LowerSELECT sees the CMP with 0 and wants to use a trick with SUB
and SBB. But we can use the flags from the BSF/TZCNT.
Fixes PR46203.
Paths
| Differential D81312
[X86] Prevent LowerSELECT from causing suboptimal codegen for __builtn_ffs(X) - 1. ClosedPublic Authored by craig.topper on Jun 5 2020, 3:31 PM.
Details Summary LowerSELECT sees the CMP with 0 and wants to use a trick with SUB Fixes PR46203.
Diff Detail
Unit TestsFailed
Event TimelineThis revision is now accepted and ready to land.Jun 8 2020, 1:24 AM Closed by commit rG2328cab16ccd: [X86] Prevent LowerSELECT from causing suboptimal codegen for __builtin_ffs(X)… (authored by craig.topper). · Explain WhyJun 8 2020, 12:09 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 268954 llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/dagcombine-select.ll
|
clang-format not found in user's PATH; not linting file.