For PR411:
authorReid Spencer <rspencer@reidspencer.com>
Tue, 30 Jan 2007 16:16:01 +0000 (16:16 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 30 Jan 2007 16:16:01 +0000 (16:16 +0000)
Update these tests to not use the same name even though the type of the
value differs. After PR411 hits, type planes will be gone and it will be
illegal for a name to be used twice, regardless of type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33660 91177308-0d34-0410-b5e6-96231b3b80d8

21 files changed:
test/Analysis/ScalarEvolution/trip-count.ll
test/CodeGen/ARM/2007-01-19-InfiniteLoop.ll
test/CodeGen/ARM/fcopysign.ll
test/CodeGen/ARM/fp.ll
test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll
test/CodeGen/PowerPC/and_sext.ll
test/CodeGen/X86/2007-01-13-StackPtrIndex.ll
test/CodeGen/X86/select.ll
test/CodeGen/X86/trunc-to-bool.ll
test/CodeGen/X86/vec_set-3.ll
test/CodeGen/X86/vec_set-4.ll
test/Feature/paramattrs.ll
test/Integer/2007-01-19-TruncSext.ll
test/Integer/indirectcall_bt.ll
test/Integer/paramattrs_bt.ll
test/Integer/recursivetype_bt.ll
test/Linker/basiclink.ll
test/Transforms/IndVarsSimplify/2007-01-06-TripCount.ll
test/Transforms/InstCombine/add.ll
test/Transforms/InstCombine/rem.ll
test/Transforms/InstCombine/vec_shuffle.ll

index 6905d6dd38efa96999cf378062466505ba86e1b9..520153baead49793a85900ac56ff411524bc7120 100644 (file)
@@ -19,8 +19,8 @@ bb:             ; preds = %bb3
 
 bb3:            ; preds = %bb, %entry
         %i.0 = phi i32 [ 0, %entry ], [ %tmp2, %bb ]            ; <i32> [#uses=3]
-        %tmp = icmp sle i32 %i.0, 9999          ; <i1> [#uses=1]
-        br i1 %tmp, label %bb, label %bb5
+        %tmp3 = icmp sle i32 %i.0, 9999          ; <i1> [#uses=1]
+        br i1 %tmp3, label %bb, label %bb5
 
 bb5:            ; preds = %bb3
         br label %return
@@ -28,5 +28,3 @@ bb5:            ; preds = %bb3
 return:         ; preds = %bb5
         ret void
 }
-
-
index 0dbf79562d965c541313d8165ffe3cc81cddef25..c69798b0b313b14365c02a310419b3e935bab68a 100644 (file)
@@ -34,8 +34,8 @@ cond_next589:         ; preds = %cond_next489
        %tmp606 = load i32* %tmp605             ; <i32> [#uses=1]
        %tmp612 = load i32* null                ; <i32> [#uses=1]
        %tmp629 = load i32* null                ; <i32> [#uses=1]
-       %tmp629 = sitofp i32 %tmp629 to double          ; <double> [#uses=1]
-       %tmp631 = mul double %tmp629, 0.000000e+00              ; <double> [#uses=1]
+       %tmp629a = sitofp i32 %tmp629 to double         ; <double> [#uses=1]
+       %tmp631 = mul double %tmp629a, 0.000000e+00             ; <double> [#uses=1]
        %tmp632 = add double 0.000000e+00, %tmp631              ; <double> [#uses=1]
        %tmp642 = call fastcc i32 @sign( i32 %tmp576, i32 %tmp561 )             ; <i32> [#uses=1]
        %tmp650 = mul i32 %tmp606, %tmp642              ; <i32> [#uses=1]
@@ -44,9 +44,9 @@ cond_next589:         ; preds = %cond_next489
        %tmp659 = ashr i32 %tmp658, i8 6                ; <i32> [#uses=1]
        %tmp660 = sub i32 0, %tmp659            ; <i32> [#uses=1]
        %tmp666 = sub i32 %tmp660, %tmp496              ; <i32> [#uses=1]
-       %tmp666 = sitofp i32 %tmp666 to double          ; <double> [#uses=2]
+       %tmp667 = sitofp i32 %tmp666 to double          ; <double> [#uses=2]
        call void @levrun_linfo_inter( i32 %tmp576, i32 0, i32* null, i32* null )
-       %tmp671 = mul double %tmp666, %tmp666           ; <double> [#uses=1]
+       %tmp671 = mul double %tmp667, %tmp667           ; <double> [#uses=1]
        %tmp675 = add double %tmp671, 0.000000e+00              ; <double> [#uses=1]
        %tmp678 = fcmp oeq double %tmp632, %tmp675              ; <i1> [#uses=1]
        br i1 %tmp678, label %cond_true679, label %cond_false693
index 73c6670bfc491df96eea088a47426cb5bcc3c254..b384f36a5c14fe949a092e23b853515f4d3275e0 100644 (file)
@@ -6,8 +6,8 @@
 define float @test1(float %x, double %y) {
        %tmp = fpext float %x to double
        %tmp2 = tail call double @copysign( double %tmp, double %y )
-       %tmp2 = fptrunc double %tmp2 to float
-       ret float %tmp2
+       %tmp3 = fptrunc double %tmp2 to float
+       ret float %tmp3
 }
 
 define double @test2(double %x, float %y) {
index 15be71637b21d8d44d6511d2635593927affa4fb..f85c17a46ac6bc0b9b559666e0415e82d1930791 100644 (file)
@@ -43,7 +43,7 @@ entry:
        ret double %tmp
 }
 
-float %h() {
+float %h2() {
 entry:
         ret float 1.000000e+00
 }
index cfbac7d3bc51779bf981349e1283756ea6df820f..d9374edfe8656e1f8575365aea0627f103e118fc 100644 (file)
@@ -1,9 +1,10 @@
-; RUN: llvm-as < %s | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep cntlzw
+; RUN: llvm-as < %s | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | \
+; RUN:    grep cntlzw
 
 define i32 @foo() {
 entry:
        %retval = alloca i32, align 4           ; <i32*> [#uses=2]
-       %tmp = alloca i32, align 4              ; <i32*> [#uses=2]
+       %temp = alloca i32, align 4             ; <i32*> [#uses=2]
        %ctz_x = alloca i32, align 4            ; <i32*> [#uses=3]
        %ctz_c = alloca i32, align 4            ; <i32*> [#uses=2]
        "alloca point" = bitcast i32 0 to i32           ; <i32> [#uses=0]
@@ -15,12 +16,12 @@ entry:
        %tmp4 = call i32 asm "$(cntlz$|cntlzw$) $0,$1", "=r,r,~{dirflag},~{fpsr},~{flags}"( i32 %tmp3 )         ; <i32> [#uses=1]
        store i32 %tmp4, i32* %ctz_c
        %tmp5 = load i32* %ctz_c                ; <i32> [#uses=1]
-       store i32 %tmp5, i32* %tmp
-       %tmp6 = load i32* %tmp          ; <i32> [#uses=1]
+       store i32 %tmp5, i32* %temp
+       %tmp6 = load i32* %temp         ; <i32> [#uses=1]
        store i32 %tmp6, i32* %retval
        br label %return
 
 return:                ; preds = %entry
-       %retval = load i32* %retval             ; <i32> [#uses=1]
-       ret i32 %retval
+       %retval2 = load i32* %retval            ; <i32> [#uses=1]
+       ret i32 %retval2
 }
index 7f4c5f0c066f5b88bf7cbb3e8cc8927c8d4c6aa1..4c3fd14cbd1c4946c5bf65d7b3d454e6e7e3179a 100644 (file)
@@ -15,15 +15,15 @@ define i16 @test2(i16 sext %X, i16 sext %x) sext {
         %tmp1 = sext i16 %x to i32
         %tmp2 = add i32 %tmp, %tmp1
         %tmp4 = ashr i32 %tmp2, i8 1
-        %tmp4 = trunc i32 %tmp4 to i16
-        %tmp45 = sext i16 %tmp4 to i32
+        %tmp5 = trunc i32 %tmp4 to i16
+        %tmp45 = sext i16 %tmp5 to i32
         %retval = trunc i32 %tmp45 to i16
         ret i16 %retval
 }
 
 define i16 @test3(i32 zext %X) sext {
         %tmp1 = lshr i32 %X, i8 16
-        %tmp1 = trunc i32 %tmp1 to i16
-        ret i16 %tmp1
+        %tmp2 = trunc i32 %tmp1 to i16
+        ret i16 %tmp2
 }
 
index 9e218b53b2ce871f9b04c72256abb4e404b79928..54c249c8bef94243f2e94338c56860b416cf4c35 100644 (file)
@@ -15,11 +15,11 @@ b:
        %r6 = load i32* %a3
        %r8 = load i32* %a4
        %r14 = load i32* %a5
-       %r = sext i32 %r2 to i64
+       %rx = sext i32 %r2 to i64
        %r9 = sext i32 %r to i64
-       %r11 = add i64 %r, 0
-       %r = icmp slt i64 %r11, 0
-       %r12 = select i1 %r, i64 0, i64 %r11
+       %r11 = add i64 %rx, 0
+       %ras = icmp slt i64 %r11, 0
+       %r12 = select i1 %ras, i64 0, i64 %r11
        %r16 = sext i32 %r14 to i64
        %r17 = sext i32 %r8 to i64
        %r18 = sub i64 %r16, 0
@@ -28,17 +28,17 @@ b:
        %r19h = add i64 %r18, 0
        %r22 = select i1 %r20, i64 1, i64 %r19h
        %r23 = mul i64 %r22, 0
-       %r23 = trunc i64 %r23 to i32
-       %r24 = shl i32 %r23, i8 0
+       %r23a = trunc i64 %r23 to i32
+       %r24 = shl i32 %r23a, i8 0
        %r25 = add i32 %r24, 0
-       %r = alloca i8, i32 %r25, align 16
-       %r28 = getelementptr i8* %r, i32 0
+       %ras2 = alloca i8, i32 %r25, align 16
+       %r28 = getelementptr i8* %ras2, i32 0
        %r38 = shl i64 %r12, i8 0
        %s2013 = add i64 %r38, 0
-       %c22012 = getelementptr i8* %r, i64 %s2013
+       %c22012 = getelementptr i8* %ras2, i64 %s2013
        %r42 = shl i64 %r12, i8 0
        %s2011 = add i64 %r42, 16
-       %c22010 = getelementptr i8* %r, i64 %s2011
+       %c22010 = getelementptr i8* %ras2, i64 %s2011
        %r50 = add i64 %r16, 0
        %r51 = icmp slt i64 %r50, 0
        %r50sh = shl i64 %r50, i8 0
@@ -46,7 +46,7 @@ b:
        %r54 = select i1 %r51, i64 0, i64 %r50j
        %r56 = mul i64 %r54, %r12
        %r28s = add i64 %r56, 16
-       %c2 = getelementptr i8* %r, i64 %r28s
+       %c2 = getelementptr i8* %ras2, i64 %r28s
        %r60 = sub i32 %r2, %r
        %r61 = icmp slt i32 %r60, 0
        br i1 %r61, label %a29b, label %b63
@@ -112,9 +112,9 @@ a30b294q:
        br label %a30b294
 a30b:
        %w = phi i64 [ 0, %b179 ], [ %v, %a30b ]
-       %b = shl i64 %w, i8 0
-       %r283 = add i64 %b, 0
-       %r286 = add i64 %b, 0
+       %b2 = shl i64 %w, i8 0
+       %r283 = add i64 %b2, 0
+       %r286 = add i64 %b2, 0
        %r288 = icmp slt i64 %r286, 0
        %v = add i64 %w, 0
        br i1 %r288, label %b188, label %a30b
@@ -204,7 +204,7 @@ a45b:
        %v1853 = add i64 %w1852, 0
        br i1 %r708, label %b565, label %a45b
 b712:
-       %r795 = add i64 %r, 0
+       %r795 = add i64 %rx, 0
        %r799 = add i64 %s923, 0
        %r802 = add i64 %w1855, 0
        %r807 = icmp slt i64 %r802, 0
@@ -255,7 +255,7 @@ b820:
        %r846 = sext i32 %r60 to i64
        %r847 = add i64 %r846, 0
        %r851 = load float* bitcast ([128 x i64]* @i6000 to float*)
-       %r856 = sub i64 %r, 0
+       %r856 = sub i64 %rx, 0
        br label %b858
 b858:
        %w1891 = phi i64 [ 0, %b820 ], [ %v1892, %b1016 ]
@@ -321,7 +321,7 @@ a66b:
        br i1 %r817, label %a93b, label %b1321
 b1086:
        %r1089 = sext i32 %r2 to i64
-       %r1090 = add i64 %r, 0
+       %r1090 = add i64 %rx, 0
        %r1096 = mul i64 %r9, 0
        %r1101 = sext i32 %r8 to i64
        %r1104 = add i64 %r1096, 0
@@ -424,7 +424,7 @@ a74b:
        %v1959 = add i64 %w1958, 0
        br i1 %r1581, label %a74b, label %b1582
 b1582:
-       %r1587 = add i64 %r, 0
+       %r1587 = add i64 %rx, 0
        %r1591 = add i64 %s1563, 0
        %r1596 = add i64 %d1533, 0
        %r1601 = icmp slt i64 %r1596, 0
index 71f4742c08bcc027f4759adb3c0e065bcd42a7f8..96b2e3ebae17886c2088d6c2ab95e11ea9325da8 100644 (file)
@@ -43,7 +43,7 @@ int %foldSel2(bool %A, int %B, int %C) {
        ret int %X
 }
 
-int %foldSel2(bool %A, int %B, int %C, double %X, double %Y) {
+int %foldSel2a(bool %A, int %B, int %C, double %X, double %Y) {
        %Cond = setlt double %X, %Y
        %X = select bool %Cond, int %B, int %C
        ret int %X
index f2871f7d713ca34bdae4780800151ea5019a3d00..8486bbd4286845aecaecd3a1735726ec6a4aebe7 100644 (file)
@@ -12,8 +12,8 @@ define i1 @test1(i32 %X) zext {
 
 define i1 @test2(i32 %val, i32 %mask) {
 entry:
-    %mask = trunc i32 %mask to i8
-    %shifted = ashr i32 %val, i8 %mask
+    %maski8 = trunc i32 %mask to i8
+    %shifted = ashr i32 %val, i8 %maski8
     %anded = and i32 %shifted, 1
     %trunced = trunc i32 %anded to i1
     br i1 %trunced, label %ret_true, label %ret_false
index 5cb133c134b6c2e0f6c34055fda255d6d513b81d..23c5808af12fe6e932bda3a2700e70b5878ea623 100644 (file)
@@ -1,5 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufps | wc -l | grep 1 &&
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshufd | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \
+; RUN:    grep shufps | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \
+; RUN:    grep pshufd | wc -l | grep 1
 
 <4 x float> %test(float %a) {
        %tmp = insertelement <4 x float> zeroinitializer, float %a, uint 1
@@ -8,7 +10,7 @@
        ret <4 x float> %tmp6
 }
 
-<2 x long> %test(int %a) {
+<2 x long> %test2(int %a) {
        %tmp7 = insertelement <4 x int> zeroinitializer, int %a, uint 2
        %tmp9 = insertelement <4 x int> %tmp7, int 0, uint 3
        %tmp10 = cast <4 x int> %tmp9 to <2 x long>
index 745200fab929743c8eea77428b14fd8db2ecb99e..c656a5817a7ebb8bf972bccc3dd8b6aea570da63 100644 (file)
@@ -11,7 +11,7 @@ entry:
        ret <2 x long> %tmp19
 }
 
-<2 x long> %test(sbyte %a) {
+<2 x long> %test2(sbyte %a) {
 entry:
        %tmp24 = insertelement <16 x sbyte> zeroinitializer, sbyte %a, uint 10
        %tmp26 = insertelement <16 x sbyte> %tmp24, sbyte 0, uint 11
index 329b875d8a4e0b0c798617449c093eec59a1d46b..0926f137e3fca7f4603820f3737daf526f912d4e 100644 (file)
@@ -12,9 +12,9 @@ implementation
 
 define i32 @main(i32 %argc, i8 **%argv) {
     %val = trunc i32 %argc to i16
-    %res = call i16 (i16 sext) sext *@test(i16 %val)
-    %two = add i16 %res, %res
-    %res = call i8 @test2(i16 %two zext) zext 
+    %res1 = call i16 (i16 sext) sext *@test(i16 %val)
+    %two = add i16 %res1, %res1
+    %res2 = call i8 @test2(i16 %two zext) zext 
     %retVal = sext i16 %two to i32
     ret i32 %retVal
 }
index 1df2fc70a0b634c022280a7bd1d7f6ea6b674d3f..3aa5f914240e49e0b7e30e3c46c0019fe241c193 100644 (file)
@@ -16,7 +16,7 @@ define void @multiply(i32 %index, i32 %X, i32 %Y) {
   ret void
 }
 
-define i32 @main(i32 %argc, i8** %argc) {
+define i32 @main(i32 %argc, i8** %argv) {
   %i = bitcast i32 0 to i32
   call void @multiply(i32 %i, i32 -1, i32 255) 
   %P = getelementptr [20 x i17]* @ARRAY, i32 0, i32 0
index 274dfc5a28e20a9b81eb335620679e048903b37b..747b39d8d7d0804d498b86ec195e205f3babbad3 100644 (file)
@@ -48,6 +48,6 @@ end
 define i32 @"main"()
 begin
   %Result = call i63 @trampoline(i63 10, i63(i63) *@fib)
-  %Result = trunc i63 %Result to i32
-  ret i32 %Result
+  %Result2 = trunc i63 %Result to i32
+  ret i32 %Result2
 end
index abf6abdca840903cfe22e431a756036e6271725e..ac382728f8fbca666fe45ef580c522c5d732e804 100644 (file)
@@ -14,7 +14,7 @@ define i33 @main(i33 %argc, i8 **%argv) {
     %val = trunc i33 %argc to i16
     %res = call i16 (i16 sext) sext *@test(i16 %val)
     %two = add i16 %res, %res
-    %res = call i8 @test2(i16 %two zext) zext 
+    %res2 = call i8 @test2(i16 %two zext) zext 
     %retVal = sext i16 %two to i33
     ret i33 %retVal
 }
index 5a0d1c7671e3ff3de69383090eb3363f85fabed2..08a1413bfc8c8b2bd9776c5f4a786c5e5fab1238 100644 (file)
@@ -68,10 +68,10 @@ bb3:
         %cast1006 = bitcast %list** %reg119 to i8**             ;;<i8**>
         %reg111 = call i8* @malloc(i32 16)                  ;;<i8*>
         store i8* %reg111, i8** %cast1006                 ;;<void>
-       %reg111 = ptrtoint i8* %reg111 to i64
-       %reg1002 = add i64 %reg111, 8
-        %reg1002 = inttoptr i64 %reg1002 to i8*             ;;<i8*>
-        %cast1008 = bitcast i8* %reg1002 to i36*                ;;<i36*>
+       %reg112 = ptrtoint i8* %reg111 to i64
+       %reg1002 = add i64 %reg112, 8
+        %reg1005 = inttoptr i64 %reg1002 to i8*             ;;<i8*>
+        %cast1008 = bitcast i8* %reg1005 to i36*                ;;<i36*>
         store i36 %Data, i36* %cast1008                         ;;<void>
         %cast1003 = inttoptr i64 0 to i64*                      ;;<i64*>
         %cast1009 = bitcast i8* %reg111 to i64**              ;;<i64**>
index 6f2971a7d647cbc7def76354c5ebbb38e57e2739..5a92b5d19c57a235bb8e7f058b89fbd46811ce71 100644 (file)
@@ -1,5 +1,5 @@
 ; Test linking two functions with different prototypes and two globals 
-; in different modules.
+; in different modules. This is for PR411
 ; RUN: llvm-as %s -o %t.bar.bc -f
 ; RUN: echo "define i32* @foo(i32 %x) { ret i32* @baz } @baz = external global i32" | \
 ; RUN:   llvm-as -o %t.foo.bc -f
index 7f79091321deb5dac04b12838f30bd07585df992..6e459308824380fc8731bb515a223f72a17c07ee 100644 (file)
@@ -26,9 +26,9 @@ cond_true:            ; preds = %bb2
        br label %bb
 
 cond_next:             ; preds = %bb2
-       %tmp = getelementptr [5 x i8]* @foo, i32 0, i32 %i.0            ; <i8*> [#uses=1]
-       %tmp = load i8* %tmp            ; <i8> [#uses=1]
-       %tmp5 = icmp eq i8 %tmp, 0              ; <i1> [#uses=1]
+       %tmp2 = getelementptr [5 x i8]* @foo, i32 0, i32 %i.0           ; <i8*> [#uses=1]
+       %tmp3 = load i8* %tmp2          ; <i8> [#uses=1]
+       %tmp5 = icmp eq i8 %tmp3, 0             ; <i1> [#uses=1]
        br i1 %tmp5, label %bb6, label %bb
 
 bb6:           ; preds = %cond_next
index 033743c64f3aff07a64151ab422910bae18c0f69..aa12a99bdc066865971fbf9858b2c5b4a1d4fc42 100644 (file)
@@ -241,7 +241,7 @@ ubyte %test34(ubyte %A) {
         ret ubyte %C
 }
 
-int %test34(int %a) {  ;; -> -1
+int %test35(int %a) {  ;; -> -1
         %tmpnot = xor int %a, -1
         %tmp2 = add int %tmpnot, %a
         ret int %tmp2
index ccb358de4d857c23e5ee16e616eb48098369c2b0..00705aa4750e462ed977ecce8aa0a66e56d895f6 100644 (file)
@@ -20,7 +20,7 @@ uint %test3(uint %A) {
        ret uint %B
 }
 
-bool %test3(int %A) {
+bool %test3a(int %A) {
        %B = rem int %A, -8   ; & 7
        %C = setne int %B, 0
        ret bool %C
index a8c83afe73c491a342f02a21895898a1475f6e8e..a53903a05f07419c160cae51f9fc6e43827fbe2e 100644 (file)
@@ -35,8 +35,8 @@ define i32 @test5(<4 x i32> %X) {
 }
 
 define float @test6(<4 x float> %X) {
-        %X = bitcast <4 x float> %X to <4 x i32>
-        %tmp152.i53899.i = shufflevector <4 x i32> %X, <4 x i32> undef, <4 x i32> zeroinitializer
+        %X1 = bitcast <4 x float> %X to <4 x i32>
+        %tmp152.i53899.i = shufflevector <4 x i32> %X1, <4 x i32> undef, <4 x i32> zeroinitializer
         %tmp152.i53900.i = bitcast <4 x i32> %tmp152.i53899.i to <4 x float>
         %tmp34 = extractelement <4 x float> %tmp152.i53900.i, i32 0
         ret float %tmp34