[PATCH] D23446: [X86] Enable setcc to srl(ctlz) transformation on btver2 architectures.
pierre gousseau via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 10 09:25:33 PDT 2016
pgousseau updated this revision to Diff 74136.
pgousseau added a comment.
Following Simon's comments:
- Add an early return in case isCtlzFast is false
- Add a test checking that no transformations occurs on single input cases.
- Prevent transformation on 128-bit cases: int foo(__int128_t a, __int128_t b) { return a || b;} as this pessimized the codegen.
- This requires constraining the pattern to the X86 form of an equality comparison with 0.
- This remove the need from the earlier patch to modify isTypeDesirableForOp().
https://reviews.llvm.org/D23446
Files:
lib/Target/X86/X86.td
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86InstrInfo.td
lib/Target/X86/X86Subtarget.cpp
lib/Target/X86/X86Subtarget.h
test/CodeGen/X86/lzcnt-zext-cmp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23446.74136.patch
Type: text/x-patch
Size: 19230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161010/059d17a9/attachment.bin>
More information about the llvm-commits
mailing list