OSDN Git Service

[InstCombine] drop poison flags in SimplifyVectorDemandedElts
authorSanjay Patel <spatel@rotateright.com>
Thu, 4 Oct 2018 21:36:50 +0000 (21:36 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 4 Oct 2018 21:36:50 +0000 (21:36 +0000)
commitf2f6f77ac448dc048964957a5e3f01bbf6f45271
treec1c4ec929b0cfad183f8aee8de2b9cbdacdaee26
parent95dbc86d2d76eb4fa7855f2d0f30a70e3851e03d
[InstCombine] drop poison flags in SimplifyVectorDemandedElts

We established the (unfortunately complicated) rules for UB/poison
propagation with vector ops in:
D48893
D48987
D49047

It's clear from the affected tests that we are potentially creating
poison where none existed before the transforms. For add/sub/mul,
the answer is simple: just drop the flags because the extra undef
vector lanes are generally more valuable for analysis and codegen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343819 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
test/Transforms/InstCombine/X86/x86-muldq.ll
test/Transforms/InstCombine/shuffle_select.ll
test/Transforms/InstCombine/vec_demanded_elts.ll