aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2015-11-24 07:43:20 +0100
committerSegher Boessenkool <segher@gcc.gnu.org>2015-11-24 07:43:20 +0100
commit7d906d07ed736abc854db2e770d5e5e07730581c (patch)
treee8e7486d62311cdca103bda26c258d6570103af2 /gcc
parentd2c9e8ed7ae8cde8e64405eb130c9d7d99c68856 (diff)
downloadgcc-7d906d07ed736abc854db2e770d5e5e07730581c.zip
gcc-7d906d07ed736abc854db2e770d5e5e07730581c.tar.gz
gcc-7d906d07ed736abc854db2e770d5e5e07730581c.tar.bz2
combine: Handle aborts in is_parallel_of_n_reg_sets (PR68381)
Some users of is_parallel_of_n_reg_sets disregard the clobbers in a parallel after it has returned "yes, this is a parallel of N sets and maybe some clobbers". But combine uses a clobber of const0_rtx to indicate substitution failure, so this leads to disaster. Fix this by checking for such special clobbers in is_parallel_of_n_reg_sets. PR rtl-optimization/68381 * combine.c (is_parallel_of_n_reg_sets): Return false if the pattern is poisoned. From-SVN: r230786
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/combine.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e770638..b3538c4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-11-24 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR rtl-optimization/68381
+ * combine.c (is_parallel_of_n_reg_sets): Return false if the pattern
+ is poisoned.
+
2015-11-23 Nick Clifton <nickc@redhat.com>
Jeff Law <law@redhat.com>
diff --git a/gcc/combine.c b/gcc/combine.c
index 2a66fd5..4958d3b 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2512,7 +2512,8 @@ is_parallel_of_n_reg_sets (rtx pat, int n)
|| !REG_P (SET_DEST (XVECEXP (pat, 0, i))))
return false;
for ( ; i < len; i++)
- if (GET_CODE (XVECEXP (pat, 0, i)) != CLOBBER)
+ if (GET_CODE (XVECEXP (pat, 0, i)) != CLOBBER
+ || XEXP (XVECEXP (pat, 0, i), 0) == const0_rtx)
return false;
return true;