This is a simple patch that adds folding from insertelement vec, poison, idx into vec.
Alive2 proof: https://alive2.llvm.org/ce/z/2y2vbC
Paths
| Differential D93994
[InstSimplify] Fold insertelement vec, poison, idx into vec ClosedPublic Authored by aqjune on Jan 3 2021, 9:05 AM.
Details Summary This is a simple patch that adds folding from insertelement vec, poison, idx into vec. Alive2 proof: https://alive2.llvm.org/ce/z/2y2vbC
Diff Detail
Event Timeline
aqjune added inline comments. Comment Actions Resolve failures If the diffs look okay, I'll split this into two commits (one with the ConstantVector and another one with the InstSimplify) when landing. This revision is now accepted and ready to land.Jan 6 2021, 9:58 AM This revision was landed with ongoing or failed builds.Jan 6 2021, 5:10 PM Closed by commit rG3a60a1f16570: [InstSimplify] Fold insertelement vec, poison, idx into vec (authored by aqjune). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 315027 llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstCombine/extractelement-inseltpoison.ll
llvm/test/Transforms/InstCombine/extractelement.ll
llvm/test/Transforms/InstSimplify/insertelement.ll
llvm/test/Transforms/SLPVectorizer/X86/alternate-int.ll
|
You can also switch this to use isGuaranteedNotToBePoison() to be more precise.