re PR rtl-optimization/78671 (ICE: in extract_constrain_insn, at recog.c:2213 with...
authorVladimir Makarov <vmakarov@redhat.com>
Thu, 8 Dec 2016 21:14:42 +0000 (21:14 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Thu, 8 Dec 2016 21:14:42 +0000 (21:14 +0000)
2016-12-08  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/78671
* lra-assign.c (lra-assigns.c): Check prohibited regs for an
allocno class.

2016-12-08  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/78671
* gcc.target/i386/pr78671.c: New.

From-SVN: r243462

gcc/ChangeLog
gcc/lra-assigns.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr78671.c [new file with mode: 0644]

index ccb8281167698a6bbdde23bb702612e7a1317881..c9371f630311cfad56b3df969a5419306e854fa0 100644 (file)
@@ -1,3 +1,9 @@
+2016-12-08  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-optimization/78671
+       * lra-assign.c (lra-assigns.c): Check prohibited regs for an
+       allocno class.
+
 2016-12-08  Uros Bizjak  <ubizjak@gmail.com>
 
        * gcc.target/i386/i386.h (HARD_REGNO_NREGS): Use GENERAL_REGNO_P.
index 936a16990ef243e268569d9d084d65f0e168a1d4..e852a68fb199c249537991f8acd4ea93c0bf93a7 100644 (file)
@@ -628,9 +628,13 @@ find_hard_regno_for_1 (int regno, int *cost, int try_only_hard_regno,
        hard_regno = ira_class_hard_regs[rclass][i];
       if (! overlaps_hard_reg_set_p (conflict_set,
                                     PSEUDO_REGNO_MODE (regno), hard_regno)
-         /* We can not use prohibited_class_mode_regs because it is
-            not defined for all classes.  */
          && HARD_REGNO_MODE_OK (hard_regno, PSEUDO_REGNO_MODE (regno))
+         /* We can not use prohibited_class_mode_regs for all classes
+            because it is not defined for all classes.  */
+         && (ira_allocno_class_translate[rclass] != rclass
+             || ! TEST_HARD_REG_BIT (ira_prohibited_class_mode_regs
+                                     [rclass][PSEUDO_REGNO_MODE (regno)],
+                                     hard_regno))
          && ! TEST_HARD_REG_BIT (impossible_start_hard_regs, hard_regno)
          && (nregs_diff == 0
              || (WORDS_BIG_ENDIAN
index ba30327cb1f747365702b800332a9920ab208996..f00fcc2df382fdc9fe24e723913a003e2af28a48 100644 (file)
@@ -1,3 +1,8 @@
+2016-12-08  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-optimization/78671
+       * gcc.target/i386/pr78671.c: New.
+
 2015-12-08  Wilco Dijkstra  <wdijkstr@arm.com>
 
        PR target/78733
diff --git a/gcc/testsuite/gcc.target/i386/pr78671.c b/gcc/testsuite/gcc.target/i386/pr78671.c
new file mode 100644 (file)
index 0000000..026ff17
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-march=skylake-avx512 -Og" } */
+
+typedef unsigned __int128 u128;
+typedef unsigned __int128 v64u128 __attribute__ ((vector_size (64)));
+
+v64u128
+foo (u128 u128_3, v64u128 v64u128_3, v64u128 v64u128_2, v64u128 v64u128_1,
+     v64u128 v64u128_0)
+{
+  v64u128_0 <<= 1;
+  v64u128_2 >>= 0 != v64u128_2;
+  v64u128_3[v64u128_3[0]] &= 1;
+  v64u128_3 = v64u128_3 & 1;
+  v64u128_2 = v64u128_2 >> 1 | v64u128_2 << v64u128_1[0];
+  v64u128_0[0] >>= 127;
+  return u128_3 + v64u128_0 + v64u128_2 + v64u128_3;
+}