llvm-project/llvm/test/Transforms/Scalarizer
Juneyoung Lee 1fc992bd86 [Scalarizer] Use poison as insertelement's placeholder
This patch makes Scalarizer to use poison as insertelement's placeholder.

It contains two changes in Scalarizer.cpp, and the both changes does not change the semantics of the optimized program.
It is because the placeholder value (poison) is already completely hidden by following insertelement instructions.

The first change at visitBitCastInst() creates poison vector of MidTy and consecutively inserts FanIn times,
which is # of elems of MidTy.
The second change at ScalarizerVisitor::finish() creates poison with Op->getType(), and it is filled with
Count insertelements.

The test diffs show that the poison value is never exposed after insertelements.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D93989
2021-01-04 00:35:28 +09:00
..
basic-inseltpoison.ll [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
basic.ll [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
cache-bug.ll
constant-extractelement.ll [Scalarizer] ExtractElement handling w/ constant extract index 2020-07-06 13:19:32 +03:00
constant-insertelement.ll [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
crash-bug.ll [Scalarizer] When gathering scattered scalar, don't replace it with itself 2020-07-07 17:03:53 +03:00
dbginfo.ll
dbgloc-bug-inseltpoison.ll Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
dbgloc-bug.ll
global-bug-2.ll [Scalarizer] Avoid changing name of non-instructions 2020-09-15 14:15:50 +02:00
global-bug.ll [Scalarizer] Avoid updating the name of globals 2020-08-24 21:55:03 +02:00
intrinsics.ll [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
order-bug-inseltpoison.ll [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
order-bug.ll [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
phi-bug-inseltpoison.ll Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
phi-bug.ll
phi-unreachable-pred.ll [Scalarizer] Centralize instruction DCE 2020-07-07 01:12:51 +03:00
scatter-order.ll [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
store-bug.ll
variable-extractelement.ll [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
variable-insertelement.ll [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
vector-gep.ll [IR] Let IRBuilder's CreateVectorSplat/CreateShuffleVector use poison as placeholder 2020-12-30 04:21:04 +09:00