[InstCombine] canonicalize raw IR rotate patterns to funnel shift
authorSanjay Patel <spatel@rotateright.com>
Tue, 1 Jan 2019 21:51:39 +0000 (21:51 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 1 Jan 2019 21:51:39 +0000 (21:51 +0000)
commit654e6aabb9f25d0d0fbad194ae6e26dd96c9e9db
tree24050f1ba2ef6fb0ab5a7667646fac810bfb6e2c
parent00b390a00044ba15f6e1b7c3200d86fc576ccdf7
[InstCombine] canonicalize raw IR rotate patterns to funnel shift

The final piece of IR-level analysis to allow this was committed with:
rL350188

Using the intrinsics should improve transforms based on cost models
like vectorization and inlining.

The backend should be prepared too, so we can now canonicalize more
sequences of shift/logic to the intrinsics and know that the end
result should be equal or better to the original code even if the
target does not have an actual rotate instruction.

llvm-svn: 350199
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/rotate.ll
llvm/test/Transforms/PhaseOrdering/rotate.ll