Mark functions in some tests as 'nounwind'. Generating
authorDale Johannesen <dalej@apple.com>
Mon, 31 Mar 2008 23:20:09 +0000 (23:20 +0000)
committerDale Johannesen <dalej@apple.com>
Mon, 31 Mar 2008 23:20:09 +0000 (23:20 +0000)
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

14 files changed:
test/CodeGen/PowerPC/fold-li.ll
test/CodeGen/PowerPC/reg-coalesce-simple.ll
test/CodeGen/PowerPC/rotl-2.ll
test/CodeGen/X86/2006-03-02-InstrSchedBug.ll
test/CodeGen/X86/2006-05-02-InstrSched1.ll
test/CodeGen/X86/2006-05-02-InstrSched2.ll
test/CodeGen/X86/2006-05-11-InstrSched.ll
test/CodeGen/X86/constant-pool-remat-0.ll
test/CodeGen/X86/iabs.ll
test/CodeGen/X86/or-branch.ll
test/CodeGen/X86/select.ll
test/CodeGen/X86/setuge.ll
test/CodeGen/X86/x86-64-mem.ll
test/CodeGen/X86/zero-remat.ll

index e96bc456c5607c121cf524b4c960cf93d079880f..ae3363389118930d68019bd3ff4b8da208343196 100644 (file)
@@ -3,12 +3,12 @@
 
 ;; Test that immediates are folded into these instructions correctly.
 
