OSDN Git Service

[InstCombine] canonicalize another raw IR rotate pattern to funnel shift
authorSanjay Patel <spatel@rotateright.com>
Tue, 8 Jan 2019 22:39:55 +0000 (22:39 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 8 Jan 2019 22:39:55 +0000 (22:39 +0000)
commit41d08309c8cfc381f03c7d5edd38a7001a45c266
treef3f3bba260d1b53af2748c25003bd904d19a8606
parentd7d79030fba0887c010619b4b7752c908f20a24e
[InstCombine] canonicalize another raw IR rotate pattern to funnel shift

This is matching the equivalent of the DAG expansion,
so it should never end up with worse perf than the
original code even if the target doesn't have a rotate
instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350672 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/rotate.ll