Run llvm-upgrade on this test and/or upgrade intrinsic function calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32133 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll b/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll
index 559a481..3e2dbfe 100644
--- a/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll
+++ b/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll
@@ -1,6 +1,6 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade < %s | llvm-as -o - | llc 
 
-; This causes the backend to assert out with:
+; This caused the backend to assert out with:
 ; SparcInstrInfo.cpp:103: failed assertion `0 && "Unexpected unsigned type"'
 ;
 implementation
diff --git a/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll b/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll
index 5b372c5..61d802c 100644
--- a/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll
+++ b/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 ;; Date:     May 28, 2003.
 ;; From:     test/Programs/External/SPEC/CINT2000/254.gap.llvm.bc
diff --git a/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll b/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll
index 518e783..e9cac7f 100644
--- a/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll
+++ b/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 ;; Date:     May 28, 2003.
 ;; From:     test/Programs/SingleSource/richards_benchmark.c
diff --git a/test/CodeGen/Generic/2003-07-07-BadLongConst.ll b/test/CodeGen/Generic/2003-07-07-BadLongConst.ll
index 13708ef..376ef19 100644
--- a/test/CodeGen/Generic/2003-07-07-BadLongConst.ll
+++ b/test/CodeGen/Generic/2003-07-07-BadLongConst.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 
 %.str_1 = internal constant [42 x sbyte] c"   ui = %u (0x%x)\09\09UL-ui = %lld (0x%llx)\0A\00"
diff --git a/test/CodeGen/Generic/2003-07-08-BadCastToBool.ll b/test/CodeGen/Generic/2003-07-08-BadCastToBool.ll
index 52932c2..2fede53 100644
--- a/test/CodeGen/Generic/2003-07-08-BadCastToBool.ll
+++ b/test/CodeGen/Generic/2003-07-08-BadCastToBool.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 ;; Date:     Jul 8, 2003.
 ;; From:     test/Programs/MultiSource/Olden-perimeter
diff --git a/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll b/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll
index 96b9435..3224d1a 100644
--- a/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll
+++ b/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll
@@ -2,10 +2,10 @@
 ; Test that llvm.memcpy works with a i64 length operand on all targets.
 
 
-declare void %llvm.memcpy(sbyte*, sbyte*, ulong, uint)
+declare void %llvm.memcpy.i64(sbyte*, sbyte*, ulong, uint)
 
 void %l12_l94_bc_divide_endif_2E_3_2E_ce() {
 newFuncRoot:
-	tail call void %llvm.memcpy( sbyte* null, sbyte* null, ulong 0, uint 1 )
+	tail call void %llvm.memcpy.i64( sbyte* null, sbyte* null, ulong 0, uint 1 )
 	unreachable
 }
diff --git a/test/CodeGen/Generic/2006-07-03-schedulers.ll b/test/CodeGen/Generic/2006-07-03-schedulers.ll
index 23513ec..7120c1f 100644
--- a/test/CodeGen/Generic/2006-07-03-schedulers.ll
+++ b/test/CodeGen/Generic/2006-07-03-schedulers.ll
@@ -1,10 +1,10 @@
-; RUN: llvm-as -f %s -o - | llc -sched=none &&
-; RUN: llvm-as -f %s -o - | llc -sched=default &&
-; RUN: llvm-as -f %s -o - | llc -sched=simple &&
-; RUN: llvm-as -f %s -o - | llc -sched=simple-noitin &&
-; RUN: llvm-as -f %s -o - | llc -sched=list-td &&
-; RUN: llvm-as -f %s -o - | llc -sched=list-tdrr &&
-; RUN: llvm-as -f %s -o - | llc -sched=list-burr
+; RUN: llvm-upgrade %s | llvm-as | llc -sched=none &&
+; RUN: llvm-upgrade %s | llvm-as | llc -sched=default &&
+; RUN: llvm-upgrade %s | llvm-as | llc -sched=simple &&
+; RUN: llvm-upgrade %s | llvm-as | llc -sched=simple-noitin &&
+; RUN: llvm-upgrade %s | llvm-as | llc -sched=list-td &&
+; RUN: llvm-upgrade %s | llvm-as | llc -sched=list-tdrr &&
+; RUN: llvm-upgrade %s | llvm-as | llc -sched=list-burr
 ; PR859
 
 implementation
diff --git a/test/CodeGen/Generic/BurgBadRegAlloc.ll b/test/CodeGen/Generic/BurgBadRegAlloc.ll
index 4347260..af74a81 100644
--- a/test/CodeGen/Generic/BurgBadRegAlloc.ll
+++ b/test/CodeGen/Generic/BurgBadRegAlloc.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 ;; Register allocation is doing a very poor job on this routine from yyparse
 ;; in Burg:
diff --git a/test/CodeGen/Generic/badFoldGEP.ll b/test/CodeGen/Generic/badFoldGEP.ll
index 503035c..63acd46 100644
--- a/test/CodeGen/Generic/badFoldGEP.ll
+++ b/test/CodeGen/Generic/badFoldGEP.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 ;; GetMemInstArgs() folded the two getElementPtr instructions together,
 ;; producing an illegal getElementPtr.  That's because the type generated
diff --git a/test/CodeGen/Generic/constindices.ll b/test/CodeGen/Generic/constindices.ll
index 3a64a15..b176144 100644
--- a/test/CodeGen/Generic/constindices.ll
+++ b/test/CodeGen/Generic/constindices.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 ; Test that a sequence of constant indices are folded correctly
 ; into the equivalent offset at compile-time.
diff --git a/test/CodeGen/Generic/fwdtwice.ll b/test/CodeGen/Generic/fwdtwice.ll
index ecbe5fc..ec085ec 100644
--- a/test/CodeGen/Generic/fwdtwice.ll
+++ b/test/CodeGen/Generic/fwdtwice.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 ;;
 ;; Test the sequence:
diff --git a/test/CodeGen/Generic/intrinsics.ll b/test/CodeGen/Generic/intrinsics.ll
index 7c1d1a5..eb3148a 100644
--- a/test/CodeGen/Generic/intrinsics.ll
+++ b/test/CodeGen/Generic/intrinsics.ll
@@ -1,12 +1,12 @@
 ; RUN: llvm-upgrade < %s | llvm-as | llc
 
 ;; SQRT
-declare float %llvm.sqrt(float)
-declare double %llvm.sqrt(double)
+declare float %llvm.sqrt.f32(float)
+declare double %llvm.sqrt.f64(double)
 double %test_sqrt(float %F) {
-	%G = call float %llvm.sqrt(float %F)
+	%G = call float %llvm.sqrt.f32(float %F)
 	%H = cast float %G to double
-	%I = call double %llvm.sqrt(double %H)
+	%I = call double %llvm.sqrt.f64(double %H)
 	ret double %I
 }
 
diff --git a/test/CodeGen/Generic/isunord.ll b/test/CodeGen/Generic/isunord.ll
index f11ec33..c8dabc4 100644
--- a/test/CodeGen/Generic/isunord.ll
+++ b/test/CodeGen/Generic/isunord.ll
@@ -2,9 +2,9 @@
 ; XFAIL: ia64|sparcv8
 
 
-declare bool %llvm.isunordered(double, double)
+declare bool %llvm.isunordered.f64(double, double)
 
 bool %test(double %X, double %Y) {
-  %tmp27 = call bool %llvm.isunordered( double %X, double %Y)
+  %tmp27 = call bool %llvm.isunordered.f64( double %X, double %Y)
   ret bool %tmp27
 }
diff --git a/test/CodeGen/Generic/llvm-ct-intrinsics.ll b/test/CodeGen/Generic/llvm-ct-intrinsics.ll
index 1897abe..014d261 100644
--- a/test/CodeGen/Generic/llvm-ct-intrinsics.ll
+++ b/test/CodeGen/Generic/llvm-ct-intrinsics.ll
@@ -1,59 +1,59 @@
 ; Make sure this testcase is supported by all code generators
 ; RUN: llvm-upgrade < %s | llvm-as | llc
 
-declare long %llvm.ctpop(long)
-declare int %llvm.ctpop(int)
-declare short %llvm.ctpop(short)
-declare sbyte %llvm.ctpop(sbyte)
+declare ulong %llvm.ctpop.i64(ulong)
+declare uint %llvm.ctpop.i32(uint)
+declare ushort %llvm.ctpop.i16(ushort)
+declare ubyte %llvm.ctpop.i8(ubyte)
 
-void %ctpoptest(sbyte %A, short %B, int %C, long %D, 
-                sbyte *%AP, short* %BP, int* %CP, long* %DP) {
-	%a = call sbyte %llvm.ctpop(sbyte %A)
-	%b = call short %llvm.ctpop(short %B)
-	%c = call int %llvm.ctpop(int %C)
-	%d = call long %llvm.ctpop(long %D)
+void %ctpoptest(ubyte %A, ushort %B, uint %C, ulong %D, 
+                ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
+	%a = call ubyte %llvm.ctpop.i8(ubyte %A)
+	%b = call ushort %llvm.ctpop.i16(ushort %B)
+	%c = call uint %llvm.ctpop.i32(uint %C)
+	%d = call ulong %llvm.ctpop.i64(ulong %D)
 
-	store sbyte %a, sbyte* %AP
-	store short %b, short* %BP
-	store int   %c, int* %CP
-	store long  %d, long* %DP
+	store ubyte %a, ubyte* %AP
+	store ushort %b, ushort* %BP
+	store uint   %c, uint* %CP
+	store ulong  %d, ulong* %DP
 	ret void
 }
 
-declare long %llvm.ctlz(long)
-declare int %llvm.ctlz(int)
-declare short %llvm.ctlz(short)
-declare sbyte %llvm.ctlz(sbyte)
+declare ulong %llvm.ctlz.i64(ulong)
+declare uint %llvm.ctlz.i32(uint)
+declare ushort %llvm.ctlz.i16(ushort)
+declare ubyte %llvm.ctlz.i8(ubyte)
 
-void %ctlztest(sbyte %A, short %B, int %C, long %D, 
-               sbyte *%AP, short* %BP, int* %CP, long* %DP) {
-	%a = call sbyte %llvm.ctlz(sbyte %A)
-	%b = call short %llvm.ctlz(short %B)
-	%c = call int %llvm.ctlz(int %C)
-	%d = call long %llvm.ctlz(long %D)
+void %ctlztest(ubyte %A, ushort %B, uint %C, ulong %D, 
+               ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
+	%a = call ubyte %llvm.ctlz.i8(ubyte %A)
+	%b = call ushort %llvm.ctlz.i16(ushort %B)
+	%c = call uint %llvm.ctlz.i32(uint %C)
+	%d = call ulong %llvm.ctlz.i64(ulong %D)
 
-	store sbyte %a, sbyte* %AP
-	store short %b, short* %BP
-	store int   %c, int* %CP
-	store long  %d, long* %DP
+	store ubyte %a, ubyte* %AP
+	store ushort %b, ushort* %BP
+	store uint   %c, uint* %CP
+	store ulong  %d, ulong* %DP
 	ret void
 }
 
-declare long %llvm.cttz(long)
-declare int %llvm.cttz(int)
-declare short %llvm.cttz(short)
-declare sbyte %llvm.cttz(sbyte)
+declare ulong %llvm.cttz.i64(ulong)
+declare uint %llvm.cttz.i32(uint)
+declare ushort %llvm.cttz.i16(ushort)
+declare ubyte %llvm.cttz.i8(ubyte)
 
-void %cttztest(sbyte %A, short %B, int %C, long %D, 
-               sbyte *%AP, short* %BP, int* %CP, long* %DP) {
-	%a = call sbyte %llvm.cttz(sbyte %A)
-	%b = call short %llvm.cttz(short %B)
-	%c = call int %llvm.cttz(int %C)
-	%d = call long %llvm.cttz(long %D)
+void %cttztest(ubyte %A, ushort %B, uint %C, ulong %D, 
+               ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
+	%a = call ubyte %llvm.cttz.i8(ubyte %A)
+	%b = call ushort %llvm.cttz.i16(ushort %B)
+	%c = call uint %llvm.cttz.i32(uint %C)
+	%d = call ulong %llvm.cttz.i64(ulong %D)
 
-	store sbyte %a, sbyte* %AP
-	store short %b, short* %BP
-	store int   %c, int* %CP
-	store long  %d, long* %DP
+	store ubyte %a, ubyte* %AP
+	store ushort %b, ushort* %BP
+	store uint   %c, uint* %CP
+	store ulong  %d, ulong* %DP
 	ret void
 }
diff --git a/test/CodeGen/Generic/negintconst.ll b/test/CodeGen/Generic/negintconst.ll
index 4c8fe74..020b6bb 100644
--- a/test/CodeGen/Generic/negintconst.ll
+++ b/test/CodeGen/Generic/negintconst.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 ; Test that a negative constant smaller than 64 bits (e.g., int)
 ; is correctly implemented with sign-extension.
diff --git a/test/CodeGen/Generic/sched.ll b/test/CodeGen/Generic/sched.ll
index 477425f..ed2f44e 100644
--- a/test/CodeGen/Generic/sched.ll
+++ b/test/CodeGen/Generic/sched.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 implementation
 declare int "printf"(sbyte*, int, float)
diff --git a/test/CodeGen/Generic/select.ll b/test/CodeGen/Generic/select.ll
index 3c75c6c..edf3641 100644
--- a/test/CodeGen/Generic/select.ll
+++ b/test/CodeGen/Generic/select.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 %AConst    = constant int 123
 
diff --git a/test/CodeGen/Generic/spillccr.ll b/test/CodeGen/Generic/spillccr.ll
index 8223d09..6ae7506 100644
--- a/test/CodeGen/Generic/spillccr.ll
+++ b/test/CodeGen/Generic/spillccr.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -f %s -o - | llc
+; RUN: llvm-upgrade %s | llvm-as | llc
 
 ; July 6, 2002 -- LLC Regression test
 ; This test case checks if the integer CC register %xcc (or %ccr)