https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61926
Bug ID: 61926 Summary: const-anchor optimisation is sensitive to ordering Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rsandifo at gcc dot gnu.org Target: mips*-*-* gcc.target/mips/const-anchor-1.c tests that cse uses constant anchors for: g (0x1233ffff, 0x12340001); But this does not work for: g (0x12340001, 0x1233ffff); since the constant that provides the 0x12340000 anchor then comes after the constant that requires it. Maybe this could fixed by doing the anchor optimisation in gcse.c instead, although that probably isn't trivial. Related to PR33699.