Existing LIR recognizes CTLZ where shifting input variable right until it is zero. (Shift-Until-Zero idiom)
This commit:
- Augments Shift-Until-Zero idiom to recognize CTTZ where input variable is shifted left.
- Prepare for BitScan idiom recognition.
Paths
| Differential D55876
[LIR] Add CTTZ support ClosedPublic Authored by ychen on Dec 18 2018, 7:05 PM.
Details Summary Existing LIR recognizes CTLZ where shifting input variable right until it is zero. (Shift-Until-Zero idiom) This commit:
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Dec 20 2018, 5:38 PM Closed by commit rL350074: [LoopIdiomRecognize] Add CTTZ support (authored by ctopper). · Explain WhyDec 26 2018, 2:03 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 179162 lib/Transforms/Scalar/LoopIdiomRecognize.cpp
test/Transforms/LoopIdiom/X86/cttz.ll
|
Can you add a test case for CntPhiUsedOutsideLoop==true with shl?