Remove llvm-upgrade

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47119 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tanya Lattner 2008-02-14 07:57:12 +00:00
parent e8b7ccf0c9
commit 6e9bceea97
47 changed files with 267 additions and 346 deletions

View File

@ -1,4 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; This testcase failed due to a bad assertion in SymbolTable.cpp, removed in ; This testcase failed due to a bad assertion in SymbolTable.cpp, removed in
; the 1.20 revision. Basically the symbol table assumed that if there was an ; the 1.20 revision. Basically the symbol table assumed that if there was an
@ -6,8 +6,6 @@
; void(opaque)* ], that there should have also been named types by now. This ; void(opaque)* ], that there should have also been named types by now. This
; was obviously not the case here, and this is valid. Assertion disabled. ; was obviously not the case here, and this is valid. Assertion disabled.
declare void "foo"(%bb) %bb = type i32
%bb = type int
implementation
declare void @foo(i32)

View File

@ -1,4 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; This testcase used to fail due to a lack of this diff in Value.cpp: ; This testcase used to fail due to a lack of this diff in Value.cpp:
; diff -r1.16 Value.cpp ; diff -r1.16 Value.cpp
@ -16,13 +16,8 @@
; This was causing an assertion failure, due to the "foo" Method object never ; This was causing an assertion failure, due to the "foo" Method object never
; releasing it's reference to the opaque %bb value. ; releasing it's reference to the opaque %bb value.
; ;
declare void "foo"(%bb)
%exception_descriptor = type opaque %bb = type i32
%exception_descriptor = type i32
%bb = type int
%exception_descriptor = type int
implementation
declare void @foo(i32)

View File

@ -1,10 +1,3 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
%Hosp = type { int, int, int, { \2 *, { int, int, int, { [4 x \3], \2, \5, \6,
int, int } * } *, \2 * }, { \2 *, { int, int, int, { [4 x \3], \2, \5, \6, int,
int } * } *, \2 * }, { \2 *, { int, int, int, { [4 x \3], \2, \5, \6, int, int
} * } *, \2 * }, { \2 *, { int, int, int, { [4 x \3], \2, \5, \6, int, int } * }
*, \2 * } }
implementation
%Hosp = type { i32, i32, i32, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* } }

View File

