This is an archive of the discontinued LLVM Phabricator instance.

[X86] Teach load folding to accept scalar _Int users of MOVSS/MOVSD.
ClosedPublic

Authored by ab on Jun 18 2015, 4:38 PM.

Details

Summary

This fixes PR23349: the _Int instructions are special, in that they operate on the full VR128 instead of FR32. The load folding then looks at MOVSS, at the user, and bails out when it sees a size mismatch.

What we really know is that the rm_Int instructions don't load the higher lanes, so folding is fine.

This happens for the straightforward intrinsic code, e.g.:

_mm_add_ss(a, _mm_load_ss(p));

Diff Detail

Repository
rL LLVM

Event Timeline

ab updated this revision to Diff 27971.Jun 18 2015, 4:38 PM
ab retitled this revision from to [X86] Teach load folding to accept scalar _Int users of MOVSS/MOVSD..
ab updated this object.
ab edited the test plan for this revision. (Show Details)
ab added a reviewer: spatel.
ab added a subscriber: Unknown Object (MLST).
spatel accepted this revision.Jun 19 2015, 7:09 AM
spatel edited edge metadata.

LGTM. Thanks!

lib/Target/X86/X86InstrInfo.cpp
5298 ↗(On Diff #27971)

"Check if \p LoadMI is a partial register load that we can fold into \p MI" ?

This revision is now accepted and ready to land.Jun 19 2015, 7:09 AM
This revision was automatically updated to reflect the committed changes.