Message ID | 8e90535a-4b51-832b-29d5-df3c68e1a5e9@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | [rs6000] fix execution failure of parity_1.f90 on P10 [PR100952] | expand |
Hi, I refined the patch according to Segher's advice. Is this okay for trunk? Any recommendations? Thanks a lot. On 6/7/2021 上午 11:01, HAO CHEN GUI wrote: > Hi, > > The patch fixed the wrong "if" fall through in "cstore<mode>4" > expand, which causes comparison pattern expanded twice on P10. > > The attachments are the patch diff and change log file. > > Bootstrapped and tested on powerpc64le-linux with no regressions. > Is this okay for trunk? Any recommendations? Thanks a lot. > PR target/100952 * config/rs6000/rs6000.md (cstore<mode>4): Fix wrong fall through. diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 3f59b544f6a..d7c13d4e79d 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -11623,7 +11623,10 @@ (define_expand "cstore<mode>4" { /* Everything is best done with setbc[r] if available. */ if (TARGET_POWER10 && TARGET_ISEL) - rs6000_emit_int_cmove (operands[0], operands[1], const1_rtx, const0_rtx); + { + rs6000_emit_int_cmove (operands[0], operands[1], const1_rtx, const0_rtx); + DONE; + } /* Expanding EQ and NE directly to some machine instructions does not help but does hurt combine. So don't. */
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575036.html Thanks On 13/7/2021 上午 9:38, HAO CHEN GUI wrote: > Hi, > > I refined the patch according to Segher's advice. Is this okay for > trunk? Any recommendations? Thanks a lot. > > On 6/7/2021 上午 11:01, HAO CHEN GUI wrote: >> Hi, >> >> The patch fixed the wrong "if" fall through in "cstore<mode>4" >> expand, which causes comparison pattern expanded twice on P10. >> >> The attachments are the patch diff and change log file. >> >> Bootstrapped and tested on powerpc64le-linux with no regressions. >> Is this okay for trunk? Any recommendations? Thanks a lot. >>
Sorry for the delay! On Tue, Jul 13, 2021 at 09:38:33AM +0800, HAO CHEN GUI wrote: > PR target/100952 > * config/rs6000/rs6000.md (cstore<mode>4): Fix wrong fall through. > diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md > index 3f59b544f6a..d7c13d4e79d 100644 > --- a/gcc/config/rs6000/rs6000.md > +++ b/gcc/config/rs6000/rs6000.md > @@ -11623,7 +11623,10 @@ (define_expand "cstore<mode>4" > { > /* Everything is best done with setbc[r] if available. */ > if (TARGET_POWER10 && TARGET_ISEL) > - rs6000_emit_int_cmove (operands[0], operands[1], const1_rtx, const0_rtx); > + { > + rs6000_emit_int_cmove (operands[0], operands[1], const1_rtx, const0_rtx); > + DONE; > + } > > /* Expanding EQ and NE directly to some machine instructions does not help > but does hurt combine. So don't. */ Perfect. Okay for trunk and backports (but do not touch GCC 11 right now without RM approval, see <https://gcc.gnu.org/pipermail/gcc/2021-July/236837.html>). Thanks! Segher
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 3f59b544f6a..3ae7aa29c1d 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -11627,7 +11627,7 @@ (define_expand "cstore<mode>4" /* Expanding EQ and NE directly to some machine instructions does not help but does hurt combine. So don't. */ - if (GET_CODE (operands[1]) == EQ) + else if (GET_CODE (operands[1]) == EQ) emit_insn (gen_eq<mode>3 (operands[0], operands[2], operands[3])); else if (<MODE>mode == Pmode && GET_CODE (operands[1]) == NE)