2013-11-30 20:04:33 +00:00
|
|
|
; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx | FileCheck %s
|
|
|
|
; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx | FileCheck -check-prefix=CHECK-LS %s
|
2006-03-01 05:49:05 +00:00
|
|
|
|
2013-11-30 20:04:33 +00:00
|
|
|
define void @test1(float %a, i32* %b) nounwind {
|
|
|
|
; CHECK-LABEL: @test1
|
|
|
|
; CHECK-LS-LABEL: @test1
|
2008-02-19 08:07:33 +00:00
|
|
|
%tmp.2 = fptosi float %a to i32 ; <i32> [#uses=1]
|
|
|
|
store i32 %tmp.2, i32* %b
|
2006-03-01 05:49:05 +00:00
|
|
|
ret void
|
2013-11-30 20:04:33 +00:00
|
|
|
|
|
|
|
; CHECK-NOT: lwz
|
|
|
|
; CHECK-NOT: stw
|
|
|
|
; CHECK: stfiwx
|
|
|
|
; CHECK: blr
|
|
|
|
|
|
|
|
; CHECK-LS: lwz
|
|
|
|
; CHECK-LS: stw
|
|
|
|
; CHECK-LS-NOT: stfiwx
|
|
|
|
; CHECK-LS: blr
|
2006-03-01 05:49:05 +00:00
|
|
|
}
|
|
|
|
|
2010-11-14 22:22:14 +00:00
|
|
|
define void @test2(float %a, i32* %b, i32 %i) nounwind {
|
2013-11-30 20:04:33 +00:00
|
|
|
; CHECK-LABEL: @test2
|
|
|
|
; CHECK-LS-LABEL: @test2
|
2008-02-19 08:07:33 +00:00
|
|
|
%tmp.2 = getelementptr i32* %b, i32 1 ; <i32*> [#uses=1]
|
|
|
|
%tmp.5 = getelementptr i32* %b, i32 %i ; <i32*> [#uses=1]
|
|
|
|
%tmp.7 = fptosi float %a to i32 ; <i32> [#uses=3]
|
|
|
|
store i32 %tmp.7, i32* %tmp.5
|
|
|
|
store i32 %tmp.7, i32* %tmp.2
|
|
|
|
store i32 %tmp.7, i32* %b
|
2006-03-01 05:49:05 +00:00
|
|
|
ret void
|
2013-11-30 20:04:33 +00:00
|
|
|
|
|
|
|
; CHECK-NOT: lwz
|
|
|
|
; CHECK-NOT: stw
|
|
|
|
; CHECK: stfiwx
|
|
|
|
; CHECK: blr
|
|
|
|
|
|
|
|
; CHECK-LS: lwz
|
|
|
|
; CHECK-LS: stw
|
|
|
|
; CHECK-LS-NOT: stfiwx
|
|
|
|
; CHECK-LS: blr
|
2006-03-01 05:49:05 +00:00
|
|
|
}
|
|
|
|
|