diff options
Diffstat (limited to 'test/CodeGen/CBackend')
54 files changed, 0 insertions, 643 deletions
diff --git a/test/CodeGen/CBackend/2002-05-16-NameCollide.ll b/test/CodeGen/CBackend/2002-05-16-NameCollide.ll deleted file mode 100644 index 0b06041..0000000 --- a/test/CodeGen/CBackend/2002-05-16-NameCollide.ll +++ /dev/null @@ -1,8 +0,0 @@ -; RUN: llc < %s -march=c - -; Make sure that global variables do not collide if they have the same name, -; but different types. - -@X = global i32 5 ; <i32*> [#uses=0] -@X.upgrd.1 = global i64 7 ; <i64*> [#uses=0] - diff --git a/test/CodeGen/CBackend/2002-05-21-MissingReturn.ll b/test/CodeGen/CBackend/2002-05-21-MissingReturn.ll deleted file mode 100644 index a9f54e4..0000000 --- a/test/CodeGen/CBackend/2002-05-21-MissingReturn.ll +++ /dev/null @@ -1,20 +0,0 @@ -; RUN: llc < %s -march=c - -; This case was emitting code that looked like this: -; ... -; llvm_BB1: /* no statement here */ -; } -; -; Which the Sun C compiler rejected, so now we are sure to put a return -; instruction in there if the basic block is otherwise empty. -; -define void @test() { - br label %BB1 - -BB2: ; preds = %BB2 - br label %BB2 - -BB1: ; preds = %0 - ret void -} - diff --git a/test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll b/test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll deleted file mode 100644 index 2afb1a0..0000000 --- a/test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll +++ /dev/null @@ -1,7 +0,0 @@ -; RUN: llc < %s -march=c - -; Test const pointer refs & forward references - -@t3 = global i32* @t1 ; <i32**> [#uses=0] -@t1 = global i32 4 ; <i32*> [#uses=1] - diff --git a/test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll b/test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll deleted file mode 100644 index b71cf07..0000000 --- a/test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll +++ /dev/null @@ -1,8 +0,0 @@ -; RUN: llc < %s -march=c - -global i32* bitcast (float* @2 to i32*) ;; Forward numeric reference -global float* @2 ;; Duplicate forward numeric reference -global float 0.0 - -@array = constant [2 x i32] [ i32 12, i32 52 ] -@arrayPtr = global i32* getelementptr ([2 x i32]* @array, i64 0, i64 0) diff --git a/test/CodeGen/CBackend/2002-08-19-DataPointer.ll b/test/CodeGen/CBackend/2002-08-19-DataPointer.ll deleted file mode 100644 index b5a1f0b..0000000 --- a/test/CodeGen/CBackend/2002-08-19-DataPointer.ll +++ /dev/null @@ -1,4 +0,0 @@ -; RUN: llc < %s -march=c - -@sptr1 = global [11 x i8]* @somestr ;; Forward ref to a constant -@somestr = constant [11 x i8] c"hello world" diff --git a/test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll b/test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll deleted file mode 100644 index 10b9fe2..0000000 --- a/test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll +++ /dev/null @@ -1,5 +0,0 @@ -; RUN: llc < %s -march=c - -@fptr = global void ()* @f ;; Forward ref method defn -declare void @f() ;; External method - diff --git a/test/CodeGen/CBackend/2002-08-19-HardConstantExpr.ll b/test/CodeGen/CBackend/2002-08-19-HardConstantExpr.ll deleted file mode 100644 index 0827423..0000000 --- a/test/CodeGen/CBackend/2002-08-19-HardConstantExpr.ll +++ /dev/null @@ -1,5 +0,0 @@ -; RUN: llc < %s -march=c - -@array = constant [2 x i32] [ i32 12, i32 52 ] ; <[2 x i32]*> [#uses=1] -@arrayPtr = global i32* getelementptr ([2 x i32]* @array, i64 0, i64 0) ; <i32**> [#uses=0] - diff --git a/test/CodeGen/CBackend/2002-08-20-UnnamedArgument.ll b/test/CodeGen/CBackend/2002-08-20-UnnamedArgument.ll deleted file mode 100644 index 59aafd5..0000000 --- a/test/CodeGen/CBackend/2002-08-20-UnnamedArgument.ll +++ /dev/null @@ -1,10 +0,0 @@ -; RUN: llc < %s -march=c - -; The C Writer bombs on this testcase because it tries the print the prototype -; for the test function, which tries to print the argument name. The function -; has not been incorporated into the slot calculator, so after it does the name -; lookup, it tries a slot calculator lookup, which fails. - -define i32 @test(i32) { - ret i32 0 -} diff --git a/test/CodeGen/CBackend/2002-08-26-IndirectCallTest.ll b/test/CodeGen/CBackend/2002-08-26-IndirectCallTest.ll deleted file mode 100644 index 6c4d629..0000000 --- a/test/CodeGen/CBackend/2002-08-26-IndirectCallTest.ll +++ /dev/null @@ -1,17 +0,0 @@ -; RUN: llc < %s -march=c - -; Indirect function call test... found by Joel & Brian -; - -@taskArray = external global i32* ; <i32**> [#uses=1] - -define void @test(i32 %X) { - %Y = add i32 %X, -1 ; <i32> [#uses=1] - %cast100 = sext i32 %Y to i64 ; <i64> [#uses=1] - %gep100 = getelementptr i32** @taskArray, i64 %cast100 ; <i32**> [#uses=1] - %fooPtr = load i32** %gep100 ; <i32*> [#uses=1] - %cast101 = bitcast i32* %fooPtr to void (i32)* ; <void (i32)*> [#uses=1] - call void %cast101( i32 1000 ) - ret void -} - diff --git a/test/CodeGen/CBackend/2002-08-30-StructureOrderingTest.ll b/test/CodeGen/CBackend/2002-08-30-StructureOrderingTest.ll deleted file mode 100644 index 1187a37..0000000 --- a/test/CodeGen/CBackend/2002-08-30-StructureOrderingTest.ll +++ /dev/null @@ -1,8 +0,0 @@ -; RUN: llc < %s -march=c - -; This testcase fails because the C backend does not arrange to output the -; contents of a structure type before it outputs the structure type itself. - -@Y = external global { { i32 } } ; <{ { i32 } }*> [#uses=0] -@X = external global { float } ; <{ float }*> [#uses=0] - diff --git a/test/CodeGen/CBackend/2002-09-20-ArrayTypeFailure.ll b/test/CodeGen/CBackend/2002-09-20-ArrayTypeFailure.ll deleted file mode 100644 index 021adb9..0000000 --- a/test/CodeGen/CBackend/2002-09-20-ArrayTypeFailure.ll +++ /dev/null @@ -1,7 +0,0 @@ -; RUN: llc < %s -march=c - -define void @test() { - %X = alloca [4 x i32] ; <[4 x i32]*> [#uses=0] - ret void -} - diff --git a/test/CodeGen/CBackend/2002-09-20-VarArgPrototypes.ll b/test/CodeGen/CBackend/2002-09-20-VarArgPrototypes.ll deleted file mode 100644 index e915cd2..0000000 --- a/test/CodeGen/CBackend/2002-09-20-VarArgPrototypes.ll +++ /dev/null @@ -1,6 +0,0 @@ -; RUN: llc < %s -march=c - - -declare void @foo(...) - - diff --git a/test/CodeGen/CBackend/2002-10-16-External.ll b/test/CodeGen/CBackend/2002-10-16-External.ll deleted file mode 100644 index 2cdd15c..0000000 --- a/test/CodeGen/CBackend/2002-10-16-External.ll +++ /dev/null @@ -1,4 +0,0 @@ -; RUN: llc < %s -march=c - -@bob = external global i32 ; <i32*> [#uses=0] - diff --git a/test/CodeGen/CBackend/2002-11-06-PrintEscaped.ll b/test/CodeGen/CBackend/2002-11-06-PrintEscaped.ll deleted file mode 100644 index 82d594f..0000000 --- a/test/CodeGen/CBackend/2002-11-06-PrintEscaped.ll +++ /dev/null @@ -1,11 +0,0 @@ -; RUN: llc < %s -march=c - -@testString = internal constant [18 x i8] c"Escaped newline\5Cn\00" ; <[18 x i8]*> [#uses=1] - -declare i32 @printf(i8*, ...) - -define i32 @main() { - call i32 (i8*, ...)* @printf( i8* getelementptr ([18 x i8]* @testString, i64 0, i64 0) ) ; <i32>:1 [#uses=0] - ret i32 0 -} - diff --git a/test/CodeGen/CBackend/2003-05-12-IntegerSizeWarning.ll b/test/CodeGen/CBackend/2003-05-12-IntegerSizeWarning.ll deleted file mode 100644 index 92d582d..0000000 --- a/test/CodeGen/CBackend/2003-05-12-IntegerSizeWarning.ll +++ /dev/null @@ -1,8 +0,0 @@ -; RUN: llc < %s -march=c - -; Apparently this constant was unsigned in ISO C 90, but not in C 99. - -define i32 @foo() { - ret i32 -2147483648 -} - diff --git a/test/CodeGen/CBackend/2003-05-13-VarArgFunction.ll b/test/CodeGen/CBackend/2003-05-13-VarArgFunction.ll deleted file mode 100644 index a42dc27..0000000 --- a/test/CodeGen/CBackend/2003-05-13-VarArgFunction.ll +++ /dev/null @@ -1,11 +0,0 @@ -; RUN: llc < %s -march=c - -; This testcase breaks the C backend, because gcc doesn't like (...) functions -; with no arguments at all. - -define void @test(i64 %Ptr) { - %P = inttoptr i64 %Ptr to void (...)* ; <void (...)*> [#uses=1] - call void (...)* %P( i64 %Ptr ) - ret void -} - diff --git a/test/CodeGen/CBackend/2003-05-31-MissingStructName.ll b/test/CodeGen/CBackend/2003-05-31-MissingStructName.ll deleted file mode 100644 index 19c7840..0000000 --- a/test/CodeGen/CBackend/2003-05-31-MissingStructName.ll +++ /dev/null @@ -1,5 +0,0 @@ -; RUN: llc < %s -march=c - -; The C backend was dying when there was no typename for a struct type! - -declare i32 @test(i32, { [32 x i32] }*) diff --git a/test/CodeGen/CBackend/2003-06-01-NullPointerType.ll b/test/CodeGen/CBackend/2003-06-01-NullPointerType.ll deleted file mode 100644 index 048e045..0000000 --- a/test/CodeGen/CBackend/2003-06-01-NullPointerType.ll +++ /dev/null @@ -1,9 +0,0 @@ -; RUN: llc < %s -march=c - -%X = type { i32, float } - -define void @test() { - getelementptr %X* null, i64 0, i32 1 ; <float*>:1 [#uses=0] - ret void -} - diff --git a/test/CodeGen/CBackend/2003-06-11-HexConstant.ll b/test/CodeGen/CBackend/2003-06-11-HexConstant.ll deleted file mode 100644 index 6197b30..0000000 --- a/test/CodeGen/CBackend/2003-06-11-HexConstant.ll +++ /dev/null @@ -1,4 +0,0 @@ -; RUN: llc < %s -march=c - -; Make sure hex constant does not continue into a valid hexadecimal letter/number -@version = global [3 x i8] c"\001\00" diff --git a/test/CodeGen/CBackend/2003-06-11-LiteralStringProblem.ll b/test/CodeGen/CBackend/2003-06-11-LiteralStringProblem.ll deleted file mode 100644 index f6177ea..0000000 --- a/test/CodeGen/CBackend/2003-06-11-LiteralStringProblem.ll +++ /dev/null @@ -1,3 +0,0 @@ -; RUN: llc < %s -march=c - -@version = global [3 x i8] c"1\00\00" diff --git a/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll b/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll deleted file mode 100644 index f0b1bbc..0000000 --- a/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll +++ /dev/null @@ -1,17 +0,0 @@ -; RUN: llc < %s -march=c - -declare i32 @callee(i32, i32) - -define i32 @test(i32 %X) { -; <label>:0 - %A = invoke i32 @callee( i32 %X, i32 5 ) - to label %Ok unwind label %Threw ; <i32> [#uses=1] - -Ok: ; preds = %Threw, %0 - %B = phi i32 [ %A, %0 ], [ -1, %Threw ] ; <i32> [#uses=1] - ret i32 %B - -Threw: ; preds = %0 - br label %Ok -} - diff --git a/test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.ll b/test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.ll deleted file mode 100644 index 4bd1da2..0000000 --- a/test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.ll +++ /dev/null @@ -1,3 +0,0 @@ -; RUN: llc < %s -march=c | grep common | grep X - -@X = linkonce global i32 5 diff --git a/test/CodeGen/CBackend/2003-10-12-NANGlobalInits.ll b/test/CodeGen/CBackend/2003-10-12-NANGlobalInits.ll deleted file mode 100644 index 0fbb3fe..0000000 --- a/test/CodeGen/CBackend/2003-10-12-NANGlobalInits.ll +++ /dev/null @@ -1,5 +0,0 @@ -; RUN: llc < %s -march=c - -; This is a non-normal FP value: it's a nan. -@NAN = global { float } { float 0x7FF8000000000000 } ; <{ float }*> [#uses=0] -@NANs = global { float } { float 0x7FFC000000000000 } ; <{ float }*> [#uses=0] diff --git a/test/CodeGen/CBackend/2003-10-23-UnusedType.ll b/test/CodeGen/CBackend/2003-10-23-UnusedType.ll deleted file mode 100644 index 9195634..0000000 --- a/test/CodeGen/CBackend/2003-10-23-UnusedType.ll +++ /dev/null @@ -1,8 +0,0 @@ -; RUN: llc < %s -march=c - -%A = type { i32, i8*, { i32, i32, i32, i32, i32, i32, i32, i32 }*, i16 } - -define void @test(%A*) { - ret void -} - diff --git a/test/CodeGen/CBackend/2003-10-28-CastToPtrToStruct.ll b/test/CodeGen/CBackend/2003-10-28-CastToPtrToStruct.ll deleted file mode 100644 index b4389ff..0000000 --- a/test/CodeGen/CBackend/2003-10-28-CastToPtrToStruct.ll +++ /dev/null @@ -1,12 +0,0 @@ -; RUN: llc < %s -march=c - -; reduced from DOOM. - %union._XEvent = type { i32 } -@.X_event_9 = global %union._XEvent zeroinitializer ; <%union._XEvent*> [#uses=1] - -define void @I_InitGraphics() { -shortcirc_next.3: - %tmp.319 = load i32* getelementptr ({ i32, i32 }* bitcast (%union._XEvent* @.X_event_9 to { i32, i32 }*), i64 0, i32 1) ; <i32> [#uses=0] - ret void -} - diff --git a/test/CodeGen/CBackend/2003-11-21-ConstantShiftExpr.ll b/test/CodeGen/CBackend/2003-11-21-ConstantShiftExpr.ll deleted file mode 100644 index 6a26291..0000000 --- a/test/CodeGen/CBackend/2003-11-21-ConstantShiftExpr.ll +++ /dev/null @@ -1,13 +0,0 @@ -; RUN: llc < %s -march=c -@y = weak global i8 0 ; <i8*> [#uses=1] - -define i32 @testcaseshr() { -entry: - ret i32 lshr (i32 ptrtoint (i8* @y to i32), i32 4) -} - -define i32 @testcaseshl() { -entry: - ret i32 shl (i32 ptrtoint (i8* @y to i32), i32 4) -} - diff --git a/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.ll b/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.ll deleted file mode 100644 index 142fbd8..0000000 --- a/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.ll +++ /dev/null @@ -1,16 +0,0 @@ -; RUN: llc < %s -march=c | grep builtin_return_address - -declare i8* @llvm.returnaddress(i32) - -declare i8* @llvm.frameaddress(i32) - -define i8* @test1() { - %X = call i8* @llvm.returnaddress( i32 0 ) ; <i8*> [#uses=1] - ret i8* %X -} - -define i8* @test2() { - %X = call i8* @llvm.frameaddress( i32 0 ) ; <i8*> [#uses=1] - ret i8* %X -} - diff --git a/test/CodeGen/CBackend/2004-02-15-PreexistingExternals.ll b/test/CodeGen/CBackend/2004-02-15-PreexistingExternals.ll deleted file mode 100644 index d1c6861..0000000 --- a/test/CodeGen/CBackend/2004-02-15-PreexistingExternals.ll +++ /dev/null @@ -1,18 +0,0 @@ -; The intrinsic lowering pass was lowering intrinsics like llvm.memcpy to -; explicitly specified prototypes, inserting a new function if the old one -; didn't exist. This caused there to be two external memcpy functions in -; this testcase for example, which caused the CBE to mangle one, screwing -; everything up. :( Test that this does not happen anymore. -; -; RUN: llc < %s -march=c | not grep _memcpy - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) - -declare float* @memcpy(i32*, i32, i32) - -define i32 @test(i8* %A, i8* %B, i32* %C) { - call float* @memcpy( i32* %C, i32 4, i32 17 ) ; <float*>:1 [#uses=0] - call void @llvm.memcpy.i32( i8* %A, i8* %B, i32 123, i32 14 ) - ret i32 7 -} - diff --git a/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.ll b/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.ll deleted file mode 100644 index 6fceb08..0000000 --- a/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.ll +++ /dev/null @@ -1,11 +0,0 @@ -; This is a non-normal FP value -; RUN: llc < %s -march=c | grep FPConstant | grep static - -define float @func() { - ret float 0xFFF0000000000000 -} - -define double @func2() { - ret double 0xFF20000000000000 -} - diff --git a/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.ll b/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.ll deleted file mode 100644 index cf59634..0000000 --- a/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.ll +++ /dev/null @@ -1,6 +0,0 @@ -; RUN: llc < %s -march=c | grep func1 | grep WEAK - -define linkonce i32 @func1() { - ret i32 5 -} - diff --git a/test/CodeGen/CBackend/2004-08-09-va-end-null.ll b/test/CodeGen/CBackend/2004-08-09-va-end-null.ll deleted file mode 100644 index 3ee23d1..0000000 --- a/test/CodeGen/CBackend/2004-08-09-va-end-null.ll +++ /dev/null @@ -1,10 +0,0 @@ -; RUN: llc < %s -march=c - -declare void @llvm.va_end(i8*) - -define void @test() { - %va.upgrd.1 = bitcast i8* null to i8* ; <i8*> [#uses=1] - call void @llvm.va_end( i8* %va.upgrd.1 ) - ret void -} - diff --git a/test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.ll b/test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.ll deleted file mode 100644 index af8f441..0000000 --- a/test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.ll +++ /dev/null @@ -1,12 +0,0 @@ -; The CBE should not emit code that casts the function pointer. This causes -; GCC to get testy and insert trap instructions instead of doing the right -; thing. :( -; RUN: llc < %s -march=c - -declare void @external(i8*) - -define i32 @test(i32* %X) { - %RV = call i32 bitcast (void (i8*)* @external to i32 (i32*)*)( i32* %X ) ; <i32> [#uses=1] - ret i32 %RV -} - diff --git a/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll b/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll deleted file mode 100644 index 78e9bac..0000000 --- a/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll +++ /dev/null @@ -1,10 +0,0 @@ -; RUN: llc < %s -march=c | not grep extern.*msg -; PR472 - -@msg = internal global [6 x i8] c"hello\00" ; <[6 x i8]*> [#uses=1] - -define i8* @foo() { -entry: - ret i8* getelementptr ([6 x i8]* @msg, i32 0, i32 0) -} - diff --git a/test/CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll b/test/CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll deleted file mode 100644 index 57a9adc..0000000 --- a/test/CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll +++ /dev/null @@ -1,5 +0,0 @@ -; RUN: llc < %s -march=c - -define i32 @foo() { - ret i32 and (i32 123456, i32 ptrtoint (i32 ()* @foo to i32)) -} diff --git a/test/CodeGen/CBackend/2005-02-14-VolatileOperations.ll b/test/CodeGen/CBackend/2005-02-14-VolatileOperations.ll deleted file mode 100644 index dd505af..0000000 --- a/test/CodeGen/CBackend/2005-02-14-VolatileOperations.ll +++ /dev/null @@ -1,8 +0,0 @@ -; RUN: llc < %s -march=c | grep volatile - -define void @test(i32* %P) { - %X = volatile load i32* %P ; <i32> [#uses=1] - volatile store i32 %X, i32* %P - ret void -} - diff --git a/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll b/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll deleted file mode 100644 index 808b8f9..0000000 --- a/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll +++ /dev/null @@ -1,18 +0,0 @@ -; RUN: llc < %s -march=c | not grep -- --65535 -; PR596 - -target datalayout = "e-p:32:32" -target triple = "i686-pc-linux-gnu" - -declare void @func(i32) - -define void @funcb() { -entry: - %tmp.1 = sub i32 0, -65535 ; <i32> [#uses=1] - call void @func( i32 %tmp.1 ) - br label %return - -return: ; preds = %entry - ret void -} - diff --git a/test/CodeGen/CBackend/2005-08-23-Fmod.ll b/test/CodeGen/CBackend/2005-08-23-Fmod.ll deleted file mode 100644 index 6e650eb..0000000 --- a/test/CodeGen/CBackend/2005-08-23-Fmod.ll +++ /dev/null @@ -1,7 +0,0 @@ -; RUN: llc < %s -march=c | grep fmod - -define double @test(double %A, double %B) { - %C = frem double %A, %B ; <double> [#uses=1] - ret double %C -} - diff --git a/test/CodeGen/CBackend/2005-09-27-VolatileFuncPtr.ll b/test/CodeGen/CBackend/2005-09-27-VolatileFuncPtr.ll deleted file mode 100644 index 99de837..0000000 --- a/test/CodeGen/CBackend/2005-09-27-VolatileFuncPtr.ll +++ /dev/null @@ -1,10 +0,0 @@ -; RUN: llc < %s -march=c | grep {\\* *volatile *\\*} - -@G = external global void ()* ; <void ()**> [#uses=2] - -define void @test() { - volatile store void ()* @test, void ()** @G - volatile load void ()** @G ; <void ()*>:1 [#uses=0] - ret void -} - diff --git a/test/CodeGen/CBackend/2006-12-11-Float-Bitcast.ll b/test/CodeGen/CBackend/2006-12-11-Float-Bitcast.ll deleted file mode 100644 index c9df800..0000000 --- a/test/CodeGen/CBackend/2006-12-11-Float-Bitcast.ll +++ /dev/null @@ -1,49 +0,0 @@ -; RUN: llc < %s -march=c | \ -; RUN: grep __BITCAST | count 14 - -define i32 @test1(float %F) { - %X = bitcast float %F to i32 ; <i32> [#uses=1] - ret i32 %X -} - -define float @test2(i32 %I) { - %X = bitcast i32 %I to float ; <float> [#uses=1] - ret float %X -} - -define i64 @test3(double %D) { - %X = bitcast double %D to i64 ; <i64> [#uses=1] - ret i64 %X -} - -define double @test4(i64 %L) { - %X = bitcast i64 %L to double ; <double> [#uses=1] - ret double %X -} - -define double @test5(double %D) { - %X = bitcast double %D to double ; <double> [#uses=1] - %Y = fadd double %X, 2.000000e+00 ; <double> [#uses=1] - %Z = bitcast double %Y to i64 ; <i64> [#uses=1] - %res = bitcast i64 %Z to double ; <double> [#uses=1] - ret double %res -} - -define float @test6(float %F) { - %X = bitcast float %F to float ; <float> [#uses=1] - %Y = fadd float %X, 2.000000e+00 ; <float> [#uses=1] - %Z = bitcast float %Y to i32 ; <i32> [#uses=1] - %res = bitcast i32 %Z to float ; <float> [#uses=1] - ret float %res -} - -define i32 @main(i32 %argc, i8** %argv) { - %a = call i32 @test1( float 0x400921FB40000000 ) ; <i32> [#uses=2] - %b = call float @test2( i32 %a ) ; <float> [#uses=0] - %c = call i64 @test3( double 0x400921FB4D12D84A ) ; <i64> [#uses=1] - %d = call double @test4( i64 %c ) ; <double> [#uses=0] - %e = call double @test5( double 7.000000e+00 ) ; <double> [#uses=0] - %f = call float @test6( float 7.000000e+00 ) ; <float> [#uses=0] - ret i32 %a -} - diff --git a/test/CodeGen/CBackend/2007-01-08-ParamAttr-ICmp.ll b/test/CodeGen/CBackend/2007-01-08-ParamAttr-ICmp.ll deleted file mode 100644 index da36e78..0000000 --- a/test/CodeGen/CBackend/2007-01-08-ParamAttr-ICmp.ll +++ /dev/null @@ -1,26 +0,0 @@ -; For PR1099 -; RUN: llc < %s -march=c | grep {(llvm_cbe_tmp2 == llvm_cbe_b_2e_0_2e_0_2e_val)} - -target datalayout = "e-p:32:32" -target triple = "i686-apple-darwin8" - %struct.Connector = type { i16, i16, i8, i8, %struct.Connector*, i8* } - - -define i1 @prune_match_entry_2E_ce(%struct.Connector* %a, i16 %b.0.0.val) { -newFuncRoot: - br label %entry.ce - -cond_next.exitStub: ; preds = %entry.ce - ret i1 true - -entry.return_crit_edge.exitStub: ; preds = %entry.ce - ret i1 false - -entry.ce: ; preds = %newFuncRoot - %tmp1 = getelementptr %struct.Connector* %a, i32 0, i32 0 ; <i16*> [#uses=1] - %tmp2 = load i16* %tmp1 ; <i16> [#uses=1] - %tmp3 = icmp eq i16 %tmp2, %b.0.0.val ; <i1> [#uses=1] - br i1 %tmp3, label %cond_next.exitStub, label %entry.return_crit_edge.exitStub -} - - diff --git a/test/CodeGen/CBackend/2007-01-17-StackSaveNRestore.ll b/test/CodeGen/CBackend/2007-01-17-StackSaveNRestore.ll deleted file mode 100644 index 4f699b7..0000000 --- a/test/CodeGen/CBackend/2007-01-17-StackSaveNRestore.ll +++ /dev/null @@ -1,12 +0,0 @@ -; RUN: llc < %s -march=c | grep __builtin_stack_save -; RUN: llc < %s -march=c | grep __builtin_stack_restore -; PR1028 - -declare i8* @llvm.stacksave() -declare void @llvm.stackrestore(i8*) - -define i8* @test() { - %s = call i8* @llvm.stacksave() - call void @llvm.stackrestore(i8* %s) - ret i8* %s -} diff --git a/test/CodeGen/CBackend/2007-02-05-memset.ll b/test/CodeGen/CBackend/2007-02-05-memset.ll deleted file mode 100644 index 7d508e4..0000000 --- a/test/CodeGen/CBackend/2007-02-05-memset.ll +++ /dev/null @@ -1,13 +0,0 @@ -; RUN: llc < %s -march=c -; PR1181 -target datalayout = "e-p:64:64" -target triple = "x86_64-apple-darwin8" - - -declare void @llvm.memset.i64(i8*, i8, i64, i32) - -define fastcc void @InitUser_data_unregistered() { -entry: - tail call void @llvm.memset.i64( i8* null, i8 0, i64 65496, i32 1 ) - ret void -} diff --git a/test/CodeGen/CBackend/2007-02-23-NameConflicts.ll b/test/CodeGen/CBackend/2007-02-23-NameConflicts.ll deleted file mode 100644 index 7e1ff2a..0000000 --- a/test/CodeGen/CBackend/2007-02-23-NameConflicts.ll +++ /dev/null @@ -1,14 +0,0 @@ -; PR1164 -; RUN: llc < %s -march=c | grep {llvm_cbe_A = \\*llvm_cbe_G;} -; RUN: llc < %s -march=c | grep {llvm_cbe_B = \\*(<mp_0_1);} -; RUN: llc < %s -march=c | grep {return (((unsigned int )(((unsigned int )llvm_cbe_A) + ((unsigned int )llvm_cbe_B))));} - -@G = global i32 123 -@ltmp_0_1 = global i32 123 - -define i32 @test(i32 *%G) { - %A = load i32* %G - %B = load i32* @ltmp_0_1 - %C = add i32 %A, %B - ret i32 %C -} diff --git a/test/CodeGen/CBackend/2007-07-11-PackedStruct.ll b/test/CodeGen/CBackend/2007-07-11-PackedStruct.ll deleted file mode 100644 index c8bfdd6..0000000 --- a/test/CodeGen/CBackend/2007-07-11-PackedStruct.ll +++ /dev/null @@ -1,9 +0,0 @@ -; RUN: llc < %s -march=c | grep {packed} - - %struct.p = type <{ i16 }> - -define i32 @main() { -entry: - %t = alloca %struct.p, align 2 - ret i32 5 -} diff --git a/test/CodeGen/CBackend/2008-02-01-UnalignedLoadStore.ll b/test/CodeGen/CBackend/2008-02-01-UnalignedLoadStore.ll deleted file mode 100644 index 6e0cf68..0000000 --- a/test/CodeGen/CBackend/2008-02-01-UnalignedLoadStore.ll +++ /dev/null @@ -1,15 +0,0 @@ -; RUN: llc < %s -march=c | \ -; RUN: grep {struct __attribute__ ((packed, aligned(} | count 4 - -define void @test(i32* %P) { - %X = load i32* %P, align 1 - store i32 %X, i32* %P, align 1 - ret void -} - -define void @test2(i32* %P) { - %X = volatile load i32* %P, align 2 - volatile store i32 %X, i32* %P, align 2 - ret void -} - diff --git a/test/CodeGen/CBackend/2008-05-31-BoolOverflow.ll b/test/CodeGen/CBackend/2008-05-31-BoolOverflow.ll deleted file mode 100644 index e9fa552..0000000 --- a/test/CodeGen/CBackend/2008-05-31-BoolOverflow.ll +++ /dev/null @@ -1,14 +0,0 @@ -; RUN: llc < %s -march=c | grep {llvm_cbe_t.*&1} -define i32 @test(i32 %r) { - %s = icmp eq i32 %r, 0 - %t = add i1 %s, %s - %u = zext i1 %t to i32 - br i1 %t, label %A, label %B -A: - - ret i32 %u -B: - - %v = select i1 %t, i32 %r, i32 %u - ret i32 %v -} diff --git a/test/CodeGen/CBackend/2008-10-21-PPCLongDoubleConstant.ll b/test/CodeGen/CBackend/2008-10-21-PPCLongDoubleConstant.ll deleted file mode 100644 index b72b573..0000000 --- a/test/CodeGen/CBackend/2008-10-21-PPCLongDoubleConstant.ll +++ /dev/null @@ -1,29 +0,0 @@ -; RUN: llc < %s -march=c -; PR2907 -target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128" -target triple = "powerpc-apple-darwin9.5" - %"struct.Point<0>" = type { %"struct.Tensor<1,0>" } - %"struct.QGauss2<1>" = type { %"struct.Quadrature<0>" } - %"struct.Quadrature<0>" = type { %struct.Subscriptor, i32, %"struct.std::vector<Point<0>,std::allocator<Point<0> > >", %"struct.std::vector<double,std::allocator<double> >" } - %struct.Subscriptor = type { i32 (...)**, i32, %"struct.std::type_info"* } - %"struct.Tensor<1,0>" = type { [1 x double] } - %"struct.std::_Vector_base<Point<0>,std::allocator<Point<0> > >" = type { %"struct.std::_Vector_base<Point<0>,std::allocator<Point<0> > >::_Vector_impl" } - %"struct.std::_Vector_base<Point<0>,std::allocator<Point<0> > >::_Vector_impl" = type { %"struct.Point<0>"*, %"struct.Point<0>"*, %"struct.Point<0>"* } - %"struct.std::_Vector_base<double,std::allocator<double> >" = type { %"struct.std::_Vector_base<double,std::allocator<double> >::_Vector_impl" } - %"struct.std::_Vector_base<double,std::allocator<double> >::_Vector_impl" = type { double*, double*, double* } - %"struct.std::type_info" = type { i32 (...)**, i8* } - %"struct.std::vector<Point<0>,std::allocator<Point<0> > >" = type { %"struct.std::_Vector_base<Point<0>,std::allocator<Point<0> > >" } - %"struct.std::vector<double,std::allocator<double> >" = type { %"struct.std::_Vector_base<double,std::allocator<double> >" } - -define fastcc void @_ZN6QGaussILi1EEC1Ej(%"struct.QGauss2<1>"* %this, i32 %n) { -entry: - br label %bb4 - -bb4: ; preds = %bb5.split, %bb4, %entry - %0 = fcmp ogt ppc_fp128 0xM00000000000000000000000000000000, select (i1 fcmp olt (ppc_fp128 fpext (double 0x3C447AE147AE147B to ppc_fp128), ppc_fp128 fmul (ppc_fp128 0xM00000000000000010000000000000000, ppc_fp128 0xM40140000000000000000000000000000)), ppc_fp128 fmul (ppc_fp128 0xM00000000000000010000000000000000, ppc_fp128 0xM40140000000000000000000000000000), ppc_fp128 fpext (double 0x3C447AE147AE147B to ppc_fp128)) ; <i1> [#uses=1] - br i1 %0, label %bb4, label %bb5.split - -bb5.split: ; preds = %bb4 - %1 = getelementptr double* null, i32 0 ; <double*> [#uses=0] - br label %bb4 -} diff --git a/test/CodeGen/CBackend/2011-06-08-addWithOverflow.ll b/test/CodeGen/CBackend/2011-06-08-addWithOverflow.ll deleted file mode 100644 index 0ae480d..0000000 --- a/test/CodeGen/CBackend/2011-06-08-addWithOverflow.ll +++ /dev/null @@ -1,35 +0,0 @@ -; RUN: llc < %s -march=c -; Check that uadd and sadd with overflow are handled by C Backend. - -%0 = type { i32, i1 } ; type %0 - -define i1 @func1(i32 zeroext %v1, i32 zeroext %v2) nounwind { -entry: - %t = call %0 @llvm.uadd.with.overflow.i32(i32 %v1, i32 %v2) ; <%0> [#uses=1] - %obit = extractvalue %0 %t, 1 ; <i1> [#uses=1] - br i1 %obit, label %carry, label %normal - -normal: ; preds = %entry - ret i1 true - -carry: ; preds = %entry - ret i1 false -} - -define i1 @func2(i32 signext %v1, i32 signext %v2) nounwind { -entry: - %t = call %0 @llvm.sadd.with.overflow.i32(i32 %v1, i32 %v2) ; <%0> [#uses=1] - %obit = extractvalue %0 %t, 1 ; <i1> [#uses=1] - br i1 %obit, label %carry, label %normal - -normal: ; preds = %entry - ret i1 true - -carry: ; preds = %entry - ret i1 false -} - -declare %0 @llvm.sadd.with.overflow.i32(i32, i32) nounwind - -declare %0 @llvm.uadd.with.overflow.i32(i32, i32) nounwind - diff --git a/test/CodeGen/CBackend/X86/2008-06-04-IndirectMem.ll b/test/CodeGen/CBackend/X86/2008-06-04-IndirectMem.ll deleted file mode 100644 index 054a3ca..0000000 --- a/test/CodeGen/CBackend/X86/2008-06-04-IndirectMem.ll +++ /dev/null @@ -1,12 +0,0 @@ -; RUN: llc < %s -march=c | grep {"m"(llvm_cbe_newcw))} -; PR2407 - -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" -target triple = "i386-pc-linux-gnu" - -define void @foo() { - %newcw = alloca i16 ; <i16*> [#uses=2] - call void asm sideeffect "fldcw $0", "*m,~{dirflag},~{fpsr},~{flags}"( i16* -%newcw ) nounwind - ret void -} diff --git a/test/CodeGen/CBackend/X86/dg.exp b/test/CodeGen/CBackend/X86/dg.exp deleted file mode 100644 index 44e3a5e..0000000 --- a/test/CodeGen/CBackend/X86/dg.exp +++ /dev/null @@ -1,5 +0,0 @@ -load_lib llvm.exp - -if { [llvm_supports_target X86] && [llvm_supports_target CBackend] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,s}]] -} diff --git a/test/CodeGen/CBackend/dg.exp b/test/CodeGen/CBackend/dg.exp deleted file mode 100644 index 9d78940..0000000 --- a/test/CodeGen/CBackend/dg.exp +++ /dev/null @@ -1,5 +0,0 @@ -load_lib llvm.exp - -if { [llvm_supports_target CBackend] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] -} diff --git a/test/CodeGen/CBackend/fneg.ll b/test/CodeGen/CBackend/fneg.ll deleted file mode 100644 index 7dec3d9..0000000 --- a/test/CodeGen/CBackend/fneg.ll +++ /dev/null @@ -1,7 +0,0 @@ -; RUN: llc < %s -march=c - -define void @func() nounwind { - entry: - %0 = fsub double -0.0, undef - ret void -} diff --git a/test/CodeGen/CBackend/pr2408.ll b/test/CodeGen/CBackend/pr2408.ll deleted file mode 100644 index bf8477b..0000000 --- a/test/CodeGen/CBackend/pr2408.ll +++ /dev/null @@ -1,12 +0,0 @@ -; RUN: llc < %s -march=c | grep {\\* ((unsigned int )} -; PR2408 - -define i32 @a(i32 %a) { -entry: - %shr = ashr i32 %a, 0 ; <i32> [#uses=1] - %shr2 = ashr i32 2, 0 ; <i32> [#uses=1] - %mul = mul i32 %shr, %shr2 ; <i32> [#uses=1] - %shr4 = ashr i32 2, 0 ; <i32> [#uses=1] - %div = sdiv i32 %mul, %shr4 ; <i32> [#uses=1] - ret i32 %div -} diff --git a/test/CodeGen/CBackend/vectors.ll b/test/CodeGen/CBackend/vectors.ll deleted file mode 100644 index b7b7677..0000000 --- a/test/CodeGen/CBackend/vectors.ll +++ /dev/null @@ -1,37 +0,0 @@ -; RUN: llc < %s -march=c -@.str15 = external global [2 x i8] - -define <4 x i32> @foo(<4 x i32> %a, i32 %b) { - %c = insertelement <4 x i32> %a, i32 1, i32 %b - - ret <4 x i32> %c -} - -define i32 @test2(<4 x i32> %a, i32 %b) { - %c = extractelement <4 x i32> %a, i32 1 - - ret i32 %c -} - -define <4 x float> @test3(<4 x float> %Y) { - %Z = fadd <4 x float> %Y, %Y - %X = shufflevector <4 x float> zeroinitializer, <4 x float> %Z, <4 x i32> < i32 0, i32 5, i32 6, i32 7 > - ret <4 x float> %X -} - -define void @test4() { - %x = alloca <4 x float> - %tmp3.i16 = getelementptr <4 x float>* %x, i32 0, i32 0 - store float 1.0, float* %tmp3.i16 - ret void -} - -define i32* @test5({i32, i32} * %P) { - %x = getelementptr {i32, i32} * %P, i32 0, i32 1 - ret i32* %x -} - -define i8* @test6() { - ret i8* getelementptr ([2 x i8]* @.str15, i32 0, i32 0) -} - |