]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/88418 (ICE in extract_insn, at recog.c:2305 (error: unrecogniz...
authorUros Bizjak <uros@gcc.gnu.org>
Fri, 21 Dec 2018 18:11:04 +0000 (19:11 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 21 Dec 2018 18:11:04 +0000 (19:11 +0100)
Backport from mainline
2018-12-10  Uros Bizjak  <ubizjak@gmail.com>

PR target/88418
* config/i386/i386.c (ix86_expand_sse_cmp): For vector modes,
check operand 1 with vector_operand predicate.
(ix86_expand_sse_movcc): For vector modes, check op_true with
vector_operand, not nonimmediate_operand.

testsuite/ChangeLog:

Backport from mainline
2018-12-10  Uros Bizjak  <ubizjak@gmail.com>

PR target/88418
* gcc.target/i386/pr88418.c: New test.

From-SVN: r267332

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr88418.c [new file with mode: 0644]

index 56b1d8f82944aa4a51d6e75873d6342f58e07d4f..a8112a3866b98868f0d1acc6b9fa8258d28c56d1 100644 (file)
@@ -1,11 +1,11 @@
 2018-12-19  Bill Schmidt  <wschmidt@linux.ibm.com>
 
-        Backport from mainline
-        2018-12-18  Bill Schmidt  <wschmidt@linux.ibm.com>
+       Backport from mainline
+       2018-12-18  Bill Schmidt  <wschmidt@linux.ibm.com>
 
-        * doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
-        Describe when a typedef name can be used as the type specifier for
-        a vector type, and when it cannot.
+       * doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
+       Describe when a typedef name can be used as the type specifier for
+       a vector type, and when it cannot.
 
 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
        (dwarf2out_switch_text_section): Generate a local label for the second
        function sub-section and apply it as the second FDE start label.
-       * gcc/final.c (final_scan_insn_1): Emit second FDE label after the second
-       sub-section start.
+       * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
+       second sub-section start.
 
 2018-11-26  Iain Sandoe  <iain@sandoe.co.uk>
 
        2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
+
        * config/darwin.c
        (darwin_function_switched_text_sections): Delete.
        * gcc/config/darwin.h
index e74f37f1ca07e17001740073a3bcdc6b5c0e12a9..637ac5fa98ec26d6df6068f9b3a5fbc712489e1e 100644 (file)
@@ -24118,7 +24118,7 @@ ix86_expand_sse_fp_minmax (rtx dest, enum rtx_code code, rtx cmp_op0,
   return true;
 }
 
-/* Expand an sse vector comparison.  Return the register with the result.  */
+/* Expand an SSE comparison.  Return the register with the result.  */
 
 static rtx
 ix86_expand_sse_cmp (rtx dest, enum rtx_code code, rtx cmp_op0, rtx cmp_op1,
@@ -24144,9 +24144,12 @@ ix86_expand_sse_cmp (rtx dest, enum rtx_code code, rtx cmp_op0, rtx cmp_op1,
   else
     cmp_mode = cmp_ops_mode;
 
-
   cmp_op0 = force_reg (cmp_ops_mode, cmp_op0);
-  if (!nonimmediate_operand (cmp_op1, cmp_ops_mode))
+
+  int (*op1_predicate)(rtx, machine_mode)
+    = VECTOR_MODE_P (cmp_ops_mode) ? vector_operand : nonimmediate_operand;
+
+  if (!op1_predicate (cmp_op1, cmp_ops_mode))
     cmp_op1 = force_reg (cmp_ops_mode, cmp_op1);
 
   if (optimize
@@ -24266,7 +24269,7 @@ ix86_expand_sse_movcc (rtx dest, rtx cmp, rtx op_true, rtx op_false)
       rtx (*gen) (rtx, rtx, rtx, rtx) = NULL;
       rtx d = dest;
 
-      if (!nonimmediate_operand (op_true, mode))
+      if (!vector_operand (op_true, mode))
        op_true = force_reg (mode, op_true);
 
       op_false = force_reg (mode, op_false);
index 8344276af91553f85c2b5d7c68efe6fc940adb0c..b8d74c51a7e08670428ff4fbd0dd94c8daa0f851 100644 (file)
@@ -1,3 +1,11 @@
+2018-12-21  Uros Bizjak  <ubizjak@gmail.com>
+
+       Backport from mainline
+       2018-12-10  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/88418
+       * gcc.target/i386/pr88418.c: New test.
+
 2018-12-17  Senthil Kumar Selvaraj  <senthilkumar.selvaraj@microchip.com>
 
        Backport from trunk
diff --git a/gcc/testsuite/gcc.target/i386/pr88418.c b/gcc/testsuite/gcc.target/i386/pr88418.c
new file mode 100644 (file)
index 0000000..3c04443
--- /dev/null
@@ -0,0 +1,15 @@
+/* PR target/88418 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -fpack-struct -msse4.1 -mno-avx" } */
+
+typedef long long v2di __attribute__ ((__vector_size__ (16)));
+
+union df {
+  v2di se[2];
+};
+
+void
+qg (union df *jz, union df *pl)
+{
+  jz->se[0] = jz->se[0] == pl->se[0];
+}