This is an archive of the discontinued LLVM Phabricator instance.

don't prevent a vselect of constants from becoming a single load (PR20648)
ClosedPublic

Authored by spatel on Aug 15 2014, 11:25 AM.

Details

Summary

Fix for PR20648 - http://llvm.org/bugs/show_bug.cgi?id=20648

This patch checks the operands of a vselect to see if all values are constants. If yes, bail out of any further attempts to create a blend or shuffle because SelectionDAGLegalize knows how to turn this kind of vselect into a single load.

This already happens for machines without SSE4.1, so the added checks just send more targets down that path.

Diff Detail

Repository
rL LLVM

Event Timeline

spatel updated this revision to Diff 12565.Aug 15 2014, 11:25 AM
spatel retitled this revision from to don't prevent a vselect of constants from becoming a single load (PR20648).
spatel updated this object.
spatel edited the test plan for this revision. (Show Details)
spatel added reviewers: chandlerc, rafael, nadav.
spatel added a subscriber: Unknown Object (MLST).

This seems fine to me, but I know Filipe has been looking at build-vector and related code paths in the x86 backend so I'd like to make sure he's ok sending more code down that path before you submit.

Thanks!

filcab edited edge metadata.Aug 20 2014, 9:39 AM

LGTM. It's the usual "bail out since we can deal with this later"

Filipe
spatel closed this revision.Aug 20 2014, 1:44 PM
spatel updated this revision to Diff 12711.

Closed by commit rL216121 (authored by @spatel).