diff options
Diffstat (limited to 'test/Assembler')
31 files changed, 46 insertions, 609 deletions
diff --git a/test/Assembler/2002-01-24-BadSymbolTableAssert.ll b/test/Assembler/2002-01-24-BadSymbolTableAssert.ll deleted file mode 100644 index 7c49e2b..0000000 --- a/test/Assembler/2002-01-24-BadSymbolTableAssert.ll +++ /dev/null @@ -1,11 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - -; 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 -; abstract type in the symbol table, [in this case for the entry %foo of type -; 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. - -%bb = type i32 - -declare void @foo(i32) diff --git a/test/Assembler/2002-01-24-ValueRefineAbsType.ll b/test/Assembler/2002-01-24-ValueRefineAbsType.ll deleted file mode 100644 index 6e49674..0000000 --- a/test/Assembler/2002-01-24-ValueRefineAbsType.ll +++ /dev/null @@ -1,23 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - -; This testcase used to fail due to a lack of this diff in Value.cpp: -; diff -r1.16 Value.cpp -; 11c11 -; < #include "llvm/Type.h" -; --- -; > #include "llvm/DerivedTypes.h" -; 74c74,76 -; < assert(Ty.get() == (const Type*)OldTy &&"Can't refine anything but my type!"); -; --- -; > assert(Ty.get() == OldTy &&"Can't refine anything but my type!"); -; > if (OldTy == NewTy && !OldTy->isAbstract()) -; > Ty.removeUserFromConcrete(); -; -; This was causing an assertion failure, due to the "foo" Method object never -; releasing it's reference to the opaque %bb value. -; - -%bb = type i32 -%exception_descriptor = type i32 - -declare void @foo(i32) diff --git a/test/Assembler/2002-02-19-TypeParsing.ll b/test/Assembler/2002-02-19-TypeParsing.ll deleted file mode 100644 index 0df6784..0000000 --- a/test/Assembler/2002-02-19-TypeParsing.ll +++ /dev/null @@ -1,3 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - -%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* } } diff --git a/test/Assembler/2002-04-04-PureVirtMethCall.ll b/test/Assembler/2002-04-04-PureVirtMethCall.ll deleted file mode 100644 index 29aed55..0000000 --- a/test/Assembler/2002-04-04-PureVirtMethCall.ll +++ /dev/null @@ -1,6 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - - type { { \2 *, \4 ** }, - { \2 *, \4 ** } - } - diff --git a/test/Assembler/2002-04-04-PureVirtMethCall2.ll b/test/Assembler/2002-04-04-PureVirtMethCall2.ll deleted file mode 100644 index a096899..0000000 --- a/test/Assembler/2002-04-04-PureVirtMethCall2.ll +++ /dev/null @@ -1,5 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - -%t = type { { \2*, \2 }, - { \2*, \2 } - } diff --git a/test/Assembler/2002-04-05-TypeParsing.ll b/test/Assembler/2002-04-05-TypeParsing.ll deleted file mode 100644 index f725944..0000000 --- a/test/Assembler/2002-04-05-TypeParsing.ll +++ /dev/null @@ -1,3 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - - %Hosp = type { { \2*, { \2, %Hosp }* }, { \2*, { \2, %Hosp }* } } diff --git a/test/Assembler/2002-05-02-ParseError.ll b/test/Assembler/2002-05-02-ParseError.ll deleted file mode 100644 index 5a9817c..0000000 --- a/test/Assembler/2002-05-02-ParseError.ll +++ /dev/null @@ -1,7 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - -%T = type i32 * - -define %T @test() { - ret %T null -} diff --git a/test/Assembler/2002-07-08-HugePerformanceProblem.ll b/test/Assembler/2002-07-08-HugePerformanceProblem.ll deleted file mode 100644 index 52c90af..0000000 --- a/test/Assembler/2002-07-08-HugePerformanceProblem.ll +++ /dev/null @@ -1,67 +0,0 @@ -; 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. -; RUN: llvm-as %s -o /dev/null - %ALL_INTERSECTIONS_METHOD = type i32 (%OBJECT*, %RAY*, %ISTACK*)* - %BBOX = type { %BBOX_VECT, %BBOX_VECT } - %BBOX_TREE = type { i16, i16, %BBOX, %BBOX_TREE** } - %BBOX_VECT = type [3 x float] - %BLEND_MAP = type { i16, i16, i16, i32, %BLEND_MAP_ENTRY* } - %BLEND_MAP_ENTRY = type { float, i8, { %COLOUR, %PIGMENT*, %TNORMAL*, %TEXTURE*, %UV_VECT } } - %CAMERA = type { %VECTOR, %VECTOR, %VECTOR, %VECTOR, %VECTOR, %VECTOR, double, double, i32, double, double, i32, double, %TNORMAL* } - %COLOUR = type [5 x float] - %COPY_METHOD = type i8* (%OBJECT*)* - %COUNTER = type { i32, i32 } - %DENSITY_FILE = type { i32, %DENSITY_FILE_DATA* } - %DENSITY_FILE_DATA = type { i32, i8*, i32, i32, i32, i8*** } - %DESTROY_METHOD = type void (%OBJECT*)* - %FILE = type { i32, i8*, i8*, i8, i8, i32, i32, i32 } - %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 } - %FOG = type { i32, double, double, double, %COLOUR, %VECTOR, %TURB*, float, %FOG* } - %FRAME = type { %CAMERA*, i32, i32, i32, %LIGHT_SOURCE*, %OBJECT*, double, double, %COLOUR, %COLOUR, %COLOUR, %IMEDIA*, %FOG*, %RAINBOW*, %SKYSPHERE* } - %FRAMESEQ = type { i32, double, i32, i32, double, i32, i32, double, i32, double, i32, double, i32, i32 } - %IMAGE = type { i32, i32, i32, i32, i32, i16, i16, %VECTOR, float, float, i32, i32, i16, %IMAGE_COLOUR*, { %IMAGE_LINE*, i8** } } - %IMAGE_COLOUR = type { i16, i16, i16, i16, i16 } - %IMAGE_LINE = type { i8*, i8*, i8*, i8* } - %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 i32 (double*, %OBJECT*)* - %INTERIOR = type { i32, i32, float, float, float, float, float, %IMEDIA* } - %INTERSECTION = type { double, %VECTOR, %VECTOR, %OBJECT*, i32, i32, double, double, i8* } - %INVERT_METHOD = type void (%OBJECT*)* - %ISTACK = type { %ISTACK*, %INTERSECTION*, i32 } - %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] - %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*)* - %OBJECT = type { %METHODS*, i32, %OBJECT*, %TEXTURE*, %INTERIOR*, %OBJECT*, %OBJECT*, %BBOX, i32 } - %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 { 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 { i32, i32, %QELEM* } - %PROJECT = type { i32, i32, i32, i32 } - %PROJECT_QUEUE = type { i32, i32, %PROJECT_TREE_NODE** } - %PROJECT_TREE_NODE = type { i16, %BBOX_TREE*, %PROJECT, i16, %PROJECT_TREE_NODE** } - %QELEM = type { double, %BBOX_TREE* } - %RAINBOW = type { double, double, double, double, double, double, double, %VECTOR, %VECTOR, %VECTOR, %PIGMENT*, %RAINBOW* } - %RAY = type { %VECTOR, %VECTOR, i32, [100 x %INTERIOR*] } - %RAYINFO = type { %VECTOR, %VECTOR, %VECTORI, %VECTORI } - %RGB = type [3 x float] - %ROTATE_METHOD = type void (%OBJECT*, double*, %TRANSFORM*)* - %SCALE_METHOD = type void (%OBJECT*, double*, %TRANSFORM*)* - %SHELLDATA = type { i32, i32, [250 x i8] } - %SKYSPHERE = type { i32, %PIGMENT**, %TRANSFORM* } - %SNGL_VECT = type [3 x float] - %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 { 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 { 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_METHOD = type void (%OBJECT*, %TRANSFORM*)* - %TRANSLATE_METHOD = type void (%OBJECT*, double*, %TRANSFORM*)* - %TURB = type { i16, %WARP*, %VECTOR, i32, float, float } - %UV_VECT = type [2 x double] - %VECTOR = type [3 x double] - %VECTORI = type [3 x i32] - %VECTOR_4D = type [4 x double] - %WARP = type { i16, %WARP* } - %__FILE = type { i32, i8*, i8*, i8, i8, i32, i32, i32 } - %_h_val = type { [2 x i32], double } - %complex.float = type { float, float } diff --git a/test/Assembler/2002-07-14-InternalLossage.ll b/test/Assembler/2002-07-14-InternalLossage.ll deleted file mode 100644 index f93f1c4..0000000 --- a/test/Assembler/2002-07-14-InternalLossage.ll +++ /dev/null @@ -1,9 +0,0 @@ -; Test to make sure that the 'internal' tag is not lost! -; -; RUN: llvm-as < %s | llvm-dis | grep internal - -declare void @foo() - -define internal void @foo() { - ret void -} diff --git a/test/Assembler/2002-07-25-ParserAssertionFailure.ll b/test/Assembler/2002-07-25-ParserAssertionFailure.ll deleted file mode 100644 index 3c5c554..0000000 --- a/test/Assembler/2002-07-25-ParserAssertionFailure.ll +++ /dev/null @@ -1,13 +0,0 @@ -; Make sure we don't get an assertion failure, even though this is a parse -; error -; RUN: not llvm-as %s -o /dev/null |& grep {'@foo' defined with} - -%ty = type void (i32) - -declare %ty* @foo() - -define void @test() { - call %ty* @foo( ) ; <%ty*>:0 [#uses=0] - ret void -} - diff --git a/test/Assembler/2002-07-25-ReturnPtrFunction.ll b/test/Assembler/2002-07-25-ReturnPtrFunction.ll index 515d105..6988fad 100644 --- a/test/Assembler/2002-07-25-ReturnPtrFunction.ll +++ b/test/Assembler/2002-07-25-ReturnPtrFunction.ll @@ -3,12 +3,10 @@ ; ; RUN: llvm-as < %s | llvm-dis | llvm-as -%ty = type void (i32) - -declare %ty* @foo() +declare void (i32)* @foo() define void @test() { - call %ty* ()* @foo( ) ; <%ty*>:1 [#uses=0] + call void (i32)* ()* @foo( ) ; <%ty*>:1 [#uses=0] ret void } diff --git a/test/Assembler/2002-10-15-NameClash.ll b/test/Assembler/2002-10-15-NameClash.ll deleted file mode 100644 index 89346cb..0000000 --- a/test/Assembler/2002-10-15-NameClash.ll +++ /dev/null @@ -1,7 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - -declare i32 @"ArrayRef"([100 x i32] * %Array) - -define i32 @"ArrayRef"([100 x i32] * %Array) { - ret i32 0 -} diff --git a/test/Assembler/2002-12-15-GlobalResolve.ll b/test/Assembler/2002-12-15-GlobalResolve.ll index f9ad12e..a873a61 100644 --- a/test/Assembler/2002-12-15-GlobalResolve.ll +++ b/test/Assembler/2002-12-15-GlobalResolve.ll @@ -4,4 +4,4 @@ @X1 = external global %T* @X2 = external global i32* -%T = type i32 +%T = type {i32} diff --git a/test/Assembler/2003-04-15-ConstantInitAssertion.ll b/test/Assembler/2003-04-15-ConstantInitAssertion.ll index e012168..fa6b807 100644 --- a/test/Assembler/2003-04-15-ConstantInitAssertion.ll +++ b/test/Assembler/2003-04-15-ConstantInitAssertion.ll @@ -1,4 +1,4 @@ -; RUN: not llvm-as < %s >/dev/null |& grep {constant expression type mismatch} +; RUN: not llvm-as < %s >/dev/null |& grep {struct initializer doesn't match struct element type} ; Test the case of a misformed constant initializer ; This should cause an assembler error, not an assertion failure! constant { i32 } { float 1.0 } diff --git a/test/Assembler/2003-05-21-MalformedStructCrash.ll b/test/Assembler/2003-05-21-MalformedStructCrash.ll index 1efb577..8d20e070 100644 --- a/test/Assembler/2003-05-21-MalformedStructCrash.ll +++ b/test/Assembler/2003-05-21-MalformedStructCrash.ll @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: not llvm-as < %s > /dev/null |& grep {constant expression type mismatch} +; RUN: not llvm-as < %s > /dev/null |& grep {initializer with struct type has wrong # elements} global {} { i32 7, float 1.0, i32 7, i32 8 } diff --git a/test/Assembler/2003-06-30-RecursiveTypeProblem.ll b/test/Assembler/2003-06-30-RecursiveTypeProblem.ll deleted file mode 100644 index 5db3114..0000000 --- a/test/Assembler/2003-06-30-RecursiveTypeProblem.ll +++ /dev/null @@ -1,3 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - -%MidFnTy = type void (%MidFnTy*) diff --git a/test/Assembler/2003-10-04-NotMergingGlobalConstants.ll b/test/Assembler/2003-10-04-NotMergingGlobalConstants.ll deleted file mode 100644 index 5fec05d..0000000 --- a/test/Assembler/2003-10-04-NotMergingGlobalConstants.ll +++ /dev/null @@ -1,6 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - -%T = type i32 -@X = global i32* null ; <i32**> [#uses=0] -@Y = global i32* null ; <i32**> [#uses=0] - diff --git a/test/Assembler/2003-12-30-TypeMapInvalidMemory.ll b/test/Assembler/2003-12-30-TypeMapInvalidMemory.ll deleted file mode 100644 index 93f9a70..0000000 --- a/test/Assembler/2003-12-30-TypeMapInvalidMemory.ll +++ /dev/null @@ -1,55 +0,0 @@ -; RUN: not llvm-as %s -o /dev/null |& grep {use of undefined type named 'struct.D_Scope'} -; END. - -@d_reduction_0_dparser_gram = global { - i32 (i8*, i8**, i32, i32, { - %struct.Grammar*, void (\4, %struct.d_loc_t*, i8**)*, %struct.D_Scope*, - void (\4)*, { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, - void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, - %struct.ParseNode_User }* (\4, i32, { i32, %struct.d_loc_t, i8*, i8*, - %struct.D_Scope*, void (\9, %struct.d_loc_t*, i8**)*, %struct.Grammar*, - %struct.ParseNode_User }**)*, - void ({ i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, - void (\8, %struct.d_loc_t*, i8**)*, - %struct.Grammar*, %struct.ParseNode_User }*)*, - %struct.d_loc_t, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, - i32 }*)*, - i32 (i8*, i8**, i32, i32, { %struct.Grammar*, - void (\4, %struct.d_loc_t*, i8**)*, %struct.D_Scope*, void (\4)*, { - i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, - void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, - %struct.ParseNode_User }* (\4, i32, { i32, %struct.d_loc_t, i8*, i8*, - %struct.D_Scope*, void (\9, %struct.d_loc_t*, i8**)*, - %struct.Grammar*, %struct.ParseNode_User }**)*, - void ({ i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, - void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, - %struct.ParseNode_User }*)*, %struct.d_loc_t, i32, i32, i32, i32, - i32, i32, i32, i32, i32, i32, i32, i32 }*)** } - - { i32 (i8*, i8**, i32, i32, { - %struct.Grammar*, void (\4, %struct.d_loc_t*, i8**)*, - %struct.D_Scope*, void (\4)*, { - i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, - void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, - %struct.ParseNode_User - }* (\4, i32, { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, - void (\9, %struct.d_loc_t*, i8**)*, %struct.Grammar*, - %struct.ParseNode_User }**)*, - void ({ i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, - void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, - %struct.ParseNode_User }*)*, - %struct.d_loc_t, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, - i32, i32 }*)* null, - i32 (i8*, i8**, i32, i32, { - %struct.Grammar*, void (\4, %struct.d_loc_t*, i8**)*, - %struct.D_Scope*, void (\4)*, { i32, %struct.d_loc_t, i8*, i8*, - %struct.D_Scope*, void (\8, %struct.d_loc_t*, i8**)*, - %struct.Grammar*, %struct.ParseNode_User }* (\4, i32, { i32, - %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, - void (\9, %struct.d_loc_t*, i8**)*, %struct.Grammar*, - %struct.ParseNode_User }**)*, - void ({ i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, - void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, - %struct.ParseNode_User }*)*, %struct.d_loc_t, i32, i32, i32, - i32, i32, i32, i32, i32, i32, i32, i32, i32 }*)** null - } diff --git a/test/Assembler/2004-11-28-InvalidTypeCrash.ll b/test/Assembler/2004-11-28-InvalidTypeCrash.ll index f9b453b..40648fd 100644 --- a/test/Assembler/2004-11-28-InvalidTypeCrash.ll +++ b/test/Assembler/2004-11-28-InvalidTypeCrash.ll @@ -1,4 +1,4 @@ ; Test for PR463. This program is erroneous, but should not crash llvm-as. -; RUN: not llvm-as %s -o /dev/null |& grep {invalid type for null constant} +; RUN: not llvm-as %s -o /dev/null |& grep {use of undefined type named 'struct.none'} @.FOO = internal global %struct.none zeroinitializer diff --git a/test/Assembler/2005-02-09-AsmWriterStoreBug.ll b/test/Assembler/2005-02-09-AsmWriterStoreBug.ll deleted file mode 100644 index 4ec1796..0000000 --- a/test/Assembler/2005-02-09-AsmWriterStoreBug.ll +++ /dev/null @@ -1,14 +0,0 @@ -; RUN: llvm-as < %s | llvm-dis | llvm-as - -; Ensure that the asm writer emits types before both operands of the -; store, even though they can be the same. - -%RecTy = type %RecTy* - -define void @foo() { - %A = malloc %RecTy ; <%RecTy> [#uses=1] - %B = malloc %RecTy ; <%RecTy> [#uses=1] - store %RecTy %B, %RecTy %A - ret void -} - diff --git a/test/Assembler/2006-05-26-VarargsCallEncode.ll b/test/Assembler/2006-05-26-VarargsCallEncode.ll deleted file mode 100644 index 6dc60c3..0000000 --- a/test/Assembler/2006-05-26-VarargsCallEncode.ll +++ /dev/null @@ -1,8 +0,0 @@ -; RUN: llvm-as < %s | llvm-dis | grep {tail call void.*sret null} - -declare void @foo({ }* sret , ...) - -define void @bar() { - tail call void ({ }* sret , ...)* @foo( { }* null sret , i32 0 ) - ret void -} diff --git a/test/Assembler/2007-07-30-AutoUpgradeZextSext.ll b/test/Assembler/2007-07-30-AutoUpgradeZextSext.ll deleted file mode 100644 index ea2db44..0000000 --- a/test/Assembler/2007-07-30-AutoUpgradeZextSext.ll +++ /dev/null @@ -1,12 +0,0 @@ -; Test that upgrading zext/sext attributes to zeroext and signext -; works correctly. -; PR1553 -; RUN: llvm-as < %s > /dev/null - -define i32 @bar() { - %t = call i8 @foo( i8 10 sext ) zext - %x = zext i8 %t to i32 - ret i32 %x -} - -declare i8 @foo(i8 signext ) zeroext diff --git a/test/Assembler/2007-11-27-AutoUpgradeAttributes.ll b/test/Assembler/2007-11-27-AutoUpgradeAttributes.ll deleted file mode 100644 index ee260ea..0000000 --- a/test/Assembler/2007-11-27-AutoUpgradeAttributes.ll +++ /dev/null @@ -1,3 +0,0 @@ -; RUN: llvm-as < %s - -@FP = weak global i8 (...) signext * null diff --git a/test/Assembler/2008-02-20-MultipleReturnValue.ll b/test/Assembler/2008-02-20-MultipleReturnValue.ll deleted file mode 100644 index 32c893a..0000000 --- a/test/Assembler/2008-02-20-MultipleReturnValue.ll +++ /dev/null @@ -1,22 +0,0 @@ -; RUN: opt < %s -verify -S | llvm-as -disable-output - -define {i32, i8} @foo(i32 %p) { - ret i32 1, i8 2 -} - -define i8 @f2(i32 %p) { - %c = call {i32, i8} @foo(i32 %p) - %d = getresult {i32, i8} %c, 1 - %e = add i8 %d, 1 - ret i8 %e -} - -define i32 @f3(i32 %p) { - %c = invoke {i32, i8} @foo(i32 %p) - to label %L unwind label %L2 - L: - %d = getresult {i32, i8} %c, 0 - ret i32 %d - L2: - ret i32 0 -} diff --git a/test/Assembler/2008-10-14-NamedTypeOnInteger.ll b/test/Assembler/2008-10-14-NamedTypeOnInteger.ll deleted file mode 100644 index 009489d..0000000 --- a/test/Assembler/2008-10-14-NamedTypeOnInteger.ll +++ /dev/null @@ -1,6 +0,0 @@ -; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis -; PR2733 - -%t1 = type i32 -%t2 = type { %t1 } -@i1 = constant %t2 { %t1 15 } diff --git a/test/Assembler/2009-02-28-CastOpc.ll b/test/Assembler/2009-02-28-CastOpc.ll index ee98d41..6035643 100644 --- a/test/Assembler/2009-02-28-CastOpc.ll +++ b/test/Assembler/2009-02-28-CastOpc.ll @@ -1,8 +1,7 @@ ; RUN: llvm-as < %s | llvm-dis -type i32 define void @foo() { - bitcast %0* null to i32* + bitcast i32* null to i32* ret void } diff --git a/test/Assembler/AutoUpgradeIntrinsics.ll b/test/Assembler/AutoUpgradeIntrinsics.ll index 417493f..eb4ac76 100644 --- a/test/Assembler/AutoUpgradeIntrinsics.ll +++ b/test/Assembler/AutoUpgradeIntrinsics.ll @@ -1,87 +1,6 @@ ; Tests to make sure intrinsics are automatically upgraded. -; RUN: llvm-as < %s | llvm-dis | not grep {i32 @llvm\\.ct} -; RUN: llvm-as < %s | llvm-dis | \ -; RUN: not grep {llvm\\.part\\.set\\.i\[0-9\]*\\.i\[0-9\]*\\.i\[0-9\]*} -; RUN: llvm-as < %s | llvm-dis | \ -; RUN: not grep {llvm\\.part\\.select\\.i\[0-9\]*\\.i\[0-9\]*} -; RUN: llvm-as < %s | llvm-dis | \ -; RUN: not grep {llvm\\.bswap\\.i\[0-9\]*\\.i\[0-9\]*} -; RUN: llvm-as < %s | llvm-dis | \ -; RUN: not grep {llvm\\.x86\\.sse2\\.loadu} -; RUN: llvm-as < %s | llvm-dis | \ -; RUN: grep {llvm\\.x86\\.mmx\\.ps} | grep {x86_mmx} | count 16 ; RUN: llvm-as < %s | llvm-dis | FileCheck %s -declare i32 @llvm.ctpop.i28(i28 %val) -declare i32 @llvm.cttz.i29(i29 %val) -declare i32 @llvm.ctlz.i30(i30 %val) - -define i32 @test_ct(i32 %A) { - %c1 = call i32 @llvm.ctpop.i28(i28 1234) - %c2 = call i32 @llvm.cttz.i29(i29 2345) - %c3 = call i32 @llvm.ctlz.i30(i30 3456) - %r1 = add i32 %c1, %c2 - %r2 = add i32 %r1, %c3 - ret i32 %r2 -} - -declare i32 @llvm.part.set.i32.i32.i32(i32 %x, i32 %rep, i32 %hi, i32 %lo) -declare i16 @llvm.part.set.i16.i16.i16(i16 %x, i16 %rep, i32 %hi, i32 %lo) -define i32 @test_part_set(i32 %A, i16 %B) { - %a = call i32 @llvm.part.set.i32.i32.i32(i32 %A, i32 27, i32 8, i32 0) - %b = call i16 @llvm.part.set.i16.i16.i16(i16 %B, i16 27, i32 8, i32 0) - %c = zext i16 %b to i32 - %d = add i32 %a, %c - ret i32 %d -} - -declare i32 @llvm.part.select.i32.i32(i32 %x, i32 %hi, i32 %lo) -declare i16 @llvm.part.select.i16.i16(i16 %x, i32 %hi, i32 %lo) -define i32 @test_part_select(i32 %A, i16 %B) { - %a = call i32 @llvm.part.select.i32.i32(i32 %A, i32 8, i32 0) - %b = call i16 @llvm.part.select.i16.i16(i16 %B, i32 8, i32 0) - %c = zext i16 %b to i32 - %d = add i32 %a, %c - ret i32 %d -} - -declare i32 @llvm.bswap.i32.i32(i32 %x) -declare i16 @llvm.bswap.i16.i16(i16 %x) -define i32 @test_bswap(i32 %A, i16 %B) { - %a = call i32 @llvm.bswap.i32.i32(i32 %A) - %b = call i16 @llvm.bswap.i16.i16(i16 %B) - %c = zext i16 %b to i32 - %d = add i32 %a, %c - ret i32 %d -} - -declare <4 x i16> @llvm.x86.mmx.psra.w(<4 x i16>, <2 x i32>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psll.w(<4 x i16>, <2 x i32>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psrl.w(<4 x i16>, <2 x i32>) nounwind readnone -define void @sh16(<4 x i16> %A, <2 x i32> %B) { - %r1 = call <4 x i16> @llvm.x86.mmx.psra.w( <4 x i16> %A, <2 x i32> %B ) ; <<4 x i16>> [#uses=0] - %r2 = call <4 x i16> @llvm.x86.mmx.psll.w( <4 x i16> %A, <2 x i32> %B ) ; <<4 x i16>> [#uses=0] - %r3 = call <4 x i16> @llvm.x86.mmx.psrl.w( <4 x i16> %A, <2 x i32> %B ) ; <<4 x i16>> [#uses=0] - ret void -} - -declare <2 x i32> @llvm.x86.mmx.psra.d(<2 x i32>, <2 x i32>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psll.d(<2 x i32>, <2 x i32>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psrl.d(<2 x i32>, <2 x i32>) nounwind readnone -define void @sh32(<2 x i32> %A, <2 x i32> %B) { - %r1 = call <2 x i32> @llvm.x86.mmx.psra.d( <2 x i32> %A, <2 x i32> %B ) ; <<2 x i32>> [#uses=0] - %r2 = call <2 x i32> @llvm.x86.mmx.psll.d( <2 x i32> %A, <2 x i32> %B ) ; <<2 x i32>> [#uses=0] - %r3 = call <2 x i32> @llvm.x86.mmx.psrl.d( <2 x i32> %A, <2 x i32> %B ) ; <<2 x i32>> [#uses=0] - ret void -} - -declare <1 x i64> @llvm.x86.mmx.psll.q(<1 x i64>, <2 x i32>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.psrl.q(<1 x i64>, <2 x i32>) nounwind readnone -define void @sh64(<1 x i64> %A, <2 x i32> %B) { - %r1 = call <1 x i64> @llvm.x86.mmx.psll.q( <1 x i64> %A, <2 x i32> %B ) ; <<1 x i64>> [#uses=0] - %r2 = call <1 x i64> @llvm.x86.mmx.psrl.q( <1 x i64> %A, <2 x i32> %B ) ; <<1 x i64>> [#uses=0] - ret void -} declare <4 x float> @llvm.x86.sse.loadu.ps(i8*) nounwind readnone declare <16 x i8> @llvm.x86.sse2.loadu.dq(i8*) nounwind readnone @@ -90,6 +9,10 @@ define void @test_loadu(i8* %a, double* %b) { %v0 = call <4 x float> @llvm.x86.sse.loadu.ps(i8* %a) %v1 = call <16 x i8> @llvm.x86.sse2.loadu.dq(i8* %a) %v2 = call <2 x double> @llvm.x86.sse2.loadu.pd(double* %b) + +; CHECK: load i128* {{.*}}, align 1 +; CHECK: load i128* {{.*}}, align 1 +; CHECK: load i128* {{.*}}, align 1 ret void } @@ -109,3 +32,11 @@ define void @f(<4 x float> %A, i8* %B, <2 x double> %C, i32 %D) { call void @llvm.x86.sse2.movnt.i(i8* %B, i32 %D) ret void } + +declare void @llvm.prefetch(i8*, i32, i32) nounwind + +define void @p(i8* %ptr) { +; CHECK: llvm.prefetch(i8* %ptr, i32 0, i32 1, i32 1) + tail call void @llvm.prefetch(i8* %ptr, i32 0, i32 1) + ret void +} diff --git a/test/Assembler/AutoUpgradeMMXIntrinsics.ll b/test/Assembler/AutoUpgradeMMXIntrinsics.ll deleted file mode 100644 index 54120ff..0000000 --- a/test/Assembler/AutoUpgradeMMXIntrinsics.ll +++ /dev/null @@ -1,223 +0,0 @@ -; Tests to make sure MMX intrinsics are automatically upgraded. -; RUN: llvm-as < %s | llvm-dis -o %t -; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<1 x i64\\\>} -; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<2 x i32\\\>} -; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<4 x i16\\\>} -; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<8 x i8\\\>} -; RUN: grep {llvm\\.x86\\.sse\\.pshuf\\.w} %t | not grep i32 - -; Addition -declare <8 x i8> @llvm.x86.mmx.padd.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.padd.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.padd.d(<2 x i32>, <2 x i32>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.padd.q(<1 x i64>, <1 x i64>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.padds.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.padds.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.paddus.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.paddus.w(<4 x i16>, <4 x i16>) nounwind readnone -define void @add(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D, - <2 x i32> %E, <2 x i32> %F, <1 x i64> %G, <1 x i64> %H) { - %r1 = call <8 x i8> @llvm.x86.mmx.padd.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.padd.w(<4 x i16> %C, <4 x i16> %D) - %r3 = call <2 x i32> @llvm.x86.mmx.padd.d(<2 x i32> %E, <2 x i32> %F) - %r4 = call <1 x i64> @llvm.x86.mmx.padd.q(<1 x i64> %G, <1 x i64> %H) - %r5 = call <8 x i8> @llvm.x86.mmx.padds.b(<8 x i8> %A, <8 x i8> %B) - %r6 = call <4 x i16> @llvm.x86.mmx.padds.w(<4 x i16> %C, <4 x i16> %D) - %r7 = call <8 x i8> @llvm.x86.mmx.paddus.b(<8 x i8> %A, <8 x i8> %B) - %r8 = call <4 x i16> @llvm.x86.mmx.paddus.w(<4 x i16> %C, <4 x i16> %D) - ret void -} - -; Subtraction -declare <8 x i8> @llvm.x86.mmx.psub.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psub.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psub.d(<2 x i32>, <2 x i32>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.psub.q(<1 x i64>, <1 x i64>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.psubs.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psubs.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.psubus.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psubus.w(<4 x i16>, <4 x i16>) nounwind readnone -define void @sub(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D, - <2 x i32> %E, <2 x i32> %F, <1 x i64> %G, <1 x i64> %H) { - %r1 = call <8 x i8> @llvm.x86.mmx.psub.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.psub.w(<4 x i16> %C, <4 x i16> %D) - %r3 = call <2 x i32> @llvm.x86.mmx.psub.d(<2 x i32> %E, <2 x i32> %F) - %r4 = call <1 x i64> @llvm.x86.mmx.psub.q(<1 x i64> %G, <1 x i64> %H) - %r5 = call <8 x i8> @llvm.x86.mmx.psubs.b(<8 x i8> %A, <8 x i8> %B) - %r6 = call <4 x i16> @llvm.x86.mmx.psubs.w(<4 x i16> %C, <4 x i16> %D) - %r7 = call <8 x i8> @llvm.x86.mmx.psubus.b(<8 x i8> %A, <8 x i8> %B) - %r8 = call <4 x i16> @llvm.x86.mmx.psubus.w(<4 x i16> %C, <4 x i16> %D) - ret void -} - -; Multiplication -declare <4 x i16> @llvm.x86.mmx.pmulh.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pmull.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pmulhu.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pmulu.dq(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.pmadd.wd(<4 x i16>, <4 x i16>) nounwind readnone -define void @mul(<4 x i16> %A, <4 x i16> %B) { - %r1 = call <4 x i16> @llvm.x86.mmx.pmulh.w(<4 x i16> %A, <4 x i16> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.pmull.w(<4 x i16> %A, <4 x i16> %B) - %r3 = call <4 x i16> @llvm.x86.mmx.pmulhu.w(<4 x i16> %A, <4 x i16> %B) - %r4 = call <4 x i16> @llvm.x86.mmx.pmulu.dq(<4 x i16> %A, <4 x i16> %B) - %r5 = call <2 x i32> @llvm.x86.mmx.pmadd.wd(<4 x i16> %A, <4 x i16> %B) - ret void -} - -; Bitwise operations -declare <1 x i64> @llvm.x86.mmx.pand(<1 x i64>, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.pandn(<1 x i64>, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.por(<1 x i64>, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.pxor(<1 x i64>, <1 x i64>) nounwind readnone -define void @bit(<1 x i64> %A, <1 x i64> %B) { - %r1 = call <1 x i64> @llvm.x86.mmx.pand(<1 x i64> %A, <1 x i64> %B) - %r2 = call <1 x i64> @llvm.x86.mmx.pandn(<1 x i64> %A, <1 x i64> %B) - %r3 = call <1 x i64> @llvm.x86.mmx.por(<1 x i64> %A, <1 x i64> %B) - %r4 = call <1 x i64> @llvm.x86.mmx.pxor(<1 x i64> %A, <1 x i64> %B) - ret void -} - -; Averages -declare <8 x i8> @llvm.x86.mmx.pavg.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pavg.w(<4 x i16>, <4 x i16>) nounwind readnone -define void @avg(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D) { - %r1 = call <8 x i8> @llvm.x86.mmx.pavg.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.pavg.w(<4 x i16> %C, <4 x i16> %D) - ret void -} - -; Maximum -declare <8 x i8> @llvm.x86.mmx.pmaxu.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pmaxs.w(<4 x i16>, <4 x i16>) nounwind readnone -define void @max(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D) { - %r1 = call <8 x i8> @llvm.x86.mmx.pmaxu.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.pmaxs.w(<4 x i16> %C, <4 x i16> %D) - ret void -} - -; Minimum -declare <8 x i8> @llvm.x86.mmx.pminu.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pmins.w(<4 x i16>, <4 x i16>) nounwind readnone -define void @min(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D) { - %r1 = call <8 x i8> @llvm.x86.mmx.pminu.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.pmins.w(<4 x i16> %C, <4 x i16> %D) - ret void -} - -; Packed sum of absolute differences -declare <4 x i16> @llvm.x86.mmx.psad.bw(<8 x i8>, <8 x i8>) nounwind readnone -define void @psad(<8 x i8> %A, <8 x i8> %B) { - %r1 = call <4 x i16> @llvm.x86.mmx.psad.bw(<8 x i8> %A, <8 x i8> %B) - ret void -} - -; Shift left -declare <4 x i16> @llvm.x86.mmx.psll.w(<4 x i16>, <1 x i64>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psll.d(<2 x i32>, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.psll.q(<1 x i64>, <1 x i64>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pslli.w(<4 x i16>, i32) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.pslli.d(<2 x i32>, i32) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.pslli.q(<1 x i64>, i32) nounwind readnone -define void @shl(<4 x i16> %A, <2 x i32> %B, <1 x i64> %C, i32 %D) { - %r1 = call <4 x i16> @llvm.x86.mmx.psll.w(<4 x i16> %A, <1 x i64> %C) - %r2 = call <2 x i32> @llvm.x86.mmx.psll.d(<2 x i32> %B, <1 x i64> %C) - %r3 = call <1 x i64> @llvm.x86.mmx.psll.q(<1 x i64> %C, <1 x i64> %C) - %r4 = call <4 x i16> @llvm.x86.mmx.pslli.w(<4 x i16> %A, i32 %D) - %r5 = call <2 x i32> @llvm.x86.mmx.pslli.d(<2 x i32> %B, i32 %D) - %r6 = call <1 x i64> @llvm.x86.mmx.pslli.q(<1 x i64> %C, i32 %D) - ret void -} - -; Shift right logical -declare <4 x i16> @llvm.x86.mmx.psrl.w(<4 x i16>, <1 x i64>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psrl.d(<2 x i32>, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.psrl.q(<1 x i64>, <1 x i64>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psrli.w(<4 x i16>, i32) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psrli.d(<2 x i32>, i32) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.psrli.q(<1 x i64>, i32) nounwind readnone -define void @shr(<4 x i16> %A, <2 x i32> %B, <1 x i64> %C, i32 %D) { - %r1 = call <4 x i16> @llvm.x86.mmx.psrl.w(<4 x i16> %A, <1 x i64> %C) - %r2 = call <2 x i32> @llvm.x86.mmx.psrl.d(<2 x i32> %B, <1 x i64> %C) - %r3 = call <1 x i64> @llvm.x86.mmx.psrl.q(<1 x i64> %C, <1 x i64> %C) - %r4 = call <4 x i16> @llvm.x86.mmx.psrli.w(<4 x i16> %A, i32 %D) - %r5 = call <2 x i32> @llvm.x86.mmx.psrli.d(<2 x i32> %B, i32 %D) - %r6 = call <1 x i64> @llvm.x86.mmx.psrli.q(<1 x i64> %C, i32 %D) - ret void -} - -; Shift right arithmetic -declare <4 x i16> @llvm.x86.mmx.psra.w(<4 x i16>, <1 x i64>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psra.d(<2 x i32>, <1 x i64>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psrai.w(<4 x i16>, i32) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psrai.d(<2 x i32>, i32) nounwind readnone -define void @sra(<4 x i16> %A, <2 x i32> %B, <1 x i64> %C, i32 %D) { - %r1 = call <4 x i16> @llvm.x86.mmx.psra.w(<4 x i16> %A, <1 x i64> %C) - %r2 = call <2 x i32> @llvm.x86.mmx.psra.d(<2 x i32> %B, <1 x i64> %C) - %r3 = call <4 x i16> @llvm.x86.mmx.psrai.w(<4 x i16> %A, i32 %D) - %r4 = call <2 x i32> @llvm.x86.mmx.psrai.d(<2 x i32> %B, i32 %D) - ret void -} - -; Pack/Unpack ops -declare <8 x i8> @llvm.x86.mmx.packsswb(<4 x i16>, <4 x i16>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.packssdw(<2 x i32>, <2 x i32>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.packuswb(<4 x i16>, <4 x i16>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.punpckhbw(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.punpckhwd(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.punpckhdq(<2 x i32>, <2 x i32>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.punpcklbw(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.punpcklwd(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.punpckldq(<2 x i32>, <2 x i32>) nounwind readnone -define void @pack_unpack(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D, - <2 x i32> %E, <2 x i32> %F) { - %r1 = call <8 x i8> @llvm.x86.mmx.packsswb(<4 x i16> %C, <4 x i16> %D) - %r2 = call <4 x i16> @llvm.x86.mmx.packssdw(<2 x i32> %E, <2 x i32> %F) - %r3 = call <8 x i8> @llvm.x86.mmx.packuswb(<4 x i16> %C, <4 x i16> %D) - %r4 = call <8 x i8> @llvm.x86.mmx.punpckhbw(<8 x i8> %A, <8 x i8> %B) - %r5 = call <4 x i16> @llvm.x86.mmx.punpckhwd(<4 x i16> %C, <4 x i16> %D) - %r6 = call <2 x i32> @llvm.x86.mmx.punpckhdq(<2 x i32> %E, <2 x i32> %F) - %r7 = call <8 x i8> @llvm.x86.mmx.punpcklbw(<8 x i8> %A, <8 x i8> %B) - %r8 = call <4 x i16> @llvm.x86.mmx.punpcklwd(<4 x i16> %C, <4 x i16> %D) - %r9 = call <2 x i32> @llvm.x86.mmx.punpckldq(<2 x i32> %E, <2 x i32> %F) - ret void -} - -; Integer comparison ops -declare <8 x i8> @llvm.x86.mmx.pcmpeq.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pcmpeq.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.pcmpeq.d(<2 x i32>, <2 x i32>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.pcmpgt.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pcmpgt.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.pcmpgt.d(<2 x i32>, <2 x i32>) nounwind readnone -define void @cmp(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D, - <2 x i32> %E, <2 x i32> %F) { - %r1 = call <8 x i8> @llvm.x86.mmx.pcmpeq.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.pcmpeq.w(<4 x i16> %C, <4 x i16> %D) - %r3 = call <2 x i32> @llvm.x86.mmx.pcmpeq.d(<2 x i32> %E, <2 x i32> %F) - %r4 = call <8 x i8> @llvm.x86.mmx.pcmpgt.b(<8 x i8> %A, <8 x i8> %B) - %r5 = call <4 x i16> @llvm.x86.mmx.pcmpgt.w(<4 x i16> %C, <4 x i16> %D) - %r6 = call <2 x i32> @llvm.x86.mmx.pcmpgt.d(<2 x i32> %E, <2 x i32> %F) - ret void -} - -; Miscellaneous -declare void @llvm.x86.mmx.maskmovq(<8 x i8>, <8 x i8>, i32*) nounwind readnone -declare i32 @llvm.x86.mmx.pmovmskb(<8 x i8>) nounwind readnone -declare void @llvm.x86.mmx.movnt.dq(i32*, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.palignr.b(<1 x i64>, <1 x i64>, i8) nounwind readnone -declare i32 @llvm.x86.mmx.pextr.w(<1 x i64>, i32) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.pinsr.w(<1 x i64>, i32, i32) nounwind readnone -declare <4 x i16> @llvm.x86.ssse3.pshuf.w(<4 x i16>, i32) nounwind readnone -define void @misc(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D, - <2 x i32> %E, <2 x i32> %F, <1 x i64> %G, <1 x i64> %H, - i32* %I, i8 %J, i16 %K, i32 %L) { - call void @llvm.x86.mmx.maskmovq(<8 x i8> %A, <8 x i8> %B, i32* %I) - %r1 = call i32 @llvm.x86.mmx.pmovmskb(<8 x i8> %A) - call void @llvm.x86.mmx.movnt.dq(i32* %I, <1 x i64> %G) - %r2 = call <1 x i64> @llvm.x86.mmx.palignr.b(<1 x i64> %G, <1 x i64> %H, i8 %J) - %r3 = call i32 @llvm.x86.mmx.pextr.w(<1 x i64> %G, i32 37) - %r4 = call <1 x i64> @llvm.x86.mmx.pinsr.w(<1 x i64> %G, i32 37, i32 927) - %r5 = call <4 x i16> @llvm.x86.ssse3.pshuf.w(<4 x i16> %C, i32 37) - ret void -} diff --git a/test/Assembler/getelementptr.ll b/test/Assembler/getelementptr.ll index ebef58f..ce6866d 100644 --- a/test/Assembler/getelementptr.ll +++ b/test/Assembler/getelementptr.ll @@ -9,13 +9,13 @@ ;; Verify that i16 indices work. @x = external global {i32, i32} -@y = global i32* getelementptr ({i32, i32}* @x, i16 42, i32 0) -; CHECK: @y = global i32* getelementptr (%0* @x, i16 42, i32 0) +@y = global i32* getelementptr ({ i32, i32 }* @x, i16 42, i32 0) +; CHECK: @y = global i32* getelementptr ({ i32, i32 }* @x, i16 42, i32 0) ; see if i92 indices work too. define i32 *@test({i32, i32}* %t, i92 %n) { ; CHECK: @test -; CHECK: %B = getelementptr %0* %t, i92 %n, i32 0 +; CHECK: %B = getelementptr { i32, i32 }* %t, i92 %n, i32 0 %B = getelementptr {i32, i32}* %t, i92 %n, i32 0 ret i32* %B } diff --git a/test/Assembler/named-metadata.ll b/test/Assembler/named-metadata.ll new file mode 100644 index 0000000..db72810 --- /dev/null +++ b/test/Assembler/named-metadata.ll @@ -0,0 +1,24 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + +!0 = metadata !{metadata !"zero"} +!1 = metadata !{metadata !"one"} +!2 = metadata !{metadata !"two"} + +!foo = !{!0, !1, !2} +; CHECK: !foo = !{!0, !1, !2} + +!\23pragma = !{!0, !1, !2} +; CHECK: !\23pragma = !{!0, !1, !2} + +; \31 is the digit '1'. On emission, we escape the first character (to avoid +; conflicting with anonymous metadata), but not the subsequent ones. +!\31\31\31 = !{!0, !1, !2} +; CHECK: !\3111 = !{!0, !1, !2} + +!\22name\22 = !{!0, !1, !2} +; CHECK: !\22name\22 = !{!0, !1, !2} + +; \x doesn't mean anything, so we parse it literally but escape the \ into \5C +; when emitting it, followed by xfoo. +!\xfoo = !{!0, !1, !2} +; CHECK: !\5Cxfoo = !{!0, !1, !2} diff --git a/test/Assembler/private.ll b/test/Assembler/private.ll deleted file mode 100644 index 3714572..0000000 --- a/test/Assembler/private.ll +++ /dev/null @@ -1,9 +0,0 @@ -; Test to make sure that the 'private' tag is not lost! -; -; RUN: llvm-as < %s | llvm-dis | grep private - -declare void @foo() - -define private void @foo() { - ret void -} |