From 7e964f49026322eb357412e38ba98e14325ca80c Mon Sep 17 00:00:00 2001 From: Vladimir Makarov Date: Thu, 8 Dec 2016 21:14:42 +0000 Subject: [PATCH] re PR rtl-optimization/78671 (ICE: in extract_constrain_insn, at recog.c:2213 with -Og -march=skylake-avx512) 2016-12-08 Vladimir Makarov PR rtl-optimization/78671 * lra-assign.c (lra-assigns.c): Check prohibited regs for an allocno class. 2016-12-08 Vladimir Makarov PR rtl-optimization/78671 * gcc.target/i386/pr78671.c: New. From-SVN: r243462 --- gcc/ChangeLog | 6 ++++++ gcc/lra-assigns.c | 8 ++++++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr78671.c | 18 ++++++++++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr78671.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ccb82811676..c9371f63031 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-12-08 Vladimir Makarov + + PR rtl-optimization/78671 + * lra-assign.c (lra-assigns.c): Check prohibited regs for an + allocno class. + 2016-12-08 Uros Bizjak * gcc.target/i386/i386.h (HARD_REGNO_NREGS): Use GENERAL_REGNO_P. diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index 936a16990ef..e852a68fb19 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ba30327cb1f..f00fcc2df38 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-12-08 Vladimir Makarov + + PR rtl-optimization/78671 + * gcc.target/i386/pr78671.c: New. + 2015-12-08 Wilco Dijkstra 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 index 00000000000..026ff17af4f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr78671.c @@ -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; +} -- 2.30.2