]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/X86/inline-asm-fpstack2.ll
Vendor import of llvm trunk r132879:
[FreeBSD/FreeBSD.git] / test / CodeGen / X86 / inline-asm-fpstack2.ll
1 ; RUN: llc < %s -march=x86 | FileCheck %s
2 ; PR4185
3
4 ; Passing a non-killed value to asm in {st}.
5 ; Make sure it is duped before.
6 ; asm kills st(0), so we shouldn't pop anything
7 ; CHECK: fld %st(0)
8 ; CHECK: fistpl
9 ; CHECK-NOT: fstp
10 ; CHECK: fistpl
11 ; CHECK-NOT: fstp
12 ; CHECK: ret
13 define void @test() {
14 return:
15         call void asm sideeffect "fistpl $0", "{st}"(double 1.000000e+06)
16         call void asm sideeffect "fistpl $0", "{st}"(double 1.000000e+06)
17         ret void
18 }
19
20 ; A valid alternative would be to remat the constant pool load before each
21 ; inline asm.