[X86] Refactored stack memory folding tests to explicitly force register spilling
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 16 Jan 2015 09:32:54 +0000 (09:32 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 16 Jan 2015 09:32:54 +0000 (09:32 +0000)
commit3717f7c80cb474dd9b4e5bbb8d4d41610c4b69fa
tree3abafda063dc7ed117e5aae5ca4e8f21ab1efba8
parent6a7c74de33833116a20da2858e89d07159572989
[X86] Refactored stack memory folding tests to explicitly force register spilling

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).

More exhaustive tests will follow shortly, I've added some extra tests (the xmm versions of some of the existing folding tests) as a starting point.

Differential Revision: http://reviews.llvm.org/D6932

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226264 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGen/X86/avx1-stack-reload-folding.ll