llvm-project
5d1f27f3 - GlobalISel: neg (and x, 1) --> SIGN_EXTEND_INREG x, 1 (#131367)

Commit
186 days ago
GlobalISel: neg (and x, 1) --> SIGN_EXTEND_INREG x, 1 (#131367) The pattern ```LLVM %shl = shl i32 %x, 31 %ashr = ashr i32 %shl, 31 ``` would be combined to `G_EXT_INREG %x, 1` by GlobalISel. However InstCombine normalizes this pattern to: ```LLVM %and = and i32 %x, 1 %neg = sub i32 0, %and ``` This adds a combiner for this variant as well.
Author
Parents
Loading