This is an archive of the discontinued LLVM Phabricator instance.

[X86][SSE] Consistently set MOVD/MOVQ load/store/move instructions to integer domain
ClosedPublic

Authored by RKSimon on Dec 5 2016, 9:51 AM.

Details

Summary

We are being inconsistent with these instructions (and all their variants.....) with a random mix of them using the default float domain.

I can add the MMX variants as well if necessary.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 80281.Dec 5 2016, 9:51 AM
RKSimon retitled this revision from to [X86][SSE] Consistently set MOVD/MOVQ load/store/move instructions to integer domain.
RKSimon updated this object.
RKSimon added reviewers: craig.topper, zvi, spatel, andreadb.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: llvm-commits.
zvi added inline comments.Dec 5 2016, 11:24 AM
test/CodeGen/X86/avx2-vbroadcast.ll
1473 ↗(On Diff #80281)

Any idea why this vmovaps hasn't changed?

RKSimon added inline comments.Dec 5 2016, 11:29 AM
test/CodeGen/X86/avx2-vbroadcast.ll
1473 ↗(On Diff #80281)

Not for certain, but those particular xor/store instructions don't interact with any domain specific instructions so it may have gotten switched to the default (float) domain.

craig.topper edited edge metadata.Dec 5 2016, 8:38 PM

Should the ones that use FR32 and FR64 in their types stay in floating point domain? Doesn't that make them likely to be near floating point code?

Should the ones that use FR32 and FR64 in their types stay in floating point domain? Doesn't that make them likely to be near floating point code?

It increases the likelihood that instructions that use the movd/movq will be in the float domain, but the movd/movq themselves will still be on the integer unit - often in cases where we should have been using movss/movsd.

A lot of this looks due to us missing so many of the movd/movq instruction enums from X86InstrInfo::getExecutionDomain/X86InstrInfo::setExecutionDomain - ideally we'd prune some of these first but I seem to recall it not being an easy task......

craig.topper accepted this revision.Dec 6 2016, 11:59 PM
craig.topper edited edge metadata.

LGTM

This revision is now accepted and ready to land.Dec 6 2016, 11:59 PM
This revision was automatically updated to reflect the committed changes.