@ -1,4 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; Method arguments were being checked for collisions at the global scope before ; Method arguments were being checked for collisions at the global scope before
; the method object was created by the parser. Because of this, false ; the method object was created by the parser. Because of this, false
@ -10,10 +10,6 @@
; Fixed by delaying binding of variable names until _after_ the method symtab is ; Fixed by delaying binding of variable names until _after_ the method symtab is
; created. ; created.
; ;
@X = global i32 4 ; <i32*> [#uses=0]
%X = global int 4 declare i32 @xxx(i32*)
declare int "xxx"(int * %X)
implementation

View File

@ -1,18 +1,12 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; Another name collision problem. Here the problem was that if a forward ; Another name collision problem. Here the problem was that if a forward
; declaration for a method was found, that this would cause spurious conflicts ; declaration for a method was found, that this would cause spurious conflicts
; to be detected between locals and globals. ; to be detected between locals and globals.
; ;
%Var = uninitialized global int @Var = external global i32 ; <i32*> [#uses=0]
declare void "foo"() define void @foo() {
%Var = alloca i32 ; <i32*> [#uses=0]
implementation
void "foo"()
begin
%Var = alloca int ; Conflict with global var
ret void ret void
end }

View File

@ -1,7 +1,6 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
type { { \2 *, \4 ** }, type { { \2 *, \4 ** },
{ \2 *, \4 ** } { \2 *, \4 ** }
} }
implementation

View File

@ -1,7 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
%t = type { { \2*, \2 }, %t = type { { \2*, \2 },
{ \2*, \2 } { \2*, \2 }
} }
implementation

View File

@ -1,8 +1,3 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
%Hosp = type { %Hosp = type { { \2*, { \2, %Hosp }* }, { \2*, { \2, %Hosp }* } }
{ \2 *, { \2, \4 } * },
{ \2 *, { \2, \4 } * }
}
implementation

View File

@ -5,15 +5,12 @@
; of the bug that was causing the Olden Health benchmark to output incorrect ; of the bug that was causing the Olden Health benchmark to output incorrect
; results! ; results!
; ;
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis > %t.1 ; RUN: llvm-as < %s | opt -constprop | llvm-dis > %t.1
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | opt -constprop | \ ; RUN: llvm-as < %s | llvm-dis | llvm-as | opt -constprop | \
; RUN: llvm-dis > %t.2 ; RUN: llvm-dis > %t.2
; RUN: diff %t.1 %t.2 ; RUN: diff %t.1 %t.2
implementation define double @test() {
%tmp = mul double 7.200000e+101, 0x427F4000 ; <double> [#uses=1]
double "test"()
begin
%tmp = mul double 72.0e100, 0x427f4000
ret double %tmp ret double %tmp
end }

View File

@ -1,11 +1,9 @@
; The output formater prints out 1.0e100 as Inf! ; The output formater prints out 1.0e100 as Inf!
; ;
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | llvm-dis ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis
implementation define float @test() {
%tmp = mul float 0x7FF0000000000000, 1.000000e+01 ; <float> [#uses=1]
float "test"()
begin
%tmp = mul float 0x7FF0000000000000, 1.0e1
ret float %tmp ret float %tmp
end }

View File

@ -4,17 +4,15 @@
; Check by running globaldce, which will remove the constant if there are ; Check by running globaldce, which will remove the constant if there are
; no references to it! ; no references to it!
; ;
; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | \ ; RUN: llvm-as < %s | opt -globaldce | llvm-dis | \
; RUN: not grep constant ; RUN: not grep constant
; ;
%v1 = internal constant int 5 @v1 = internal constant i32 5
implementation define i32 @createtask() {
%v1 = alloca i32 ;; Alloca should have one use!
int "createtask"() begin %reg112 = load i32* %v1 ;; This load should not use the global!
%v1 = alloca int ;; Alloca should have one use! ret i32 %reg112
%reg112 = load int* %v1 ;; This load should not use the global! }
ret int %reg112
end

View File

@ -1,13 +1,10 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; It looks like the assembler is not forward resolving the function declaraion ; It looks like the assembler is not forward resolving the function declaraion
; correctly. ; correctly.
void "test"() define void @test() {
begin call void @foo( )
call void %foo()
ret void ret void
end }
declare void "foo"()
declare void @foo()

View File

@ -1,69 +1,67 @@
; This file takes about 48 __MINUTES__ to assemble using as. This is WAY too ; This file takes about 48 __MINUTES__ to assemble using as. This is WAY too
; long. The type resolution code needs to be sped up a lot. ; long. The type resolution code needs to be sped up a lot.
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; END. %ALL_INTERSECTIONS_METHOD = type i32 (%OBJECT*, %RAY*, %ISTACK*)*
%ALL_INTERSECTIONS_METHOD = type int (%OBJECT*, %RAY*, %ISTACK*)*
%BBOX = type { %BBOX_VECT, %BBOX_VECT } %BBOX = type { %BBOX_VECT, %BBOX_VECT }
%BBOX_TREE = type { short, short, %BBOX, %BBOX_TREE** } %BBOX_TREE = type { i16, i16, %BBOX, %BBOX_TREE** }
%BBOX_VECT = type [3 x float] %BBOX_VECT = type [3 x float]
%BLEND_MAP = type { short, short, short, int, %BLEND_MAP_ENTRY* } %BLEND_MAP = type { i16, i16, i16, i32, %BLEND_MAP_ENTRY* }
%BLEND_MAP_ENTRY = type { float, ubyte, { %COLOUR, %PIGMENT*, %TNORMAL*, %TEXTURE*, %UV_VECT } } %BLEND_MAP_ENTRY = type { float, i8, { %COLOUR, %PIGMENT*, %TNORMAL*, %TEXTURE*, %UV_VECT } }
%CAMERA = type { %VECTOR, %VECTOR, %VECTOR, %VECTOR, %VECTOR, %VECTOR, double, double, int, double, double, int, double, %TNORMAL* } %CAMERA = type { %VECTOR, %VECTOR, %VECTOR, %VECTOR, %VECTOR, %VECTOR, double, double, i32, double, double, i32, double, %TNORMAL* }
%COLOUR = type [5 x float] %COLOUR = type [5 x float]
%COPY_METHOD = type sbyte* (%OBJECT*)* %COPY_METHOD = type i8* (%OBJECT*)*
%COUNTER = type { uint, uint } %COUNTER = type { i32, i32 }
%DENSITY_FILE = type { int, %DENSITY_FILE_DATA* } %DENSITY_FILE = type { i32, %DENSITY_FILE_DATA* }
%DENSITY_FILE_DATA = type { int, sbyte*, int, int, int, ubyte*** } %DENSITY_FILE_DATA = type { i32, i8*, i32, i32, i32, i8*** }
%DESTROY_METHOD = type void (%OBJECT*)* %DESTROY_METHOD = type void (%OBJECT*)*
%FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint } %FILE = type { i32, i8*, i8*, i8, i8, i32, i32, i32 }
%FILE_HANDLE = type { sbyte*, int, int, int, int, sbyte*, %FILE*, int, int (%FILE_HANDLE*, sbyte*, int*, int*, int, int)*, void (%FILE_HANDLE*, %COLOUR*, int)*, int (%FILE_HANDLE*, %COLOUR*, int*)*, void (%IMAGE*, sbyte*)*, void (%FILE_HANDLE*)* } %FILE_HANDLE = type { i8*, i32, i32, i32, i32, i8*, %FILE*, i32, i32 (%FILE_HANDLE*, i8*, i32*, i32*, i32, i32)*, void (%FILE_HANDLE*, %COLOUR*, i32)*, i32 (%FILE_HANDLE*, %COLOUR*, i32*)*, void (%IMAGE*, i8*)*, void (%FILE_HANDLE*)* }
%FINISH = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, %BBOX_VECT, %BBOX_VECT } %FINISH = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, %BBOX_VECT, %BBOX_VECT }
%FOG = type { int, double, double, double, %COLOUR, %VECTOR, %TURB*, float, %FOG* } %FOG = type { i32, double, double, double, %COLOUR, %VECTOR, %TURB*, float, %FOG* }
%FRAME = type { %CAMERA*, int, int, int, %LIGHT_SOURCE*, %OBJECT*, double, double, %COLOUR, %COLOUR, %COLOUR, %IMEDIA*, %FOG*, %RAINBOW*, %SKYSPHERE* } %FRAME = type { %CAMERA*, i32, i32, i32, %LIGHT_SOURCE*, %OBJECT*, double, double, %COLOUR, %COLOUR, %COLOUR, %IMEDIA*, %FOG*, %RAINBOW*, %SKYSPHERE* }
%FRAMESEQ = type { int, double, int, int, double, int, int, double, int, double, int, double, uint, uint } %FRAMESEQ = type { i32, double, i32, i32, double, i32, i32, double, i32, double, i32, double, i32, i32 }
%IMAGE = type { int, int, int, int, int, short, short, %VECTOR, float, float, int, int, short, %IMAGE_COLOUR*, { %IMAGE_LINE*, ubyte** } } %IMAGE = type { i32, i32, i32, i32, i32, i16, i16, %VECTOR, float, float, i32, i32, i16, %IMAGE_COLOUR*, { %IMAGE_LINE*, i8** } }
%IMAGE_COLOUR = type { ushort, ushort, ushort, ushort, ushort } %IMAGE_COLOUR = type { i16, i16, i16, i16, i16 }
%IMAGE_LINE = type { ubyte*, ubyte*, ubyte*, ubyte* } %IMAGE_LINE = type { i8*, i8*, i8*, i8* }
%IMEDIA = type { int, int, int, int, int, double, double, int, int, int, int, %COLOUR, %COLOUR, %COLOUR, %COLOUR, double, double, double, double*, %PIGMENT*, %IMEDIA* } %IMEDIA = type { i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, %COLOUR, %COLOUR, %COLOUR, %COLOUR, double, double, double, double*, %PIGMENT*, %IMEDIA* }
%INSIDE_METHOD = type int (double*, %OBJECT*)* %INSIDE_METHOD = type i32 (double*, %OBJECT*)*
%INTERIOR = type { int, int, float, float, float, float, float, %IMEDIA* } %INTERIOR = type { i32, i32, float, float, float, float, float, %IMEDIA* }
%INTERSECTION = type { double, %VECTOR, %VECTOR, %OBJECT*, int, int, double, double, sbyte* } %INTERSECTION = type { double, %VECTOR, %VECTOR, %OBJECT*, i32, i32, double, double, i8* }
%INVERT_METHOD = type void (%OBJECT*)* %INVERT_METHOD = type void (%OBJECT*)*
%ISTACK = type { %ISTACK*, %INTERSECTION*, uint } %ISTACK = type { %ISTACK*, %INTERSECTION*, i32 }
%LIGHT_SOURCE = type { %METHODS*, int, %OBJECT*, %TEXTURE*, %INTERIOR*, %OBJECT*, %OBJECT*, %BBOX, uint, %OBJECT*, %COLOUR, %VECTOR, %VECTOR, %VECTOR, %VECTOR, %VECTOR, double, double, double, double, double, %LIGHT_SOURCE*, ubyte, ubyte, ubyte, ubyte, int, int, int, int, int, %COLOUR**, %OBJECT*, [6 x %PROJECT_TREE_NODE*] } %LIGHT_SOURCE = type { %METHODS*, i32, %OBJECT*, %TEXTURE*, %INTERIOR*, %OBJECT*, %OBJECT*, %BBOX, i32, %OBJECT*, %COLOUR, %VECTOR, %VECTOR, %VECTOR, %VECTOR, %VECTOR, double, double, double, double, double, %LIGHT_SOURCE*, i8, i8, i8, i8, i32, i32, i32, i32, i32, %COLOUR**, %OBJECT*, [6 x %PROJECT_TREE_NODE*] }
%MATRIX = type [4 x %VECTOR_4D] %MATRIX = type [4 x %VECTOR_4D]
%METHODS = type { %ALL_INTERSECTIONS_METHOD, %INSIDE_METHOD, %NORMAL_METHOD, %COPY_METHOD, %ROTATE_METHOD, %ROTATE_METHOD, %ROTATE_METHOD, %TRANSFORM_METHOD, %DESTROY_METHOD, %DESTROY_METHOD } %METHODS = type { %ALL_INTERSECTIONS_METHOD, %INSIDE_METHOD, %NORMAL_METHOD, %COPY_METHOD, %ROTATE_METHOD, %ROTATE_METHOD, %ROTATE_METHOD, %TRANSFORM_METHOD, %DESTROY_METHOD, %DESTROY_METHOD }
%NORMAL_METHOD = type void (double*, %OBJECT*, %INTERSECTION*)* %NORMAL_METHOD = type void (double*, %OBJECT*, %INTERSECTION*)*
%OBJECT = type { %METHODS*, int, %OBJECT*, %TEXTURE*, %INTERIOR*, %OBJECT*, %OBJECT*, %BBOX, uint } %OBJECT = type { %METHODS*, i32, %OBJECT*, %TEXTURE*, %INTERIOR*, %OBJECT*, %OBJECT*, %BBOX, i32 }
%Opts = type { int, uint, sbyte, sbyte, sbyte, int, [150 x sbyte], [150 x sbyte], [150 x sbyte], [150 x sbyte], [150 x sbyte], double, double, uint, int, double, double, int, [25 x sbyte*], int, int, int, double, double, int, int, double, double, double, uint, int, int, int, int, %FRAMESEQ, double, int, double, double, double, double, double, int, int, int, int, int, int, int, int, int, int, int, int, int, [150 x sbyte], %SHELLDATA*, [150 x sbyte], int, int } %Opts = type { i32, i32, i8, i8, i8, i32, [150 x i8], [150 x i8], [150 x i8], [150 x i8], [150 x i8], double, double, i32, i32, double, double, i32, [25 x i8*], i32, i32, i32, double, double, i32, i32, double, double, double, i32, i32, i32, i32, i32, %FRAMESEQ, double, i32, double, double, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [150 x i8], %SHELLDATA*, [150 x i8], i32, i32 }
%PIGMENT = type { ushort, ushort, ushort, int, float, float, float, %WARP*, %TPATTERN*, %BLEND_MAP*, { %DENSITY_FILE*, %IMAGE*, %VECTOR, float, short, short, short, { float, %VECTOR }, %complex.float }, %COLOUR } %PIGMENT = type { i16, i16, i16, i32, float, float, float, %WARP*, %TPATTERN*, %BLEND_MAP*, { %DENSITY_FILE*, %IMAGE*, %VECTOR, float, i16, i16, i16, { float, %VECTOR }, %complex.float }, %COLOUR }
%PRIORITY_QUEUE = type { uint, uint, %QELEM* } %PRIORITY_QUEUE = type { i32, i32, %QELEM* }
%PROJECT = type { int, int, int, int } %PROJECT = type { i32, i32, i32, i32 }
%PROJECT_QUEUE = type { uint, uint, %PROJECT_TREE_NODE** } %PROJECT_QUEUE = type { i32, i32, %PROJECT_TREE_NODE** }
%PROJECT_TREE_NODE = type { ushort, %BBOX_TREE*, %PROJECT, ushort, %PROJECT_TREE_NODE** } %PROJECT_TREE_NODE = type { i16, %BBOX_TREE*, %PROJECT, i16, %PROJECT_TREE_NODE** }
%QELEM = type { double, %BBOX_TREE* } %QELEM = type { double, %BBOX_TREE* }
%RAINBOW = type { double, double, double, double, double, double, double, %VECTOR, %VECTOR, %VECTOR, %PIGMENT*, %RAINBOW* } %RAINBOW = type { double, double, double, double, double, double, double, %VECTOR, %VECTOR, %VECTOR, %PIGMENT*, %RAINBOW* }
%RAY = type { %VECTOR, %VECTOR, int, [100 x %INTERIOR*] } %RAY = type { %VECTOR, %VECTOR, i32, [100 x %INTERIOR*] }
%RAYINFO = type { %VECTOR, %VECTOR, %VECTORI, %VECTORI } %RAYINFO = type { %VECTOR, %VECTOR, %VECTORI, %VECTORI }
%RGB = type [3 x float] %RGB = type [3 x float]
%ROTATE_METHOD = type void (%OBJECT*, double*, %TRANSFORM*)* %ROTATE_METHOD = type void (%OBJECT*, double*, %TRANSFORM*)*
%SCALE_METHOD = type void (%OBJECT*, double*, %TRANSFORM*)* %SCALE_METHOD = type void (%OBJECT*, double*, %TRANSFORM*)*
%SHELLDATA = type { int, int, [250 x sbyte] } %SHELLDATA = type { i32, i32, [250 x i8] }
%SKYSPHERE = type { int, %PIGMENT**, %TRANSFORM* } %SKYSPHERE = type { i32, %PIGMENT**, %TRANSFORM* }
%SNGL_VECT = type [3 x float] %SNGL_VECT = type [3 x float]
%TEXTURE = type { ushort, ushort, ushort, int, float, float, float, %WARP*, %TPATTERN*, %BLEND_MAP*, { %DENSITY_FILE*, %IMAGE*, %VECTOR, float, short, short, short, { float, %VECTOR }, %complex.float }, %TEXTURE*, %PIGMENT*, %TNORMAL*, %FINISH*, %TEXTURE*, int } %TEXTURE = type { i16, i16, i16, i32, float, float, float, %WARP*, %TPATTERN*, %BLEND_MAP*, { %DENSITY_FILE*, %IMAGE*, %VECTOR, float, i16, i16, i16, { float, %VECTOR }, %complex.float }, %TEXTURE*, %PIGMENT*, %TNORMAL*, %FINISH*, %TEXTURE*, i32 }
%TNORMAL = type { ushort, ushort, ushort, int, float, float, float, %WARP*, %TPATTERN*, %BLEND_MAP*, { %DENSITY_FILE*, %IMAGE*, %VECTOR, float, short, short, short, { float, %VECTOR }, %complex.float }, float } %TNORMAL = type { i16, i16, i16, i32, float, float, float, %WARP*, %TPATTERN*, %BLEND_MAP*, { %DENSITY_FILE*, %IMAGE*, %VECTOR, float, i16, i16, i16, { float, %VECTOR }, %complex.float }, float }
%TPATTERN = type { ushort, ushort, ushort, int, float, float, float, %WARP*, %TPATTERN*, %BLEND_MAP*, { %DENSITY_FILE*, %IMAGE*, %VECTOR, float, short, short, short, { float, %VECTOR }, %complex.float } } %TPATTERN = type { i16, i16, i16, i32, float, float, float, %WARP*, %TPATTERN*, %BLEND_MAP*, { %DENSITY_FILE*, %IMAGE*, %VECTOR, float, i16, i16, i16, { float, %VECTOR }, %complex.float } }
%TRANSFORM = type { %MATRIX, %MATRIX } %TRANSFORM = type { %MATRIX, %MATRIX }
%TRANSFORM_METHOD = type void (%OBJECT*, %TRANSFORM*)* %TRANSFORM_METHOD = type void (%OBJECT*, %TRANSFORM*)*
%TRANSLATE_METHOD = type void (%OBJECT*, double*, %TRANSFORM*)* %TRANSLATE_METHOD = type void (%OBJECT*, double*, %TRANSFORM*)*
%TURB = type { ushort, %WARP*, %VECTOR, int, float, float } %TURB = type { i16, %WARP*, %VECTOR, i32, float, float }
%UV_VECT = type [2 x double] %UV_VECT = type [2 x double]
%VECTOR = type [3 x double] %VECTOR = type [3 x double]
%VECTORI = type [3 x int] %VECTORI = type [3 x i32]
%VECTOR_4D = type [4 x double] %VECTOR_4D = type [4 x double]
%WARP = type { ushort, %WARP* } %WARP = type { i16, %WARP* }
%__FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint } %__FILE = type { i32, i8*, i8*, i8, i8, i32, i32, i32 }
%_h_val = type { [2 x uint], double } %_h_val = type { [2 x i32], double }
%complex.float = type { float, float } %complex.float = type { float, float }

View File

@ -1,11 +1,9 @@
; Test to make sure that the 'internal' tag is not lost! ; Test to make sure that the 'internal' tag is not lost!
; ;
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep internal ; RUN: llvm-as < %s | llvm-dis | grep internal
declare void %foo() declare void @foo()
implementation
internal void %foo() { define internal void @foo() {
ret void ret void
} }

View File

@ -1,12 +1,10 @@
; Test that opaque types are preserved correctly ; Test that opaque types are preserved correctly
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | llvm-dis ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis
; ;
%Ty = type opaque %Ty = type opaque
implementation define %Ty* @func() {
%Ty* %func() {
ret %Ty* null ret %Ty* null
} }

View File

@ -1,6 +1,5 @@
; Test double quotes in strings work correctly! ; Test double quotes in strings work correctly!
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | llvm-dis ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis
; ;
@str = internal global [6 x i8] c"\22foo\22\00" ; <[6 x i8]*> [#uses=0]
%str = internal global [6 x sbyte] c"\22foo\22\00"

View File

@ -1,13 +1,15 @@
; Test that returning a pointer to a function causes the disassembler to print ; Test that returning a pointer to a function causes the disassembler to print
; the right thing. ; the right thing.
; ;
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as ; RUN: llvm-as < %s | llvm-dis | llvm-as
%ty = type void (int) %ty = type void (i32)
declare %ty* %foo() declare %ty* @foo()
void %test() { define void @test() {
call %ty*()* %foo() call %ty* ()* @foo( ) ; <%ty*>:1 [#uses=0]
ret void ret void
} }

View File

@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as ; RUN: llvm-as < %s | llvm-dis | llvm-as
; Make sure that \\ works in a string initializer ; Make sure that \\ works in a string initializer
%Slashtest = internal global [8 x sbyte] c"\5Cbegin{\00" @Slashtest = internal global [8 x i8] c"\5Cbegin{\00"

View File

@ -1,8 +1,6 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
define void @test(i32 %X) {
void %test(int %X) { call void @test( i32 6 )
call void (int)* cast (void(int) * %test to void(int) *) (int 6)
ret void ret void
} }

View File

@ -1,17 +1,16 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
%.LC0 = internal global [12 x sbyte] c"hello world\00" @.LC0 = internal global [12 x i8] c"hello world\00" ; <[12 x i8]*> [#uses=1]
implementation ; Functions: define i8* @test() {
; <label>:0
sbyte* %test() {
br label %BB1 br label %BB1
BB1: ;[#uses=2] BB1: ; preds = %BB2, %0
%ret = phi sbyte* [ getelementptr ([12 x sbyte]* %.LC0, long 0, long 0), %0 ], [ null, %BB2 ] %ret = phi i8* [ getelementptr ([12 x i8]* @.LC0, i64 0, i64 0), %0 ], [ null, %BB2 ] ; <i8*> [#uses=1]
ret sbyte* %ret ret i8* %ret
BB2: BB2: ; No predecessors!
br label %BB1 br label %BB1
} }

View File

@ -1,10 +1,8 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
%.LC0 = internal global [12 x sbyte] c"hello world\00" ; <[12 x sbyte]*> [#uses=1] @.LC0 = internal global [12 x i8] c"hello world\00" ; <[12 x i8]*> [#uses=1]
implementation ; Functions: define i8* @test() {
ret i8* getelementptr ([12 x i8]* @.LC0, i64 0, i64 0)
sbyte* %test() {
ret sbyte* getelementptr ([12 x sbyte]* %.LC0, long 0, long 0)
} }

View File

@ -7,19 +7,16 @@
; disassembling this would be good, but in addition to that, the bytecode ; disassembling this would be good, but in addition to that, the bytecode
; reader should NEVER produce a program "successfully" with placeholders still ; reader should NEVER produce a program "successfully" with placeholders still
; around! ; around!
;
; RUN: llvm-as < %s | llvm-dis | llvm-as
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as @.LC0 = internal global [4 x i8] c"foo\00" ; <[4 x i8]*> [#uses=1]
@X = global i8* null ; <i8**> [#uses=0]
%.LC0 = internal global [4 x sbyte] c"foo\00" ; <[4 x sbyte]*> [#uses=1] declare i32 @puts(i8*)
%X = global sbyte * null define void @main() {
bb1:
implementation ; Functions: %reg211 = call i32 @puts( i8* getelementptr ([4 x i8]* @.LC0, i64 0, i64 0) ) ; <i32> [#uses=0]
declare int %puts(sbyte*)
void %main() {
bb1: ;[#uses=0]
%reg211 = call int %puts( sbyte* getelementptr ([4 x sbyte]* %.LC0, uint 0, uint 0) ) ; <int> [#uses=0]
ret void ret void
} }

View File

@ -1,22 +1,17 @@
; Testcase that seems to break the bytecode reader. This comes from the ; Testcase that seems to break the bytecode reader. This comes from the
; "crafty" spec benchmark. ; "crafty" spec benchmark.
; ;
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | llvm-as ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | llvm-as
%CHESS_POSITION = type { uint, int } %CHESS_POSITION = type { i32, i32 }
@pawn_probes = external global i32 ; <i32*> [#uses=0]
@pawn_hash_mask = external global i32 ; <i32*> [#uses=0]
@search = external global %CHESS_POSITION ; <%CHESS_POSITION*> [#uses=2]
%pawn_probes = uninitialized global int ; <int*> [#uses=1] define void @Evaluate() {
%pawn_hash_mask = uninitialized global uint ; <uint*> [#uses=0] %reg1321 = getelementptr %CHESS_POSITION* @search, i64 0, i32 1 ; <i32*> [#uses=1]
%reg114 = load i32* %reg1321 ; <i32> [#uses=0]
%search = uninitialized global %CHESS_POSITION ; <%CHESS_POSITION*> [#uses=6] %reg1801 = getelementptr %CHESS_POSITION* @search, i64 0, i32 0 ; <i32*> [#uses=1]
%reg182 = load i32* %reg1801 ; <i32> [#uses=0]
implementation ; Functions:
void %Evaluate() {
%reg1321 = getelementptr %CHESS_POSITION* %search, uint 0, ubyte 1
%reg114 = load int* %reg1321 ; <int> [#uses=0]
%reg1801 = getelementptr %CHESS_POSITION* %search, uint 0, ubyte 0
%reg182 = load uint* %reg1801 ; <uint> [#uses=1]
ret void ret void
} }

View File

@ -1,15 +1,17 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; Dominance relationships is not calculated correctly for unreachable blocks, ; Dominance relationships is not calculated correctly for unreachable blocks,
; which causes the verifier to barf on this input. ; which causes the verifier to barf on this input.
int %test(bool %b) { define i32 @test(i1 %b) {
BB0: ret int 7 ; Loop is unreachable BB0:
ret i32 7 ; Loop is unreachable
Loop: Loop: ; preds = %L2, %Loop
%B = phi int [%B, %L2], [%B, %Loop] ; PHI has same value always. %B = phi i32 [ %B, %L2 ], [ %B, %Loop ] ;PHI has same value always.
br bool %b, label %L2, label %Loop br i1 %b, label %L2, label %Loop
L2:
L2: ; preds = %Loop
br label %Loop br label %Loop
} }

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis ; RUN: llvm-as < %s | llvm-dis
%Domain = type { %Domain**, %Domain* } %Domain = type { %Domain**, %Domain* }
@D = global %Domain zeroinitializer ; <%Domain*> [#uses=0]
%D = global %Domain { %Domain** null, %Domain* null }
implementation

View File

@ -1,7 +1,7 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
declare int "ArrayRef"([100 x int] * %Array) declare i32 @"ArrayRef"([100 x i32] * %Array)
int "ArrayRef"([100 x int] * %Array) { define i32 @"ArrayRef"([100 x i32] * %Array) {
ret int 0 ret i32 0
} }

View File

@ -1,10 +1,7 @@
; RUN: llvm-upgrade < %s 2>/dev/null | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; RUN: llvm-upgrade < %s |& grep {Renaming global variable 'X' to}
%X = external global uint * @X = external global i32*
%X = external global %T* @X1 = external global %T*
%X = external global int * @X2 = external global i32*
%T = type int %T = type i32
implementation

View File

@ -1,5 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
@spell_order = global [4 x i8] c"\FF\00\F7\00"
%spell_order = global [4 x ubyte] c"\FF\00\F7\00"

View File

@ -1,9 +1,7 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; There should be absolutely no problem with this testcase. ; There should be absolutely no problem with this testcase.
implementation define i32 @test(i32 %arg1, i32 %arg2) {
ret i32 ptrtoint (i32 (i32, i32)* @test to i32)
int %test(int %arg1, int %arg2) {
ret int cast (int (int, int)* %test to int)
} }

View File

@ -1,6 +1,6 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis ; RUN: llvm-as < %s | llvm-dis
void %test() { define void @test() {
%tmp.123 = cast long cast ([5 x { ubyte, sbyte }]* getelementptr ([30 x [5 x { ubyte, sbyte }]]* null, long 0, long 0) to long) to int %tmp.123 = trunc i64 0 to i32 ; <i32> [#uses=0]
ret void ret void
} }

View File

@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep -- -2147483648 ; RUN: llvm-as < %s | llvm-dis | grep -- -2147483648
int %foo() { define i32 @foo() {
ret int -2147483648 ret i32 -2147483648
} }

View File

@ -1,15 +1,14 @@
; This bug was caused by two CPR's existing for the same global variable, ; This bug was caused by two CPR's existing for the same global variable,
; colliding in the Module level CPR map. ; colliding in the Module level CPR map.
; RUN: llvm-as < %s -o /dev/null -f
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f define void @test() {
call void (...)* bitcast (void (i16*, i32)* @AddString to void (...)*)( i16* null, i32 0 )
void %test() {
call void (...)* cast (void (short*, int)* %AddString to void (...)*)(short* null, int 0)
ret void ret void
} }
void %AddString(short* %tmp.124, int %tmp.127) { define void @AddString(i16* %tmp.124, i32 %tmp.127) {
call void (...)* cast (void (short*, int)* %AddString to void (...)*)(short* %tmp.124, int %tmp.127) call void (...)* bitcast (void (i16*, i32)* @AddString to void (...)*)( i16* %tmp.124, i32 %tmp.127 )
ret void ret void
} }

View File

@ -1,9 +1,11 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; Check minimal switch statement ; Check minimal switch statement
void %test(int %X) { define void @test(i32 %X) {
switch int %X, label %dest [] switch i32 %X, label %dest [
dest: ]
dest: ; preds = %0
ret void ret void
} }

View File

@ -1,5 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; Test that shift instructions can be used in constant expressions. ; Test that shift instructions can be used in constant expressions.
global int shl (int 7, ubyte 19) global i32 3670016

View File

@ -1,6 +1,6 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; The old C front-end never generated empty structures, now the new one ; The old C front-end never generated empty structures, now the new one
; can. For some reason we never handled them in the parser. Weird. ; can. For some reason we never handled them in the parser. Weird.
%X = global {} {} @X = global { } zeroinitializer

View File

@ -1,6 +1,9 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis ; RUN: llvm-as < %s | llvm-dis
void %test() {
invoke void %test() to label %Next except label %Next define void @test() {
Next: invoke void @test( )
to label %Next unwind label %Next
Next: ; preds = %0, %0
ret void ret void
} }

View File

@ -1,7 +1,3 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
%MidFnTy = type void (void (%MidFnTy* )*)
implementation
%MidFnTy = type void (%MidFnTy*)

View File

@ -1,18 +1,16 @@
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -simplifycfg | llvm-dis | not grep br ; RUN: llvm-as < %s | opt -instcombine -simplifycfg | llvm-dis | not grep br
%.str_1 = internal constant [6 x sbyte] c"_Bool\00" ; <[6 x sbyte]*> [#uses=1] @.str_1 = internal constant [6 x i8] c"_Bool\00" ; <[6 x i8]*> [#uses=2]
implementation define i32 @test() {
%tmp.54 = load i8* getelementptr ([6 x i8]* @.str_1, i64 0, i64 1) ; <i8> [#uses=1]
%tmp.55 = icmp ne i8 %tmp.54, 66 ; <i1> [#uses=1]
br i1 %tmp.55, label %then.7, label %endif.7
int %test() { then.7: ; preds = %then.7, %0
%tmp.54 = load sbyte* getelementptr (sbyte* getelementptr ([6 x sbyte]* %.str_1, long 0, long 0), long 1)
; <sbyte> [#uses=1]
%tmp.55 = setne sbyte %tmp.54, 66 ; <bool> [#uses=1]
br bool %tmp.55, label %then.7, label %endif.7
then.7:
br label %then.7 br label %then.7
endif.7:
ret int 0
endif.7: ; preds = %0
ret i32 0
} }

View File

@ -1,5 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep getelementptr ; RUN: llvm-as < %s | llvm-dis | not grep getelementptr
%A = external global { float } ; <{ float }*> [#uses=1]
global int* cast (float* getelementptr ({ float }* %A, long 0, ubyte 0) to int*)
@A = external global { float } ; <{ float }*> [#uses=2]
global i32* bitcast ({ float }* @A to i32*) ; <i32**>:0 [#uses=0]

View File

@ -1,7 +1,6 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
%T = type opaque %T = type i32
%X = global %T* null @X = global i32* null ; <i32**> [#uses=0]
%Y = global int* null @Y = global i32* null ; <i32**> [#uses=0]
%T = type int

View File

@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis ; RUN: llvm-as < %s | llvm-dis
int %test() { define i32 @test() {
ret int shr (int cast (int()* %test to int), ubyte 2) ret i32 ashr (i32 ptrtoint (i32 ()* @test to i32), i32 2)
} }

View File

@ -1,10 +1,10 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep { bitcast (} ; RUN: llvm-as < %s | llvm-dis | not grep { bitcast (}
%.Base64_1 = external constant [4 x sbyte] @.Base64_1 = external constant [4 x i8] ; <[4 x i8]*> [#uses=1]
ubyte %test(sbyte %Y) { ; No predecessors! define i8 @test(i8 %Y) {
%X = cast sbyte %Y to ubyte ; <ubyte> [#uses=1] %X = bitcast i8 %Y to i8 ; <i8> [#uses=1]
%tmp.13 = add ubyte %X, cast (sbyte sub (sbyte 0, sbyte cast ([4 x sbyte]* %.Base64_1 to sbyte)) to ubyte) ; <ubyte> [#uses=1] %tmp.13 = add i8 %X, sub (i8 0, i8 ptrtoint ([4 x i8]* @.Base64_1 to i8)) ; <i8> [#uses=1]
ret ubyte %tmp.13 ret i8 %tmp.13
} }

View File

@ -1,12 +1,12 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \ ; RUN: llvm-as < %s | llvm-dis | \
; RUN: not grep {getelementptr.*getelementptr} ; RUN: not grep {getelementptr.*getelementptr}
%struct.TUVVertex = type { short, short, short, short } %struct.TTriangleItem = type { i8*, i8*, [3 x %struct.TUVVertex] }
%struct.TTriangleItem = type { sbyte*, sbyte*, [3 x %struct.TUVVertex] } %struct.TUVVertex = type { i16, i16, i16, i16 }
@data_triangleItems = internal constant [2908 x %struct.TTriangleItem] zeroinitializer; <[2908 x %struct.TTriangleItem]*> [#uses=2]
%data_triangleItems = internal constant [2908 x %struct.TTriangleItem] zeroinitializer define void @foo() {
store i16 0, i16* getelementptr ([2908 x %struct.TTriangleItem]* @data_triangleItems, i64 0, i64 0, i32 2, i64 0, i32 0)
void %foo() {
store short 0, short* getelementptr ([3 x %struct.TUVVertex]* getelementptr ([2908 x %struct.TTriangleItem]* %data_triangleItems, long 0, long 0, ubyte 2), long 0, long 0, ubyte 0)
ret void ret void
} }

View File

@ -1,4 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 9223372036854775808 ; RUN: llvm-as < %s | llvm-dis | grep 9223372036854775808
global long -9223372036854775808 global i64 -9223372036854775808

View File

@ -1,5 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep -- -0.0 ; RUN: llvm-as < %s | llvm-dis | grep -- -0.0
global double 0x8000000000000000 global double 0x8000000000000000
global float -0.0 global float -0.0

View File

@ -1,23 +1,23 @@
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f ; RUN: llvm-as < %s -o /dev/null -f
; %inc2 uses it's own value, but that's ok, as it's unreachable! ; %inc2 uses it's own value, but that's ok, as it's unreachable!
void %test() { define void @test() {
entry: entry:
ret void ret void
no_exit.2: ; preds = %endif.6 no_exit.2: ; preds = %endif.6
%tmp.103 = setlt double 0x0, 0x0 ; <bool> [#uses=1] %tmp.103 = fcmp olt double 0.000000e+00, 0.000000e+00 ; <i1> [#uses=1]
br bool %tmp.103, label %endif.6, label %else.0 br i1 %tmp.103, label %endif.6, label %else.0
else.0: ; preds = %no_exit.2 else.0: ; preds = %no_exit.2
store ushort 0, ushort* null store i16 0, i16* null
br label %endif.6 br label %endif.6
endif.6: ; preds = %no_exit.2, %else.0 endif.6: ; preds = %else.0, %no_exit.2
%inc.2 = add int %inc.2, 1 ; <int> [#uses=2] %inc.2 = add i32 %inc.2, 1 ; <i32> [#uses=2]
%tmp.96 = setlt int %inc.2, 0 ; <bool> [#uses=1] %tmp.96 = icmp slt i32 %inc.2, 0 ; <i1> [#uses=1]
br bool %tmp.96, label %no_exit.2, label %UnifiedReturnBlock1 br i1 %tmp.96, label %no_exit.2, label %UnifiedReturnBlock1
UnifiedReturnBlock1: ; preds = %endif.6 UnifiedReturnBlock1: ; preds = %endif.6
ret void ret void