As noted on PR53610, we can fold a 'bit splat' negation of a shifted bitmask pattern into a pair of shifts.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Please add tests w/ subtraction from a value, and then double the amount of tests by adding all the missing extra-use tests.
llvm/lib/Transforms/InstCombine/InstCombineNegator.cpp | ||
---|---|---|
193 | Use m_ImmConstant unless there's a test/need to match a constant expression. |
Comment Actions
Hm, please also add an assortment of tests where there is a trunc inbetween, we really should handle that.
llvm/lib/Transforms/InstCombine/InstCombineNegator.cpp | ||
---|---|---|
192 | Since one-use check is required, this should go into the next switch which is use-constrained. | |
193 | I think just plain m_c_And() would make more sense here. | |
194 | SplattingShAmt |
Since one-use check is required, this should go into the next switch which is use-constrained.