Patch to remove extra bitcasts from shuffles, this is often a legacy of XformToShuffleWithZero being used to combine bitmaskings (of float vectors bitcast to integer vectors) into shuffles:
bitcast(shuffle(bitcast(s0),bitcast(s1))) -> shuffle(s0,s1)
Paths
| Differential D9097
[DAGCombiner] Remove extra bitcasts surrounding vector shuffles ClosedPublic Authored by RKSimon on Apr 19 2015, 7:37 AM.
Details Summary Patch to remove extra bitcasts from shuffles, this is often a legacy of XformToShuffleWithZero being used to combine bitmaskings (of float vectors bitcast to integer vectors) into shuffles: bitcast(shuffle(bitcast(s0),bitcast(s1))) -> shuffle(s0,s1)
Diff Detail
Event TimelineComment Actions Hi Simon, This looks mostly good, just one question. Thanks,
RKSimon edited edge metadata. Comment ActionsThanks Quentin, I've added an extra test for peeking through the bitcasted masked constant vectors. The UNDEF implementation was never getting hit so I dropped that for simplicity (visitVECTOR_SHUFFLE has support for cases where the second operand is UNDEF already). This revision is now accepted and ready to land.Apr 22 2015, 9:35 AM Closed by commit rL235578: [DAGCombiner] Remove extra bitcasts surrounding vector shuffles (authored by RKSimon). · Explain WhyApr 23 2015, 1:46 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 23992 lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/combine-or.ll
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Please use instnamer to have easier to update tests.