https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121306
Bug ID: 121306 Summary: [16 Regression] testcase failures after r16-2614-g965564eafb721f on x86_64 Product: gcc Version: 14.2.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Target: x86_64 gcc.target/i386/pr78904-1b.c started to fail after this change (this is not fixed by the fix for the wrong code issue; PR 121302). with this change we have: ``` Trying 9 -> 10: 9: {r107:QI=zero_extract(r110:DI,0x8,0x8)#0&zero_extract(r103:DI,0x8,0x8)#0;clobber flags:CC;} REG_UNUSED flags:CC REG_DEAD r110:DI 10: zero_extract(r103:DI,0x8,0x8)=r107:QI#0 REG_DEAD r107:QI Failed to match this instruction: (set (zero_extract:DI (reg/v:DI 103 [ a ]) (const_int 8 [0x8]) (const_int 8 [0x8])) (lshiftrt:DI (and:DI (reg:DI 110 [ b ]) (reg/v:DI 103 [ a ])) (const_int 8 [0x8]))) Failed to match this instruction: (set (reg/v:DI 103 [ a ]) (ior:DI (and:DI (reg/v:DI 103 [ a ]) (const_int -65281 [0xffffffffffff00ff])) (and:DI (ashift:DI (lshiftrt:DI (and:DI (reg:DI 110 [ b ]) (reg/v:DI 103 [ a ])) (const_int 8 [0x8])) (const_int 8 [0x8])) (const_int 65280 [0xff00])))) ``` But without we get: ``` Trying 9 -> 10: 9: {r107:QI=zero_extract(r110:DI,0x8,0x8)#0&zero_extract(r103:DI,0x8,0x8)#0;clobber flags:CC;} REG_UNUSED flags:CC REG_DEAD r110:DI 10: zero_extract(r103:DI,0x8,0x8)=r107:QI#0 REG_DEAD r107:QI Successfully matched this instruction: (set (zero_extract:DI (reg/v:DI 103 [ a ]) (const_int 8 [0x8]) (const_int 8 [0x8])) (zero_extract:DI (and:DI (reg:DI 110 [ b ]) (reg/v:DI 103 [ a ])) (const_int 8 [0x8]) (const_int 8 [0x8]))) ``` I think this is because we lost the `&0xff` which was required to recognize the zero_extract.