From: segher Date: Tue, 24 Nov 2015 06:43:20 +0000 (+0000) Subject: combine: Handle aborts in is_parallel_of_n_reg_sets (PR68381) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af7e839751f225946ccf763122868852656ea7e3;p=thirdparty%2Fgcc.git 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230786 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e770638354df..b3538c487351 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-24 Segher Boessenkool + + PR rtl-optimization/68381 + * combine.c (is_parallel_of_n_reg_sets): Return false if the pattern + is poisoned. + 2015-11-23 Nick Clifton Jeff Law diff --git a/gcc/combine.c b/gcc/combine.c index 2a66fd5c8bdf..4958d3bfc636 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;