On 8/8/2026 4:19 PM, Andrea Pinski wrote:
REF_REVERSE_STORAGE_ORDER is forgotten about when factor_out_conditional_load
was written up so if REF_REVERSE_STORAGE_ORDER was set, it would be lost.
If REF_REVERSE_STORAGE_ORDER was mismatched then it would mess up too.
This fixes that oversight.

Bootstrapped and tested on x86_64-linux-gnu.

        PR tree-optimization/126729

gcc/ChangeLog:

        * tree-ssa-phiopt.cc (factor_out_conditional_load): Handle
        REF_REVERSE_STORAGE_ORDER being set correctly.

gcc/testsuite/ChangeLog:

        * gcc.dg/sso/factor_load-1.c: New test.

Signed-off-by: Andrea Pinski <[email protected]>
OK.
Jeff

Reply via email to