diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 08:25:06 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 08:25:06 +0000 |
commit | e3ff5ada8a8f6cc166ecc45147da0d63c3683026 (patch) | |
tree | ccd4a6b0d605384b41f7d3b84cc019344c2dd65a /test/Feature | |
parent | 950bf6030101d670ea205efd307ea5d3b375544d (diff) | |
download | external_llvm-e3ff5ada8a8f6cc166ecc45147da0d63c3683026.zip external_llvm-e3ff5ada8a8f6cc166ecc45147da0d63c3683026.tar.gz external_llvm-e3ff5ada8a8f6cc166ecc45147da0d63c3683026.tar.bz2 |
For PR761:
Remove "target endian/pointersize" or add "target datalayout" to make
the test parse properly or set the datalayout because defaults changes.
For 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Feature')
-rw-r--r-- | test/Feature/globalredefinition2.ll | 2 | ||||
-rw-r--r-- | test/Feature/globalredefinition3.ll | 4 | ||||
-rw-r--r-- | test/Feature/newcasts.ll | 32 | ||||
-rwxr-xr-x | test/Feature/packed_struct.ll | 22 | ||||
-rw-r--r-- | test/Feature/paramattrs.ll | 10 |
5 files changed, 35 insertions, 35 deletions
diff --git a/test/Feature/globalredefinition2.ll b/test/Feature/globalredefinition2.ll index 4e14b00..d99a80d 100644 --- a/test/Feature/globalredefinition2.ll +++ b/test/Feature/globalredefinition2.ll @@ -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 diff --git a/test/Feature/globalredefinition3.ll b/test/Feature/globalredefinition3.ll index 7ed4a50..8e81d21 100644 --- a/test/Feature/globalredefinition3.ll +++ b/test/Feature/globalredefinition3.ll @@ -4,5 +4,5 @@ ; Test forward references and redefinitions of globals -%B = global i32 7 -%B = global i32 7 +@B = global i32 7 +@B = global i32 7 diff --git a/test/Feature/newcasts.ll b/test/Feature/newcasts.ll index 148e2ee..d237157 100644 --- a/test/Feature/newcasts.ll +++ b/test/Feature/newcasts.ll @@ -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 ) } diff --git a/test/Feature/packed_struct.ll b/test/Feature/packed_struct.ll index 12ea766..861d0bb 100755 --- a/test/Feature/packed_struct.ll +++ b/test/Feature/packed_struct.ll @@ -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 }>] +@foos = external global %struct.anon +@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} +@E1 = global <{i8, i32, i32}> <{i8 1, i32 2, i32 3}> +@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 } diff --git a/test/Feature/paramattrs.ll b/test/Feature/paramattrs.ll index 6c2e8b1..329b875 100644 --- a/test/Feature/paramattrs.ll +++ b/test/Feature/paramattrs.ll @@ -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 } |