If a vr is already marked alive in a bb, then it has PHI uses that are visited earlie...
[oota-llvm.git] / test / CodeGen / PowerPC / stfiwx.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | \
2 ; RUN:   llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx -o %t1 -f
3 ; RUN: grep stfiwx %t1
4 ; RUN: not grep r1 %t1
5 ; RUN: llvm-upgrade < %s | llvm-as | \
6 ; RUN:   llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx \
7 ; RUN:   -o %t2 -f
8 ; RUN: not grep stfiwx %t2
9 ; RUN: grep r1 %t2
10
11 void %test(float %a, int* %b) {
12         %tmp.2 = cast float %a to int
13         store int %tmp.2, int* %b
14         ret void
15 }
16
17 void %test2(float %a, int* %b, int %i) {
18         %tmp.2 = getelementptr int* %b, int 1
19         %tmp.5 = getelementptr int* %b, int %i
20         %tmp.7 = cast float %a to int
21         store int %tmp.7, int* %tmp.5
22         store int %tmp.7, int* %tmp.2
23         store int %tmp.7, int* %b
24         ret void
25 }
26