[InstCombine] allow more binop (shuffle X), C transforms
authorSanjay Patel <spatel@rotateright.com>
Wed, 16 May 2018 15:15:22 +0000 (15:15 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 16 May 2018 15:15:22 +0000 (15:15 +0000)
commit2eb3512090b8a3be45d88b53b2416e6e16455efb
treee88d8ee83b126de60638e93282ec62fb141d9094
parent561228b2fa1fa7e638a10a7767df5f6f99ddaa43
[InstCombine] allow more binop (shuffle X), C transforms

The canonicalization was restricted to shuffle masks with
a 1-to-1 mapping to the constant vector, but that disqualifies
the common splat pattern. This is part of solving PR37463:
https://bugs.llvm.org/show_bug.cgi?id=37463

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