summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/inline-asm-fpstack2.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/inline-asm-fpstack2.ll')
-rw-r--r--test/CodeGen/X86/inline-asm-fpstack2.ll15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/CodeGen/X86/inline-asm-fpstack2.ll b/test/CodeGen/X86/inline-asm-fpstack2.ll
index ffa6ee6..78037e0 100644
--- a/test/CodeGen/X86/inline-asm-fpstack2.ll
+++ b/test/CodeGen/X86/inline-asm-fpstack2.ll
@@ -1,10 +1,21 @@
-; RUN: llc < %s -march=x86 > %t
-; RUN: grep {fld %%st(0)} %t
+; RUN: llc < %s -march=x86 | FileCheck %s
; PR4185
+; Passing a non-killed value to asm in {st}.
+; Make sure it is duped before.
+; asm kills st(0), so we shouldn't pop anything
+; CHECK: fld %st(0)
+; CHECK: fistpl
+; CHECK-NOT: fstp
+; CHECK: fistpl
+; CHECK-NOT: fstp
+; CHECK: ret
define void @test() {
return:
call void asm sideeffect "fistpl $0", "{st}"(double 1.000000e+06)
call void asm sideeffect "fistpl $0", "{st}"(double 1.000000e+06)
ret void
}
+
+; A valid alternative would be to remat the constant pool load before each
+; inline asm.
OpenPOWER on IntegriCloud