[llvm-commits] CVS: llvm/test/Feature/globalredefinition2.ll globalredefinition3.ll newcasts.ll packed_struct.ll paramattrs.ll

Reid Spencer reid at x10sys.com
Fri Jan 26 00:26:12 PST 2007



Changes in directory llvm/test/Feature:

globalredefinition2.ll updated: 1.1 -> 1.2
globalredefinition3.ll updated: 1.2 -> 1.3
newcasts.ll updated: 1.3 -> 1.4
packed_struct.ll updated: 1.4 -> 1.5
paramattrs.ll updated: 1.3 -> 1.4
---
Log message:

For PR761: http://llvm.org/PR761 :
Remove "target endian/pointersize" or add "target datalayout" to make
the test parse properly or set the datalayout because defaults changes.

For PR645: http://llvm.org/PR645 :
Make global names use the @ prefix.

For llvm-upgrade changes:
Fix test cases or completely remove use of llvm-upgrade for test cases 
that cannot survive the new renaming or upgrade capabilities. 



---
Diffs of the changes:  (+35 -35)

 globalredefinition2.ll |    2 +-
 globalredefinition3.ll |    4 ++--
 newcasts.ll            |   32 ++++++++++++++++----------------
 packed_struct.ll       |   22 +++++++++++-----------
 paramattrs.ll          |   10 +++++-----
 5 files changed, 35 insertions(+), 35 deletions(-)


Index: llvm/test/Feature/globalredefinition2.ll
diff -u llvm/test/Feature/globalredefinition2.ll:1.1 llvm/test/Feature/globalredefinition2.ll:1.2
--- llvm/test/Feature/globalredefinition2.ll:1.1	Fri Jan  5 11:25:12 2007
+++ llvm/test/Feature/globalredefinition2.ll	Fri Jan 26 02:25:06 2007
@@ -1,6 +1,6 @@
 ; Test that redefinitions of globals produces an error in llvm-upgrade
 ; RUN: llvm-upgrade < %s -o /dev/null -f 2>&1 | \
-; RUN:   grep "Global variable '%B' was renamed to '"
+; RUN:   grep "Renaming global variable 'B' to.*linkage errors"
 
 %B = global int 7
 %B = global int 7


Index: llvm/test/Feature/globalredefinition3.ll
diff -u llvm/test/Feature/globalredefinition3.ll:1.2 llvm/test/Feature/globalredefinition3.ll:1.3
--- llvm/test/Feature/globalredefinition3.ll:1.2	Fri Jan  5 15:51:57 2007
+++ llvm/test/Feature/globalredefinition3.ll	Fri Jan 26 02:25:06 2007
@@ -4,5 +4,5 @@
 
 ; Test forward references and redefinitions of globals
 
-%B = global i32 7
-%B = global i32 7
+ at B = global i32 7
+ at B = global i32 7


