[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)
commitd023dd60e944886a9d5a0b1dbf46f67d43293af8
tree0bd98a23cbc0515a99f4b9598c849b83fca7b902
parent016220549dd7b1e402f9738e43a2b698e9c35c88
[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.

llvm-svn: 350672
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/rotate.ll