A combine that canonicalizes a chain of inserts that broadcasts a value into a single insert + a splat shufflevector.
This fixes PR31286, since we actually do the right thing when the broadcast is canonical.
(See "good4"test)
Paths
| Differential D27992
[InstCombine] Canonicalize insert sequences that broadcast a value into a insert + shuffle ClosedPublic Authored by mkuper on Dec 20 2016, 10:34 AM.
Details Summary A combine that canonicalizes a chain of inserts that broadcasts a value into a single insert + a splat shufflevector. This fixes PR31286, since we actually do the right thing when the broadcast is canonical.
Diff Detail Event Timelinemajnemer edited edge metadata. Comment ActionsLGTM
This revision is now accepted and ready to land.Dec 27 2016, 2:41 PM Closed by commit rL290641: [InstCombine] Canonicalize insert splat sequences into an insert + shuffle (authored by mkuper). · Explain WhyDec 27 2016, 4:28 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 82119 lib/Transforms/InstCombine/InstCombineVectorOps.cpp
test/Transforms/BBVectorize/X86/loop1.ll
test/Transforms/BBVectorize/loop1.ll
test/Transforms/BBVectorize/simple-int.ll
test/Transforms/InstCombine/broadcast.ll
test/Transforms/SLPVectorizer/X86/operandorder.ll
|
It might be more efficient to do ConstantAggregateZero::get(VectorType::get(...) instead.