On 12/28/2021 6:27 PM, Xionghu Luo via Gcc-patches wrote:
Bootstrapped and regtested on powerpc64le-linux-gnu {P10,P9}
powerpc64-linux-gnu {P8, P7} and X86.  OK for master?

gcc/ChangeLog:

        PR 90323
        * simplify-rtx.c (simplify_context::simplify_binary_operation_1): Relax
        C from constant to constant or reg.

gcc/testsuite/ChangeLog:

        * gcc.target/powerpc/pr90323.c: New test.
If C is not a constant and the target does not have and-complement instructions, then this is likely worse than the original.  If you want to do this transformation, then you probably need to be checking target costs.

Jeff

Reply via email to