From ceca194c4355224723b309a3a27c5e5bc19cb6fc Mon Sep 17 00:00:00 2001 From: Tanya Lattner Date: Mon, 10 Mar 2008 07:21:50 +0000 Subject: Remove llvm-upgrade and update tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48137 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/DebugInfo/funccall.ll | 289 ++++----- test/ExecutionEngine/2002-12-16-ArgTest.ll | 63 +- test/ExecutionEngine/2003-01-04-ArgumentBug.ll | 20 +- test/ExecutionEngine/2003-01-04-LoopTest.ll | 32 +- test/ExecutionEngine/2003-01-04-PhiTest.ll | 16 +- test/ExecutionEngine/2003-01-09-SARTest.ll | 13 +- test/ExecutionEngine/2003-01-10-FUCOM.ll | 16 +- test/ExecutionEngine/2003-01-15-AlignmentTest.ll | 27 +- .../ExecutionEngine/2003-05-06-LivenessClobber.llx | 23 +- test/ExecutionEngine/2003-05-07-ArgumentTest.llx | 16 +- test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll | 20 +- test/ExecutionEngine/2003-06-04-bzip2-bug.ll | 26 +- test/ExecutionEngine/2003-06-05-PHIBug.ll | 21 +- test/ExecutionEngine/2003-08-15-AllocaAssertion.ll | 12 +- test/ExecutionEngine/2003-08-21-EnvironmentTest.ll | 17 +- .../2003-08-23-RegisterAllocatePhysReg.ll | 54 +- ...-10-18-PHINode-ConstantExpr-CondCode-Failure.ll | 42 +- test/ExecutionEngine/2005-12-02-TailCallBug.ll | 32 +- test/ExecutionEngine/hello.ll | 14 +- test/ExecutionEngine/hello2.ll | 24 +- test/ExecutionEngine/simplesttest.ll | 9 +- test/ExecutionEngine/simpletest.ll | 14 +- test/ExecutionEngine/test-arith.ll | 67 +- test/ExecutionEngine/test-branch.ll | 15 +- test/ExecutionEngine/test-call.ll | 26 +- test/ExecutionEngine/test-cast.ll | 236 +++---- test/ExecutionEngine/test-constantexpr.ll | 13 +- test/ExecutionEngine/test-fp.ll | 34 +- test/ExecutionEngine/test-loadstore.ll | 53 +- test/ExecutionEngine/test-logical.ll | 36 +- test/ExecutionEngine/test-loop.ll | 20 +- test/ExecutionEngine/test-malloc.ll | 22 +- test/ExecutionEngine/test-phi.ll | 39 +- test/ExecutionEngine/test-ret.ll | 55 +- test/ExecutionEngine/test-setcond-fp.ll | 40 +- test/ExecutionEngine/test-setcond-int.ll | 135 ++-- test/ExecutionEngine/test-shift.ll | 67 +- test/Linker/2003-11-18-TypeResolution.ll | 15 +- test/Linker/2004-02-17-WeakStrongLinkage.ll | 6 +- test/Linker/2004-05-07-TypeResolution1.ll | 68 +- test/Linker/2004-05-07-TypeResolution2.ll | 22 +- test/Linker/2005-02-12-ConstantGlobals.ll | 4 +- .../Linker/2005-12-06-AppendingZeroLengthArrays.ll | 5 +- test/Linker/2006-01-19-ConstantPacked.ll | 14 +- test/Linker/AppendingLinkage.ll | 18 +- test/Linker/AppendingLinkage2.ll | 8 +- test/Linker/ConstantGlobals1.ll | 9 +- test/Linker/ConstantGlobals2.ll | 9 +- test/Linker/ConstantGlobals3.ll | 8 +- test/Linker/LinkOnce.ll | 6 +- test/Linker/testlink1.ll | 78 ++- test/Linker/testlink2.ll | 67 +- test/Linker/weakextern.ll | 11 +- .../SimplifyCFG/2002-05-05-EmptyBlockMerge.ll | 30 +- .../SimplifyCFG/2002-05-21-PHIElimination.ll | 18 +- test/Transforms/SimplifyCFG/2002-06-24-PHINode.ll | 18 +- .../SimplifyCFG/2002-09-24-PHIAssertion.ll | 19 +- .../SimplifyCFG/2003-03-07-DominateProblem.ll | 23 +- .../SimplifyCFG/2003-08-05-InvokeCrash.ll | 16 +- .../SimplifyCFG/2003-08-05-MishandleInvoke.ll | 14 +- .../SimplifyCFG/2003-08-17-BranchFold.ll | 27 +- .../SimplifyCFG/2003-08-17-BranchFoldOrdering.ll | 29 +- .../SimplifyCFG/2003-08-17-FoldSwitch.ll | 117 ++-- .../SimplifyCFG/2004-12-10-SimplifyCFGCrash.ll | 49 +- test/Transforms/SimplifyCFG/2005-06-16-PHICrash.ll | 126 ++-- .../SimplifyCFG/2005-08-01-PHIUpdateFail.ll | 91 +-- .../SimplifyCFG/2005-08-03-PHIFactorCrash.ll | 66 +- .../SimplifyCFG/2005-10-02-InvokeSimplify.ll | 24 +- .../SimplifyCFG/2005-12-03-IncorrectPHIFold.ll | 172 +++-- .../SimplifyCFG/2006-02-17-InfiniteUnroll.ll | 32 +- test/Transforms/SimplifyCFG/2006-06-12-InfLoop.ll | 422 ++++--------- test/Transforms/SimplifyCFG/2006-08-03-Crash.ll | 130 ++-- .../Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll | 48 +- .../SimplifyCFG/2006-10-29-InvokeCrash.ll | 701 +++++++++------------ .../SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll | 250 ++++---- .../SimplifyLibCalls/2005-05-20-sprintf-crash.ll | 13 +- test/Transforms/SimplifyLibCalls/ExitInMain.ll | 16 +- test/Transforms/SimplifyLibCalls/FFS.ll | 45 +- test/Transforms/SimplifyLibCalls/FPrintF.ll | 36 +- test/Transforms/SimplifyLibCalls/IsDigit.ll | 30 +- test/Transforms/SimplifyLibCalls/MemCpy.ll | 32 +- test/Transforms/SimplifyLibCalls/MemMove.ll | 32 +- test/Transforms/SimplifyLibCalls/MemSet.ll | 25 +- test/Transforms/SimplifyLibCalls/Pow.ll | 22 +- test/Transforms/SimplifyLibCalls/Puts.ll | 37 +- test/Transforms/SimplifyLibCalls/SPrintF.ll | 60 +- test/Transforms/SimplifyLibCalls/StrCat.ll | 39 +- test/Transforms/SimplifyLibCalls/StrChr.ll | 30 +- test/Transforms/SimplifyLibCalls/StrCmp.ll | 43 +- test/Transforms/SimplifyLibCalls/StrCpy.ll | 39 +- test/Transforms/SimplifyLibCalls/StrLen.ll | 76 ++- test/Transforms/SimplifyLibCalls/StrNCmp.ll | 43 +- test/Transforms/SimplifyLibCalls/ToAscii.ll | 33 +- test/Transforms/SimplifyLibCalls/floor.ll | 37 +- test/Transforms/SimplifyLibCalls/memcmp.ll | 36 +- test/Transforms/TailCallElim/accum_recursion.ll | 24 +- .../TailCallElim/accum_recursion_constant_arg.ll | 24 +- test/Transforms/TailCallElim/ackermann.ll | 44 +- .../TailCallElim/dont-tce-tail-marked-call.ll | 17 +- test/Transforms/TailCallElim/intervening-inst.ll | 26 +- .../TailCallElim/move_alloca_for_tail_call.ll | 17 +- test/Transforms/TailCallElim/return_constant.ll | 22 +- .../TailCallElim/trivial_codegen_tailcall.ll | 9 +- test/Transforms/TailDup/2003-06-24-Simpleloop.ll | 25 +- test/Transforms/TailDup/2003-07-22-InfiniteLoop.ll | 14 +- .../TailDup/2003-08-23-InvalidatedPointers.ll | 49 +- .../TailDup/2003-08-31-UnreachableBlocks.ll | 23 +- .../TailDup/2004-04-01-DemoteRegToStack.llx | 28 +- test/Transforms/TailDup/MergeTest.ll | 42 +- test/Transforms/TailDup/PHIUpdateTest.ll | 26 +- test/Transforms/TailDup/basictest.ll | 28 +- test/Transforms/TailDup/basictest2.ll | 20 +- test/Transforms/TailDup/if-tail-dup.ll | 80 +-- test/Verifier/invoke-1.ll | 14 +- test/Verifier/invoke-2.ll | 21 +- 115 files changed, 2572 insertions(+), 3133 deletions(-) diff --git a/test/DebugInfo/funccall.ll b/test/DebugInfo/funccall.ll index cb5dab62ca..47fe4c2498 100644 --- a/test/DebugInfo/funccall.ll +++ b/test/DebugInfo/funccall.ll @@ -1,166 +1,147 @@ -;; RUN: llvm-upgrade < %s | llvm-as | llc +;; RUN: llvm-as < %s | llc + %llvm.dbg.anchor.type = type { i32, i32 } + %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 } + %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8* } + %llvm.dbg.global_variable.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1, { }* } + %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1 } + %llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* } +@llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] +@llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] +@llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 52 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] +@llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { + i32 393262, + { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), + { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), + i8* getelementptr ([4 x i8]* @str, i32 0, i32 0), + i8* getelementptr ([4 x i8]* @str, i32 0, i32 0), + i8* null, + { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), + i32 4, + { }* null, + i1 false, + i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] +@str = internal constant [4 x i8] c"foo\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] +@llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { + i32 393233, + { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), + i32 1, + i8* getelementptr ([11 x i8]* @str1, i32 0, i32 0), + i8* getelementptr ([50 x i8]* @str2, i32 0, i32 0), + i8* getelementptr ([45 x i8]* @str3, i32 0, i32 0) }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] +@str1 = internal constant [11 x i8] c"funccall.c\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] +@str2 = internal constant [50 x i8] c"/Volumes/Big2/llvm/llvm/test/Regression/Debugger/\00", section "llvm.metadata" ; <[50 x i8]*> [#uses=1] +@str3 = internal constant [45 x i8] c"4.0.1 LLVM (Apple Computer, Inc. build 5421)\00", section "llvm.metadata" ; <[45 x i8]*> [#uses=1] +@llvm.dbg.variable = internal constant %llvm.dbg.variable.type { + i32 393472, + { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*), + i8* getelementptr ([2 x i8]* @str4, i32 0, i32 0), + { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), + i32 5, + { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@str4 = internal constant [2 x i8] c"t\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] +@llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { + i32 393252, + { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), + i8* getelementptr ([4 x i8]* @str15, i32 0, i32 0), + { }* null, + i32 0, + i64 32, + i64 32, + i64 0, + i32 0, + i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] +@str15 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] +@llvm.dbg.subprogram2 = internal constant %llvm.dbg.subprogram.type { + i32 393262, + { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), + { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), + i8* getelementptr ([5 x i8]* @str6, i32 0, i32 0), + i8* getelementptr ([5 x i8]* @str6, i32 0, i32 0), + i8* null, + { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), + i32 8, + { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), + i1 false, + i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] +@str6 = internal constant [5 x i8] c"main\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] +@llvm.dbg.variable3 = internal constant %llvm.dbg.variable.type { + i32 393474, + { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram2 to { }*), + i8* getelementptr ([7 x i8]* @str7, i32 0, i32 0), + { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), + i32 8, + { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@str7 = internal constant [7 x i8] c"retval\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] +@llvm.dbg.global_variable = internal constant %llvm.dbg.global_variable.type { + i32 393268, + { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.global_variables to { }*), + { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), + i8* getelementptr ([2 x i8]* @str4, i32 0, i32 0), + i8* getelementptr ([2 x i8]* @str4, i32 0, i32 0), + i8* null, + { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), + i32 2, + { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), + i1 true, + i1 true, + { }* bitcast (i32* @q to { }*) }, section "llvm.metadata" ; <%llvm.dbg.global_variable.type*> [#uses=0] +@str4.upgrd.1 = internal constant [2 x i8] c"q\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=0] +@q = internal global i32 0 ; [#uses=7] -;; Debugger type declarations -%llvm.dbg.anchor.type = type { uint, uint } -%llvm.dbg.basictype.type = type { uint, { }*, sbyte*, { }*, uint, ulong, ulong, ulong, uint, uint } -%llvm.dbg.compile_unit.type = type { uint, { }*, uint, sbyte*, sbyte*, sbyte* } -%llvm.dbg.global_variable.type = type { uint, { }*, { }*, sbyte*, sbyte*, sbyte*, { }*, uint, { }*, bool, bool, { }* } -%llvm.dbg.subprogram.type = type { uint, { }*, { }*, sbyte*, sbyte*, sbyte*, { }*, uint, { }*, bool, bool } -%llvm.dbg.variable.type = type { uint, { }*, sbyte*, { }*, uint, { }* } +declare void @llvm.dbg.func.start({ }*) -;; Debugger intrinsic declarations... -declare void %llvm.dbg.func.start({ }*) -declare void %llvm.dbg.stoppoint(uint, uint, { }*) -declare void %llvm.dbg.declare({ }*, { }*) -declare void %llvm.dbg.region.start({ }*) -declare void %llvm.dbg.region.end({ }*) +declare void @llvm.dbg.stoppoint(i32, i32, { }*) -;; Debugger anchors -%llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { - uint 393216, ;; DW_TAG_anchor | version(6) - uint 46 }, section "llvm.metadata" ;; DW_TAG_subprogram -%llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { - uint 393216, ;; DW_TAG_anchor | version(6) - uint 17 }, section "llvm.metadata" ;; DW_TAG_compile_unit -%llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { - uint 393216, ;; DW_TAG_anchor | version(6) - uint 52 }, section "llvm.metadata" ;; DW_TAG_variable +declare void @llvm.dbg.declare({ }*, { }*) -;; Debug info -%llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { - uint 393262, ;; DW_TAG_subprogram | version(6) - { }* bitcast (%llvm.dbg.anchor.type* %llvm.dbg.subprograms to { }*), ;; Anchor - { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*),;; Context - sbyte* getelementptr ([4 x sbyte]* %str, int 0, int 0), ;; Name - sbyte* getelementptr ([4 x sbyte]* %str, int 0, int 0), ;; Fully quanlified name - sbyte* null, ;; Linkage name - { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*),;; Compile unit - uint 4, ;; Line number - { }* null, ;; Type descriptor - bool false, ;; Static? - bool true }, section "llvm.metadata" ;; External? -%str = internal constant [4 x sbyte] c"foo\00", section "llvm.metadata" - -%llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { - uint 393233, ;; DW_TAG_compile_unit | version(6) - { }* bitcast (%llvm.dbg.anchor.type* %llvm.dbg.compile_units to { }*), ;; Anchor - uint 1, ;; Language - sbyte* getelementptr ([11 x sbyte]* %str, int 0, int 0), ;; Source file - sbyte* getelementptr ([50 x sbyte]* %str, int 0, int 0), ;; Source file directory - sbyte* getelementptr ([45 x sbyte]* %str, int 0, int 0) }, section "llvm.metadata" ;; Produceer -%str = internal constant [11 x sbyte] c"funccall.c\00", section "llvm.metadata" -%str = internal constant [50 x sbyte] c"/Volumes/Big2/llvm/llvm/test/Regression/Debugger/\00", section "llvm.metadata" -%str = internal constant [45 x sbyte] c"4.0.1 LLVM (Apple Computer, Inc. build 5421)\00", section "llvm.metadata" +declare void @llvm.dbg.region.start({ }*) -%llvm.dbg.variable = internal constant %llvm.dbg.variable.type { - uint 393472, ;; DW_TAG_auto_variable | version(6) - { }* bitcast (%llvm.dbg.subprogram.type* %llvm.dbg.subprogram to { }*), ;; Context - sbyte* getelementptr ([2 x sbyte]* %str, int 0, int 0), ;; Name - { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*),;; Compile unit - uint 5, ;; Line number - { }* bitcast (%llvm.dbg.basictype.type* %llvm.dbg.basictype to { }*) }, section "llvm.metadata" ;; Type -%str = internal constant [2 x sbyte] c"t\00", section "llvm.metadata" +declare void @llvm.dbg.region.end({ }*) -%llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { - uint 393252, ;; DW_TAG_base_type | version(6) - { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*),;; Context - sbyte* getelementptr ([4 x sbyte]* %str1, int 0, int 0), ;; Name - { }* null, ;; Compile Unit - uint 0, ;; Line number - ulong 32, ;; Size in bits - ulong 32, ;; Align in bits - ulong 0, ;; Offset in bits - uint 0, ;; Flags - uint 5 }, section "llvm.metadata" ;; Basic type encoding -%str1 = internal constant [4 x sbyte] c"int\00", section "llvm.metadata" - -%llvm.dbg.subprogram2 = internal constant %llvm.dbg.subprogram.type { - uint 393262, ;; DW_TAG_subprogram | version(6) - { }* bitcast (%llvm.dbg.anchor.type* %llvm.dbg.subprograms to { }*), ;; Anchor - { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*),;; Context - sbyte* getelementptr ([5 x sbyte]* %str, int 0, int 0), ;; Name - sbyte* getelementptr ([5 x sbyte]* %str, int 0, int 0), ;; Fully quanlified name - sbyte* null, ;; Linkage name - { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*),;; Compile unit - uint 8, ;; Line number - { }* bitcast (%llvm.dbg.basictype.type* %llvm.dbg.basictype to { }*), ;; Type descriptor - bool false, ;; Static? - bool true }, section "llvm.metadata" ;; External? -%str = internal constant [5 x sbyte] c"main\00", section "llvm.metadata" - -%llvm.dbg.variable3 = internal constant %llvm.dbg.variable.type { - uint 393474, ;; DW_TAG_return_variable | version(6) - { }* bitcast (%llvm.dbg.subprogram.type* %llvm.dbg.subprogram2 to { }*), ;; Context - sbyte* getelementptr ([7 x sbyte]* %str, int 0, int 0), ;; Name - { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*),;; Compile unit - uint 8, ;; Line number - { }* bitcast (%llvm.dbg.basictype.type* %llvm.dbg.basictype to { }*) }, section "llvm.metadata" ;; Type -%str = internal constant [7 x sbyte] c"retval\00", section "llvm.metadata" - -%llvm.dbg.global_variable = internal constant %llvm.dbg.global_variable.type { - uint 393268, ;; DW_TAG_variable | version(6) - { }* bitcast (%llvm.dbg.anchor.type* %llvm.dbg.global_variables to { }*), ;; Anchor - { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*),;; Context - sbyte* getelementptr ([2 x sbyte]* %str4, int 0, int 0), ;; Name - sbyte* getelementptr ([2 x sbyte]* %str4, int 0, int 0), ;; Fully qualified name - sbyte* null, ;; Linkage name - { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*),;; Compile unit - uint 2, ;; Line number - { }* bitcast (%llvm.dbg.basictype.type* %llvm.dbg.basictype to { }*), ;; Type - bool true, ;; Static? - bool true, ;; External? - { }* bitcast (int* %q to { }*) }, section "llvm.metadata" ;; Variable -%str4 = internal constant [2 x sbyte] c"q\00", section "llvm.metadata" - -;; Global -%q = internal global int 0 - -implementation - -void %foo() { +define void @foo() { entry: - %t = alloca int, align 4 - "alloca point" = bitcast int 0 to int - call void %llvm.dbg.func.start( { }* bitcast (%llvm.dbg.subprogram.type* %llvm.dbg.subprogram to { }*) ) - call void %llvm.dbg.stoppoint( uint 4, uint 0, { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*) ) - %t = bitcast int* %t to { }* - call void %llvm.dbg.declare( { }* %t, { }* bitcast (%llvm.dbg.variable.type* %llvm.dbg.variable to { }*) ) - call void %llvm.dbg.stoppoint( uint 5, uint 0, { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*) ) - %tmp = load int* %q - store int %tmp, int* %t - call void %llvm.dbg.stoppoint( uint 6, uint 0, { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*) ) - %tmp1 = load int* %t - %tmp2 = add int %tmp1, 1 - store int %tmp2, int* %q - call void %llvm.dbg.stoppoint( uint 7, uint 0, { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*) ) - call void %llvm.dbg.region.end( { }* bitcast (%llvm.dbg.subprogram.type* %llvm.dbg.subprogram to { }*) ) + %t = alloca i32, align 4 ; [#uses=3] + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + call void @llvm.dbg.func.start( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*) ) + call void @llvm.dbg.stoppoint( i32 4, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) + %t.upgrd.2 = bitcast i32* %t to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare( { }* %t.upgrd.2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*) ) + call void @llvm.dbg.stoppoint( i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) + %tmp = load i32* @q ; [#uses=1] + store i32 %tmp, i32* %t + call void @llvm.dbg.stoppoint( i32 6, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) + %tmp1 = load i32* %t ; [#uses=1] + %tmp2 = add i32 %tmp1, 1 ; [#uses=1] + store i32 %tmp2, i32* @q + call void @llvm.dbg.stoppoint( i32 7, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) + call void @llvm.dbg.region.end( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*) ) ret void } -int %main() { +define i32 @main() { entry: - %retval = alloca int, align 4 - %tmp = alloca int, align 4 - "alloca point" = bitcast int 0 to int - call void %llvm.dbg.func.start( { }* bitcast (%llvm.dbg.subprogram.type* %llvm.dbg.subprogram2 to { }*) ) - call void %llvm.dbg.stoppoint( uint 8, uint 0, { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*) ) - %retval = bitcast int* %retval to { }* - call void %llvm.dbg.declare( { }* %retval, { }* bitcast (%llvm.dbg.variable.type* %llvm.dbg.variable3 to { }*) ) - call void %llvm.dbg.stoppoint( uint 9, uint 0, { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*) ) - store int 0, int* %q - call void %llvm.dbg.stoppoint( uint 10, uint 0, { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*) ) - call void (...)* bitcast (void ()* %foo to void (...)*)( ) - call void %llvm.dbg.stoppoint( uint 11, uint 0, { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*) ) - %tmp = load int* %q - %tmp1 = sub int %tmp, 1 - store int %tmp1, int* %q - call void %llvm.dbg.stoppoint( uint 13, uint 0, { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*) ) - %tmp2 = load int* %q - store int %tmp2, int* %tmp - %tmp3 = load int* %tmp - store int %tmp3, int* %retval - %retval = load int* %retval - call void %llvm.dbg.stoppoint( uint 14, uint 0, { }* bitcast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit to { }*) ) - call void %llvm.dbg.region.end( { }* bitcast (%llvm.dbg.subprogram.type* %llvm.dbg.subprogram2 to { }*) ) - ret int %retval + %retval = alloca i32, align 4 ; [#uses=3] + %tmp = alloca i32, align 4 ; [#uses=2] + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + call void @llvm.dbg.func.start( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram2 to { }*) ) + call void @llvm.dbg.stoppoint( i32 8, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) + %retval.upgrd.3 = bitcast i32* %retval to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare( { }* %retval.upgrd.3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable3 to { }*) ) + call void @llvm.dbg.stoppoint( i32 9, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) + store i32 0, i32* @q + call void @llvm.dbg.stoppoint( i32 10, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) + call void (...)* bitcast (void ()* @foo to void (...)*)( ) + call void @llvm.dbg.stoppoint( i32 11, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) + %tmp.upgrd.4 = load i32* @q ; [#uses=1] + %tmp1 = sub i32 %tmp.upgrd.4, 1 ; [#uses=1] + store i32 %tmp1, i32* @q + call void @llvm.dbg.stoppoint( i32 13, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) + %tmp2 = load i32* @q ; [#uses=1] + store i32 %tmp2, i32* %tmp + %tmp3 = load i32* %tmp ; [#uses=1] + store i32 %tmp3, i32* %retval + %retval.upgrd.5 = load i32* %retval ; [#uses=1] + call void @llvm.dbg.stoppoint( i32 14, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) + call void @llvm.dbg.region.end( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram2 to { }*) ) + ret i32 %retval.upgrd.5 } diff --git a/test/ExecutionEngine/2002-12-16-ArgTest.ll b/test/ExecutionEngine/2002-12-16-ArgTest.ll index 4ef1439d71..6a8d100e67 100644 --- a/test/ExecutionEngine/2002-12-16-ArgTest.ll +++ b/test/ExecutionEngine/2002-12-16-ArgTest.ll @@ -1,47 +1,38 @@ -; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc +; RUN: llvm-as < %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null -%.LC0 = internal global [10 x sbyte] c"argc: %d\0A\00" +@.LC0 = internal global [10 x i8] c"argc: %d\0A\00" ; <[10 x i8]*> [#uses=1] -implementation ; Functions: +declare i32 @puts(i8*) -declare int %puts(sbyte*) - -void %getoptions(int* %argc) { -bb0: ; No predecessors! +define void @getoptions(i32* %argc) { +bb0: ret void } -declare int %printf(sbyte*, ...) - -int %main(int %argc, sbyte** %argv) { -bb0: ; No predecessors! - call int (sbyte*, ...)* %printf( sbyte* getelementptr ([10 x sbyte]* %.LC0, long 0, long 0), int %argc) - %cast224 = cast sbyte** %argv to sbyte* ; [#uses=1] - %local = alloca sbyte* ; [#uses=3] - store sbyte* %cast224, sbyte** %local - %cond226 = setle int %argc, 0 ; [#uses=1] - br bool %cond226, label %bb3, label %bb2 +declare i32 @printf(i8*, ...) +define i32 @main(i32 %argc, i8** %argv) { +bb0: + call i32 (i8*, ...)* @printf( i8* getelementptr ([10 x i8]* @.LC0, i64 0, i64 0), i32 %argc ) ; :0 [#uses=0] + %cast224 = bitcast i8** %argv to i8* ; [#uses=1] + %local = alloca i8* ; [#uses=3] + store i8* %cast224, i8** %local + %cond226 = icmp sle i32 %argc, 0 ; [#uses=1] + br i1 %cond226, label %bb3, label %bb2 bb2: ; preds = %bb2, %bb0 - %cann-indvar = phi int [ 0, %bb0 ], [ %add1-indvar, %bb2 ] ; [#uses=2] - %add1-indvar = add int %cann-indvar, 1 ; [#uses=2] - %cann-indvar-idxcast = cast int %cann-indvar to long ; [#uses=1] - ;%reg115 = load sbyte** %local ; [#uses=1] - ;%cann-indvar-idxcast-scale = mul long %cann-indvar-idxcast, 8 ; [#uses=1] - ;%reg232 = getelementptr sbyte* %reg115, long %cann-indvar-idxcast-scale ; [#uses=1] - ;%cast235 = cast sbyte* %reg232 to sbyte** ; [#uses=1] - %CT = cast sbyte** %local to sbyte*** - %reg115 = load sbyte*** %CT - %cast235 = getelementptr sbyte** %reg115, long %cann-indvar-idxcast - - %reg117 = load sbyte** %cast235 ; [#uses=1] - %reg236 = call int %puts( sbyte* %reg117 ) ; [#uses=0] - %cond239 = setlt int %add1-indvar, %argc ; [#uses=1] - br bool %cond239, label %bb2, label %bb3 - + %cann-indvar = phi i32 [ 0, %bb0 ], [ %add1-indvar, %bb2 ] ; [#uses=2] + %add1-indvar = add i32 %cann-indvar, 1 ; [#uses=2] + %cann-indvar-idxcast = sext i32 %cann-indvar to i64 ; [#uses=1] + %CT = bitcast i8** %local to i8*** ; [#uses=1] + %reg115 = load i8*** %CT ; [#uses=1] + %cast235 = getelementptr i8** %reg115, i64 %cann-indvar-idxcast ; [#uses=1] + %reg117 = load i8** %cast235 ; [#uses=1] + %reg236 = call i32 @puts( i8* %reg117 ) ; [#uses=0] + %cond239 = icmp slt i32 %add1-indvar, %argc ; [#uses=1] + br i1 %cond239, label %bb2, label %bb3 bb3: ; preds = %bb2, %bb0 - %cast243 = cast sbyte** %local to int* ; [#uses=1] - call void %getoptions( int* %cast243 ) - ret int 0 + %cast243 = bitcast i8** %local to i32* ; [#uses=1] + call void @getoptions( i32* %cast243 ) + ret i32 0 } diff --git a/test/ExecutionEngine/2003-01-04-ArgumentBug.ll b/test/ExecutionEngine/2003-01-04-ArgumentBug.ll index 218154f8cf..6a8f07bad5 100644 --- a/test/ExecutionEngine/2003-01-04-ArgumentBug.ll +++ b/test/ExecutionEngine/2003-01-04-ArgumentBug.ll @@ -1,16 +1,14 @@ -; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc +; RUN: llvm-as < %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null - -implementation ; Functions: - -int %foo(int %X, int %Y, double %A) { - %cond212 = setne double %A, 1.000000e+00 ; [#uses=1] - %cast110 = cast bool %cond212 to int ; [#uses=1] - ret int %cast110 +define i32 @foo(i32 %X, i32 %Y, double %A) { + %cond212 = fcmp une double %A, 1.000000e+00 ; [#uses=1] + %cast110 = zext i1 %cond212 to i32 ; [#uses=1] + ret i32 %cast110 } -int %main() { - %reg212 = call int %foo( int 0, int 1, double 1.000000e+00 ) ; [#uses=1] - ret int %reg212 +define i32 @main() { + %reg212 = call i32 @foo( i32 0, i32 1, double 1.000000e+00 ) ; [#uses=1] + ret i32 %reg212 } + diff --git a/test/ExecutionEngine/2003-01-04-LoopTest.ll b/test/ExecutionEngine/2003-01-04-LoopTest.ll index f70928aef8..fce0b00a04 100644 --- a/test/ExecutionEngine/2003-01-04-LoopTest.ll +++ b/test/ExecutionEngine/2003-01-04-LoopTest.ll @@ -1,25 +1,21 @@ -; RUN: llvm-upgrade < %s | llvm-as -o %t.bc -f +; RUN: llvm-as < %s -o %t.bc -f ; RUN: lli %t.bc > /dev/null -implementation - -int %main() { - call int %mylog(int 4) - ret int 0 +define i32 @main() { + call i32 @mylog( i32 4 ) ; :1 [#uses=0] + ret i32 0 } -internal int %mylog(int %num) { -bb0: ; No predecessors! +define internal i32 @mylog(i32 %num) { +bb0: br label %bb2 - -bb2: - %reg112 = phi int [ 10, %bb2 ], [ 1, %bb0 ] - %cann-indvar = phi int [ %cann-indvar, %bb2 ], [0, %bb0] - %reg114 = add int %reg112, 1 - %cond222 = setlt int %reg114, %num - br bool %cond222, label %bb2, label %bb3 - -bb3: ; preds = %bb2, %bb0 - ret int %reg114 +bb2: ; preds = %bb2, %bb0 + %reg112 = phi i32 [ 10, %bb2 ], [ 1, %bb0 ] ; [#uses=1] + %cann-indvar = phi i32 [ %cann-indvar, %bb2 ], [ 0, %bb0 ] ; [#uses=1] + %reg114 = add i32 %reg112, 1 ; [#uses=2] + %cond222 = icmp slt i32 %reg114, %num ; [#uses=1] + br i1 %cond222, label %bb2, label %bb3 +bb3: ; preds = %bb2 + ret i32 %reg114 } diff --git a/test/ExecutionEngine/2003-01-04-PhiTest.ll b/test/ExecutionEngine/2003-01-04-PhiTest.ll index 45af8300a6..cadb19e777 100644 --- a/test/ExecutionEngine/2003-01-04-PhiTest.ll +++ b/test/ExecutionEngine/2003-01-04-PhiTest.ll @@ -1,11 +1,13 @@ -; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc +; RUN: llvm-as < %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null -int %main() { +define i32 @main() { +;