2010-07-10 18:30:25 +02:00
|
|
|
; RUN: llc < %s -march=x86 | FileCheck %s
|
2009-06-21 14:02:51 +02:00
|
|
|
; PR4185
|
|
|
|
|
2010-07-10 18:30:25 +02:00
|
|
|
; 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
|
2009-06-21 14:02:51 +02:00
|
|
|
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
|
|
|
|
}
|
2010-07-10 18:30:25 +02:00
|
|
|
|
|
|
|
; A valid alternative would be to remat the constant pool load before each
|
|
|
|
; inline asm.
|