Index: llvm/test/Feature/newcasts.ll
diff -u llvm/test/Feature/newcasts.ll:1.3 llvm/test/Feature/newcasts.ll:1.4
--- llvm/test/Feature/newcasts.ll:1.3	Fri Dec 29 14:21:51 2006
+++ llvm/test/Feature/newcasts.ll	Fri Jan 26 02:25:06 2007
@@ -1,28 +1,28 @@
-; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
+; RUN: llvm-as < %s | llvm-dis > %t1.ll
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 
-void "NewCasts" (short %x) {
-  %a = zext short %x to int
-  %b = sext short %x to uint
-  %c = trunc short %x to ubyte
-  %d = uitofp short %x to float
-  %e = sitofp short %x to double
-  %f = fptoui float %d to short
-  %g = fptosi double %e to short
+define void @"NewCasts" (i16 %x) {
+  %a = zext i16 %x to i32
+  %b = sext i16 %x to i32
+  %c = trunc i16 %x to i8
+  %d = uitofp i16 %x to float
+  %e = sitofp i16 %x to double
+  %f = fptoui float %d to i16
+  %g = fptosi double %e to i16
   %i = fpext float %d to double
   %j = fptrunc double %i to float
-  %k = bitcast int %a to float
-  %l = inttoptr short %x to int*
-  %m = ptrtoint int* %l to long
+  %k = bitcast i32 %a to float
+  %l = inttoptr i16 %x to i32*
+  %m = ptrtoint i32* %l to i64
   ret void
 }
 
 
-ushort "ZExtConst" () {
-  ret ushort trunc ( uint zext ( short 42 to uint) to ushort )
+define i16 @"ZExtConst" () {
+  ret i16 trunc ( i32 zext ( i16 42 to i32) to i16 )
 }
 
-short "SExtConst" () {
-  ret short trunc (int sext (ushort 42 to int) to short )
+define i16 @"SExtConst" () {
+  ret i16 trunc (i32 sext (i16 42 to i32) to i16 )
 }


Index: llvm/test/Feature/packed_struct.ll
diff -u llvm/test/Feature/packed_struct.ll:1.4 llvm/test/Feature/packed_struct.ll:1.5
--- llvm/test/Feature/packed_struct.ll:1.4	Mon Jan  8 12:15:35 2007
+++ llvm/test/Feature/packed_struct.ll	Fri Jan 26 02:25:06 2007
@@ -5,29 +5,29 @@
 ; RUN: grep "<{" %t2.ll
 
 %struct.anon = type <{ i8, i32, i32, i32 }>
-%foos = external global %struct.anon 
-%bara = external global [2 x <{ i32, i8 }>]
+ at foos = external global %struct.anon 
+ at bara = external global [2 x <{ i32, i8 }>]
 
 ;initializers should work for packed and non-packed the same way
-%E1 = global <{i8, i32, i32}> <{i8 1, i32 2, i32 3}>
-%E2 = global {i8, i32, i32} {i8 4, i32 5, i32 6}
+ at E1 = global <{i8, i32, i32}> <{i8 1, i32 2, i32 3}>
+ at E2 = global {i8, i32, i32} {i8 4, i32 5, i32 6}
 
 implementation   ; Functions:
 
-define i32 %main() 
+define i32 @main() 
 {
-        %tmp = load i32*  getelementptr (%struct.anon* %foos, i32 0, i32 1)            ; <i32> [#uses=1]
-        %tmp3 = load i32* getelementptr (%struct.anon* %foos, i32 0, i32 2)            ; <i32> [#uses=1]
-        %tmp6 = load i32* getelementptr (%struct.anon* %foos, i32 0, i32 3)            ; <i32> [#uses=1]
+        %tmp = load i32*  getelementptr (%struct.anon* @foos, i32 0, i32 1)            ; <i32> [#uses=1]
+        %tmp3 = load i32* getelementptr (%struct.anon* @foos, i32 0, i32 2)            ; <i32> [#uses=1]
+        %tmp6 = load i32* getelementptr (%struct.anon* @foos, i32 0, i32 3)            ; <i32> [#uses=1]
         %tmp4 = add i32 %tmp3, %tmp             ; <i32> [#uses=1]
         %tmp7 = add i32 %tmp4, %tmp6            ; <i32> [#uses=1]
         ret i32 %tmp7
 }
 
-define i32 %bar() {
+define i32 @bar() {
 entry:
-        %tmp = load i32* getelementptr([2 x <{ i32, i8 }>]* %bara, i32 0, i32 0, i32 0 )            ; <i32> [#uses=1]
-        %tmp4 = load i32* getelementptr ([2 x <{ i32, i8 }>]* %bara, i32 0, i32 1, i32 0)           ; <i32> [#uses=1]
+        %tmp = load i32* getelementptr([2 x <{ i32, i8 }>]* @bara, i32 0, i32 0, i32 0 )            ; <i32> [#uses=1]
+        %tmp4 = load i32* getelementptr ([2 x <{ i32, i8 }>]* @bara, i32 0, i32 1, i32 0)           ; <i32> [#uses=1]
         %tmp5 = add i32 %tmp4, %tmp             ; <i32> [#uses=1]
         ret i32 %tmp5
 }


Index: llvm/test/Feature/paramattrs.ll
diff -u llvm/test/Feature/paramattrs.ll:1.3 llvm/test/Feature/paramattrs.ll:1.4
--- llvm/test/Feature/paramattrs.ll:1.3	Fri Jan  5 11:26:04 2007
+++ llvm/test/Feature/paramattrs.ll	Fri Jan 26 02:25:06 2007
@@ -5,16 +5,16 @@
 %ZFunTy = type i32(i8 zext)
 %SFunTy = type i32(i8 sext)
 
-declare i16 "test"(i16 sext %arg) sext 
-declare i8 "test2" (i16 zext %a2) zext 
+declare i16 @"test"(i16 sext %arg) sext 
+declare i8 @"test2" (i16 zext %a2) zext 
 
 implementation
 
-define i32 %main(i32 %argc, i8 **%argv) {
+define i32 @main(i32 %argc, i8 **%argv) {
     %val = trunc i32 %argc to i16
-    %res = call i16 (i16 sext) sext *%test(i16 %val)
+    %res = call i16 (i16 sext) sext *@test(i16 %val)
     %two = add i16 %res, %res
-    %res = call i8 %test2(i16 %two zext) zext 
+    %res = call i8 @test2(i16 %two zext) zext 
     %retVal = sext i16 %two to i32
     ret i32 %retVal
 }






More information about the llvm-commits mailing list