llvm.org GIT mirror llvm / 070549e
Add some tests for (conv (load x)) -> (load (conv*)x) xform. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36912 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
1 changed file(s) with 18 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 > %t
1 ; RUN: not grep fmrs %t
0 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | not grep fmrs
1 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | not grep fmrrd
22
33 @i = weak global i32 0 ; [#uses=2]
44 @u = weak global i32 0 ; [#uses=2]
55
6 define i32 @foo1(float *%x) {
7 %tmp1 = load float* %x
8 %tmp2 = bitcast float %tmp1 to i32
9 ret i32 %tmp2
10 }
11
12 define i64 @foo2(double *%x) {
13 %tmp1 = load double* %x
14 %tmp2 = bitcast double %tmp1 to i64
15 ret i64 %tmp2
16 }
17
618 define void @foo5(float %x) {
7 entry:
8 %tmp1 = fptosi float %x to i32 ; [#uses=1]
19 %tmp1 = fptosi float %x to i32
920 store i32 %tmp1, i32* @i
1021 ret void
1122 }
1223
1324 define void @foo6(float %x) {
14 entry:
15 %tmp1 = fptoui float %x to i32 ; [#uses=1]
25 %tmp1 = fptoui float %x to i32
1626 store i32 %tmp1, i32* @u
1727 ret void
1828 }
1929
2030 define void @foo7(double %x) {
21 entry:
22 %tmp1 = fptosi double %x to i32 ; [#uses=1]
31 %tmp1 = fptosi double %x to i32
2332 store i32 %tmp1, i32* @i
2433 ret void
2534 }
2635
2736 define void @foo8(double %x) {
28 entry:
29 %tmp1 = fptoui double %x to i32 ; [#uses=1]
37 %tmp1 = fptoui double %x to i32
3038 store i32 %tmp1, i32* @u
3139 ret void
3240 }