https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86882
--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> --- Also suspicious combine transformation before the failure: Trying 10, 11 -> 13: 10: r94:SI=zero_extend(r92:QI) 11: {r95:SI=r94:SI^0x101;clobber flags:CC;} REG_DEAD r94:SI REG_UNUSED flags:CC 13: {r97:HI=r95:SI#0^r92:QI#0;clobber flags:CC;} REG_DEAD r95:SI REG_DEAD r92:QI REG_UNUSED flags:CC Failed to match this instruction: (parallel [ (set (reg:HI 97) (xor:HI (and:HI (subreg:HI (reg:QI 92 [ <retval> ]) 0) (const_int -256 [0xffffffffffffff00])) (const_int 257 [0x101]))) (clobber (reg:CC 17 flags)) ]) Failed to match this instruction: (set (reg:HI 97) (xor:HI (and:HI (subreg:HI (reg:QI 92 [ <retval> ]) 0) (const_int -256 [0xffffffffffffff00])) (const_int 257 [0x101]))) Successfully matched this instruction: (set (reg:HI 95 [ jd ]) (and:HI (subreg:HI (reg:QI 92 [ <retval> ]) 0) (const_int -256 [0xffffffffffffff00]))) Successfully matched this instruction: (set (reg:HI 97) (xor:HI (reg:HI 95 [ jd ]) (const_int 257 [0x101]))) allowing combination of insns 10, 11 and 13 original costs 4 + 4 + 4 = 12 replacement costs 6 + 4 = 10 deferring deletion of insn with uid = 10. modifying insn i2 11: {r95:HI=r92:QI#0&0xffffffffffffff00;clobber flags:CC;} REG_UNUSED flags:CC REG_DEAD r92:QI deferring rescan insn with uid = 11. modifying insn i3 13: {r97:HI=r95:HI^0x101;clobber flags:CC;} REG_UNUSED flags:CC REG_DEAD r95:HI deferring rescan insn with uid = 13. The problematic insn: (set (reg:HI 95 [ jd ]) (and:HI (subreg:HI (reg:QI 92 [ <retval> ]) 0) (const_int -256 [0xffffffffffffff00]))) clears defined bits from the subreg and keeps undefined bits from the paradoxical subreg.