On Apr 7, 2022, HAO CHEN GUI via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> Gentle ping this: > https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590958.html > Thanks >> On 28/2/2022 上午 11:17, HAO CHEN GUI wrote: >>> This patch corrects the match pattern in pr56605.c. The former pattern >>> is wrong and test case fails with GCC11. It should match following insn on >>> each subtarget after mode promotion is disabled. The patch need to be >>> backported to GCC11. >>> -/* { dg-final { scan-rtl-dump-times {\(compare:CC >>> \((?:and|zero_extend):(?:DI) \((?:sub)?reg:[SD]I} 1 "combine" } } */ >>> +/* { dg-final { scan-rtl-dump-times {\(compare:CC \(and:SI \(subreg:SI >>> \(reg:DI} 1 "combine" } } */ How about this less strict change instead? ppc: testsuite: PROMOTE_MODE fallout pr56605 [PR102146] The test expects a compare of DImode values, but after the removal of PROMOTE_MODE from rs6000/, we get SImode. Adjust the expectations. Tested with gcc-11 targeting ppc64-vx7r2. Ok to install? for gcc/testsuite/ChangeLog PR target/102146 * gcc.target/powerpc/pr56605.c: Accept SImode compare operand. --- gcc/testsuite/gcc.target/powerpc/pr56605.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c index fdedbfc573dd8..7695f87db6f66 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr56605.c +++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c @@ -11,5 +11,5 @@ void foo (short* __restrict sb, int* __restrict ia) ia[i] = (int) sb[i]; } -/* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:DI) \((?:sub)?reg:[SD]I} 1 "combine" } } */ +/* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:[SD]I) \((?:sub)?reg:[SD]I} 1 "combine" } } */ -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org>