]> granicus.if.org Git - llvm/commit
[InstCombine] canonicalize rotate right by constant to rotate left
authorSanjay Patel <spatel@rotateright.com>
Sun, 17 Mar 2019 19:08:00 +0000 (19:08 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sun, 17 Mar 2019 19:08:00 +0000 (19:08 +0000)
commit051e78c201382cf76eb86ea914dfc1d8f31d749b
tree3b783f7342bd72f35fbef4c149623d8d3cf9c94f
parent3ce62d30c2710a0896b356810c7bc3d5591b3011
[InstCombine] canonicalize rotate right by constant to rotate left

This was noted as a backend problem:
https://bugs.llvm.org/show_bug.cgi?id=41057
...and subsequently fixed for x86:
rL356121
But we should canonicalize these in IR for the benefit of all targets
and improve IR analysis such as CSE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356338 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/fsh.ll