If a 64-bit value is tested against a bit which is known to be in the range
[0..32) (modulo 64), we can use the 32-bit BT instruction, which has a slightly
shorter encoding.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
15317 ↗ | (On Diff #75387) | Would this be cleaner with DAG.MaskedValueIsZero()? |
Comment Actions
Use MaskedValueIsZero
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
15317 ↗ | (On Diff #75387) | Yes, done. |
Comment Actions
LGTM.
Although it seems like this could be a universal strength reduction optimization in IR. Ie, we should shrink these ops with the help of the datalayout in InstCombine?