summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/partial-fold32.ll
diff options
context:
space:
mode:
authorMichael Kuperstein <mkuper@google.com>2016-11-23 18:33:49 +0000
committerMichael Kuperstein <mkuper@google.com>2016-11-23 18:33:49 +0000
commit47eb85a0033fd21764fe100e736c3ec54d4f741f (patch)
tree87b3a0867fc7cfd6773183ffa1082de972f1bbc8 /llvm/test/CodeGen/X86/partial-fold32.ll
parent3c3fe5d885b8772634a7571907400580873ab611 (diff)
downloadbcm5719-llvm-47eb85a0033fd21764fe100e736c3ec54d4f741f.tar.gz
bcm5719-llvm-47eb85a0033fd21764fe100e736c3ec54d4f741f.zip
[X86] Allow folding of stack reloads when loading a subreg of the spilled reg
We did not support subregs in InlineSpiller:foldMemoryOperand() because targets may not deal with them correctly. This adds a target hook to let the spiller know that a target can handle subregs, and actually enables it for x86 for the case of stack slot reloads. This fixes PR30832. Differential Revision: https://reviews.llvm.org/D26521 llvm-svn: 287792
Diffstat (limited to 'llvm/test/CodeGen/X86/partial-fold32.ll')
-rw-r--r--llvm/test/CodeGen/X86/partial-fold32.ll3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/X86/partial-fold32.ll b/llvm/test/CodeGen/X86/partial-fold32.ll
index ba3f73ba90f..7fc1ed3521e 100644
--- a/llvm/test/CodeGen/X86/partial-fold32.ll
+++ b/llvm/test/CodeGen/X86/partial-fold32.ll
@@ -3,8 +3,7 @@
define fastcc i8 @fold32to8(i32 %add, i8 %spill) {
; CHECK-LABEL: fold32to8:
; CHECK: movl %ecx, (%esp) # 4-byte Spill
-; CHECK: movl (%esp), %eax # 4-byte Reload
-; CHECK: subb %al, %dl
+; CHECK: subb (%esp), %dl # 1-byte Folded Reload
entry:
tail call void asm sideeffect "", "~{eax},~{ebx},~{ecx},~{edi},~{esi},~{ebp},~{dirflag},~{fpsr},~{flags}"()
%trunc = trunc i32 %add to i8
OpenPOWER on IntegriCloud