[PATCH] D45863: [InstCombine] Support BitTests in ThreeWayComparison. Mismatched types
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 19 22:24:11 PDT 2018
mkazantsev created this revision.
mkazantsev added reviewers: craig.topper, lebedev.ri, spatel, reames.
mkazantsev added dependencies: D45856: [InstCombine] Support BitTests in ThreeWayComparison. General case, part 2, D45862: [InstCombine] Relax restriction in foldSelectInstWithICmp for sake of smaller code size.
In this patch we continue supporting BitTests of the highest bit in the ThreeWayComparison
matcher in the InstCombine (see problem's description in the message of https://reviews.llvm.org/D45854).
This patch adds support for the transform of
%c2 = icmp slt i64 %a, 0
%select1 = select i1 %c2, i32 %Less, i32 %Greater
to
(trunc (%a s>> 64) to i32) - (%Less - %Greater) + %Greater
https://reviews.llvm.org/D45863
Files:
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/three-way-comparison.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45863.143227.patch
Type: text/x-patch
Size: 8438 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180420/37a4711d/attachment-0001.bin>
More information about the llvm-commits
mailing list