-define i32 @ADD(i32 %X) {
+define i32 @ADD(i32 %X) nounwind {
         %Y = add i32 %X, 65537          ; <i32> [#uses=1]
         ret i32 %Y
 }
 
-define i32 @SUB(i32 %X) {
+define i32 @SUB(i32 %X) nounwind {
         %Y = sub i32 %X, 65537          ; <i32> [#uses=1]
         ret i32 %Y
 }
index dccf21e1720e91c08443340ef8883e6e4660f39a..2c301a9b8d186c4e962c02ffda06106aaf10a276 100644 (file)
@@ -2,7 +2,7 @@
 
 %struct.foo = type { i32, i32, [0 x i8] }
 
-define i32 @test(%struct.foo* %X) {
+define i32 @test(%struct.foo* %X) nounwind {
         %tmp1 = getelementptr %struct.foo* %X, i32 0, i32 2, i32 100            ; <i8*> [#uses=1]
         %tmp = load i8* %tmp1           ; <i8> [#uses=1]
         %tmp2 = zext i8 %tmp to i32             ; <i32> [#uses=1]
index 1e6adb741a7cea8c507ac84a923b0ef687cf7efc..ce7a24c0b07b0165b4bd3700f89e9a7941217e3d 100644 (file)
@@ -2,7 +2,7 @@
 ; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | count 2
 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep or
 
-define i32 @rotl32(i32 %A, i8 %Amt) {
+define i32 @rotl32(i32 %A, i8 %Amt) nounwind {
        %shift.upgrd.1 = zext i8 %Amt to i32            ; <i32> [#uses=1]
        %B = shl i32 %A, %shift.upgrd.1         ; <i32> [#uses=1]
        %Amt2 = sub i8 32, %Amt         ; <i8> [#uses=1]
@@ -12,7 +12,7 @@ define i32 @rotl32(i32 %A, i8 %Amt) {
        ret i32 %D
 }
 
-define i32 @rotr32(i32 %A, i8 %Amt) {
+define i32 @rotr32(i32 %A, i8 %Amt) nounwind {
        %shift.upgrd.3 = zext i8 %Amt to i32            ; <i32> [#uses=1]
        %B = lshr i32 %A, %shift.upgrd.3                ; <i32> [#uses=1]
        %Amt2 = sub i8 32, %Amt         ; <i8> [#uses=1]
@@ -22,14 +22,14 @@ define i32 @rotr32(i32 %A, i8 %Amt) {
        ret i32 %D
 }
 
-define i32 @rotli32(i32 %A) {
+define i32 @rotli32(i32 %A) nounwind {
        %B = shl i32 %A, 5              ; <i32> [#uses=1]
        %C = lshr i32 %A, 27            ; <i32> [#uses=1]
        %D = or i32 %B, %C              ; <i32> [#uses=1]
        ret i32 %D
 }
 
-define i32 @rotri32(i32 %A) {
+define i32 @rotri32(i32 %A) nounwind {
        %B = lshr i32 %A, 5             ; <i32> [#uses=1]
        %C = shl i32 %A, 27             ; <i32> [#uses=1]
        %D = or i32 %B, %C              ; <i32> [#uses=1]
index 96a6ca388433ba495e6b3a58439cff44751a63ae..6da71171e5e0c990611bbcb20530f157a7b9eb05 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-as < %s | llc -march=x86 -stats |& \
 ; RUN:   grep asm-printer | grep 7
 
-define i32 @g(i32 %a, i32 %b) {
+define i32 @g(i32 %a, i32 %b) nounwind {
         %tmp.1 = shl i32 %b, 1          ; <i32> [#uses=1]
         %tmp.3 = add i32 %tmp.1, %a             ; <i32> [#uses=1]
         %tmp.5 = mul i32 %tmp.3, %a             ; <i32> [#uses=1]
index 1357419077fcbaab2690f0b45ac45a9e11974665..d9ef5b0f71b0611801ef81164562bda5ba09d8b6 100644 (file)
@@ -5,7 +5,7 @@
 @size20 = external global i32          ; <i32*> [#uses=1]
 @in5 = external global i8*             ; <i8**> [#uses=1]
 
-define i32 @compare(i8* %a, i8* %b) {
+define i32 @compare(i8* %a, i8* %b) nounwind {
        %tmp = bitcast i8* %a to i32*           ; <i32*> [#uses=1]
        %tmp1 = bitcast i8* %b to i32*          ; <i32*> [#uses=1]
        %tmp.upgrd.1 = load i32* @size20                ; <i32> [#uses=1]
index 6e1610e098c443ec023c335b5aca01a8bdb934d4..de87fc4e2bbfa072ee079b44639db5db23955f94 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-as < %s | llc -march=x86 -stats |& \
 ; RUN:   grep asm-printer | grep 13
 
-define void @_ZN9__gnu_cxx9hashtableISt4pairIKPKciES3_NS_4hashIS3_EESt10_Select1stIS5_E5eqstrSaIiEE14find_or_insertERKS5__cond_true456.i(i8* %tmp435.i, i32* %tmp449.i.out) {
+define void @_ZN9__gnu_cxx9hashtableISt4pairIKPKciES3_NS_4hashIS3_EESt10_Select1stIS5_E5eqstrSaIiEE14find_or_insertERKS5__cond_true456.i(i8* %tmp435.i, i32* %tmp449.i.out) nounwind {
 newFuncRoot:
        br label %cond_true456.i
 bb459.i.exitStub:              ; preds = %cond_true456.i
index 786eed7cbb2f7c8496378525cab39d167583dcb4..19eface83cd955c2ada62ae4ebc685cd780d62bf 100644 (file)
@@ -2,7 +2,7 @@
 ; RUN:     grep {asm-printer} | grep 32
 
 target datalayout = "e-p:32:32"
-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) {
+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 {
 entry:
        %tmp9 = icmp slt i32 %M, 5              ; <i1> [#uses=1]
        br i1 %tmp9, label %return, label %cond_true
index 80077209dd93243ce5a7cf33d43008cd8289f0f6..3e07d0d0b2d67ac339a75dd15810dfb490c37c4c 100644 (file)
@@ -5,7 +5,7 @@
 
 declare fastcc float @qux(float %y)
 
-define fastcc float @array(float %a) {
+define fastcc float @array(float %a) nounwind {
   %n = mul float %a, 9.0
   %m = call fastcc float @qux(float %n)
   %o = mul float %m, 9.0
index 7c23645c6a320b8eb11f5208c841580f0919c791..75de9f637956cee66f7071c86da47d47505fd3d6 100644 (file)
@@ -8,7 +8,7 @@
 ;;       xorl %eax, %edi
 ;;       movl %edi, %eax
 ;;       ret
-define i32 @test(i32 %a) {
+define i32 @test(i32 %a) nounwind {
         %tmp1neg = sub i32 0, %a
         %b = icmp sgt i32 %a, -1
         %abs = select i1 %b, i32 %a, i32 %tmp1neg
index bccba1f62d9380a603818e019a11d897064719fa..e6b840daba2c74b00a6bd369307004898f92225d 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llvm-as < %s | llc -march=x86 | not grep set
 
-define void @foo(i32 %X, i32 %Y, i32 %Z) {
+define void @foo(i32 %X, i32 %Y, i32 %Z) nounwind {
 entry:
        %tmp = tail call i32 (...)* @bar( )             ; <i32> [#uses=0]
        %tmp.upgrd.1 = icmp eq i32 %X, 0                ; <i1> [#uses=1]
index 210d5f80c229f02bd64297d5af6732c8e87635fd..a41b223fb2a74e8f070ffc04032e15f2b8e0f1dc 100644 (file)
@@ -2,61 +2,61 @@
 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah
 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | not grep set
 
-define i1 @boolSel(i1 %A, i1 %B, i1 %C) {
+define i1 @boolSel(i1 %A, i1 %B, i1 %C) nounwind {
        %X = select i1 %A, i1 %B, i1 %C         ; <i1> [#uses=1]
        ret i1 %X
 }
 
-define i8 @byteSel(i1 %A, i8 %B, i8 %C) {
+define i8 @byteSel(i1 %A, i8 %B, i8 %C) nounwind {
        %X = select i1 %A, i8 %B, i8 %C         ; <i8> [#uses=1]
        ret i8 %X
 }
 
-define i16 @shortSel(i1 %A, i16 %B, i16 %C) {
+define i16 @shortSel(i1 %A, i16 %B, i16 %C) nounwind {
        %X = select i1 %A, i16 %B, i16 %C               ; <i16> [#uses=1]
        ret i16 %X
 }
 
-define i32 @intSel(i1 %A, i32 %B, i32 %C) {
+define i32 @intSel(i1 %A, i32 %B, i32 %C) nounwind {
        %X = select i1 %A, i32 %B, i32 %C               ; <i32> [#uses=1]
        ret i32 %X
 }
 
-define i64 @longSel(i1 %A, i64 %B, i64 %C) {
+define i64 @longSel(i1 %A, i64 %B, i64 %C) nounwind {
        %X = select i1 %A, i64 %B, i64 %C               ; <i64> [#uses=1]
        ret i64 %X
 }
 
-define double @doubleSel(i1 %A, double %B, double %C) {
+define double @doubleSel(i1 %A, double %B, double %C) nounwind {
        %X = select i1 %A, double %B, double %C         ; <double> [#uses=1]
        ret double %X
 }
 
-define i8 @foldSel(i1 %A, i8 %B, i8 %C) {
+define i8 @foldSel(i1 %A, i8 %B, i8 %C) nounwind {
        %Cond = icmp slt i8 %B, %C              ; <i1> [#uses=1]
        %X = select i1 %Cond, i8 %B, i8 %C              ; <i8> [#uses=1]
        ret i8 %X
 }
 
-define i32 @foldSel2(i1 %A, i32 %B, i32 %C) {
+define i32 @foldSel2(i1 %A, i32 %B, i32 %C) nounwind {
        %Cond = icmp eq i32 %B, %C              ; <i1> [#uses=1]
        %X = select i1 %Cond, i32 %B, i32 %C            ; <i32> [#uses=1]
        ret i32 %X
 }
 
-define i32 @foldSel2a(i1 %A, i32 %B, i32 %C, double %X, double %Y) {
+define i32 @foldSel2a(i1 %A, i32 %B, i32 %C, double %X, double %Y) nounwind {
        %Cond = fcmp olt double %X, %Y          ; <i1> [#uses=1]
        %X.upgrd.1 = select i1 %Cond, i32 %B, i32 %C            ; <i32> [#uses=1]
        ret i32 %X.upgrd.1
 }
 
-define float @foldSel3(i1 %A, float %B, float %C, i32 %X, i32 %Y) {
+define float @foldSel3(i1 %A, float %B, float %C, i32 %X, i32 %Y) nounwind {
        %Cond = icmp ult i32 %X, %Y             ; <i1> [#uses=1]
        %X.upgrd.2 = select i1 %Cond, float %B, float %C                ; <float> [#uses=1]
        ret float %X.upgrd.2
 }
 
-define float @nofoldSel4(i1 %A, float %B, float %C, i32 %X, i32 %Y) {
+define float @nofoldSel4(i1 %A, float %B, float %C, i32 %X, i32 %Y) nounwind {
        %Cond = icmp slt i32 %X, %Y             ; <i1> [#uses=1]
        %X.upgrd.3 = select i1 %Cond, float %B, float %C                ; <float> [#uses=1]
        ret float %X.upgrd.3
index 91f497ff759b15344c333efdc0106815a40435ed..5342b1b089c5248a87292b262bf347700f545b6f 100644 (file)
@@ -2,7 +2,7 @@
 
 declare i1 @llvm.isunordered.f32(float, float)
 
-define float @cmp(float %A, float %B, float %C, float %D) {
+define float @cmp(float %A, float %B, float %C, float %D) nounwind {
 entry:
         %tmp.1 = fcmp uno float %A, %B          ; <i1> [#uses=1]
         %tmp.2 = fcmp oge float %A, %B          ; <i1> [#uses=1]
index 8d0e26640c0f116dc35abf1e5124ce72b5e2054c..3a475789f3d898328b9883be4db47ed9d1832974 100644 (file)
 @bsrc = internal global [500000 x i32] zeroinitializer, align 32               ; <[500000 x i32]*> [#uses=0]
 @bdst = internal global [500000 x i32] zeroinitializer, align 32               ; <[500000 x i32]*> [#uses=0]
 
-define void @test1() {
+define void @test1() nounwind {
        %tmp = load i32* getelementptr ([0 x i32]* @src, i32 0, i32 0)          ; <i32> [#uses=1]
        store i32 %tmp, i32* getelementptr ([0 x i32]* @dst, i32 0, i32 0)
        ret void
 }
 
-define void @test2() {
+define void @test2() nounwind {
        store i32* getelementptr ([0 x i32]* @dst, i32 0, i32 0), i32** @ptr
        ret void
 }
 
-define void @test3() {
+define void @test3() nounwind {
        store i32* getelementptr ([500 x i32]* @ldst, i32 0, i32 0), i32** @lptr
        br label %return
 
index 9300c1239cd0714e9ff1cb20f6935417ca61ba7e..5195a11bcd41c479db8befda749f02dda5c470bb 100644 (file)
@@ -6,11 +6,11 @@
 declare void @bar(double %x)
 declare void @barf(float %x)
 
-define double @foo() {
+define double @foo() nounwind {
   call void @bar(double 0.0)
   ret double 0.0
 }
-define float @foof() {
+define float @foof() nounwind {
   call void @barf(float 0.0)
   ret float 0.0
 }