[InstCombine] narrowRotate - minor refactoring for funnel shift support. NFC.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 16 Oct 2020 10:27:16 +0000 (11:27 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 16 Oct 2020 10:27:28 +0000 (11:27 +0100)
commit1cf347e48b588ea277cc550b3ac57ecfa540618c
treea99700c61ec8bd68b991ee812877878b66d58f57
parente8d9ee9c7cfe46d9b552111a27d866fce0498b0a
[InstCombine] narrowRotate - minor refactoring for funnel shift support. NFC.

Prep work for PR35155 - renamed narrowRotate to narrowFunnelShift, rewrote some comments and adjusted code to collect separate shift values, although we bail if they don't match (still only rotations are only actually folded).

I'm trying to match matchFunnelShift as much as possible in case we finally get to merge these one day.
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h