[InstCombine] allow shuffle+binop canonicalization with widening shuffles
authorSanjay Patel <spatel@rotateright.com>
Mon, 27 Aug 2018 22:41:44 +0000 (22:41 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 27 Aug 2018 22:41:44 +0000 (22:41 +0000)
commit42d31c20a84af29b991d61eefec8d65378cf56f7
tree7dfa6f42add035b0aad24ea878f5424f32ddb9c1
parent20d78921437054d186a78fee0ac09cce4dafa363
[InstCombine] allow shuffle+binop canonicalization with widening shuffles

This lines up with the behavior of an existing transform where if both
operands of the binop are shuffled, we allow moving the binop before the
shuffle regardless of whether the shuffle changes the size of the vector.

llvm-svn: 340787
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/vec_shuffle.ll