diff options
Diffstat (limited to 'test/Transforms/FunctionResolve')
3 files changed, 18 insertions, 20 deletions
diff --git a/test/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVars.ll b/test/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVars.ll index e17e9d7..427227a 100644 --- a/test/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVars.ll +++ b/test/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVars.ll @@ -1,17 +1,17 @@ ; Test that: extern int X[] and int X[] = { 1, 2, 3, 4 } are resolved ; correctly. ; -; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | not grep external +; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep external -%X = external global [0 x int] -%X = global [4 x int] [ int 1, int 2, int 3, int 4 ] +@X = external global [0 x int] +@X = global [4 x int] [ int 1, int 2, int 3, int 4 ] implementation ; Functions: -int %foo(int %x) { +int @foo(int %x) { bb1: ;[#uses=0] - store int 5, int* getelementptr ([0 x int]* %X, long 0, long 2) - %F = getelementptr [0 x int]* %X, long 0, long 2 + store int 5, int* getelementptr ([0 x int]* @X, long 0, long 2) + %F = getelementptr [0 x int]* @X, long 0, long 2 %val = load int* %F ret int %val } diff --git a/test/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVarsEasier.ll b/test/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVarsEasier.ll index e9c1d8c..188fc95 100644 --- a/test/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVarsEasier.ll +++ b/test/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVarsEasier.ll @@ -1,19 +1,19 @@ ; Test that: extern int X[] and int X[] = { 1, 2, 3, 4 } are resolved ; correctly. This doesn't have constantexprs ; -; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | not grep external +; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep external ; -%X = external global [0 x int] -%X = global [4 x int] [ int 1, int 2, int 3, int 4 ] +@X = external global [0 x int] +@X = global [4 x int] [ int 1, int 2, int 3, int 4 ] implementation ; Functions: int %foo(int %x) { bb1: ;[#uses=0] - %G = getelementptr [0 x int]* %X, long 0, long 1 + %G = getelementptr [0 x int]* @X, long 0, long 1 store int 5, int* %G - %F = getelementptr [0 x int]* %X, long 0, long 2 + %F = getelementptr [0 x int]* @X, long 0, long 2 %val = load int* %F ret int %val } diff --git a/test/Transforms/FunctionResolve/2003-10-21-GlobalResolveHack.ll b/test/Transforms/FunctionResolve/2003-10-21-GlobalResolveHack.ll index 0865f0d..df5340f 100644 --- a/test/Transforms/FunctionResolve/2003-10-21-GlobalResolveHack.ll +++ b/test/Transforms/FunctionResolve/2003-10-21-GlobalResolveHack.ll @@ -1,14 +1,12 @@ ; This tests a hack put into place specifically for the C++ libstdc++ library. ; It uses an ugly hack which is cleaned up by the funcresolve pass. +; +; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | grep @X | grep '{' -; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | grep %X | grep '{' +@X = external global { i32 } +@X = global [ 4 x i8 ] zeroinitializer -%X = external global { int } -%X = global [ 4 x sbyte ] zeroinitializer - -implementation - -int* %test() { - %P = getelementptr {int}* %X, long 0, uint 0 - ret int* %P +define i32* @test() { + %P = getelementptr {i32}* @X, i64 0, i32 0 + ret i32* %P } |