On Wed, Sep 16, 2026 at 04:33:22PM +0530, Kishan Parmar wrote: > Hello All, > > Below patch is bootstrapped and regtested on powerpc64le-linux with no > regressions. > > Commit r17-3977-gfb21f1686938d6 introduced aop_optab (any_or_plus) to > allow backends control over choices of PLUS vs. IOR during expansion. > However, this caused a code-generation regression on rs6000 where > bitfield stores (like those in testcase gcc.target/powerpc/20050603-3.c) > were expanded using PLUS instead of logical IOR, preventing optimization > into rlwimi. Additionally, this commit introduced an ICE on bootstrap > during the cse1 pass after adding aop<mode>3 expander in rs6000.md > because simplify-rtx was missing case label for the new AOP RTX code. > > This patch resolves both issues by: > 1) Defining the direct aop<mode>3 expander for rs6000 to always emit > logical IOR, restoring the expected code-generation and fixing the > regression. > 2) Adding the case label for AOP in simplify_binary_operation_1 to > safely prevent the compiler crash. > > No new testcase is added since the existing testcase > gcc.target/powerpc/20050603-3.c will work for this. > > 2026-09-16 Kishan Parmar <[email protected]> > > gcc/ChangeLog: > PR target/127399 > * config/rs6000/rs6000.md (aop<mode>3): New define_expand to specify > logical IOR for any_or_plus (AOP) operations on SDI modes. > * simplify-rtx.cc (simplify_binary_operation_1): Add case AOP to > safely handle and simplify the new AOP RTX binary code.
The PowerPC code looks ok for the master branch, once you remove the pixop comment. I'll let a middle end reviewer comment on the simplify_rtx changes at the moment. -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: [email protected]
