1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx | FileCheck -check-prefix=CHECK-LS %s 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Workerdefine void @test1(float %a, i32* %b) nounwind { 5*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test1 6*9880d681SAndroid Build Coastguard Worker; CHECK-LS-LABEL: @test1 7*9880d681SAndroid Build Coastguard Worker %tmp.2 = fptosi float %a to i32 ; <i32> [#uses=1] 8*9880d681SAndroid Build Coastguard Worker store i32 %tmp.2, i32* %b 9*9880d681SAndroid Build Coastguard Worker ret void 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: lwz 12*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: stw 13*9880d681SAndroid Build Coastguard Worker; CHECK: stfiwx 14*9880d681SAndroid Build Coastguard Worker; CHECK: blr 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Worker; CHECK-LS: lwz 17*9880d681SAndroid Build Coastguard Worker; CHECK-LS: stw 18*9880d681SAndroid Build Coastguard Worker; CHECK-LS-NOT: stfiwx 19*9880d681SAndroid Build Coastguard Worker; CHECK-LS: blr 20*9880d681SAndroid Build Coastguard Worker} 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Workerdefine void @test2(float %a, i32* %b, i32 %i) nounwind { 23*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test2 24*9880d681SAndroid Build Coastguard Worker; CHECK-LS-LABEL: @test2 25*9880d681SAndroid Build Coastguard Worker %tmp.2 = getelementptr i32, i32* %b, i32 1 ; <i32*> [#uses=1] 26*9880d681SAndroid Build Coastguard Worker %tmp.5 = getelementptr i32, i32* %b, i32 %i ; <i32*> [#uses=1] 27*9880d681SAndroid Build Coastguard Worker %tmp.7 = fptosi float %a to i32 ; <i32> [#uses=3] 28*9880d681SAndroid Build Coastguard Worker store i32 %tmp.7, i32* %tmp.5 29*9880d681SAndroid Build Coastguard Worker store i32 %tmp.7, i32* %tmp.2 30*9880d681SAndroid Build Coastguard Worker store i32 %tmp.7, i32* %b 31*9880d681SAndroid Build Coastguard Worker ret void 32*9880d681SAndroid Build Coastguard Worker 33*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: lwz 34*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: stw 35*9880d681SAndroid Build Coastguard Worker; CHECK: stfiwx 36*9880d681SAndroid Build Coastguard Worker; CHECK: blr 37*9880d681SAndroid Build Coastguard Worker 38*9880d681SAndroid Build Coastguard Worker; CHECK-LS: lwz 39*9880d681SAndroid Build Coastguard Worker; CHECK-LS: stw 40*9880d681SAndroid Build Coastguard Worker; CHECK-LS-NOT: stfiwx 41*9880d681SAndroid Build Coastguard Worker; CHECK-LS: blr 42*9880d681SAndroid Build Coastguard Worker} 43*9880d681SAndroid Build Coastguard Worker 44