Mercurial > hg > CbC > CbC_llvm
comparison test/CodeGen/Mips/cmov.ll @ 95:afa8332a0e37 LLVM3.8
LLVM 3.8
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 17:48:58 +0900 |
parents | 60c9769439b8 |
children | 1172e4bd9c6f |
comparison
equal
deleted
inserted
replaced
84:f3e34b893a5f | 95:afa8332a0e37 |
---|---|
39 ; 64-CMP-DAG: ld $2, 0($[[T2]]) | 39 ; 64-CMP-DAG: ld $2, 0($[[T2]]) |
40 | 40 |
41 define i32* @cmov1(i32 signext %s) nounwind readonly { | 41 define i32* @cmov1(i32 signext %s) nounwind readonly { |
42 entry: | 42 entry: |
43 %tobool = icmp ne i32 %s, 0 | 43 %tobool = icmp ne i32 %s, 0 |
44 %tmp1 = load i32** @i3, align 4 | 44 %tmp1 = load i32*, i32** @i3, align 4 |
45 %cond = select i1 %tobool, i32* getelementptr inbounds ([3 x i32]* @i1, i32 0, i32 0), i32* %tmp1 | 45 %cond = select i1 %tobool, i32* getelementptr inbounds ([3 x i32], [3 x i32]* @i1, i32 0, i32 0), i32* %tmp1 |
46 ret i32* %cond | 46 ret i32* %cond |
47 } | 47 } |
48 | 48 |
49 @c = global i32 1, align 4 | 49 @c = global i32 1, align 4 |
50 @d = global i32 0, align 4 | 50 @d = global i32 0, align 4 |
79 ; 64-CMP-DAG: lw $2, 0($[[T2]]) | 79 ; 64-CMP-DAG: lw $2, 0($[[T2]]) |
80 | 80 |
81 define i32 @cmov2(i32 signext %s) nounwind readonly { | 81 define i32 @cmov2(i32 signext %s) nounwind readonly { |
82 entry: | 82 entry: |
83 %tobool = icmp ne i32 %s, 0 | 83 %tobool = icmp ne i32 %s, 0 |
84 %tmp1 = load i32* @c, align 4 | 84 %tmp1 = load i32, i32* @c, align 4 |
85 %tmp2 = load i32* @d, align 4 | 85 %tmp2 = load i32, i32* @d, align 4 |
86 %cond = select i1 %tobool, i32 %tmp1, i32 %tmp2 | 86 %cond = select i1 %tobool, i32 %tmp1, i32 %tmp2 |
87 ret i32 %cond | 87 ret i32 %cond |
88 } | 88 } |
89 | 89 |
90 ; ALL-LABEL: cmov3: | 90 ; ALL-LABEL: cmov3: |