This saves a bit of codesize.
This is valid if the sign-flags are not used:
Differential D149027
[X86] Add peephole to convert `(Cmp Op32/Op64, Imm8)` -> `(Cmp Op16/Op8, Imm8)` goldstein.w.n on Apr 23 2023, 11:30 AM. Authored by
Details This saves a bit of codesize. This is valid if the sign-flags are not used:
Diff Detail
Event Timeline
Comment Actions Craig pointed out, this only benefits for %eax -> %al. Given how niche it is, going to abandon. |
OpVT.isScalarInteger() should always bee true for X86ISD::CMP I think. The isa<ConstantSDNode>(N1) would guarantee it too.