1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -mattr=stfiwx | FileCheck %s
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -mattr=-stfiwx | FileCheck -check-prefix=CHECK-LS %s
4 define void @test1(float %a, ptr %b) nounwind {
6 ; CHECK-LS-LABEL: @test1
7 %tmp.2 = fptosi float %a to i32 ; <i32> [#uses=1]
8 store i32 %tmp.2, ptr %b
19 ; CHECK-LS-NOT: stfiwx
23 define void @test2(float %a, ptr %b, i32 %i) nounwind {
25 ; CHECK-LS-LABEL: @test2
26 %tmp.2 = getelementptr i32, ptr %b, i32 1 ; <ptr> [#uses=1]
27 %tmp.5 = getelementptr i32, ptr %b, i32 %i ; <ptr> [#uses=1]
28 %tmp.7 = fptosi float %a to i32 ; <i32> [#uses=3]
29 store i32 %tmp.7, ptr %tmp.5
30 store i32 %tmp.7, ptr %tmp.2
31 store i32 %tmp.7, ptr %b
42 ; CHECK-LS-NOT: stfiwx