This is an archive of the discontinued LLVM Phabricator instance.

Fix a broadcast related regression on the vector shuffle lowering.
ClosedPublic

Authored by filcab on Oct 12 2014, 1:22 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

filcab updated this revision to Diff 14778.Oct 12 2014, 1:22 PM
filcab retitled this revision from to Fix a broadcast related regression on the vector shuffle lowering..
filcab updated this object.
filcab edited the test plan for this revision. (Show Details)
filcab added a reviewer: chandlerc.
filcab added a subscriber: Unknown Object (MLST).
chandlerc edited edge metadata.Oct 12 2014, 6:18 PM

Minor comments on the code.

Please fold these tests into the existing 256-bit vector shuffle tests and use the same style of file check assertions.

lib/Target/X86/X86ISelLowering.cpp
7900 ↗(On Diff #14778)

for (;;) { is my preferred spelling of an loop without a condition.

7901 ↗(On Diff #14778)

Switch on the opcode rather than an if chain. It makes it much more clear what is going on if we extend this later. Using continue makes it easy to handle the "double break" issue.

7908 ↗(On Diff #14778)

dyn_cast, and break if null. that way we only go through the cast machinery once.

7913 ↗(On Diff #14778)

I would probably precompute some part of the upper bound into a variable to make the bounds test a bit easier to read.

filcab updated this revision to Diff 14782.Oct 12 2014, 9:07 PM
filcab edited edge metadata.

Added Chandler suggested fixes.

chandlerc accepted this revision.Oct 13 2014, 12:01 AM
chandlerc edited edge metadata.

Looks good, please commit!

This revision is now accepted and ready to land.Oct 13 2014, 12:01 AM
filcab closed this revision.Oct 13 2014, 9:26 AM
filcab updated this revision to Diff 14803.

Closed by commit rL219617 (authored by @filcab).