This is an archive of the discontinued LLVM Phabricator instance.

[X86] Refactored stack memory folding tests to explicitly force register spilling
ClosedPublic

Authored by RKSimon on Jan 12 2015, 11:15 AM.

Details

Summary

The current 'big vectors' stack folded reload testing pattern is very bulky and makes it difficult to test all instructions as big vectors will tend to use only the ymm instruction implementations.

This patch changes the tests to use a nop call that lists explicit xmm registers as sideeffects, with this we can force a partial register spill of the relevant registers and then check that the reload is correctly folded. The asm generated only adds the forced spill, a nop instruction and a couple of extra labels (a fraction of the current approach).

If people are happy with this new approach I can begin adding more exhaustive tests (starting with the avx1 instructions before moving on to the sse versions) and properly uncover any issues with the memory folding tables.

I've added some extra tests (the xmm versions of some of the existing folding tests) as a starting point.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 18030.Jan 12 2015, 11:15 AM
RKSimon retitled this revision from to [X86] Refactored stack memory folding tests to explicitly force register spilling.
RKSimon updated this object.
RKSimon edited the test plan for this revision. (Show Details)
RKSimon added reviewers: qcolombet, andreadb, mkuper.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: Unknown Object (MLST).
This revision was automatically updated to reflect the committed changes.

Thanks Michael, I'll start adding the missing tests quite quickly now, along with fixes for instructions that don't currently fold.

Interestingly, phabricator didn't appear to recognise your 'LGTM.' reply - does it not like trailing fullstops?