llvm.org GIT mirror llvm / 1d3863f
Mark functions in some tests as 'nounwind'. Generating EH info for these functions causes the tests to fail for random reasons (e.g. looking for 'or' or counting lines with asm-printer; labels count as lines.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49003 91177308-0d34-0410-b5e6-96231b3b80d8 Dale Johannesen 12 years ago
14 changed file(s) with 31 addition(s) and 31 deletion(s). Raw diff Collapse all Expand all
22
33 ;; Test that immediates are folded into these instructions correctly.
44
5 define i32 @ADD(i32 %X) {
5 define i32 @ADD(i32 %X) nounwind {
66 %Y = add i32 %X, 65537 ; [#uses=1]
77 ret i32 %Y
88 }
99
10 define i32 @SUB(i32 %X) {
10 define i32 @SUB(i32 %X) nounwind {
1111 %Y = sub i32 %X, 65537 ; [#uses=1]
1212 ret i32 %Y
1313 }
11
22 %struct.foo = type { i32, i32, [0 x i8] }
33
4 define i32 @test(%struct.foo* %X) {
4 define i32 @test(%struct.foo* %X) nounwind {
55 %tmp1 = getelementptr %struct.foo* %X, i32 0, i32 2, i32 100 ; [#uses=1]
66 %tmp = load i8* %tmp1 ; [#uses=1]
77 %tmp2 = zext i8 %tmp to i32 ; [#uses=1]
11 ; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | count 2
22 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep or
33
4 define i32 @rotl32(i32 %A, i8 %Amt) {
4 define i32 @rotl32(i32 %A, i8 %Amt) nounwind {
55 %shift.upgrd.1 = zext i8 %Amt to i32 ; [#uses=1]
66 %B = shl i32 %A, %shift.upgrd.1 ; [#uses=1]
77 %Amt2 = sub i8 32, %Amt ; [#uses=1]
1111 ret i32 %D
1212 }
1313
14 define i32 @rotr32(i32 %A, i8 %Amt) {
14 define i32 @rotr32(i32 %A, i8 %Amt) nounwind {
1515 %shift.upgrd.3 = zext i8 %Amt to i32 ; [#uses=1]
1616 %B = lshr i32 %A, %shift.upgrd.3 ; [#uses=1]
1717 %Amt2 = sub i8 32, %Amt ; [#uses=1]
2121 ret i32 %D
2222 }
2323
24 define i32 @rotli32(i32 %A) {
24 define i32 @rotli32(i32 %A) nounwind {
2525 %B = shl i32 %A, 5 ; [#uses=1]
2626 %C = lshr i32 %A, 27 ; [#uses=1]
2727 %D = or i32 %B, %C ; [#uses=1]
2828 ret i32 %D
2929 }
3030
31 define i32 @rotri32(i32 %A) {
31 define i32 @rotri32(i32 %A) nounwind {
3232 %B = lshr i32 %A, 5 ; [#uses=1]
3333 %C = shl i32 %A, 27 ; [#uses=1]
3434 %D = or i32 %B, %C ; [#uses=1]
0 ; RUN: llvm-as < %s | llc -march=x86 -stats |& \
11 ; RUN: grep asm-printer | grep 7
22
3 define i32 @g(i32 %a, i32 %b) {
3 define i32 @g(i32 %a, i32 %b) nounwind {
44 %tmp.1 = shl i32 %b, 1 ; [#uses=1]
55 %tmp.3 = add i32 %tmp.1, %a ; [#uses=1]
66 %tmp.5 = mul i32 %tmp.3, %a ; [#uses=1]
44 @size20 = external global i32 ; [#uses=1]
55 @in5 = external global i8* ; [#uses=1]
66
7 define i32 @compare(i8* %a, i8* %b) {
7 define i32 @compare(i8* %a, i8* %b) nounwind {
88 %tmp = bitcast i8* %a to i32* ; [#uses=1]
99 %tmp1 = bitcast i8* %b to i32* ; [#uses=1]
1010 %tmp.upgrd.1 = load i32* @size20 ; [#uses=1]
0 ; RUN: llvm-as < %s | llc -march=x86 -stats |& \
11 ; RUN: grep asm-printer | grep 13
22
3 define void @_ZN9__gnu_cxx9hashtableISt4pairIKPKciES3_NS_4hashIS3_EESt10_Select1stIS5_E5eqstrSaIiEE14find_or_insertERKS5__cond_true456.i(i8* %tmp435.i, i32* %tmp449.i.out) {
3 define void @_ZN9__gnu_cxx9hashtableISt4pairIKPKciES3_NS_4hashIS3_EESt10_Select1stIS5_E5eqstrSaIiEE14find_or_insertERKS5__cond_true456.i(i8* %tmp435.i, i32* %tmp449.i.out) nounwind {
44 newFuncRoot:
55 br label %cond_true456.i
66 bb459.i.exitStub: ; preds = %cond_true456.i
11 ; RUN: grep {asm-printer} | grep 32
22
33 target datalayout = "e-p:32:32"
4 define void @foo(i32* %mc, i32* %bp, i32* %ms, i32* %xmb, i32* %mpp, i32* %tpmm, i32* %ip, i32* %tpim, i32* %dpp, i32* %tpdm, i32* %bpi, i32 %M) {
4 define void @foo(i32* %mc, i32* %bp, i32* %ms, i32* %xmb, i32* %mpp, i32* %tpmm, i32* %ip, i32* %tpim, i32* %dpp, i32* %tpdm, i32* %bpi, i32 %M) nounwind {
55 entry:
66 %tmp9 = icmp slt i32 %M, 5 ; [#uses=1]
77 br i1 %tmp9, label %return, label %cond_true
44
55 declare fastcc float @qux(float %y)
66
7 define fastcc float @array(float %a) {
7 define fastcc float @array(float %a) nounwind {
88 %n = mul float %a, 9.0
99 %m = call fastcc float @qux(float %n)
1010 %o = mul float %m, 9.0
77 ;; xorl %eax, %edi
88 ;; movl %edi, %eax
99 ;; ret
10 define i32 @test(i32 %a) {
10 define i32 @test(i32 %a) nounwind {
1111 %tmp1neg = sub i32 0, %a
1212 %b = icmp sgt i32 %a, -1
1313 %abs = select i1 %b, i32 %a, i32 %tmp1neg
0 ; RUN: llvm-as < %s | llc -march=x86 | not grep set
11
2 define void @foo(i32 %X, i32 %Y, i32 %Z) {
2 define void @foo(i32 %X, i32 %Y, i32 %Z) nounwind {
33 entry:
44 %tmp = tail call i32 (...)* @bar( ) ; [#uses=0]
55 %tmp.upgrd.1 = icmp eq i32 %X, 0 ; [#uses=1]
11 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah
22 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | not grep set
33
4 define i1 @boolSel(i1 %A, i1 %B, i1 %C) {
4 define i1 @boolSel(i1 %A, i1 %B, i1 %C) nounwind {
55 %X = select i1 %A, i1 %B, i1 %C ; [#uses=1]
66 ret i1 %X
77 }
88
9 define i8 @byteSel(i1 %A, i8 %B, i8 %C) {
9 define i8 @byteSel(i1 %A, i8 %B, i8 %C) nounwind {
1010 %X = select i1 %A, i8 %B, i8 %C ; [#uses=1]
1111 ret i8 %X
1212 }
1313
14 define i16 @shortSel(i1 %A, i16 %B, i16 %C) {
14 define i16 @shortSel(i1 %A, i16 %B, i16 %C) nounwind {
1515 %X = select i1 %A, i16 %B, i16 %C ; [#uses=1]
1616 ret i16 %X
1717 }
1818
19 define i32 @intSel(i1 %A, i32 %B, i32 %C) {
19 define i32 @intSel(i1 %A, i32 %B, i32 %C) nounwind {
2020 %X = select i1 %A, i32 %B, i32 %C ; [#uses=1]
2121 ret i32 %X
2222 }
2323
24 define i64 @longSel(i1 %A, i64 %B, i64 %C) {
24 define i64 @longSel(i1 %A, i64 %B, i64 %C) nounwind {
2525 %X = select i1 %A, i64 %B, i64 %C ; [#uses=1]
2626 ret i64 %X
2727 }
2828
29 define double @doubleSel(i1 %A, double %B, double %C) {
29 define double @doubleSel(i1 %A, double %B, double %C) nounwind {
3030 %X = select i1 %A, double %B, double %C ; [#uses=1]
3131 ret double %X
3232 }
3333
34 define i8 @foldSel(i1 %A, i8 %B, i8 %C) {
34 define i8 @foldSel(i1 %A, i8 %B, i8 %C) nounwind {
3535 %Cond = icmp slt i8 %B, %C ; [#uses=1]
3636 %X = select i1 %Cond, i8 %B, i8 %C ; [#uses=1]
3737 ret i8 %X
3838 }
3939
40 define i32 @foldSel2(i1 %A, i32 %B, i32 %C) {
40 define i32 @foldSel2(i1 %A, i32 %B, i32 %C) nounwind {
4141 %Cond = icmp eq i32 %B, %C ; [#uses=1]
4242 %X = select i1 %Cond, i32 %B, i32 %C ; [#uses=1]
4343 ret i32 %X
4444 }
4545
46 define i32 @foldSel2a(i1 %A, i32 %B, i32 %C, double %X, double %Y) {
46 define i32 @foldSel2a(i1 %A, i32 %B, i32 %C, double %X, double %Y) nounwind {
4747 %Cond = fcmp olt double %X, %Y ; [#uses=1]
4848 %X.upgrd.1 = select i1 %Cond, i32 %B, i32 %C ; [#uses=1]
4949 ret i32 %X.upgrd.1
5050 }
5151
52 define float @foldSel3(i1 %A, float %B, float %C, i32 %X, i32 %Y) {
52 define float @foldSel3(i1 %A, float %B, float %C, i32 %X, i32 %Y) nounwind {
5353 %Cond = icmp ult i32 %X, %Y ; [#uses=1]
5454 %X.upgrd.2 = select i1 %Cond, float %B, float %C ; [#uses=1]
5555 ret float %X.upgrd.2
5656 }
5757
58 define float @nofoldSel4(i1 %A, float %B, float %C, i32 %X, i32 %Y) {
58 define float @nofoldSel4(i1 %A, float %B, float %C, i32 %X, i32 %Y) nounwind {
5959 %Cond = icmp slt i32 %X, %Y ; [#uses=1]
6060 %X.upgrd.3 = select i1 %Cond, float %B, float %C ; [#uses=1]
6161 ret float %X.upgrd.3
11
22 declare i1 @llvm.isunordered.f32(float, float)
33
4 define float @cmp(float %A, float %B, float %C, float %D) {
4 define float @cmp(float %A, float %B, float %C, float %D) nounwind {
55 entry:
66 %tmp.1 = fcmp uno float %A, %B ; [#uses=1]
77 %tmp.2 = fcmp oge float %A, %B ; [#uses=1]
1616 @bsrc = internal global [500000 x i32] zeroinitializer, align 32 ; <[500000 x i32]*> [#uses=0]
1717 @bdst = internal global [500000 x i32] zeroinitializer, align 32 ; <[500000 x i32]*> [#uses=0]
1818
19 define void @test1() {
19 define void @test1() nounwind {
2020 %tmp = load i32* getelementptr ([0 x i32]* @src, i32 0, i32 0) ; [#uses=1]
2121 store i32 %tmp, i32* getelementptr ([0 x i32]* @dst, i32 0, i32 0)
2222 ret void
2323 }
2424
25 define void @test2() {
25 define void @test2() nounwind {
2626 store i32* getelementptr ([0 x i32]* @dst, i32 0, i32 0), i32** @ptr
2727 ret void
2828 }
2929
30 define void @test3() {
30 define void @test3() nounwind {
3131 store i32* getelementptr ([500 x i32]* @ldst, i32 0, i32 0), i32** @lptr
3232 br label %return
3333
55 declare void @bar(double %x)
66 declare void @barf(float %x)
77
8 define double @foo() {
8 define double @foo() nounwind {
99 call void @bar(double 0.0)
1010 ret double 0.0
1111 }
12 define float @foof() {
12 define float @foof() nounwind {
1313 call void @barf(float 0.0)
1414 ret float 0.0
1515 }