OSDN Git Service

[InstCombine] don't propagate wider shufflevector arguments to predecessors
authorSanjay Patel <spatel@rotateright.com>
Fri, 28 Sep 2018 15:24:41 +0000 (15:24 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 28 Sep 2018 15:24:41 +0000 (15:24 +0000)
commit331a5ec71329eb0a6d46104ff00af89598f4292a
tree02297e5238b8a917f00497525e3240ae222f463e
parent5c806329ca45fe87128fb9c721ad355219e10b82
[InstCombine] don't propagate wider shufflevector arguments to predecessors

InstCombine would propagate shufflevector insts that had wider output vectors onto
predecessors, which would sometimes push undef's onto the divisor of a div/rem and
result in bad codegen.

I've fixed this by just banning propagating shufflevector back if the result of
the shufflevector is wider than the input vectors.

Patch by: @sheredom (Neil Henning)

Differential Revision: https://reviews.llvm.org/D52548

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343329 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Instructions.h
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
test/Transforms/InstCombine/vec_shuffle.ll