aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2008-02-19 01:41:04 +0000
committerTanya Lattner <tonic@nondot.org>2008-02-19 01:41:04 +0000
commit53a66d10f01ebfeac7b8e59ca677f2cf2d4a3b26 (patch)
tree896c6dee3a55f268ea98656237c7954799fd8ec7 /test
parentefec751a1b786724862ceff52748df94873a807e (diff)
downloadexternal_llvm-53a66d10f01ebfeac7b8e59ca677f2cf2d4a3b26.zip
external_llvm-53a66d10f01ebfeac7b8e59ca677f2cf2d4a3b26.tar.gz
external_llvm-53a66d10f01ebfeac7b8e59ca677f2cf2d4a3b26.tar.bz2
Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47296 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Alpha/2005-07-12-TwoMallocCalls.ll24
-rw-r--r--test/CodeGen/Alpha/2005-12-12-MissingFCMov.ll58
-rw-r--r--test/CodeGen/Alpha/2006-01-18-MissedGlobal.ll41
-rw-r--r--test/CodeGen/Alpha/2006-01-26-VaargBreak.ll17
-rw-r--r--test/CodeGen/Alpha/2006-04-04-zextload.ll54
-rw-r--r--test/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll20
-rw-r--r--test/CodeGen/Alpha/2006-11-01-vastart.ll15
-rw-r--r--test/CodeGen/Alpha/bic.ll12
-rw-r--r--test/CodeGen/Alpha/bsr.ll19
-rw-r--r--test/CodeGen/Alpha/call_adj.ll16
-rw-r--r--test/CodeGen/Alpha/cmov.ll29
-rw-r--r--test/CodeGen/Alpha/cmpbge.ll24
-rw-r--r--test/CodeGen/Alpha/ctlz_e.ll13
-rw-r--r--test/CodeGen/Alpha/ctpop.ll21
-rw-r--r--test/CodeGen/Alpha/eqv.ll13
-rw-r--r--test/CodeGen/Alpha/jmp_table.ll161
-rw-r--r--test/CodeGen/Alpha/mul5.ll55
-rw-r--r--test/CodeGen/Alpha/neg1.ll8
-rw-r--r--test/CodeGen/Alpha/not.ll10
-rw-r--r--test/CodeGen/Alpha/ornot.ll13
-rw-r--r--test/CodeGen/Alpha/rpcc.ll11
-rw-r--r--test/CodeGen/Alpha/srl_and.ll10
-rw-r--r--test/CodeGen/Alpha/weak.ll17
-rw-r--r--test/CodeGen/Alpha/zapnot2.ll11
-rw-r--r--test/CodeGen/Alpha/zapnot3.ll18
-rw-r--r--test/CodeGen/Alpha/zapnot4.ll11
-rw-r--r--test/CodeGen/CBackend/2002-05-16-NameCollide.ll7
-rw-r--r--test/CodeGen/CBackend/2002-05-21-MissingReturn.ll17
-rw-r--r--test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll6
-rw-r--r--test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll11
-rw-r--r--test/CodeGen/CBackend/2002-08-19-DataPointer.ll7
-rw-r--r--test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll6
-rw-r--r--test/CodeGen/CBackend/2002-08-19-HardConstantExpr.ll6
-rw-r--r--test/CodeGen/CBackend/2002-08-20-RecursiveTypes.ll5
-rw-r--r--test/CodeGen/CBackend/2002-08-20-UnnamedArgument.ll7
-rw-r--r--test/CodeGen/CBackend/2002-08-26-IndirectCallTest.ll21
-rw-r--r--test/CodeGen/CBackend/2002-08-30-StructureOrderingTest.ll7
-rw-r--r--test/CodeGen/CBackend/2002-09-20-ArrayTypeFailure.ll13
-rw-r--r--test/CodeGen/CBackend/2002-09-20-VarArgPrototypes.ll4
-rw-r--r--test/CodeGen/CBackend/2002-10-15-OpaqueTypeProblem.ll9
-rw-r--r--test/CodeGen/CBackend/2002-10-16-External.ll4
-rw-r--r--test/CodeGen/CBackend/2002-10-30-FunctionPointerAlloca.ll16
-rw-r--r--test/CodeGen/CBackend/2002-11-06-PrintEscaped.ll15
-rw-r--r--test/CodeGen/CBackend/2003-05-12-IntegerSizeWarning.ll7
-rw-r--r--test/CodeGen/CBackend/2003-05-13-VarArgFunction.ll11
-rw-r--r--test/CodeGen/CBackend/2003-05-31-MissingStructName.ll5
-rw-r--r--test/CodeGen/CBackend/2003-06-01-NullPointerType.ll12
-rw-r--r--test/CodeGen/CBackend/2003-06-11-HexConstant.ll5
-rw-r--r--test/CodeGen/CBackend/2003-06-11-LiteralStringProblem.ll6
-rw-r--r--test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx19
-rw-r--r--test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll21
-rw-r--r--test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.llx5
-rw-r--r--test/CodeGen/CBackend/2003-10-12-NANGlobalInits.ll6
-rw-r--r--test/CodeGen/CBackend/2003-10-23-UnusedType.ll8
-rw-r--r--test/CodeGen/CBackend/2003-10-28-CastToPtrToStruct.ll16
-rw-r--r--test/CodeGen/CBackend/2003-11-21-ConstantShiftExpr.ll15
-rw-r--r--test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx20
-rw-r--r--test/CodeGen/CBackend/2004-02-15-PreexistingExternals.llx16
-rw-r--r--test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx11
-rw-r--r--test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx8
-rw-r--r--test/CodeGen/CBackend/2004-08-09-va-end-null.ll11
-rw-r--r--test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.llx15
-rw-r--r--test/CodeGen/CBackend/2004-12-03-ExternStatics.ll14
-rw-r--r--test/CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll6
-rw-r--r--test/CodeGen/CBackend/2005-02-14-VolatileOperations.ll11
-rw-r--r--test/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll6
-rw-r--r--test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll22
-rw-r--r--test/CodeGen/CBackend/2005-08-23-Fmod.ll9
-rw-r--r--test/CodeGen/CBackend/2005-09-27-VolatileFuncPtr.ll13
-rw-r--r--test/CodeGen/CBackend/2006-12-11-Float-Bitcast.ll67
-rw-r--r--test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll16
-rw-r--r--test/CodeGen/Generic/2002-04-16-StackFrameSizeAlignment.ll22
-rw-r--r--test/CodeGen/Generic/2003-05-27-phifcmpd.ll25
-rw-r--r--test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll16
-rw-r--r--test/CodeGen/Generic/2003-05-27-usefsubasbool.ll17
-rw-r--r--test/CodeGen/Generic/2003-05-28-ManyArgs.ll271
-rw-r--r--test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll49
-rw-r--r--test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll37
-rw-r--r--test/CodeGen/Generic/2003-07-06-BadIntCmp.ll57
-rw-r--r--test/CodeGen/Generic/2003-07-07-BadLongConst.ll30
-rw-r--r--test/CodeGen/Generic/2003-07-08-BadCastToBool.ll32
-rw-r--r--test/CodeGen/Generic/2003-07-29-BadConstSbyte.ll41
-rw-r--r--test/CodeGen/Generic/2004-02-08-UnwindSupport.llx22
-rw-r--r--test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx24
-rw-r--r--test/CodeGen/Generic/2005-01-18-SetUO-InfLoop.ll27
-rw-r--r--test/CodeGen/Generic/2005-04-09-GlobalInPHI.ll29
-rw-r--r--test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll12
-rw-r--r--test/CodeGen/Generic/2005-10-18-ZeroSizeStackObject.ll8
-rw-r--r--test/CodeGen/Generic/2005-10-21-longlonggtu.ll26
-rw-r--r--test/CodeGen/Generic/2005-12-01-Crash.ll31
-rw-r--r--test/CodeGen/Generic/2005-12-12-ExpandSextInreg.ll10
-rw-r--r--test/CodeGen/Generic/2006-01-12-BadSetCCFold.ll24
-rw-r--r--test/CodeGen/Generic/2006-01-18-InvalidBranchOpcodeAssert.ll19
-rw-r--r--test/CodeGen/Generic/2006-02-12-InsertLibcall.ll40
-rw-r--r--test/CodeGen/Generic/2006-03-01-dagcombineinfloop.ll139
-rw-r--r--test/CodeGen/Generic/2006-03-27-DebugInfoNULLDeclare.ll13
-rw-r--r--test/CodeGen/Generic/2006-04-11-vecload.ll6
-rw-r--r--test/CodeGen/Generic/2006-04-26-SetCCAnd.ll31
-rw-r--r--test/CodeGen/Generic/2006-04-28-Sign-extend-bool.ll15
-rw-r--r--test/CodeGen/Generic/2006-05-06-GEP-Cast-Sink-Crash.ll46
-rw-r--r--test/CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll10
-rw-r--r--test/CodeGen/Generic/2006-06-13-ComputeMaskedBitsCrash.ll50
-rw-r--r--test/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll316
-rw-r--r--test/CodeGen/Generic/2006-07-03-schedulers.ll57
-rw-r--r--test/CodeGen/Generic/2006-08-30-CoallescerCrash.ll133
-rw-r--r--test/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll106
-rw-r--r--test/CodeGen/Generic/2006-09-06-SwitchLowering.ll66
-rw-r--r--test/CodeGen/Generic/2006-10-27-CondFolding.ll12
-rw-r--r--test/CodeGen/Generic/2006-10-29-Crash.ll29
-rw-r--r--test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll14
-rw-r--r--test/CodeGen/Generic/2006-11-20-DAGCombineCrash.ll57
-rw-r--r--test/CodeGen/Generic/2006-12-16-InlineAsmCrash.ll44
-rw-r--r--test/CodeGen/Generic/BasicInstrs.llx64
-rw-r--r--test/CodeGen/Generic/BurgBadRegAlloc.ll1020
-rw-r--r--test/CodeGen/Generic/ConstantExprLowering.llx34
-rw-r--r--test/CodeGen/Generic/SwitchLowering.ll41
-rw-r--r--test/CodeGen/Generic/badCallArgLRLLVM.ll29
-rw-r--r--test/CodeGen/Generic/badFoldGEP.ll28
-rw-r--r--test/CodeGen/Generic/badarg6.ll50
-rw-r--r--test/CodeGen/Generic/badlive.ll48
-rw-r--r--test/CodeGen/Generic/bool-to-double.ll7
-rw-r--r--test/CodeGen/Generic/call-ret0.ll14
-rw-r--r--test/CodeGen/Generic/call-ret42.ll12
-rw-r--r--test/CodeGen/Generic/call-void.ll13
-rw-r--r--test/CodeGen/Generic/call2-ret0.ll19
-rw-r--r--test/CodeGen/Generic/cast-fp.ll80
-rw-r--r--test/CodeGen/Generic/constindices.ll92
-rw-r--r--test/CodeGen/Generic/debug-info.ll24
-rw-r--r--test/CodeGen/Generic/div-neg-power-2.ll9
-rw-r--r--test/CodeGen/Generic/fneg-fabs.ll30
-rw-r--r--test/CodeGen/Generic/fwdtwice.ll25
-rw-r--r--test/CodeGen/Generic/global-ret0.ll10
-rw-r--r--test/CodeGen/Generic/hello.ll14
-rw-r--r--test/CodeGen/Generic/intrinsics.ll53
-rw-r--r--test/CodeGen/Generic/isunord.ll12
-rw-r--r--test/CodeGen/Generic/llvm-ct-intrinsics.ll103
-rw-r--r--test/CodeGen/Generic/negintconst.ll34
-rw-r--r--test/CodeGen/Generic/nested-select.ll23
-rw-r--r--test/CodeGen/Generic/print-add.ll26
-rw-r--r--test/CodeGen/Generic/print-arith-fp.ll135
-rw-r--r--test/CodeGen/Generic/print-arith-int.ll180
-rw-r--r--test/CodeGen/Generic/print-int.ll16
-rw-r--r--test/CodeGen/Generic/print-mul-exp.ll104
-rw-r--r--test/CodeGen/Generic/print-mul.ll53
-rw-r--r--test/CodeGen/Generic/print-shift.ll55
-rw-r--r--test/CodeGen/Generic/ret0.ll6
-rw-r--r--test/CodeGen/Generic/ret42.ll6
-rw-r--r--test/CodeGen/Generic/sched.ll52
-rw-r--r--test/CodeGen/Generic/select.ll254
-rw-r--r--test/CodeGen/Generic/shift-int64.ll15
-rw-r--r--test/CodeGen/Generic/spillccr.ll73
-rw-r--r--test/CodeGen/Generic/stacksave-restore.ll20
-rw-r--r--test/CodeGen/Generic/switch-crit-edge-constant.ll73
-rw-r--r--test/CodeGen/Generic/vector-constantexpr.ll9
-rw-r--r--test/CodeGen/Generic/vector-identity-shuffle.ll28
-rw-r--r--test/CodeGen/Generic/vector.ll218
-rw-r--r--test/CodeGen/IA64/2005-08-22-LegalizerCrash.ll13
-rw-r--r--test/CodeGen/IA64/2005-10-29-shladd.ll12
-rw-r--r--test/CodeGen/IA64/ret-0.ll4
-rw-r--r--test/CodeGen/SPARC/2006-01-22-BitConvertLegalize.ll16
-rw-r--r--test/CodeGen/SPARC/ctpop.ll15
-rw-r--r--test/CodeGen/SPARC/xnor.ll19
162 files changed, 3173 insertions, 3373 deletions
diff --git a/test/CodeGen/Alpha/2005-07-12-TwoMallocCalls.ll b/test/CodeGen/Alpha/2005-07-12-TwoMallocCalls.ll
index 2c3ba9d..c96b14a 100644
--- a/test/CodeGen/Alpha/2005-07-12-TwoMallocCalls.ll
+++ b/test/CodeGen/Alpha/2005-07-12-TwoMallocCalls.ll
@@ -1,19 +1,17 @@
; There should be exactly two calls here (memset and malloc), no more.
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep jsr | count 2
+; RUN: llvm-as < %s | llc -march=alpha | grep jsr | count 2
%typedef.bc_struct = type opaque
+declare void @llvm.memset.i64(i8*, i8, i64, i32)
-implementation ; Functions:
-
-declare void %llvm.memset.i64(sbyte*, ubyte, ulong, uint)
-
-bool %l12_l94_bc_divide_endif_2E_3_2E_ce(int* %tmp.71.reload, uint %scale2.1.3, uint %extra.0, %typedef.bc_struct* %n1, %typedef.bc_struct* %n2, int* %tmp.92.reload, uint %tmp.94.reload, int* %tmp.98.reload, uint %tmp.100.reload, sbyte** %tmp.112.out, uint* %tmp.157.out, sbyte** %tmp.158.out) {
+define i1 @l12_l94_bc_divide_endif_2E_3_2E_ce(i32* %tmp.71.reload, i32 %scale2.1.3, i32 %extra.0, %typedef.bc_struct* %n1, %typedef.bc_struct* %n2, i32* %tmp.92.reload, i32 %tmp.94.reload, i32* %tmp.98.reload, i32 %tmp.100.reload, i8** %tmp.112.out, i32* %tmp.157.out, i8** %tmp.158.out) {
newFuncRoot:
- %tmp.120 = add uint %extra.0, 2 ; <uint> [#uses=1]
- %tmp.122 = add uint %tmp.120, %tmp.94.reload ; <uint> [#uses=1]
- %tmp.123 = add uint %tmp.122, %tmp.100.reload ; <uint> [#uses=2]
- %tmp.112 = malloc sbyte, uint %tmp.123 ; <sbyte*> [#uses=3]
- %tmp.137 = cast uint %tmp.123 to ulong ; <ulong> [#uses=1]
- tail call void %llvm.memset.i64( sbyte* %tmp.112, ubyte 0, ulong %tmp.137, uint 0 )
- ret bool true
+ %tmp.120 = add i32 %extra.0, 2 ; <i32> [#uses=1]
+ %tmp.122 = add i32 %tmp.120, %tmp.94.reload ; <i32> [#uses=1]
+ %tmp.123 = add i32 %tmp.122, %tmp.100.reload ; <i32> [#uses=2]
+ %tmp.112 = malloc i8, i32 %tmp.123 ; <i8*> [#uses=1]
+ %tmp.137 = zext i32 %tmp.123 to i64 ; <i64> [#uses=1]
+ tail call void @llvm.memset.i64( i8* %tmp.112, i8 0, i64 %tmp.137, i32 0 )
+ ret i1 true
}
+
diff --git a/test/CodeGen/Alpha/2005-12-12-MissingFCMov.ll b/test/CodeGen/Alpha/2005-12-12-MissingFCMov.ll
index 5b9fa19..b45c2a4 100644
--- a/test/CodeGen/Alpha/2005-12-12-MissingFCMov.ll
+++ b/test/CodeGen/Alpha/2005-12-12-MissingFCMov.ll
@@ -1,44 +1,40 @@
; This shouldn't crash
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
+; RUN: llvm-as < %s | llc -march=alpha
-; ModuleID = 'bugpoint-reduced-simplified.bc'
-target endian = little
-target pointersize = 64
-%.str_4 = external global [44 x sbyte] ; <[44 x sbyte]*> [#uses=0]
+@.str_4 = external global [44 x i8] ; <[44 x i8]*> [#uses=0]
-implementation ; Functions:
+declare void @printf(i32, ...)
-declare void %printf(int, ...)
-
-void %main() {
+define void @main() {
entry:
- %tmp.11861 = setlt long 0, 1 ; <bool> [#uses=1]
- %tmp.19466 = setlt long 0, 1 ; <bool> [#uses=1]
- %tmp.21571 = setlt long 0, 1 ; <bool> [#uses=1]
- %tmp.36796 = setlt long 0, 1 ; <bool> [#uses=1]
- br bool %tmp.11861, label %loopexit.2, label %no_exit.2
+ %tmp.11861 = icmp slt i64 0, 1 ; <i1> [#uses=1]
+ %tmp.19466 = icmp slt i64 0, 1 ; <i1> [#uses=1]
+ %tmp.21571 = icmp slt i64 0, 1 ; <i1> [#uses=1]
+ %tmp.36796 = icmp slt i64 0, 1 ; <i1> [#uses=1]
+ br i1 %tmp.11861, label %loopexit.2, label %no_exit.2
-no_exit.2: ; preds = %entry
- ret void
+no_exit.2: ; preds = %entry
+ ret void
-loopexit.2: ; preds = %entry
- br bool %tmp.19466, label %loopexit.3, label %no_exit.3.preheader
+loopexit.2: ; preds = %entry
+ br i1 %tmp.19466, label %loopexit.3, label %no_exit.3.preheader
-no_exit.3.preheader: ; preds = %loopexit.2
- ret void
+no_exit.3.preheader: ; preds = %loopexit.2
+ ret void
-loopexit.3: ; preds = %loopexit.2
- br bool %tmp.21571, label %no_exit.6, label %no_exit.4
+loopexit.3: ; preds = %loopexit.2
+ br i1 %tmp.21571, label %no_exit.6, label %no_exit.4
-no_exit.4: ; preds = %loopexit.3
- ret void
+no_exit.4: ; preds = %loopexit.3
+ ret void
-no_exit.6: ; preds = %no_exit.6, %loopexit.3
- %tmp.30793 = setgt long 0, 0 ; <bool> [#uses=1]
- br bool %tmp.30793, label %loopexit.6, label %no_exit.6
+no_exit.6: ; preds = %no_exit.6, %loopexit.3
+ %tmp.30793 = icmp sgt i64 0, 0 ; <i1> [#uses=1]
+ br i1 %tmp.30793, label %loopexit.6, label %no_exit.6
-loopexit.6: ; preds = %no_exit.6
- %Z.1 = select bool %tmp.36796, double 1.000000e+00, double 0x3FEFFF7CEDE74EAE ; <double> [#uses=2]
- tail call void (int, ...)* %printf( int 0, long 0, long 0, long 0, double 1.000000e+00, double 1.000000e+00, double %Z.1, double %Z.1 )
- ret void
+loopexit.6: ; preds = %no_exit.6
+ %Z.1 = select i1 %tmp.36796, double 1.000000e+00, double 0x3FEFFF7CEDE74EAE; <double> [#uses=2]
+ tail call void (i32, ...)* @printf( i32 0, i64 0, i64 0, i64 0, double 1.000000e+00, double 1.000000e+00, double %Z.1, double %Z.1 )
+ ret void
}
+
diff --git a/test/CodeGen/Alpha/2006-01-18-MissedGlobal.ll b/test/CodeGen/Alpha/2006-01-18-MissedGlobal.ll
index f0a5c17..f89997e 100644
--- a/test/CodeGen/Alpha/2006-01-18-MissedGlobal.ll
+++ b/test/CodeGen/Alpha/2006-01-18-MissedGlobal.ll
@@ -1,30 +1,27 @@
; The global symbol should be legalized
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
+; RUN: llvm-as < %s | llc -march=alpha
-target endian = little
-target pointersize = 64
- %struct.LIST_HELP = type { %struct.LIST_HELP*, sbyte* }
- %struct._IO_FILE = type { int, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct._IO_marker*, %struct._IO_FILE*, int, int, long, ushort, sbyte, [1 x sbyte], sbyte*, long, sbyte*, sbyte*, int, [44 x sbyte] }
- %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, int }
-%clause_SORT = external global [21 x %struct.LIST_HELP*] ; <[21 x %struct.LIST_HELP*]*> [#uses=1]
-%ia_in = external global %struct._IO_FILE* ; <%struct._IO_FILE**> [#uses=1]
-%multvec_j = external global [100 x uint] ; <[100 x uint]*> [#uses=1]
+target datalayout = "e-p:64:64"
+ %struct.LIST_HELP = type { %struct.LIST_HELP*, i8* }
+ %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i32, [44 x i8] }
+ %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 }
+@clause_SORT = external global [21 x %struct.LIST_HELP*] ; <[21 x %struct.LIST_HELP*]*> [#uses=0]
+@ia_in = external global %struct._IO_FILE* ; <%struct._IO_FILE**> [#uses=1]
+@multvec_j = external global [100 x i32] ; <[100 x i32]*> [#uses=0]
-implementation ; Functions:
-
-void %main(int %argc) {
+define void @main(i32 %argc) {
clock_Init.exit:
- %tmp.5.i575 = load int* null ; <int> [#uses=1]
- %tmp.309 = seteq int %tmp.5.i575, 0 ; <bool> [#uses=1]
- br bool %tmp.309, label %UnifiedReturnBlock, label %then.17
+ %tmp.5.i575 = load i32* null ; <i32> [#uses=1]
+ %tmp.309 = icmp eq i32 %tmp.5.i575, 0 ; <i1> [#uses=1]
+ br i1 %tmp.309, label %UnifiedReturnBlock, label %then.17
-then.17: ; preds = %clock_Init.exit
- store %struct._IO_FILE* null, %struct._IO_FILE** %ia_in
- %savedstack = call sbyte* %llvm.stacksave( ) ; <sbyte*> [#uses=0]
- ret void
+then.17: ; preds = %clock_Init.exit
+ store %struct._IO_FILE* null, %struct._IO_FILE** @ia_in
+ %savedstack = call i8* @llvm.stacksave( ) ; <i8*> [#uses=0]
+ ret void
-UnifiedReturnBlock: ; preds = %clock_Init.exit
- ret void
+UnifiedReturnBlock: ; preds = %clock_Init.exit
+ ret void
}
-declare sbyte* %llvm.stacksave()
+declare i8* @llvm.stacksave()
diff --git a/test/CodeGen/Alpha/2006-01-26-VaargBreak.ll b/test/CodeGen/Alpha/2006-01-26-VaargBreak.ll
index e58152e..05ebe1e 100644
--- a/test/CodeGen/Alpha/2006-01-26-VaargBreak.ll
+++ b/test/CodeGen/Alpha/2006-01-26-VaargBreak.ll
@@ -1,17 +1,14 @@
; This shouldn't crash
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
+; RUN: llvm-as < %s | llc -march=alpha
-; ModuleID = 'simp.bc'
-target endian = little
-target pointersize = 64
+target datalayout = "e-p:64:64"
target triple = "alphaev6-unknown-linux-gnu"
deplibs = [ "c", "crtend", "stdc++" ]
- %struct.__va_list_tag = type { sbyte*, int }
+ %struct.__va_list_tag = type { i8*, i32 }
-implementation ; Functions:
-
-uint %emit_library_call_value(int %nargs, ...) {
+define i32 @emit_library_call_value(i32 %nargs, ...) {
entry:
- %tmp.223 = va_arg %struct.__va_list_tag* null, uint ; <uint> [#uses=0]
- ret uint %tmp.223
+ %tmp.223 = va_arg %struct.__va_list_tag* null, i32 ; <i32> [#uses=1]
+ ret i32 %tmp.223
}
+
diff --git a/test/CodeGen/Alpha/2006-04-04-zextload.ll b/test/CodeGen/Alpha/2006-04-04-zextload.ll
index 75ad7e0..f3ff5b1 100644
--- a/test/CodeGen/Alpha/2006-04-04-zextload.ll
+++ b/test/CodeGen/Alpha/2006-04-04-zextload.ll
@@ -1,36 +1,34 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
+; RUN: llvm-as < %s | llc -march=alpha
-target endian = little
-target pointersize = 64
+target datalayout = "e-p:64:64"
target triple = "alphaev67-unknown-linux-gnu"
- %llvm.dbg.compile_unit.type = type { uint, { }*, uint, uint, sbyte*, sbyte*, sbyte* }
- %struct._Callback_list = type { %struct._Callback_list*, void (uint, %struct.ios_base*, int)*, int, int }
- %struct._Impl = type { int, %struct.facet**, ulong, %struct.facet**, sbyte** }
- %struct._Words = type { sbyte*, long }
- "struct.__codecvt_abstract_base<char,char,__mbstate_t>" = type { %struct.facet }
- "struct.basic_streambuf<char,std::char_traits<char> >" = type { int (...)**, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct.locale }
- %struct.facet = type { int (...)**, int }
- %struct.ios_base = type { int (...)**, long, long, uint, uint, uint, %struct._Callback_list*, %struct._Words, [8 x %struct._Words], int, %struct._Words*, %struct.locale }
- %struct.locale = type { %struct._Impl* }
- "struct.ostreambuf_iterator<char,std::char_traits<char> >" = type { "struct.basic_streambuf<char,std::char_traits<char> >"*, bool }
-%llvm.dbg.compile_unit1047 = external global %llvm.dbg.compile_unit.type ; <%llvm.dbg.compile_unit.type*> [#uses=1]
+ %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i32, i8*, i8*, i8* }
+ %struct._Callback_list = type { %struct._Callback_list*, void (i32, %struct.ios_base*, i32)*, i32, i32 }
+ %struct._Impl = type { i32, %struct.facet**, i64, %struct.facet**, i8** }
+ %struct._Words = type { i8*, i64 }
+ %"struct.__codecvt_abstract_base<char,char,__mbstate_t>" = type { %struct.facet }
+ %"struct.basic_streambuf<char,std::char_traits<char> >" = type { i32 (...)**, i8*, i8*, i8*, i8*, i8*, i8*, %struct.locale }
+ %struct.facet = type { i32 (...)**, i32 }
+ %struct.ios_base = type { i32 (...)**, i64, i64, i32, i32, i32, %struct._Callback_list*, %struct._Words, [8 x %struct._Words], i32, %struct._Words*, %struct.locale }
+ %struct.locale = type { %struct._Impl* }
+ %"struct.ostreambuf_iterator<char,std::char_traits<char> >" = type { %"struct.basic_streambuf<char,std::char_traits<char> >"*, i1 }
+@llvm.dbg.compile_unit1047 = external global %llvm.dbg.compile_unit.type ; <%llvm.dbg.compile_unit.type*> [#uses=1]
-implementation ; Functions:
-
-void %_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_() {
+define void @_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_() {
entry:
- %tmp234 = seteq sbyte 0, 0 ; <bool> [#uses=1]
- br bool %tmp234, label %cond_next243, label %cond_true235
+ %tmp234 = icmp eq i8 0, 0 ; <i1> [#uses=1]
+ br i1 %tmp234, label %cond_next243, label %cond_true235
-cond_true235: ; preds = %entry
- ret void
+cond_true235: ; preds = %entry
+ ret void
-cond_next243: ; preds = %entry
- %tmp428 = load long* null ; <long> [#uses=1]
- %tmp428 = cast long %tmp428 to uint ; <uint> [#uses=1]
- %tmp429 = alloca sbyte, uint %tmp428 ; <sbyte*> [#uses=0]
- call void %llvm.dbg.stoppoint( uint 1146, uint 0, { }* cast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit1047 to { }*) )
- unreachable
+cond_next243: ; preds = %entry
+ %tmp428 = load i64* null ; <i64> [#uses=1]
+ %tmp428.upgrd.1 = trunc i64 %tmp428 to i32 ; <i32> [#uses=1]
+ %tmp429 = alloca i8, i32 %tmp428.upgrd.1 ; <i8*> [#uses=0]
+ call void @llvm.dbg.stoppoint( i32 1146, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1047 to { }*) )
+ unreachable
}
-declare void %llvm.dbg.stoppoint(uint, uint, { }*)
+declare void @llvm.dbg.stoppoint(i32, i32, { }*)
+
diff --git a/test/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll b/test/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll
index 0f2da53..6b55047 100644
--- a/test/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll
+++ b/test/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll
@@ -1,20 +1,18 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
+; RUN: llvm-as < %s | llc -march=alpha
-target endian = little
-target pointersize = 64
+target datalayout = "e-p:64:64"
target triple = "alphaev67-unknown-linux-gnu"
-implementation ; Functions:
-
-int %_ZN9__gnu_cxx18__exchange_and_addEPVii(int* %__mem, int %__val) {
+define i32 @_ZN9__gnu_cxx18__exchange_and_addEPVii(i32* %__mem, i32 %__val) {
entry:
- %__tmp = alloca int, align 4 ; <int*> [#uses=1]
- %tmp3 = call int asm sideeffect "\0A$$Lxadd_0:\0A\09ldl_l $0,$3\0A\09addl $0,$4,$1\0A\09stl_c $1,$2\0A\09beq $1,$$Lxadd_0\0A\09mb", "=&r,=*&r,=*m,m,r"( int* %__tmp, int* %__mem, int* %__mem, int %__val ) ; <int> [#uses=1]
- ret int %tmp3
+ %__tmp = alloca i32, align 4 ; <i32*> [#uses=1]
+ %tmp3 = call i32 asm sideeffect "\0A$$Lxadd_0:\0A\09ldl_l $0,$3\0A\09addl $0,$4,$1\0A\09stl_c $1,$2\0A\09beq $1,$$Lxadd_0\0A\09mb", "=&r,=*&r,=*m,m,r"( i32* %__tmp, i32* %__mem, i32* %__mem, i32 %__val ) ; <i32> [#uses=1]
+ ret i32 %tmp3
}
-void %_ZN9__gnu_cxx12__atomic_addEPVii(int* %__mem, int %__val) {
+define void @_ZN9__gnu_cxx12__atomic_addEPVii(i32* %__mem, i32 %__val) {
entry:
- %tmp2 = call int asm sideeffect "\0A$$Ladd_1:\0A\09ldl_l $0,$2\0A\09addl $0,$3,$0\0A\09stl_c $0,$1\0A\09beq $0,$$Ladd_1\0A\09mb", "=&r,=*m,m,r"( int* %__mem, int* %__mem, int %__val ) ; <int> [#uses=0]
+ %tmp2 = call i32 asm sideeffect "\0A$$Ladd_1:\0A\09ldl_l $0,$2\0A\09addl $0,$3,$0\0A\09stl_c $0,$1\0A\09beq $0,$$Ladd_1\0A\09mb", "=&r,=*m,m,r"( i32* %__mem, i32* %__mem, i32 %__val ) ; <i32> [#uses=0]
ret void
}
+
diff --git a/test/CodeGen/Alpha/2006-11-01-vastart.ll b/test/CodeGen/Alpha/2006-11-01-vastart.ll
index 61d6db9..3f42eda 100644
--- a/test/CodeGen/Alpha/2006-11-01-vastart.ll
+++ b/test/CodeGen/Alpha/2006-11-01-vastart.ll
@@ -1,18 +1,15 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
+; RUN: llvm-as < %s | llc -march=alpha
target datalayout = "e-p:64:64"
-target endian = little
-target pointersize = 64
target triple = "alphaev67-unknown-linux-gnu"
- %struct.va_list = type { sbyte*, int, int }
+ %struct.va_list = type { i8*, i32, i32 }
-implementation ; Functions:
-
-void %yyerror(int, ...) {
+define void @yyerror(i32, ...) {
entry:
- call void %llvm.va_start( %struct.va_list* null )
+ %va.upgrd.1 = bitcast %struct.va_list* null to i8* ; <i8*> [#uses=1]
+ call void @llvm.va_start( i8* %va.upgrd.1 )
ret void
}
-declare void %llvm.va_start(%struct.va_list*)
+declare void @llvm.va_start(i8*)
diff --git a/test/CodeGen/Alpha/bic.ll b/test/CodeGen/Alpha/bic.ll
index 4e55d18..6e63511 100644
--- a/test/CodeGen/Alpha/bic.ll
+++ b/test/CodeGen/Alpha/bic.ll
@@ -1,11 +1,9 @@
; Make sure this testcase codegens to the bic instruction
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep {bic}
+; RUN: llvm-as < %s | llc -march=alpha | grep {bic}
-implementation ; Functions:
-
-long %bar(long %x, long %y) {
+define i64 @bar(i64 %x, i64 %y) {
entry:
- %tmp.1 = xor long %x, -1 ; <long> [#uses=1]
- %tmp.2 = and long %y, %tmp.1
- ret long %tmp.2
+ %tmp.1 = xor i64 %x, -1 ; <i64> [#uses=1]
+ %tmp.2 = and i64 %y, %tmp.1 ; <i64> [#uses=1]
+ ret i64 %tmp.2
}
diff --git a/test/CodeGen/Alpha/bsr.ll b/test/CodeGen/Alpha/bsr.ll
index 32ea0cb..d461857 100644
--- a/test/CodeGen/Alpha/bsr.ll
+++ b/test/CodeGen/Alpha/bsr.ll
@@ -1,13 +1,12 @@
; Make sure this testcase codegens the bsr instruction
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep bsr
+; RUN: llvm-as < %s | llc -march=alpha | grep bsr
-implementation
-
-internal long %abc(int %x) {
- %tmp.2 = add int %x, -1 ; <int> [#uses=1]
- %tmp.0 = call long %abc( int %tmp.2 ) ; <long> [#uses=1]
- %tmp.5 = add int %x, -2 ; <int> [#uses=1]
- %tmp.3 = call long %abc( int %tmp.5 ) ; <long> [#uses=1]
- %tmp.6 = add long %tmp.0, %tmp.3 ; <long> [#uses=1]
- ret long %tmp.6
+define internal i64 @abc(i32 %x) {
+ %tmp.2 = add i32 %x, -1 ; <i32> [#uses=1]
+ %tmp.0 = call i64 @abc( i32 %tmp.2 ) ; <i64> [#uses=1]
+ %tmp.5 = add i32 %x, -2 ; <i32> [#uses=1]
+ %tmp.3 = call i64 @abc( i32 %tmp.5 ) ; <i64> [#uses=1]
+ %tmp.6 = add i64 %tmp.0, %tmp.3 ; <i64> [#uses=1]
+ ret i64 %tmp.6
}
+
diff --git a/test/CodeGen/Alpha/call_adj.ll b/test/CodeGen/Alpha/call_adj.ll
index da47c6c..ee8cda8 100644
--- a/test/CodeGen/Alpha/call_adj.ll
+++ b/test/CodeGen/Alpha/call_adj.ll
@@ -1,15 +1,13 @@
;All this should do is not crash
-;RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
+;RUN: llvm-as < %s | llc -march=alpha
-target endian = little
-target pointersize = 64
+target datalayout = "e-p:64:64"
target triple = "alphaev67-unknown-linux-gnu"
-implementation ; Functions:
-
-void %_ZNSt13basic_filebufIcSt11char_traitsIcEE22_M_convert_to_externalEPcl(uint %f) {
+define void @_ZNSt13basic_filebufIcSt11char_traitsIcEE22_M_convert_to_externalEPcl(i32 %f) {
entry:
- %tmp49 = alloca sbyte, uint %f ; <sbyte*> [#uses=1]
- %tmp = call uint null( sbyte* null, sbyte* null, sbyte* null, sbyte* null, sbyte* null, sbyte* null, sbyte* null)
- ret void
+ %tmp49 = alloca i8, i32 %f ; <i8*> [#uses=0]
+ %tmp = call i32 null( i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null ) ; <i32> [#uses=0]
+ ret void
}
+
diff --git a/test/CodeGen/Alpha/cmov.ll b/test/CodeGen/Alpha/cmov.ll
index 33f1eb8..08e1dad 100644
--- a/test/CodeGen/Alpha/cmov.ll
+++ b/test/CodeGen/Alpha/cmov.ll
@@ -1,24 +1,23 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | not grep cmovlt
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep cmoveq
+; RUN: llvm-as < %s | llc -march=alpha | not grep cmovlt
+; RUN: llvm-as < %s | llc -march=alpha | grep cmoveq
-
-long %cmov_lt(long %a, long %c) {
+define i64 @cmov_lt(i64 %a, i64 %c) {
entry:
- %tmp.1 = setlt long %c, 0
- %retval = select bool %tmp.1, long %a, long 10
- ret long %retval
+ %tmp.1 = icmp slt i64 %c, 0 ; <i1> [#uses=1]
+ %retval = select i1 %tmp.1, i64 %a, i64 10 ; <i64> [#uses=1]
+ ret i64 %retval
}
-long %cmov_const(long %a, long %b, long %c) {
+define i64 @cmov_const(i64 %a, i64 %b, i64 %c) {
entry:
- %tmp.1 = setlt long %a, %b
- %retval = select bool %tmp.1, long %c, long 10
- ret long %retval
+ %tmp.1 = icmp slt i64 %a, %b ; <i1> [#uses=1]
+ %retval = select i1 %tmp.1, i64 %c, i64 10 ; <i64> [#uses=1]
+ ret i64 %retval
}
-long %cmov_lt2(long %a, long %c) {
+define i64 @cmov_lt2(i64 %a, i64 %c) {
entry:
- %tmp.1 = setgt long %c, 0
- %retval = select bool %tmp.1, long 10, long %a
- ret long %retval
+ %tmp.1 = icmp sgt i64 %c, 0 ; <i1> [#uses=1]
+ %retval = select i1 %tmp.1, i64 10, i64 %a ; <i64> [#uses=1]
+ ret i64 %retval
}
diff --git a/test/CodeGen/Alpha/cmpbge.ll b/test/CodeGen/Alpha/cmpbge.ll
index e99a6b1..9b83215 100644
--- a/test/CodeGen/Alpha/cmpbge.ll
+++ b/test/CodeGen/Alpha/cmpbge.ll
@@ -1,16 +1,16 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep cmpbge | count 2
+; RUN: llvm-as < %s | llc -march=alpha | grep cmpbge | count 2
-bool %test1(ulong %A, ulong %B) {
- %C = and ulong %A, 255
- %D = and ulong %B, 255
- %E = setge ulong %C, %D
- ret bool %E
+define i1 @test1(i64 %A, i64 %B) {
+ %C = and i64 %A, 255 ; <i64> [#uses=1]
+ %D = and i64 %B, 255 ; <i64> [#uses=1]
+ %E = icmp uge i64 %C, %D ; <i1> [#uses=1]
+ ret i1 %E
}
-bool %test2(ulong %a, ulong %B) {
- %A = shl ulong %a, ubyte 1
- %C = and ulong %A, 254
- %D = and ulong %B, 255
- %E = setge ulong %C, %D
- ret bool %E
+define i1 @test2(i64 %a, i64 %B) {
+ %A = shl i64 %a, 1 ; <i64> [#uses=1]
+ %C = and i64 %A, 254 ; <i64> [#uses=1]
+ %D = and i64 %B, 255 ; <i64> [#uses=1]
+ %E = icmp uge i64 %C, %D ; <i1> [#uses=1]
+ ret i1 %E
}
diff --git a/test/CodeGen/Alpha/ctlz_e.ll b/test/CodeGen/Alpha/ctlz_e.ll
index 9d7c44c..56027dd 100644
--- a/test/CodeGen/Alpha/ctlz_e.ll
+++ b/test/CodeGen/Alpha/ctlz_e.ll
@@ -1,12 +1,11 @@
; Make sure this testcase does not use ctpop
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | not grep -i ctpop
+; RUN: llvm-as < %s | llc -march=alpha | not grep -i ctpop
-declare ulong %llvm.ctlz.i64(ulong)
+declare i64 @llvm.ctlz.i64(i64)
-implementation ; Functions:
-
-ulong %bar(ulong %x) {
+define i64 @bar(i64 %x) {
entry:
- %tmp.1 = call ulong %llvm.ctlz.i64( ulong %x )
- ret ulong %tmp.1
+ %tmp.1 = call i64 @llvm.ctlz.i64( i64 %x ) ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
+
diff --git a/test/CodeGen/Alpha/ctpop.ll b/test/CodeGen/Alpha/ctpop.ll
index 388c121..654cd04 100644
--- a/test/CodeGen/Alpha/ctpop.ll
+++ b/test/CodeGen/Alpha/ctpop.ll
@@ -1,20 +1,19 @@
; Make sure this testcase codegens to the ctpop instruction
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev67 | grep -i ctpop
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=+CIX | \
+; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev67 | grep -i ctpop
+; RUN: llvm-as < %s | llc -march=alpha -mattr=+CIX | \
; RUN: grep -i ctpop
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev6 | \
+; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev6 | \
; RUN: not grep -i ctpop
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev56 | \
+; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev56 | \
; RUN: not grep -i ctpop
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=-CIX | \
+; RUN: llvm-as < %s | llc -march=alpha -mattr=-CIX | \
; RUN: not grep -i ctpop
-declare long %llvm.ctpop.i64(long)
+declare i64 @llvm.ctpop.i64(i64)
-implementation ; Functions:
-
-long %bar(long %x) {
+define i64 @bar(i64 %x) {
entry:
- %tmp.1 = call long %llvm.ctpop.i64( long %x )
- ret long %tmp.1
+ %tmp.1 = call i64 @llvm.ctpop.i64( i64 %x ) ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
+
diff --git a/test/CodeGen/Alpha/eqv.ll b/test/CodeGen/Alpha/eqv.ll
index 76bbc92..2539d72 100644
--- a/test/CodeGen/Alpha/eqv.ll
+++ b/test/CodeGen/Alpha/eqv.ll
@@ -1,11 +1,10 @@
; Make sure this testcase codegens to the eqv instruction
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep eqv
+; RUN: llvm-as < %s | llc -march=alpha | grep eqv
-implementation ; Functions:
-
-long %bar(long %x, long %y) {
+define i64 @bar(i64 %x, i64 %y) {
entry:
- %tmp.1 = xor long %x, -1 ; <long> [#uses=1]
- %tmp.2 = xor long %y, %tmp.1
- ret long %tmp.2
+ %tmp.1 = xor i64 %x, -1 ; <i64> [#uses=1]
+ %tmp.2 = xor i64 %y, %tmp.1 ; <i64> [#uses=1]
+ ret i64 %tmp.2
}
+
diff --git a/test/CodeGen/Alpha/jmp_table.ll b/test/CodeGen/Alpha/jmp_table.ll
index 175e7bf..04182a7 100644
--- a/test/CodeGen/Alpha/jmp_table.ll
+++ b/test/CodeGen/Alpha/jmp_table.ll
@@ -1,101 +1,98 @@
; try to check that we have the most important instructions, which shouldn't
; appear otherwise
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep jmp
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep gprel32
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ldl
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep rodata
-; END.
+; RUN: llvm-as < %s | llc -march=alpha | grep jmp
+; RUN: llvm-as < %s | llc -march=alpha | grep gprel32
+; RUN: llvm-as < %s | llc -march=alpha | grep ldl
+; RUN: llvm-as < %s | llc -march=alpha | grep rodata
-target endian = little
-target pointersize = 64
+target datalayout = "e-p:64:64"
target triple = "alphaev67-unknown-linux-gnu"
-%str = internal constant [2 x sbyte] c"1\00" ; <[2 x sbyte]*> [#uses=1]
-%str1 = internal constant [2 x sbyte] c"2\00" ; <[2 x sbyte]*> [#uses=1]
-%str2 = internal constant [2 x sbyte] c"3\00" ; <[2 x sbyte]*> [#uses=1]
-%str3 = internal constant [2 x sbyte] c"4\00" ; <[2 x sbyte]*> [#uses=1]
-%str4 = internal constant [2 x sbyte] c"5\00" ; <[2 x sbyte]*> [#uses=1]
-%str5 = internal constant [2 x sbyte] c"6\00" ; <[2 x sbyte]*> [#uses=1]
-%str6 = internal constant [2 x sbyte] c"7\00" ; <[2 x sbyte]*> [#uses=1]
-%str7 = internal constant [2 x sbyte] c"8\00" ; <[2 x sbyte]*> [#uses=1]
+@str = internal constant [2 x i8] c"1\00" ; <[2 x i8]*> [#uses=1]
+@str1 = internal constant [2 x i8] c"2\00" ; <[2 x i8]*> [#uses=1]
+@str2 = internal constant [2 x i8] c"3\00" ; <[2 x i8]*> [#uses=1]
+@str3 = internal constant [2 x i8] c"4\00" ; <[2 x i8]*> [#uses=1]
+@str4 = internal constant [2 x i8] c"5\00" ; <[2 x i8]*> [#uses=1]
+@str5 = internal constant [2 x i8] c"6\00" ; <[2 x i8]*> [#uses=1]
+@str6 = internal constant [2 x i8] c"7\00" ; <[2 x i8]*> [#uses=1]
+@str7 = internal constant [2 x i8] c"8\00" ; <[2 x i8]*> [#uses=1]
-implementation ; Functions:
-
-int %main(int %x, sbyte** %y) {
+define i32 @main(i32 %x, i8** %y) {
entry:
- %x_addr = alloca int ; <int*> [#uses=2]
- %y_addr = alloca sbyte** ; <sbyte***> [#uses=1]
- %retval = alloca int, align 4 ; <int*> [#uses=2]
- %tmp = alloca int, align 4 ; <int*> [#uses=2]
- %foo = alloca sbyte*, align 8 ; <sbyte**> [#uses=9]
- "alloca point" = cast int 0 to int ; <int> [#uses=0]
- store int %x, int* %x_addr
- store sbyte** %y, sbyte*** %y_addr
- %tmp = load int* %x_addr ; <int> [#uses=1]
- switch int %tmp, label %bb15 [
- int 1, label %bb
- int 2, label %bb1
- int 3, label %bb3
- int 4, label %bb5
- int 5, label %bb7
- int 6, label %bb9
- int 7, label %bb11
- int 8, label %bb13
- ]
+ %x_addr = alloca i32 ; <i32*> [#uses=2]
+ %y_addr = alloca i8** ; <i8***> [#uses=1]
+ %retval = alloca i32, align 4 ; <i32*> [#uses=2]
+ %tmp = alloca i32, align 4 ; <i32*> [#uses=2]
+ %foo = alloca i8*, align 8 ; <i8**> [#uses=9]
+ %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
+ store i32 %x, i32* %x_addr
+ store i8** %y, i8*** %y_addr
+ %tmp.upgrd.1 = load i32* %x_addr ; <i32> [#uses=1]
+ switch i32 %tmp.upgrd.1, label %bb15 [
+ i32 1, label %bb
+ i32 2, label %bb1
+ i32 3, label %bb3
+ i32 4, label %bb5
+ i32 5, label %bb7
+ i32 6, label %bb9
+ i32 7, label %bb11
+ i32 8, label %bb13
+ ]
-bb: ; preds = %entry
- %tmp = getelementptr [2 x sbyte]* %str, int 0, ulong 0 ; <sbyte*> [#uses=1]
- store sbyte* %tmp, sbyte** %foo
- br label %bb16
+bb: ; preds = %entry
+ %tmp.upgrd.2 = getelementptr [2 x i8]* @str, i32 0, i64 0 ; <i8*> [#uses=1]
+ store i8* %tmp.upgrd.2, i8** %foo
+ br label %bb16
-bb1: ; preds = %entry
- %tmp2 = getelementptr [2 x sbyte]* %str1, int 0, ulong 0 ; <sbyte*> [#uses=1]
- store sbyte* %tmp2, sbyte** %foo
- br label %bb16
+bb1: ; preds = %entry
+ %tmp2 = getelementptr [2 x i8]* @str1, i32 0, i64 0 ; <i8*> [#uses=1]
+ store i8* %tmp2, i8** %foo
+ br label %bb16
-bb3: ; preds = %entry
- %tmp4 = getelementptr [2 x sbyte]* %str2, int 0, ulong 0 ; <sbyte*> [#uses=1]
- store sbyte* %tmp4, sbyte** %foo
- br label %bb16
+bb3: ; preds = %entry
+ %tmp4 = getelementptr [2 x i8]* @str2, i32 0, i64 0 ; <i8*> [#uses=1]
+ store i8* %tmp4, i8** %foo
+ br label %bb16
-bb5: ; preds = %entry
- %tmp6 = getelementptr [2 x sbyte]* %str3, int 0, ulong 0 ; <sbyte*> [#uses=1]
- store sbyte* %tmp6, sbyte** %foo
- br label %bb16
+bb5: ; preds = %entry
+ %tmp6 = getelementptr [2 x i8]* @str3, i32 0, i64 0 ; <i8*> [#uses=1]
+ store i8* %tmp6, i8** %foo
+ br label %bb16
-bb7: ; preds = %entry
- %tmp8 = getelementptr [2 x sbyte]* %str4, int 0, ulong 0 ; <sbyte*> [#uses=1]
- store sbyte* %tmp8, sbyte** %foo
- br label %bb16
+bb7: ; preds = %entry
+ %tmp8 = getelementptr [2 x i8]* @str4, i32 0, i64 0 ; <i8*> [#uses=1]
+ store i8* %tmp8, i8** %foo
+ br label %bb16
-bb9: ; preds = %entry
- %tmp10 = getelementptr [2 x sbyte]* %str5, int 0, ulong 0 ; <sbyte*> [#uses=1]
- store sbyte* %tmp10, sbyte** %foo
- br label %bb16
+bb9: ; preds = %entry
+ %tmp10 = getelementptr [2 x i8]* @str5, i32 0, i64 0 ; <i8*> [#uses=1]
+ store i8* %tmp10, i8** %foo
+ br label %bb16
-bb11: ; preds = %entry
- %tmp12 = getelementptr [2 x sbyte]* %str6, int 0, ulong 0 ; <sbyte*> [#uses=1]
- store sbyte* %tmp12, sbyte** %foo
- br label %bb16
+bb11: ; preds = %entry
+ %tmp12 = getelementptr [2 x i8]* @str6, i32 0, i64 0 ; <i8*> [#uses=1]
+ store i8* %tmp12, i8** %foo
+ br label %bb16
-bb13: ; preds = %entry
- %tmp14 = getelementptr [2 x sbyte]* %str7, int 0, ulong 0 ; <sbyte*> [#uses=1]
- store sbyte* %tmp14, sbyte** %foo
- br label %bb16
+bb13: ; preds = %entry
+ %tmp14 = getelementptr [2 x i8]* @str7, i32 0, i64 0 ; <i8*> [#uses=1]
+ store i8* %tmp14, i8** %foo
+ br label %bb16
-bb15: ; preds = %entry
- br label %bb16
+bb15: ; preds = %entry
+ br label %bb16
-bb16: ; preds = %bb15, %bb13, %bb11, %bb9, %bb7, %bb5, %bb3, %bb1, %bb
- %tmp17 = load sbyte** %foo ; <sbyte*> [#uses=1]
- %tmp18 = call int (...)* %print( sbyte* %tmp17 ) ; <int> [#uses=0]
- store int 0, int* %tmp
- %tmp19 = load int* %tmp ; <int> [#uses=1]
- store int %tmp19, int* %retval
- br label %return
+bb16: ; preds = %bb15, %bb13, %bb11, %bb9, %bb7, %bb5, %bb3, %bb1, %bb
+ %tmp17 = load i8** %foo ; <i8*> [#uses=1]
+ %tmp18 = call i32 (...)* @print( i8* %tmp17 ) ; <i32> [#uses=0]
+ store i32 0, i32* %tmp
+ %tmp19 = load i32* %tmp ; <i32> [#uses=1]
+ store i32 %tmp19, i32* %retval
+ br label %return
-return: ; preds = %bb16
- %retval = load int* %retval ; <int> [#uses=1]
- ret int %retval
+return: ; preds = %bb16
+ %retval.upgrd.3 = load i32* %retval ; <i32> [#uses=1]
+ ret i32 %retval.upgrd.3
}
-declare int %print(...)
+declare i32 @print(...)
+
diff --git a/test/CodeGen/Alpha/mul5.ll b/test/CodeGen/Alpha/mul5.ll
index 956fbf9..9042015 100644
--- a/test/CodeGen/Alpha/mul5.ll
+++ b/test/CodeGen/Alpha/mul5.ll
@@ -1,52 +1,53 @@
; Make sure this testcase does not use mulq
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | \
+; RUN: llvm-as < %s | llvm-as | llc -march=alpha | \
; RUN: not grep -i mul
; XFAIL: *
-implementation ; Functions:
-
-ulong %foo1(ulong %x) {
+define i64 @foo1(i64 %x) {
entry:
- %tmp.1 = mul ulong %x, 9 ; <ulong> [#uses=1]
- ret ulong %tmp.1
+ %tmp.1 = mul i64 %x, 9 ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
-ulong %foo3(ulong %x) {
+
+define i64 @foo3(i64 %x) {
entry:
- %tmp.1 = mul ulong %x, 259
- ret ulong %tmp.1
+ %tmp.1 = mul i64 %x, 259 ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
-ulong %foo4l(ulong %x) {
+define i64 @foo4l(i64 %x) {
entry:
- %tmp.1 = mul ulong %x, 260
- ret ulong %tmp.1
+ %tmp.1 = mul i64 %x, 260 ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
-ulong %foo4ln(ulong %x) {
+define i64 @foo4ln(i64 %x) {
entry:
- %tmp.1 = mul ulong %x, 508
- ret ulong %tmp.1
+ %tmp.1 = mul i64 %x, 508 ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
-ulong %foo4ln_more(ulong %x) {
+
+define i64 @foo4ln_more(i64 %x) {
entry:
- %tmp.1 = mul ulong %x, 252
- ret ulong %tmp.1
+ %tmp.1 = mul i64 %x, 252 ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
-ulong %foo1n(ulong %x) {
+define i64 @foo1n(i64 %x) {
entry:
- %tmp.1 = mul ulong %x, 511
- ret ulong %tmp.1
+ %tmp.1 = mul i64 %x, 511 ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
-ulong %foo8l(ulong %x) {
+define i64 @foo8l(i64 %x) {
entry:
- %tmp.1 = mul ulong %x, 768
- ret ulong %tmp.1
+ %tmp.1 = mul i64 %x, 768 ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
-long %bar(long %x) {
+define i64 @bar(i64 %x) {
entry:
- %tmp.1 = mul long %x, 5 ; <long> [#uses=1]
- ret long %tmp.1
+ %tmp.1 = mul i64 %x, 5 ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
+
diff --git a/test/CodeGen/Alpha/neg1.ll b/test/CodeGen/Alpha/neg1.ll
index 037e3a2..ddaed4a 100644
--- a/test/CodeGen/Alpha/neg1.ll
+++ b/test/CodeGen/Alpha/neg1.ll
@@ -1,9 +1,7 @@
; Make sure this testcase codegens to the lda -1 instruction
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep {\\-1}
+; RUN: llvm-as < %s | llc -march=alpha | grep {\\-1}
-implementation ; Functions:
-
-long %bar() {
+define i64 @bar() {
entry:
- ret long -1
+ ret i64 -1
}
diff --git a/test/CodeGen/Alpha/not.ll b/test/CodeGen/Alpha/not.ll
index 3423aa7..cea9f6b 100644
--- a/test/CodeGen/Alpha/not.ll
+++ b/test/CodeGen/Alpha/not.ll
@@ -1,10 +1,8 @@
; Make sure this testcase codegens to the ornot instruction
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep eqv
+; RUN: llvm-as < %s | llc -march=alpha | grep eqv
-implementation ; Functions:
-
-long %bar(long %x) {
+define i64 @bar(i64 %x) {
entry:
- %tmp.1 = xor long %x, -1 ; <long> [#uses=1]
- ret long %tmp.1
+ %tmp.1 = xor i64 %x, -1 ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
diff --git a/test/CodeGen/Alpha/ornot.ll b/test/CodeGen/Alpha/ornot.ll
index d2da888..b8d350d 100644
--- a/test/CodeGen/Alpha/ornot.ll
+++ b/test/CodeGen/Alpha/ornot.ll
@@ -1,11 +1,10 @@
; Make sure this testcase codegens to the ornot instruction
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ornot
+; RUN: llvm-as < %s | llc -march=alpha | grep ornot
-implementation ; Functions:
-
-long %bar(long %x, long %y) {
+define i64 @bar(i64 %x, i64 %y) {
entry:
- %tmp.1 = xor long %x, -1 ; <long> [#uses=1]
- %tmp.2 = or long %y, %tmp.1
- ret long %tmp.2
+ %tmp.1 = xor i64 %x, -1 ; <i64> [#uses=1]
+ %tmp.2 = or i64 %y, %tmp.1 ; <i64> [#uses=1]
+ ret i64 %tmp.2
}
+
diff --git a/test/CodeGen/Alpha/rpcc.ll b/test/CodeGen/Alpha/rpcc.ll
index ba143a6..193a47f 100644
--- a/test/CodeGen/Alpha/rpcc.ll
+++ b/test/CodeGen/Alpha/rpcc.ll
@@ -1,10 +1,9 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep rpcc
+; RUN: llvm-as < %s | llc -march=alpha | grep rpcc
-declare ulong %llvm.readcyclecounter()
+declare i64 @llvm.readcyclecounter()
-ulong %foo() {
+define i64 @foo() {
entry:
-%tmp.1 = call ulong %llvm.readcyclecounter ()
-ret ulong %tmp.1
+ %tmp.1 = call i64 @llvm.readcyclecounter( ) ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
-
diff --git a/test/CodeGen/Alpha/srl_and.ll b/test/CodeGen/Alpha/srl_and.ll
index 2ed1bf9..2344833 100644
--- a/test/CodeGen/Alpha/srl_and.ll
+++ b/test/CodeGen/Alpha/srl_and.ll
@@ -1,10 +1,10 @@
; Make sure this testcase codegens to the zapnot instruction
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot
+; RUN: llvm-as < %s | llc -march=alpha | grep zapnot
-ulong %foo(ulong %y) {
+define i64 @foo(i64 %y) {
entry:
- %tmp = shr ulong %y, ubyte 3 ; <ulong> [#uses=1]
- %tmp2 = and ulong %tmp, 8191 ; <ulong> [#uses=1]
- ret ulong %tmp2
+ %tmp = lshr i64 %y, 3 ; <i64> [#uses=1]
+ %tmp2 = and i64 %tmp, 8191 ; <i64> [#uses=1]
+ ret i64 %tmp2
}
diff --git a/test/CodeGen/Alpha/weak.ll b/test/CodeGen/Alpha/weak.ll
index aefaefd..e00e6d7 100644
--- a/test/CodeGen/Alpha/weak.ll
+++ b/test/CodeGen/Alpha/weak.ll
@@ -1,17 +1,16 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep .weak.*f
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep .weak.*h
+; RUN: llvm-as < %s | llc -march=alpha | grep .weak.*f
+; RUN: llvm-as < %s | llc -march=alpha | grep .weak.*h
-implementation ; Functions:
-
-weak uint %f() {
+define weak i32 @f() {
entry:
- unreachable
+ unreachable
}
-void %g() {
+define void @g() {
entry:
- tail call void %h( )
+ tail call void @h( )
ret void
}
-declare extern_weak void %h()
+declare extern_weak void @h()
+
diff --git a/test/CodeGen/Alpha/zapnot2.ll b/test/CodeGen/Alpha/zapnot2.ll
index d026edd..6a33ca2 100644
--- a/test/CodeGen/Alpha/zapnot2.ll
+++ b/test/CodeGen/Alpha/zapnot2.ll
@@ -1,10 +1,9 @@
; Make sure this testcase codegens to the zapnot instruction
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot
+; RUN: llvm-as < %s | llc -march=alpha | grep zapnot
-implementation ; Functions:
-
-long %bar(long %x) {
+define i64 @bar(i64 %x) {
entry:
- %tmp.1 = and long %x, 16711935 ; <long> [#uses=1]
- ret long %tmp.1
+ %tmp.1 = and i64 %x, 16711935 ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
+
diff --git a/test/CodeGen/Alpha/zapnot3.ll b/test/CodeGen/Alpha/zapnot3.ll
index c106b6d..26aab37 100644
--- a/test/CodeGen/Alpha/zapnot3.ll
+++ b/test/CodeGen/Alpha/zapnot3.ll
@@ -1,15 +1,15 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot
+; RUN: llvm-as < %s | llc -march=alpha | grep zapnot
;demanded bits mess up this mask in a hard to fix way
-;ulong %foo(ulong %y) {
-; %tmp = and ulong %y, 65535
-; %tmp2 = shr ulong %tmp, ubyte 3
-; ret ulong %tmp2
+;define i64 @foo(i64 %y) {
+; %tmp = and i64 %y, 65535
+; %tmp2 = shr i64 %tmp, i8 3
+; ret i64 %tmp2
;}
-ulong %foo2(ulong %y) {
- %tmp = shr ulong %y, ubyte 3 ; <ulong> [#uses=1]
- %tmp2 = and ulong %tmp, 8191 ; <ulong> [#uses=1]
- ret ulong %tmp2
+define i64 @foo2(i64 %y) {
+ %tmp = lshr i64 %y, 3 ; <i64> [#uses=1]
+ %tmp2 = and i64 %tmp, 8191 ; <i64> [#uses=1]
+ ret i64 %tmp2
}
diff --git a/test/CodeGen/Alpha/zapnot4.ll b/test/CodeGen/Alpha/zapnot4.ll
index b805607..1be3ca2 100644
--- a/test/CodeGen/Alpha/zapnot4.ll
+++ b/test/CodeGen/Alpha/zapnot4.ll
@@ -1,8 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot
+; RUN: llvm-as < %s | llc -march=alpha | grep zapnot
-ulong %foo(ulong %y) {
- %tmp = shl ulong %y, ubyte 3 ; <ulong> [#uses=1]
- %tmp2 = and ulong %tmp, 65535 ; <ulong> [#uses=1]
- ret ulong %tmp2
+define i64 @foo(i64 %y) {
+ %tmp = shl i64 %y, 3 ; <i64> [#uses=1]
+ %tmp2 = and i64 %tmp, 65535 ; <i64> [#uses=1]
+ ret i64 %tmp2
}
-
diff --git a/test/CodeGen/CBackend/2002-05-16-NameCollide.ll b/test/CodeGen/CBackend/2002-05-16-NameCollide.ll
index 249927d..c69b9b0 100644
--- a/test/CodeGen/CBackend/2002-05-16-NameCollide.ll
+++ b/test/CodeGen/CBackend/2002-05-16-NameCollide.ll
@@ -1,7 +1,8 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
; Make sure that global variables do not collide if they have the same name,
; but different types.
-%X = global int 5
-%X = global long 7
+@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
index 775a762..2908157 100644
--- a/test/CodeGen/CBackend/2002-05-21-MissingReturn.ll
+++ b/test/CodeGen/CBackend/2002-05-21-MissingReturn.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
; This case was emitting code that looked like this:
; ...
@@ -8,10 +8,13 @@
; 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.
;
-void "test"() {
- br label %BB1
-BB2:
- br label %BB2
-BB1:
- ret void
+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
index c8d1201..297807e 100644
--- a/test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll
+++ b/test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll
@@ -1,7 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
; Test const pointer refs & forward references
-%t3 = global int * %t1 ;; Forward reference
-%t1 = global int 4
+@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
index 2842faa..ead1bce 100644
--- a/test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll
+++ b/test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll
@@ -1,9 +1,8 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
-global int* cast (float* %0 to int*) ;; Forward numeric reference
-global float* %0 ;; Duplicate forward numeric reference
+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 int] [ int 12, int 52 ]
-%arrayPtr = global int* getelementptr ([2 x int]* %array, long 0, long 0) ;; int* &%array[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
index ca2af79..7ae13ec 100644
--- a/test/CodeGen/CBackend/2002-08-19-DataPointer.ll
+++ b/test/CodeGen/CBackend/2002-08-19-DataPointer.ll
@@ -1,5 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
-
-%sptr1 = global [11x sbyte]* %somestr ;; Forward ref to a constant
-%somestr = constant [11x sbyte] c"hello world"
+; RUN: llvm-as < %s | llc -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
index baf7d78..25f63a0 100644
--- a/test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll
+++ b/test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll
@@ -1,5 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
-%fptr = global void() * %f ;; Forward ref method defn
-declare void "f"() ;; External method
+@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
index 51bc950..528b8de 100644
--- a/test/CodeGen/CBackend/2002-08-19-HardConstantExpr.ll
+++ b/test/CodeGen/CBackend/2002-08-19-HardConstantExpr.ll
@@ -1,5 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
-%array = constant [2 x int] [ int 12, int 52 ] ; <[2 x int]*> [#uses=1]
-%arrayPtr = global int* getelementptr ([2 x int]* %array, long 0, long 0) ; <int**> [#uses=1]
+@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-RecursiveTypes.ll b/test/CodeGen/CBackend/2002-08-20-RecursiveTypes.ll
index fdcdeed..e9df0c2 100644
--- a/test/CodeGen/CBackend/2002-08-20-RecursiveTypes.ll
+++ b/test/CodeGen/CBackend/2002-08-20-RecursiveTypes.ll
@@ -1,4 +1,3 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
-
-%MyIntList = uninitialized global { \2 *, int }
+; RUN: llvm-as < %s | llc -march=c
+@MyIntList = external global { \2*, i32 }
diff --git a/test/CodeGen/CBackend/2002-08-20-UnnamedArgument.ll b/test/CodeGen/CBackend/2002-08-20-UnnamedArgument.ll
index 3ec23fb..ccffe68 100644
--- a/test/CodeGen/CBackend/2002-08-20-UnnamedArgument.ll
+++ b/test/CodeGen/CBackend/2002-08-20-UnnamedArgument.ll
@@ -1,11 +1,10 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -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.
-int %test(int) {
- ret int 0
+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
index 4a977e8..bf592ce 100644
--- a/test/CodeGen/CBackend/2002-08-26-IndirectCallTest.ll
+++ b/test/CodeGen/CBackend/2002-08-26-IndirectCallTest.ll
@@ -1,16 +1,17 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
; Indirect function call test... found by Joel & Brian
;
-%taskArray = uninitialized global int*
+@taskArray = external global i32* ; <i32**> [#uses=1]
-void %test(int %X) {
- %Y = add int %X, -1 ; <int>:1 [#uses=3]
- %cast100 = cast int %Y to long ; <uint> [#uses=1]
- %gep100 = getelementptr int** %taskArray, long %cast100 ; <int**> [#uses=1]
- %fooPtr = load int** %gep100 ; <int*> [#uses=1]
- %cast101 = cast int* %fooPtr to void (int)* ; <void (int)*> [#uses=1]
- call void %cast101( int 1000 )
- ret void
+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
index d8477d5..e048905 100644
--- a/test/CodeGen/CBackend/2002-08-30-StructureOrderingTest.ll
+++ b/test/CodeGen/CBackend/2002-08-30-StructureOrderingTest.ll
@@ -1,7 +1,8 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -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 = uninitialized global { {int } }
-%X = uninitialized global { float }
+@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
index 6158b2f..ebb1c0f 100644
--- a/test/CodeGen/CBackend/2002-09-20-ArrayTypeFailure.ll
+++ b/test/CodeGen/CBackend/2002-09-20-ArrayTypeFailure.ll
@@ -1,10 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
-
-
-implementation
-
-void %test() {
- %X = alloca [4xint]
- ret void
+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
index f3841f4..69f4575 100644
--- a/test/CodeGen/CBackend/2002-09-20-VarArgPrototypes.ll
+++ b/test/CodeGen/CBackend/2002-09-20-VarArgPrototypes.ll
@@ -1,6 +1,6 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
-declare void %foo(...)
+declare void @foo(...)
diff --git a/test/CodeGen/CBackend/2002-10-15-OpaqueTypeProblem.ll b/test/CodeGen/CBackend/2002-10-15-OpaqueTypeProblem.ll
index 1a9cdb7..2f6d9be 100644
--- a/test/CodeGen/CBackend/2002-10-15-OpaqueTypeProblem.ll
+++ b/test/CodeGen/CBackend/2002-10-15-OpaqueTypeProblem.ll
@@ -1,7 +1,6 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
- %MPI_Comm = type %struct.Comm*
- %struct.Comm = type opaque
-%thing = global %MPI_Comm* null ; <%MPI_Comm**> [#uses=0]
+%MPI_Comm = type %struct.Comm*
+%struct.Comm = type opaque
+@thing = global %MPI_Comm* null ; <%MPI_Comm**> [#uses=0]
-implementation ; Functions:
diff --git a/test/CodeGen/CBackend/2002-10-16-External.ll b/test/CodeGen/CBackend/2002-10-16-External.ll
index d60a3d8..d40cbda 100644
--- a/test/CodeGen/CBackend/2002-10-16-External.ll
+++ b/test/CodeGen/CBackend/2002-10-16-External.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
-%bob = external global int ; <int*> [#uses=2]
+@bob = external global i32 ; <i32*> [#uses=0]
diff --git a/test/CodeGen/CBackend/2002-10-30-FunctionPointerAlloca.ll b/test/CodeGen/CBackend/2002-10-30-FunctionPointerAlloca.ll
index b887488..a17b8db 100644
--- a/test/CodeGen/CBackend/2002-10-30-FunctionPointerAlloca.ll
+++ b/test/CodeGen/CBackend/2002-10-30-FunctionPointerAlloca.ll
@@ -1,12 +1,10 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
+ %BitField = type i32
+ %tokenptr = type i32*
- %BitField = type int
- %tokenptr = type %BitField*
-
-implementation
-
-void %test() {
- %pmf1 = alloca %tokenptr (%tokenptr, sbyte*)*
- ret void
+define void @test() {
+ %pmf1 = alloca %tokenptr (%tokenptr, i8*)* ; <%tokenptr (%tokenptr, i8*)**> [#uses=0]
+ ret void
}
+
diff --git a/test/CodeGen/CBackend/2002-11-06-PrintEscaped.ll b/test/CodeGen/CBackend/2002-11-06-PrintEscaped.ll
index 62c0e27..2dd281a 100644
--- a/test/CodeGen/CBackend/2002-11-06-PrintEscaped.ll
+++ b/test/CodeGen/CBackend/2002-11-06-PrintEscaped.ll
@@ -1,12 +1,11 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
-%testString = internal constant [18 x sbyte] c "Escaped newline\n\00"
+@testString = internal constant [18 x i8] c"Escaped newline\5Cn\00" ; <[18 x i8]*> [#uses=1]
-implementation
+declare i32 @printf(i8*, ...)
-declare int %printf(sbyte*, ...)
-
-int %main() {
- call int (sbyte*, ...)* %printf( sbyte* getelementptr ([18 x sbyte]* %testString, long 0, long 0))
- ret int 0
+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
index 2c6a596..4a7170d 100644
--- a/test/CodeGen/CBackend/2003-05-12-IntegerSizeWarning.ll
+++ b/test/CodeGen/CBackend/2003-05-12-IntegerSizeWarning.ll
@@ -1,7 +1,8 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
; Apparently this constant was unsigned in ISO C 90, but not in C 99.
-int %foo() {
- ret int -2147483648
+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
index 1e08b2d..2a4e839 100644
--- a/test/CodeGen/CBackend/2003-05-13-VarArgFunction.ll
+++ b/test/CodeGen/CBackend/2003-05-13-VarArgFunction.ll
@@ -1,10 +1,11 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
; This testcase breaks the C backend, because gcc doesn't like (...) functions
; with no arguments at all.
-void %test(long %Ptr) {
- %P = cast long %Ptr to void(...) *
- call void(...)* %P(long %Ptr)
- ret void
+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
index 567d8e4..fb7e2ba 100644
--- a/test/CodeGen/CBackend/2003-05-31-MissingStructName.ll
+++ b/test/CodeGen/CBackend/2003-05-31-MissingStructName.ll
@@ -1,6 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
; The C backend was dying when there was no typename for a struct type!
-declare int %test(int,{ [32 x int] }*)
-
+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
index 224ba15..6b7f9f0 100644
--- a/test/CodeGen/CBackend/2003-06-01-NullPointerType.ll
+++ b/test/CodeGen/CBackend/2003-06-01-NullPointerType.ll
@@ -1,9 +1,9 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
+%X = type { i32, float }
-%X = type { int, float }
-
-void %test() {
- getelementptr %X* null, long 0, uint 1
- ret void
+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
index bc5691f..c6128d6 100644
--- a/test/CodeGen/CBackend/2003-06-11-HexConstant.ll
+++ b/test/CodeGen/CBackend/2003-06-11-HexConstant.ll
@@ -1,5 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
; Make sure hex constant does not continue into a valid hexadecimal letter/number
-%version = global [3 x sbyte] c"\001\00"
-
+@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
index 7af255b..fd68211 100644
--- a/test/CodeGen/CBackend/2003-06-11-LiteralStringProblem.ll
+++ b/test/CodeGen/CBackend/2003-06-11-LiteralStringProblem.ll
@@ -1,5 +1,3 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
-
-
-%version = global [3 x sbyte] c"1\00\00"
+; RUN: llvm-as < %s | llc -march=c
+@version = global [3 x i8] c"1\00\00"
diff --git a/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx b/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx
index f49b98c..e074c2e 100644
--- a/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx
+++ b/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx
@@ -1,16 +1,17 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c > %t1.cbe.c
+; RUN: llvm-as < %s | llc -march=c > %t1.cbe.c
; RUN: gcc -B/usr/bin/ %t1.cbe.c -o %t1.cbe
; RUN: ./%t1.cbe
-bool %doTest(ubyte %x) {
- %dec.0 = add ubyte %x, 255
- %tmp.1001 = trunc ubyte %dec.0 to bool
- ret bool %tmp.1001
+define i1 @doTest(i8 %x) {
+ %dec.0 = add i8 %x, -1 ; <i8> [#uses=1]
+ %tmp.1001 = trunc i8 %dec.0 to i1 ; <i1> [#uses=1]
+ ret i1 %tmp.1001
}
-int %main () {
- %result = call bool %doTest(ubyte 1)
- %p = cast bool %result to int
- ret int %p
+define i32 @main() {
+ %result = call i1 @doTest( i8 1 ) ; <i1> [#uses=1]
+ %p = zext i1 %result to i32 ; <i32> [#uses=1]
+ ret i32 %p
}
+
diff --git a/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll b/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll
index f69c7dc..9fe98e2 100644
--- a/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll
+++ b/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll
@@ -1,14 +1,17 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
+declare i32 @callee(i32, i32)
-declare int %callee(int, int)
+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
-int %test(int %X) {
- %A = invoke int %callee(int %X, int 5) to label %Ok except label %Threw
-Ok:
- %B = phi int [%A, %0], [-1, %Threw]
- ret int %B
-Threw:
- br label %Ok
+Threw: ; preds = %0
+ br label %Ok
}
+
diff --git a/test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.llx b/test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.llx
index 75e223d..ef3b579 100644
--- a/test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.llx
+++ b/test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.llx
@@ -1,4 +1,3 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep common | grep X
-
-%X = linkonce global int 5
+; RUN: llvm-as < %s | llc -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
index a82d7e5..077f16c 100644
--- a/test/CodeGen/CBackend/2003-10-12-NANGlobalInits.ll
+++ b/test/CodeGen/CBackend/2003-10-12-NANGlobalInits.ll
@@ -1,5 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
; This is a non-normal FP value: it's a nan.
-%NAN = global { float } { float 0x7FF8000000000000 }
-%NANs = global { float } { float 0x7FF4000000000000 }
+@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
index e073928..e67ba2e 100644
--- a/test/CodeGen/CBackend/2003-10-23-UnusedType.ll
+++ b/test/CodeGen/CBackend/2003-10-23-UnusedType.ll
@@ -1,6 +1,8 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
+%A = type { i32, i8*, { i32, i32, i32, i32, i32, i32, i32, i32 }*, i16 }
-%A = type { uint, sbyte*, { uint, uint, uint, uint, uint, uint, uint, uint }*, ushort }
+define void @test(%A*) {
+ ret void
+}
-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
index 4c7ab32..41f3f1e 100644
--- a/test/CodeGen/CBackend/2003-10-28-CastToPtrToStruct.ll
+++ b/test/CodeGen/CBackend/2003-10-28-CastToPtrToStruct.ll
@@ -1,12 +1,12 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
; reduced from DOOM.
-%union._XEvent = type { int }
-%.X_event_9 = global %union._XEvent zeroinitializer
+ %union._XEvent = type { i32 }
+@.X_event_9 = global %union._XEvent zeroinitializer ; <%union._XEvent*> [#uses=1]
-implementation ; Functions:
-void %I_InitGraphics() {
-shortcirc_next.3: ; preds = %no_exit.1
- %tmp.319 = load int* getelementptr ({ int, int }* cast (%union._XEvent* %.X_event_9 to { int, int }*), long 0, uint 1) ; <int> [#uses=1]
- ret void
+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
index 3866200..e8da787 100644
--- a/test/CodeGen/CBackend/2003-11-21-ConstantShiftExpr.ll
+++ b/test/CodeGen/CBackend/2003-11-21-ConstantShiftExpr.ll
@@ -1,12 +1,13 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
+@y = weak global i8 0 ; <i8*> [#uses=1]
-%y = weak global sbyte 0
-implementation
-uint %testcaseshr() {
+define i32 @testcaseshr() {
entry:
- ret uint shr (uint cast (sbyte* %y to uint), ubyte 4)
+ ret i32 lshr (i32 ptrtoint (i8* @y to i32), i32 4)
}
-uint %testcaseshl() {
+
+define i32 @testcaseshl() {
entry:
- ret uint shl (uint cast (sbyte* %y to uint), ubyte 4)
+ ret i32 shl (i32 ptrtoint (i8* @y to i32), i32 4)
}
+
diff --git a/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx b/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx
index 973e6d8..911d6d4 100644
--- a/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx
+++ b/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx
@@ -1,14 +1,16 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep builtin_return_address
+; RUN: llvm-as < %s | llc -march=c | grep builtin_return_address
-declare sbyte* %llvm.returnaddress(uint)
-declare sbyte* %llvm.frameaddress(uint)
+declare i8* @llvm.returnaddress(i32)
-sbyte *%test1() {
- %X = call sbyte* %llvm.returnaddress(uint 0)
- ret sbyte* %X
+declare i8* @llvm.frameaddress(i32)
+
+define i8* @test1() {
+ %X = call i8* @llvm.returnaddress( i32 0 ) ; <i8*> [#uses=1]
+ ret i8* %X
}
-sbyte *%test2() {
- %X = call sbyte* %llvm.frameaddress(uint 0)
- ret sbyte* %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.llx b/test/CodeGen/CBackend/2004-02-15-PreexistingExternals.llx
index 1afa47b..1629deb 100644
--- a/test/CodeGen/CBackend/2004-02-15-PreexistingExternals.llx
+++ b/test/CodeGen/CBackend/2004-02-15-PreexistingExternals.llx
@@ -4,13 +4,15 @@
; this testcase for example, which caused the CBE to mangle one, screwing
; everything up. :( Test that this does not happen anymore.
;
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep _memcpy
+; RUN: llvm-as < %s | llc -march=c | not grep _memcpy
-declare void %llvm.memcpy.i32(sbyte*, sbyte*, uint,uint)
-declare float* %memcpy(int*, uint,int)
+declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-int %test(sbyte *%A, sbyte* %B, int* %C) {
- call float* %memcpy(int* %C, uint 4, int 17)
- call void %llvm.memcpy.i32(sbyte* %A, sbyte* %B, uint 123, uint 14)
- ret int 7
+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.llx b/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx
index 87a642b..6f23915 100644
--- a/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx
+++ b/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx
@@ -1,10 +1,11 @@
; This is a non-normal FP value
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep FPConstant | grep static
+; RUN: llvm-as < %s | llc -march=c | grep FPConstant | grep static
-float %func () {
- ret float 0xFFF0000000000000 ; -inf
+define float @func() {
+ ret float 0xFFF0000000000000
}
-double %func2() {
- ret double 0xFF20000000000000 ; -inf
+define double @func2() {
+ ret double 0xFF20000000000000
}
+
diff --git a/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx b/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx
index 997f1c9..2d62231 100644
--- a/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx
+++ b/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx
@@ -1,8 +1,6 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep func1 | grep WEAK
+; RUN: llvm-as < %s | llc -march=c | grep func1 | grep WEAK
-implementation
-
-linkonce int %func1 () {
- ret int 5
+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
index f8e8fe5..ae7ba53 100644
--- a/test/CodeGen/CBackend/2004-08-09-va-end-null.ll
+++ b/test/CodeGen/CBackend/2004-08-09-va-end-null.ll
@@ -1,9 +1,10 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
-declare void %llvm.va_end(sbyte*)
+declare void @llvm.va_end(i8*)
-void %test() {
- call void %llvm.va_end( sbyte* null )
- ret void
+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.llx b/test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.llx
index 99bb602..a8ee438 100644
--- a/test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.llx
+++ b/test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.llx
@@ -1,17 +1,12 @@
; 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: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
-implementation
+declare void @external(i8*)
-declare void %external(sbyte*)
-
-int %test(int *%X) {
- %RV = call int (int*)* cast (void(sbyte*)* %external to int(int*)*)(int* %X)
- ret int %RV
+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
index a285dae..8acab76 100644
--- a/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll
+++ b/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll
@@ -1,12 +1,10 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep extern.*msg
+; RUN: llvm-as < %s | llc -march=c | not grep extern.*msg
+; PR472
-; This is PR472
+@msg = internal global [6 x i8] c"hello\00" ; <[6 x i8]*> [#uses=1]
-%msg = internal global [6 x sbyte] c"hello\00"
-
-implementation ; Functions:
-
-sbyte* %foo() {
+define i8* @foo() {
entry:
- ret sbyte* getelementptr ([6 x sbyte]* %msg, int 0, int 0)
+ 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
index ebe4566..9acaa72 100644
--- a/test/CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll
+++ b/test/CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll
@@ -1,5 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
-int %foo() {
- ret int and (int 123456, int cast (int()* %foo to int))
+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
index e161e46..12c8790 100644
--- a/test/CodeGen/CBackend/2005-02-14-VolatileOperations.ll
+++ b/test/CodeGen/CBackend/2005-02-14-VolatileOperations.ll
@@ -1,7 +1,8 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep volatile
+; RUN: llvm-as < %s | llc -march=c | grep volatile
-void %test(int* %P) {
- %X = volatile load int*%P
- volatile store int %X, int* %P
- ret void
+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-03-08-RecursiveTypeCrash.ll b/test/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll
index 5349488..162e3d3 100644
--- a/test/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll
+++ b/test/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll
@@ -1,5 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
+; RUN: llvm-as < %s | llc -march=c
-%JNIEnv = type %struct.JNINa*
-%struct.JNINa = type { sbyte*, sbyte*, sbyte*, void (%JNIEnv*)* }
+ %JNIEnv = type %struct.JNINa*
+ %struct.JNINa = type { i8*, i8*, i8*, void (%JNIEnv*)* }
diff --git a/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll b/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll
index e73eb63..55d43e2 100644
--- a/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll
+++ b/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll
@@ -1,20 +1,18 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep -- --65535
+; RUN: llvm-as < %s | llc -march=c | not grep -- --65535
; PR596
-target endian = little
-target pointersize = 32
+target datalayout = "e-p:32:32"
target triple = "i686-pc-linux-gnu"
-implementation ; Functions:
+declare void @func(i32)
-declare void %func(int)
-
-void %funcb() {
+define void @funcb() {
entry:
- %tmp.1 = sub int 0, -65535 ; <int> [#uses=1]
- call void %func( int %tmp.1 )
- br label %return
+ %tmp.1 = sub i32 0, -65535 ; <i32> [#uses=1]
+ call void @func( i32 %tmp.1 )
+ br label %return
-return: ; preds = %entry
- ret void
+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
index 5ce1e96..7c55019 100644
--- a/test/CodeGen/CBackend/2005-08-23-Fmod.ll
+++ b/test/CodeGen/CBackend/2005-08-23-Fmod.ll
@@ -1,6 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep fmod
+; RUN: llvm-as < %s | llc -march=c | grep fmod
-double %test(double %A, double %B) {
- %C = rem double %A, %B
- ret double %C
+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
index 32a7088..37f311d 100644
--- a/test/CodeGen/CBackend/2005-09-27-VolatileFuncPtr.ll
+++ b/test/CodeGen/CBackend/2005-09-27-VolatileFuncPtr.ll
@@ -1,9 +1,10 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep {\\* *volatile *\\*}
+; RUN: llvm-as < %s | llc -march=c | grep {\\* *volatile *\\*}
-%G = external global void()*
+@G = external global void ()* ; <void ()**> [#uses=2]
-void %test() {
- volatile store void()* %test, void()** %G
- volatile load void()** %G
- ret void
+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
index e692005..ca4e48e 100644
--- a/test/CodeGen/CBackend/2006-12-11-Float-Bitcast.ll
+++ b/test/CodeGen/CBackend/2006-12-11-Float-Bitcast.ll
@@ -1,48 +1,49 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | \
+; RUN: llvm-as < %s | llc -march=c | \
; RUN: grep __BITCAST | count 14
-int %test1(float %F) {
- %X = bitcast float %F to int
- ret int %X
+define i32 @test1(float %F) {
+ %X = bitcast float %F to i32 ; <i32> [#uses=1]
+ ret i32 %X
}
-float %test2(int %I) {
- %X = bitcast int %I to float
- ret float %X
+define float @test2(i32 %I) {
+ %X = bitcast i32 %I to float ; <float> [#uses=1]
+ ret float %X
}
-long %test3(double %D) {
- %X = bitcast double %D to long
- ret long %X
+define i64 @test3(double %D) {
+ %X = bitcast double %D to i64 ; <i64> [#uses=1]
+ ret i64 %X
}
-double %test4(long %L) {
- %X = bitcast long %L to double
- ret double %X
+define double @test4(i64 %L) {
+ %X = bitcast i64 %L to double ; <double> [#uses=1]
+ ret double %X
}
-double %test5(double %D) {
- %X = bitcast double %D to double
- %Y = add double %X, 2.0
- %Z = bitcast double %Y to long
- %res = bitcast long %Z to double
- ret double %res
+define double @test5(double %D) {
+ %X = bitcast double %D to double ; <double> [#uses=1]
+ %Y = add 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
}
-float %test6(float %F) {
- %X = bitcast float %F to float
- %Y = add float %X, 2.0
- %Z = bitcast float %Y to int
- %res = bitcast int %Z to float
- ret float %res
+define float @test6(float %F) {
+ %X = bitcast float %F to float ; <float> [#uses=1]
+ %Y = add 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
}
-int %main(int %argc, sbyte** %argv) {
- %a = call int %test1(float 0x400921FB40000000)
- %b = call float %test2(int %a)
- %c = call long %test3(double 0x400921FB4D12D84A)
- %d = call double %test4(long %c)
- %e = call double %test5(double 7.0)
- %f = call float %test6(float 7.0)
- ret int %a
+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/Generic/2002-04-14-UnexpectedUnsignedType.ll b/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll
index 3e2dbfe..879c4c8 100644
--- a/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll
+++ b/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll
@@ -1,15 +1,13 @@
-; RUN: llvm-upgrade < %s | llvm-as -o - | llc
+; RUN: llvm-as < %s -o - | llc
; This caused the backend to assert out with:
; SparcInstrInfo.cpp:103: failed assertion `0 && "Unexpected unsigned type"'
;
-implementation
-declare void "bar"(sbyte* %G)
+declare void @bar(i8*)
-void "foo"()
-begin
- %cast225 = cast ulong 123456 to sbyte* ; <sbyte*> [#uses=1]
- call void %bar( sbyte* %cast225)
- ret void
-end
+define void @foo() {
+ %cast225 = inttoptr i64 123456 to i8* ; <i8*> [#uses=1]
+ call void @bar( i8* %cast225 )
+ ret void
+}
diff --git a/test/CodeGen/Generic/2002-04-16-StackFrameSizeAlignment.ll b/test/CodeGen/Generic/2002-04-16-StackFrameSizeAlignment.ll
index d7e138a..d77b9e1 100644
--- a/test/CodeGen/Generic/2002-04-16-StackFrameSizeAlignment.ll
+++ b/test/CodeGen/Generic/2002-04-16-StackFrameSizeAlignment.ll
@@ -1,18 +1,14 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
; Compiling this file produces:
; Sparc.cpp:91: failed assertion `(offset - OFFSET) % getStackFrameSizeAlignment() == 0'
;
-implementation
-
-declare int "SIM"(sbyte* %A, sbyte* %B, int %M, int %N, int %K, [256 x int]* %V, int %Q, int %R, int %nseq)
-
-void "foo"()
-begin
-bb0: ;[#uses=0]
- %V = alloca [256 x int], uint 256 ; <[256 x int]*> [#uses=1]
- call int %SIM( sbyte* null, sbyte* null, int 0, int 0, int 0, [256 x int]* %V, int 0, int 0, int 2 ) ; <int>:0 [#uses=0]
- ret void
-end
-
+declare i32 @SIM(i8*, i8*, i32, i32, i32, [256 x i32]*, i32, i32, i32)
+
+define void @foo() {
+bb0:
+ %V = alloca [256 x i32], i32 256 ; <[256 x i32]*> [#uses=1]
+ call i32 @SIM( i8* null, i8* null, i32 0, i32 0, i32 0, [256 x i32]* %V, i32 0, i32 0, i32 2 ) ; <i32>:0 [#uses=0]
+ ret void
+}
diff --git a/test/CodeGen/Generic/2003-05-27-phifcmpd.ll b/test/CodeGen/Generic/2003-05-27-phifcmpd.ll
index 5c795fa..cf17ef4 100644
--- a/test/CodeGen/Generic/2003-05-27-phifcmpd.ll
+++ b/test/CodeGen/Generic/2003-05-27-phifcmpd.ll
@@ -1,18 +1,19 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-void %QRiterate(int %p.1, double %tmp.212) {
-entry: ; No predecessors!
- %tmp.184 = setgt int %p.1, 0 ; <bool> [#uses=1]
- br bool %tmp.184, label %shortcirc_next.1, label %shortcirc_done.1
+define void @QRiterate(i32 %p.1, double %tmp.212) {
+entry:
+ %tmp.184 = icmp sgt i32 %p.1, 0 ; <i1> [#uses=1]
+ br i1 %tmp.184, label %shortcirc_next.1, label %shortcirc_done.1
-shortcirc_next.1: ; preds = %entry
- %tmp.213 = setne double %tmp.212, 0.000000e+00
+shortcirc_next.1: ; preds = %shortcirc_done.1, %entry
+ %tmp.213 = fcmp une double %tmp.212, 0.000000e+00 ; <i1> [#uses=1]
br label %shortcirc_done.1
-shortcirc_done.1: ; preds = %entry, %shortcirc_next.1
- %val.1 = phi bool [ false, %entry ], [ %tmp.213, %shortcirc_next.1 ]
- br bool %val.1, label %shortcirc_next.1, label %exit.1
+shortcirc_done.1: ; preds = %shortcirc_next.1, %entry
+ %val.1 = phi i1 [ false, %entry ], [ %tmp.213, %shortcirc_next.1 ] ; <i1> [#uses=1]
+ br i1 %val.1, label %shortcirc_next.1, label %exit.1
-exit.1:
- ret void
+exit.1: ; preds = %shortcirc_done.1
+ ret void
}
+
diff --git a/test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll b/test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll
index 8df84f0..03b2a16 100644
--- a/test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll
+++ b/test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll
@@ -1,13 +1,13 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-
-void %QRiterate(double %tmp.212) {
- %tmp.213 = setne double %tmp.212, 0.000000e+00
+define void @QRiterate(double %tmp.212) {
+ %tmp.213 = fcmp une double %tmp.212, 0.000000e+00 ; <i1> [#uses=1]
br label %shortcirc_next.1
-shortcirc_next.1: ; preds = %entry
- br bool %tmp.213, label %shortcirc_next.1, label %exit.1
+shortcirc_next.1: ; preds = %shortcirc_next.1, %0
+ br i1 %tmp.213, label %shortcirc_next.1, label %exit.1
-exit.1:
- ret void
+exit.1: ; preds = %shortcirc_next.1
+ ret void
}
+
diff --git a/test/CodeGen/Generic/2003-05-27-usefsubasbool.ll b/test/CodeGen/Generic/2003-05-27-usefsubasbool.ll
index 40f4d4d..b456eeb 100644
--- a/test/CodeGen/Generic/2003-05-27-usefsubasbool.ll
+++ b/test/CodeGen/Generic/2003-05-27-usefsubasbool.ll
@@ -1,13 +1,14 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-void %QRiterate(double %tmp.212) {
-entry: ; No predecessors!
+define void @QRiterate(double %tmp.212) {
+entry:
br label %shortcirc_next.1
-shortcirc_next.1: ; preds = %entry
- %tmp.213 = setne double %tmp.212, 0.000000e+00
- br bool %tmp.213, label %shortcirc_next.1, label %exit.1
+shortcirc_next.1: ; preds = %shortcirc_next.1, %entry
+ %tmp.213 = fcmp une double %tmp.212, 0.000000e+00 ; <i1> [#uses=1]
+ br i1 %tmp.213, label %shortcirc_next.1, label %exit.1
-exit.1:
- ret void
+exit.1: ; preds = %shortcirc_next.1
+ ret void
}
+
diff --git a/test/CodeGen/Generic/2003-05-28-ManyArgs.ll b/test/CodeGen/Generic/2003-05-28-ManyArgs.ll
index 8600638..595700a 100644
--- a/test/CodeGen/Generic/2003-05-28-ManyArgs.ll
+++ b/test/CodeGen/Generic/2003-05-28-ManyArgs.ll
@@ -1,156 +1,153 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
;; Date: May 28, 2003.
;; From: test/Programs/External/SPEC/CINT2000/175.vpr.llvm.bc
;; Function: int %main(int %argc.1, sbyte** %argv.1)
;;
;; Error: A function call with about 56 arguments causes an assertion failure
-;; in llc because the register allocator cannot find a register
-;; not used explicitly by the call instruction.
-;;
+;; in llc because the register allocator cannot find a register
+;; not used explicitly by the call instruction.
+;;
;; Cause: Regalloc was not keeping track of free registers correctly.
-;; It was counting the registers allocated to all outgoing arguments,
-;; even though most of those are copied to the stack (so those
-;; registers are not actually used by the call instruction).
+;; It was counting the registers allocated to all outgoing arguments,
+;; even though most of those are copied to the stack (so those
+;; registers are not actually used by the call instruction).
;;
;; Fixed: By rewriting selection and allocation so that selection explicitly
-;; inserts all copy operations required for passing arguments and
+;; inserts all copy operations required for passing arguments and
;; for the return value of a call, copying to/from registers
;; and/or to stack locations as needed.
;;
+ %struct..s_annealing_sched = type { i32, float, float, float, float }
+ %struct..s_chan = type { i32, float, float, float, float }
+ %struct..s_det_routing_arch = type { i32, float, float, float, i32, i32, i16, i16, i16, float, float }
+ %struct..s_placer_opts = type { i32, float, i32, i32, i8*, i32, i32 }
+ %struct..s_router_opts = type { float, float, float, float, float, i32, i32, i32, i32 }
+ %struct..s_segment_inf = type { float, i32, i16, i16, float, float, i32, float, float }
+ %struct..s_switch_inf = type { i32, float, float, float, float }
- %struct..s_annealing_sched = type { uint, float, float, float, float }
- %struct..s_chan = type { uint, float, float, float, float }
- %struct..s_det_routing_arch = type { uint, float, float, float, uint, int, short, short, short, float, float }
- %struct..s_placer_opts = type { int, float, int, uint, sbyte*, uint, int }
- %struct..s_router_opts = type { float, float, float, float, float, int, int, uint, int }
- %struct..s_segment_inf = type { float, int, short, short, float, float, uint, float, float }
- %struct..s_switch_inf = type { uint, float, float, float, float }
-
-implementation
-
-int %main(int %argc.1, sbyte** %argv.1) {
-entry:
- %net_file = alloca [300 x sbyte]
- %place_file = alloca [300 x sbyte]
- %arch_file = alloca [300 x sbyte]
- %route_file = alloca [300 x sbyte]
- %full_stats = alloca uint
- %operation = alloca int
- %verify_binary_search = alloca uint
- %show_graphics = alloca uint
- %annealing_sched = alloca %struct..s_annealing_sched
- %placer_opts = alloca %struct..s_placer_opts
- %router_opts = alloca %struct..s_router_opts
- %det_routing_arch = alloca %struct..s_det_routing_arch
- %segment_inf = alloca %struct..s_segment_inf*
- %timing_inf = alloca { uint, float, float, float, float, float, float, float, float, float, float }
- %tmp.101 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 4
- %tmp.105 = getelementptr [300 x sbyte]* %net_file, long 0, long 0
- %tmp.106 = getelementptr [300 x sbyte]* %arch_file, long 0, long 0
- %tmp.107 = getelementptr [300 x sbyte]* %place_file, long 0, long 0
- %tmp.108 = getelementptr [300 x sbyte]* %route_file, long 0, long 0
- %tmp.109 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 0
- %tmp.112 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 0
- %tmp.114 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 6
- %tmp.118 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 7
- %tmp.135 = load int* %operation
- %tmp.137 = load int* %tmp.112
- %tmp.138 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 1
- %tmp.139 = load float* %tmp.138
- %tmp.140 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 2
- %tmp.141 = load int* %tmp.140
- %tmp.142 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 3
- %tmp.143 = load uint* %tmp.142
- %tmp.145 = load sbyte** %tmp.101
- %tmp.146 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 5
- %tmp.147 = load uint* %tmp.146
- %tmp.149 = load int* %tmp.114
- %tmp.154 = load uint* %full_stats
- %tmp.155 = load uint* %verify_binary_search
- %tmp.156 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, uint 0
- %tmp.157 = load uint* %tmp.156
- %tmp.158 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, uint 1
- %tmp.159 = load float* %tmp.158
- %tmp.160 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, uint 2
- %tmp.161 = load float* %tmp.160
- %tmp.162 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, uint 3
- %tmp.163 = load float* %tmp.162
- %tmp.164 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, uint 4
- %tmp.165 = load float* %tmp.164
- %tmp.166 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 0
- %tmp.167 = load float* %tmp.166
- %tmp.168 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 1
- %tmp.169 = load float* %tmp.168
- %tmp.170 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 2
- %tmp.171 = load float* %tmp.170
- %tmp.172 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 3
- %tmp.173 = load float* %tmp.172
- %tmp.174 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 4
- %tmp.175 = load float* %tmp.174
- %tmp.176 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 5
- %tmp.177 = load int* %tmp.176
- %tmp.178 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 6
- %tmp.179 = load int* %tmp.178
- %tmp.181 = load uint* %tmp.118
- %tmp.182 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 8
- %tmp.183 = load int* %tmp.182
- %tmp.184 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, uint 0
- %tmp.185 = load uint* %tmp.184
- %tmp.186 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, uint 1
- %tmp.187 = load float* %tmp.186
- %tmp.188 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, uint 2
- %tmp.189 = load float* %tmp.188
- %tmp.190 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, uint 3
- %tmp.191 = load float* %tmp.190
- %tmp.192 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, uint 4
- %tmp.193 = load uint* %tmp.192
- %tmp.194 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, uint 5
- %tmp.195 = load int* %tmp.194
- %tmp.196 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, uint 6
- %tmp.197 = load short* %tmp.196
- %tmp.198 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, uint 7
- %tmp.199 = load short* %tmp.198
- %tmp.200 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, uint 8
- %tmp.201 = load short* %tmp.200
- %tmp.202 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, uint 9
- %tmp.203 = load float* %tmp.202
- %tmp.204 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, uint 10
- %tmp.205 = load float* %tmp.204
- %tmp.206 = load %struct..s_segment_inf** %segment_inf
- %tmp.208 = load uint* %tmp.109
- %tmp.209 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 1
- %tmp.210 = load float* %tmp.209
- %tmp.211 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 2
- %tmp.212 = load float* %tmp.211
- %tmp.213 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 3
- %tmp.214 = load float* %tmp.213
- %tmp.215 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 4
- %tmp.216 = load float* %tmp.215
- %tmp.217 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 5
- %tmp.218 = load float* %tmp.217
- %tmp.219 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 6
- %tmp.220 = load float* %tmp.219
- %tmp.221 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 7
- %tmp.222 = load float* %tmp.221
- %tmp.223 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 8
- %tmp.224 = load float* %tmp.223
- %tmp.225 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 9
- %tmp.226 = load float* %tmp.225
- %tmp.227 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 10
- %tmp.228 = load float* %tmp.227
- call void %place_and_route( int %tmp.135, int %tmp.137, float %tmp.139, int %tmp.141, uint %tmp.143, sbyte* %tmp.145, uint %tmp.147, int %tmp.149, sbyte* %tmp.107, sbyte* %tmp.105, sbyte* %tmp.106, sbyte* %tmp.108, uint %tmp.154, uint %tmp.155, uint %tmp.157, float %tmp.159, float %tmp.161, float %tmp.163, float %tmp.165, float %tmp.167, float %tmp.169, float %tmp.171, float %tmp.173, float %tmp.175, int %tmp.177, int %tmp.179, uint %tmp.181, int %tmp.183, uint %tmp.185, float %tmp.187, float %tmp.189, float %tmp.191, uint %tmp.193, int %tmp.195, short %tmp.197, short %tmp.199, short %tmp.201, float %tmp.203, float %tmp.205, %struct..s_segment_inf* %tmp.206, uint %tmp.208, float %tmp.210, float %tmp.212, float %tmp.214, float %tmp.216, float %tmp.218, float %tmp.220, float %tmp.222, float %tmp.224, float %tmp.226, float %tmp.228 )
- %tmp.231 = load uint* %show_graphics
- %tmp.232 = setne uint %tmp.231, 0
- br bool %tmp.232, label %then.2, label %endif.2
+define i32 @main(i32 %argc.1, i8** %argv.1) {
+entry:
+ %net_file = alloca [300 x i8] ; <[300 x i8]*> [#uses=1]
+ %place_file = alloca [300 x i8] ; <[300 x i8]*> [#uses=1]
+ %arch_file = alloca [300 x i8] ; <[300 x i8]*> [#uses=1]
+ %route_file = alloca [300 x i8] ; <[300 x i8]*> [#uses=1]
+ %full_stats = alloca i32 ; <i32*> [#uses=1]
+ %operation = alloca i32 ; <i32*> [#uses=1]
+ %verify_binary_search = alloca i32 ; <i32*> [#uses=1]
+ %show_graphics = alloca i32 ; <i32*> [#uses=1]
+ %annealing_sched = alloca %struct..s_annealing_sched ; <%struct..s_annealing_sched*> [#uses=5]
+ %placer_opts = alloca %struct..s_placer_opts ; <%struct..s_placer_opts*> [#uses=7]
+ %router_opts = alloca %struct..s_router_opts ; <%struct..s_router_opts*> [#uses=9]
+ %det_routing_arch = alloca %struct..s_det_routing_arch ; <%struct..s_det_routing_arch*> [#uses=11]
+ %segment_inf = alloca %struct..s_segment_inf* ; <%struct..s_segment_inf**> [#uses=1]
+ %timing_inf = alloca { i32, float, float, float, float, float, float, float, float, float, float } ; <{ i32, float, float, float, float, float, float, float, float, float, float }*> [#uses=11]
+ %tmp.101 = getelementptr %struct..s_placer_opts* %placer_opts, i64 0, i32 4 ; <i8**> [#uses=1]
+ %tmp.105 = getelementptr [300 x i8]* %net_file, i64 0, i64 0 ; <i8*> [#uses=1]
+ %tmp.106 = getelementptr [300 x i8]* %arch_file, i64 0, i64 0 ; <i8*> [#uses=1]
+ %tmp.107 = getelementptr [300 x i8]* %place_file, i64 0, i64 0 ; <i8*> [#uses=1]
+ %tmp.108 = getelementptr [300 x i8]* %route_file, i64 0, i64 0 ; <i8*> [#uses=1]
+ %tmp.109 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 0 ; <i32*> [#uses=1]
+ %tmp.112 = getelementptr %struct..s_placer_opts* %placer_opts, i64 0, i32 0 ; <i32*> [#uses=1]
+ %tmp.114 = getelementptr %struct..s_placer_opts* %placer_opts, i64 0, i32 6 ; <i32*> [#uses=1]
+ %tmp.118 = getelementptr %struct..s_router_opts* %router_opts, i64 0, i32 7 ; <i32*> [#uses=1]
+ %tmp.135 = load i32* %operation ; <i32> [#uses=1]
+ %tmp.137 = load i32* %tmp.112 ; <i32> [#uses=1]
+ %tmp.138 = getelementptr %struct..s_placer_opts* %placer_opts, i64 0, i32 1 ; <float*> [#uses=1]
+ %tmp.139 = load float* %tmp.138 ; <float> [#uses=1]
+ %tmp.140 = getelementptr %struct..s_placer_opts* %placer_opts, i64 0, i32 2 ; <i32*> [#uses=1]
+ %tmp.141 = load i32* %tmp.140 ; <i32> [#uses=1]
+ %tmp.142 = getelementptr %struct..s_placer_opts* %placer_opts, i64 0, i32 3 ; <i32*> [#uses=1]
+ %tmp.143 = load i32* %tmp.142 ; <i32> [#uses=1]
+ %tmp.145 = load i8** %tmp.101 ; <i8*> [#uses=1]
+ %tmp.146 = getelementptr %struct..s_placer_opts* %placer_opts, i64 0, i32 5 ; <i32*> [#uses=1]
+ %tmp.147 = load i32* %tmp.146 ; <i32> [#uses=1]
+ %tmp.149 = load i32* %tmp.114 ; <i32> [#uses=1]
+ %tmp.154 = load i32* %full_stats ; <i32> [#uses=1]
+ %tmp.155 = load i32* %verify_binary_search ; <i32> [#uses=1]
+ %tmp.156 = getelementptr %struct..s_annealing_sched* %annealing_sched, i64 0, i32 0 ; <i32*> [#uses=1]
+ %tmp.157 = load i32* %tmp.156 ; <i32> [#uses=1]
+ %tmp.158 = getelementptr %struct..s_annealing_sched* %annealing_sched, i64 0, i32 1 ; <float*> [#uses=1]
+ %tmp.159 = load float* %tmp.158 ; <float> [#uses=1]
+ %tmp.160 = getelementptr %struct..s_annealing_sched* %annealing_sched, i64 0, i32 2 ; <float*> [#uses=1]
+ %tmp.161 = load float* %tmp.160 ; <float> [#uses=1]
+ %tmp.162 = getelementptr %struct..s_annealing_sched* %annealing_sched, i64 0, i32 3 ; <float*> [#uses=1]
+ %tmp.163 = load float* %tmp.162 ; <float> [#uses=1]
+ %tmp.164 = getelementptr %struct..s_annealing_sched* %annealing_sched, i64 0, i32 4 ; <float*> [#uses=1]
+ %tmp.165 = load float* %tmp.164 ; <float> [#uses=1]
+ %tmp.166 = getelementptr %struct..s_router_opts* %router_opts, i64 0, i32 0 ; <float*> [#uses=1]
+ %tmp.167 = load float* %tmp.166 ; <float> [#uses=1]
+ %tmp.168 = getelementptr %struct..s_router_opts* %router_opts, i64 0, i32 1 ; <float*> [#uses=1]
+ %tmp.169 = load float* %tmp.168 ; <float> [#uses=1]
+ %tmp.170 = getelementptr %struct..s_router_opts* %router_opts, i64 0, i32 2 ; <float*> [#uses=1]
+ %tmp.171 = load float* %tmp.170 ; <float> [#uses=1]
+ %tmp.172 = getelementptr %struct..s_router_opts* %router_opts, i64 0, i32 3 ; <float*> [#uses=1]
+ %tmp.173 = load float* %tmp.172 ; <float> [#uses=1]
+ %tmp.174 = getelementptr %struct..s_router_opts* %router_opts, i64 0, i32 4 ; <float*> [#uses=1]
+ %tmp.175 = load float* %tmp.174 ; <float> [#uses=1]
+ %tmp.176 = getelementptr %struct..s_router_opts* %router_opts, i64 0, i32 5 ; <i32*> [#uses=1]
+ %tmp.177 = load i32* %tmp.176 ; <i32> [#uses=1]
+ %tmp.178 = getelementptr %struct..s_router_opts* %router_opts, i64 0, i32 6 ; <i32*> [#uses=1]
+ %tmp.179 = load i32* %tmp.178 ; <i32> [#uses=1]
+ %tmp.181 = load i32* %tmp.118 ; <i32> [#uses=1]
+ %tmp.182 = getelementptr %struct..s_router_opts* %router_opts, i64 0, i32 8 ; <i32*> [#uses=1]
+ %tmp.183 = load i32* %tmp.182 ; <i32> [#uses=1]
+ %tmp.184 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 0 ; <i32*> [#uses=1]
+ %tmp.185 = load i32* %tmp.184 ; <i32> [#uses=1]
+ %tmp.186 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 1 ; <float*> [#uses=1]
+ %tmp.187 = load float* %tmp.186 ; <float> [#uses=1]
+ %tmp.188 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 2 ; <float*> [#uses=1]
+ %tmp.189 = load float* %tmp.188 ; <float> [#uses=1]
+ %tmp.190 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 3 ; <float*> [#uses=1]
+ %tmp.191 = load float* %tmp.190 ; <float> [#uses=1]
+ %tmp.192 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 4 ; <i32*> [#uses=1]
+ %tmp.193 = load i32* %tmp.192 ; <i32> [#uses=1]
+ %tmp.194 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 5 ; <i32*> [#uses=1]
+ %tmp.195 = load i32* %tmp.194 ; <i32> [#uses=1]
+ %tmp.196 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 6 ; <i16*> [#uses=1]
+ %tmp.197 = load i16* %tmp.196 ; <i16> [#uses=1]
+ %tmp.198 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 7 ; <i16*> [#uses=1]
+ %tmp.199 = load i16* %tmp.198 ; <i16> [#uses=1]
+ %tmp.200 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 8 ; <i16*> [#uses=1]
+ %tmp.201 = load i16* %tmp.200 ; <i16> [#uses=1]
+ %tmp.202 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 9 ; <float*> [#uses=1]
+ %tmp.203 = load float* %tmp.202 ; <float> [#uses=1]
+ %tmp.204 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 10 ; <float*> [#uses=1]
+ %tmp.205 = load float* %tmp.204 ; <float> [#uses=1]
+ %tmp.206 = load %struct..s_segment_inf** %segment_inf ; <%struct..s_segment_inf*> [#uses=1]
+ %tmp.208 = load i32* %tmp.109 ; <i32> [#uses=1]
+ %tmp.209 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 1 ; <float*> [#uses=1]
+ %tmp.210 = load float* %tmp.209 ; <float> [#uses=1]
+ %tmp.211 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 2 ; <float*> [#uses=1]
+ %tmp.212 = load float* %tmp.211 ; <float> [#uses=1]
+ %tmp.213 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 3 ; <float*> [#uses=1]
+ %tmp.214 = load float* %tmp.213 ; <float> [#uses=1]
+ %tmp.215 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 4 ; <float*> [#uses=1]
+ %tmp.216 = load float* %tmp.215 ; <float> [#uses=1]
+ %tmp.217 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 5 ; <float*> [#uses=1]
+ %tmp.218 = load float* %tmp.217 ; <float> [#uses=1]
+ %tmp.219 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 6 ; <float*> [#uses=1]
+ %tmp.220 = load float* %tmp.219 ; <float> [#uses=1]
+ %tmp.221 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 7 ; <float*> [#uses=1]
+ %tmp.222 = load float* %tmp.221 ; <float> [#uses=1]
+ %tmp.223 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 8 ; <float*> [#uses=1]
+ %tmp.224 = load float* %tmp.223 ; <float> [#uses=1]
+ %tmp.225 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 9 ; <float*> [#uses=1]
+ %tmp.226 = load float* %tmp.225 ; <float> [#uses=1]
+ %tmp.227 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 10 ; <float*> [#uses=1]
+ %tmp.228 = load float* %tmp.227 ; <float> [#uses=1]
+ call void @place_and_route( i32 %tmp.135, i32 %tmp.137, float %tmp.139, i32 %tmp.141, i32 %tmp.143, i8* %tmp.145, i32 %tmp.147, i32 %tmp.149, i8* %tmp.107, i8* %tmp.105, i8* %tmp.106, i8* %tmp.108, i32 %tmp.154, i32 %tmp.155, i32 %tmp.157, float %tmp.159, float %tmp.161, float %tmp.163, float %tmp.165, float %tmp.167, float %tmp.169, float %tmp.171, float %tmp.173, float %tmp.175, i32 %tmp.177, i32 %tmp.179, i32 %tmp.181, i32 %tmp.183, i32 %tmp.185, float %tmp.187, float %tmp.189, float %tmp.191, i32 %tmp.193, i32 %tmp.195, i16 %tmp.197, i16 %tmp.199, i16 %tmp.201, float %tmp.203, float %tmp.205, %struct..s_segment_inf* %tmp.206, i32 %tmp.208, float %tmp.210, float %tmp.212, float %tmp.214, float %tmp.216, float %tmp.218, float %tmp.220, float %tmp.222, float %tmp.224, float %tmp.226, float %tmp.228 )
+ %tmp.231 = load i32* %show_graphics ; <i32> [#uses=1]
+ %tmp.232 = icmp ne i32 %tmp.231, 0 ; <i1> [#uses=1]
+ br i1 %tmp.232, label %then.2, label %endif.2
-then.2:
+then.2: ; preds = %entry
br label %endif.2
-endif.2:
- ret int 0
+endif.2: ; preds = %then.2, %entry
+ ret i32 0
}
-declare int %printf(sbyte*, ...)
+declare i32 @printf(i8*, ...)
-declare void %place_and_route(int, int, float, int, uint, sbyte*, uint, int, sbyte*, sbyte*, sbyte*, sbyte*, uint, uint, uint, float, float, float, float, float, float, float, float, float, int, int, uint, int, uint, float, float, float, uint, int, short, short, short, float, float, %struct..s_segment_inf*, uint, float, float, float, float, float, float, float, float, float, float)
+declare void @place_and_route(i32, i32, float, i32, i32, i8*, i32, i32, i8*, i8*, i8*, i8*, i32, i32, i32, float, float, float, float, float, float, float, float, float, i32, i32, i32, i32, i32, float, float, float, i32, i32, i16, i16, i16, float, float, %struct..s_segment_inf*, i32, float, float, float, float, float, float, float, float, float, float)
diff --git a/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll b/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll
index 61d802c..41c90bd 100644
--- a/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll
+++ b/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
;; Date: May 28, 2003.
;; From: test/Programs/External/SPEC/CINT2000/254.gap.llvm.bc
@@ -16,35 +16,24 @@
;; The next instruction contributes a leading non-zero so another
;; zero should not be added before it!
;;
+ %FileType = type { i32, [256 x i8], i32, i32, i32, i32 }
+@OutputFiles = external global [16 x %FileType] ; <[16 x %FileType]*> [#uses=1]
+@Output = internal global %FileType* null ; <%FileType**> [#uses=1]
-
-%FileType = type { int, [256 x sbyte], int, int, int, int }
-%OutputFiles = uninitialized global [16 x %FileType]
-%Output = internal global %FileType* null
-
-
-implementation; Functions:
-
-internal int %OpenOutput(sbyte* %filename.1) {
+define internal i32 @OpenOutput(i8* %filename.1) {
entry:
- %tmp.0 = load %FileType** %Output
- %tmp.4 = getelementptr %FileType* %tmp.0, long 1
-
- ;;------ Original instruction in 254.gap.llvm.bc:
- ;; %tmp.10 = seteq { int, [256 x sbyte], int, int, int, int }* %tmp.4, getelementptr ([16 x { int, [256 x sbyte], int, int, int, int }]* getelementptr ([16 x { int, [256 x sbyte], int, int, int, int }]* %OutputFiles, long 1), long 0, long 0)
-
- ;;------ Code sequence produced by preselection phase for above instr:
- ;; This code sequence is folded incorrectly by llc during selection
- ;; causing an assertion about a dynamic casting error.
- %addrOfGlobal = getelementptr [16 x %FileType]* %OutputFiles, long 0
- %constantGEP = getelementptr [16 x %FileType]* %addrOfGlobal, long 1
- %constantGEP = getelementptr [16 x %FileType]* %constantGEP, long 0, long 0
- %tmp.10 = seteq %FileType* %tmp.4, %constantGEP
- br bool %tmp.10, label %return, label %endif.0
-
-endif.0:
- ret int 0
-
-return:
- ret int 1
+ %tmp.0 = load %FileType** @Output ; <%FileType*> [#uses=1]
+ %tmp.4 = getelementptr %FileType* %tmp.0, i64 1 ; <%FileType*> [#uses=1]
+ %addrOfGlobal = getelementptr [16 x %FileType]* @OutputFiles, i64 0 ; <[16 x %FileType]*> [#uses=1]
+ %constantGEP = getelementptr [16 x %FileType]* %addrOfGlobal, i64 1 ; <[16 x %FileType]*> [#uses=1]
+ %constantGEP.upgrd.1 = getelementptr [16 x %FileType]* %constantGEP, i64 0, i64 0 ; <%FileType*> [#uses=1]
+ %tmp.10 = icmp eq %FileType* %tmp.4, %constantGEP.upgrd.1 ; <i1> [#uses=1]
+ br i1 %tmp.10, label %return, label %endif.0
+
+endif.0: ; preds = %entry
+ ret i32 0
+
+return: ; preds = %entry
+ ret i32 1
}
+
diff --git a/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll b/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll
index e9cac7f..43bff82 100644
--- a/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll
+++ b/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
;; Date: May 28, 2003.
;; From: test/Programs/SingleSource/richards_benchmark.c
@@ -9,26 +9,25 @@
;; causes llc to produces an invalid register <NULL VALUE>
;; for the phi arguments.
- %struct..packet = type { %struct..packet*, int, int, int, [4 x sbyte] }
- %struct..task = type { %struct..task*, int, int, %struct..packet*, int, %struct..task* (%struct..packet*)*, int, int }
-%v1 = external global int
-%v2 = external global int
+ %struct..packet = type { %struct..packet*, i32, i32, i32, [4 x i8] }
+ %struct..task = type { %struct..task*, i32, i32, %struct..packet*, i32, %struct..task* (%struct..packet*)*, i32, i32 }
+@v1 = external global i32 ; <i32*> [#uses=1]
+@v2 = external global i32 ; <i32*> [#uses=1]
-implementation ; Functions:
+define %struct..task* @handlerfn(%struct..packet* %pkt.2) {
+entry:
+ %tmp.1 = icmp ne %struct..packet* %pkt.2, null ; <i1> [#uses=1]
+ br i1 %tmp.1, label %cond_false, label %cond_continue
-%struct..task* %handlerfn(%struct..packet* %pkt.2) {
-entry: ; No predecessors!
- %tmp.1 = setne %struct..packet* %pkt.2, null
- br bool %tmp.1, label %cond_false, label %cond_continue
+cond_false: ; preds = %entry
+ br label %cond_continue
-cond_false: ; preds = %entry
- br label %cond_continue
-
-cond_continue: ; preds = %entry, %cond_false
- %mem_tmp.0 = phi int* [ %v2, %cond_false ], [ %v1, %entry ]
- %tmp.12 = cast int* %mem_tmp.0 to %struct..packet*
- call void %append( %struct..packet* %pkt.2, %struct..packet* %tmp.12 )
- ret %struct..task* null
+cond_continue: ; preds = %cond_false, %entry
+ %mem_tmp.0 = phi i32* [ @v2, %cond_false ], [ @v1, %entry ] ; <i32*> [#uses=1]
+ %tmp.12 = bitcast i32* %mem_tmp.0 to %struct..packet* ; <%struct..packet*> [#uses=1]
+ call void @append( %struct..packet* %pkt.2, %struct..packet* %tmp.12 )
+ ret %struct..task* null
}
-declare void %append(%struct..packet*, %struct..packet*)
+declare void @append(%struct..packet*, %struct..packet*)
+
diff --git a/test/CodeGen/Generic/2003-07-06-BadIntCmp.ll b/test/CodeGen/Generic/2003-07-06-BadIntCmp.ll
index a741ebc..d66ea18 100644
--- a/test/CodeGen/Generic/2003-07-06-BadIntCmp.ll
+++ b/test/CodeGen/Generic/2003-07-06-BadIntCmp.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
;; Date: May 28, 2003.
;; From: test/Programs/MultiSource/Olden-perimeter/maketree.c
@@ -12,41 +12,40 @@
;; is wrong because the value being compared (int euclid = x*x + y*y)
;; overflows, so that the 64-bit and 32-bit compares are not equal.
-%.str_1 = internal constant [6 x sbyte] c"true\0A\00"
-%.str_2 = internal constant [7 x sbyte] c"false\0A\00"
+@.str_1 = internal constant [6 x i8] c"true\0A\00" ; <[6 x i8]*> [#uses=1]
+@.str_2 = internal constant [7 x i8] c"false\0A\00" ; <[7 x i8]*> [#uses=1]
-implementation ; Functions:
+declare i32 @printf(i8*, ...)
-declare int %printf(sbyte*, ...)
-
-internal void %__main() {
-entry: ; No predecessors!
- ret void
+define internal void @__main() {
+entry:
+ ret void
}
-internal void %CheckOutside(int %x.1, int %y.1) {
-entry: ; No predecessors!
- %tmp.2 = mul int %x.1, %x.1 ; <int> [#uses=1]
- %tmp.5 = mul int %y.1, %y.1 ; <int> [#uses=1]
- %tmp.6 = add int %tmp.2, %tmp.5 ; <int> [#uses=1]
- %tmp.8 = setle int %tmp.6, 4194304 ; <bool> [#uses=1]
- br bool %tmp.8, label %then, label %else
+define internal void @CheckOutside(i32 %x.1, i32 %y.1) {
+entry:
+ %tmp.2 = mul i32 %x.1, %x.1 ; <i32> [#uses=1]
+ %tmp.5 = mul i32 %y.1, %y.1 ; <i32> [#uses=1]
+ %tmp.6 = add i32 %tmp.2, %tmp.5 ; <i32> [#uses=1]
+ %tmp.8 = icmp sle i32 %tmp.6, 4194304 ; <i1> [#uses=1]
+ br i1 %tmp.8, label %then, label %else
-then: ; preds = %entry
- %tmp.11 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([6 x sbyte]* %.str_1, long 0, long 0) ) ; <int> [#uses=0]
- br label %UnifiedExitNode
+then: ; preds = %entry
+ %tmp.11 = call i32 (i8*, ...)* @printf( i8* getelementptr ([6 x i8]* @.str_1, i64 0, i64 0) ) ; <i32> [#uses=0]
+ br label %UnifiedExitNode
-else: ; preds = %entry
- %tmp.13 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([7 x sbyte]* %.str_2, long 0, long 0) ) ; <int> [#uses=0]
- br label %UnifiedExitNode
+else: ; preds = %entry
+ %tmp.13 = call i32 (i8*, ...)* @printf( i8* getelementptr ([7 x i8]* @.str_2, i64 0, i64 0) ) ; <i32> [#uses=0]
+ br label %UnifiedExitNode
-UnifiedExitNode: ; preds = %then, %else
- ret void
+UnifiedExitNode: ; preds = %else, %then
+ ret void
}
-int %main() {
-entry: ; No predecessors!
- call void %__main( )
- call void %CheckOutside( int 2097152, int 2097152 )
- ret int 0
+define i32 @main() {
+entry:
+ call void @__main( )
+ call void @CheckOutside( i32 2097152, i32 2097152 )
+ ret i32 0
}
+
diff --git a/test/CodeGen/Generic/2003-07-07-BadLongConst.ll b/test/CodeGen/Generic/2003-07-07-BadLongConst.ll
index 376ef19..80738d5 100644
--- a/test/CodeGen/Generic/2003-07-07-BadLongConst.ll
+++ b/test/CodeGen/Generic/2003-07-07-BadLongConst.ll
@@ -1,22 +1,20 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
+@.str_1 = internal constant [42 x i8] c" ui = %u (0x%x)\09\09UL-ui = %lld (0x%llx)\0A\00" ; <[42 x i8]*> [#uses=1]
-%.str_1 = internal constant [42 x sbyte] c" ui = %u (0x%x)\09\09UL-ui = %lld (0x%llx)\0A\00"
+declare i32 @printf(i8*, ...)
-implementation ; Functions:
-
-declare int %printf(sbyte*, ...)
-
-internal ulong %getL() {
-entry: ; No predecessors!
- ret ulong 12659530247033960611
+define internal i64 @getL() {
+entry:
+ ret i64 -5787213826675591005
}
-int %main(int %argc.1, sbyte** %argv.1) {
-entry: ; No predecessors!
- %tmp.11 = call ulong %getL( )
- %tmp.5 = cast ulong %tmp.11 to uint
- %tmp.23 = and ulong %tmp.11, 18446744069414584320
- %tmp.16 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([42 x sbyte]* %.str_1, long 0, long 0), uint %tmp.5, uint %tmp.5, ulong %tmp.23, ulong %tmp.23 )
- ret int 0
+define i32 @main(i32 %argc.1, i8** %argv.1) {
+entry:
+ %tmp.11 = call i64 @getL( ) ; <i64> [#uses=2]
+ %tmp.5 = trunc i64 %tmp.11 to i32 ; <i32> [#uses=2]
+ %tmp.23 = and i64 %tmp.11, -4294967296 ; <i64> [#uses=2]
+ %tmp.16 = call i32 (i8*, ...)* @printf( i8* getelementptr ([42 x i8]* @.str_1, i64 0, i64 0), i32 %tmp.5, i32 %tmp.5, i64 %tmp.23, i64 %tmp.23 ) ; <i32> [#uses=0]
+ ret i32 0
}
+
diff --git a/test/CodeGen/Generic/2003-07-08-BadCastToBool.ll b/test/CodeGen/Generic/2003-07-08-BadCastToBool.ll
index 2fede53..4532b76 100644
--- a/test/CodeGen/Generic/2003-07-08-BadCastToBool.ll
+++ b/test/CodeGen/Generic/2003-07-08-BadCastToBool.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
;; Date: Jul 8, 2003.
;; From: test/Programs/MultiSource/Olden-perimeter
@@ -11,26 +11,24 @@
;; for bitwise operations but not booleans! For booleans,
;; the result has to be compared with 0.
-%.str_1 = internal constant [30 x sbyte] c"d = %d, ct = %d, d ^ ct = %d\0A\00"
+@.str_1 = internal constant [30 x i8] c"d = %d, ct = %d, d ^ ct = %d\0A\00"
+declare i32 @printf(i8*, ...)
-implementation ; Functions:
-
-declare int %printf(sbyte*, ...)
-
-int %adj(uint %d.1, uint %ct.1) {
+define i32 @adj(i32 %d.1, i32 %ct.1) {
entry:
- %tmp.19 = seteq uint %ct.1, 2
- %tmp.22.not = cast uint %ct.1 to bool
- %tmp.221 = xor bool %tmp.22.not, true
- %tmp.26 = or bool %tmp.19, %tmp.221
- %tmp.27 = cast bool %tmp.26 to int
- ret int %tmp.27
+ %tmp.19 = icmp eq i32 %ct.1, 2 ; <i1> [#uses=1]
+ %tmp.22.not = trunc i32 %ct.1 to i1 ; <i1> [#uses=1]
+ %tmp.221 = xor i1 %tmp.22.not, true ; <i1> [#uses=1]
+ %tmp.26 = or i1 %tmp.19, %tmp.221 ; <i1> [#uses=1]
+ %tmp.27 = zext i1 %tmp.26 to i32 ; <i32> [#uses=1]
+ ret i32 %tmp.27
}
-int %main() {
+define i32 @main() {
entry:
- %result = call int %adj(uint 3, uint 2)
- %tmp.0 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([30 x sbyte]* %.str_1, long 0, long 0), uint 3, uint 2, int %result)
- ret int 0
+ %result = call i32 @adj( i32 3, i32 2 ) ; <i32> [#uses=1]
+ %tmp.0 = call i32 (i8*, ...)* @printf( i8* getelementptr ([30 x i8]* @.str_1, i64 0, i64 0), i32 3, i32 2, i32 %result ) ; <i32> [#uses=0]
+ ret i32 0
}
+
diff --git a/test/CodeGen/Generic/2003-07-29-BadConstSbyte.ll b/test/CodeGen/Generic/2003-07-29-BadConstSbyte.ll
index 09a0431..54880db 100644
--- a/test/CodeGen/Generic/2003-07-29-BadConstSbyte.ll
+++ b/test/CodeGen/Generic/2003-07-29-BadConstSbyte.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
;; Date: Jul 29, 2003.
;; From: test/Programs/MultiSource/Ptrdist-bc
@@ -14,28 +14,27 @@
;; .ascii "\000\001\001\001\001\001\001\001\001\002\003\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\002\004\005\001\001\006\a\001\b\t\n\v\f\r\016\017\020\020\020\020\020\020\020\020\020\020\001\021\022\023\024\001\001\025\025\025\025\025\025\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\026\027\030\031\032\001\033\034\035\036\037 !\"#$%&'()*+,-./$0$1$234\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
;;
+@yy_ec = internal constant [6 x i8] c"\06\07\01\08\01\09" ; <[6 x i8]*> [#uses=1]
+@.str_3 = internal constant [8 x i8] c"[%d] = \00" ; <[8 x i8]*> [#uses=1]
+@.str_4 = internal constant [4 x i8] c"%d\0A\00" ; <[4 x i8]*> [#uses=1]
-%yy_ec = internal constant [6 x sbyte] c"\06\07\01\08\01\09"
+declare i32 @printf(i8*, ...)
-%.str_3 = internal constant [8 x sbyte] c"[%d] = \00"
-%.str_4 = internal constant [4 x sbyte] c"%d\0A\00"
+define i32 @main() {
+entry:
+ br label %loopentry
-implementation
+loopentry: ; preds = %loopentry, %entry
+ %i = phi i64 [ 0, %entry ], [ %inc.i, %loopentry ] ; <i64> [#uses=3]
+ %cptr = getelementptr [6 x i8]* @yy_ec, i64 0, i64 %i ; <i8*> [#uses=1]
+ %c = load i8* %cptr ; <i8> [#uses=1]
+ %ignore = call i32 (i8*, ...)* @printf( i8* getelementptr ([8 x i8]* @.str_3, i64 0, i64 0), i64 %i ) ; <i32> [#uses=0]
+ %ignore2 = call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @.str_4, i64 0, i64 0), i8 %c ) ; <i32> [#uses=0]
+ %inc.i = add i64 %i, 1 ; <i64> [#uses=2]
+ %done = icmp sle i64 %inc.i, 5 ; <i1> [#uses=1]
+ br i1 %done, label %loopentry, label %exit.1
-declare int %printf(sbyte*, ...)
+exit.1: ; preds = %loopentry
+ ret i32 0
+}
-int %main() {
-entry:
- br label %loopentry
-loopentry:
- %i = phi long [0, %entry], [%inc.i, %loopentry]
- %cptr = getelementptr [6 x sbyte]* %yy_ec, long 0, long %i
- %c = load sbyte* %cptr
- %ignore = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([8 x sbyte]* %.str_3, long 0, long 0), long %i)
- %ignore2 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([4 x sbyte]* %.str_4, long 0, long 0), sbyte %c)
- %inc.i = add long %i, 1
- %done = setle long %inc.i, 5
- br bool %done, label %loopentry, label %exit.1
-exit.1:
- ret int 0
-};
diff --git a/test/CodeGen/Generic/2004-02-08-UnwindSupport.llx b/test/CodeGen/Generic/2004-02-08-UnwindSupport.llx
index 6e57fbc..10d4069 100644
--- a/test/CodeGen/Generic/2004-02-08-UnwindSupport.llx
+++ b/test/CodeGen/Generic/2004-02-08-UnwindSupport.llx
@@ -1,13 +1,17 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -enable-correct-eh-support
+; RUN: llvm-as < %s | llc -enable-correct-eh-support
-int %test() {
- unwind
+define i32 @test() {
+ unwind
}
-int %main() {
- %X = invoke int %test() to label %cont except label %EH
-cont:
- ret int 1
-EH:
- ret int 0
+define i32 @main() {
+ %X = invoke i32 @test( )
+ to label %cont unwind label %EH ; <i32> [#uses=0]
+
+cont: ; preds = %0
+ ret i32 1
+
+EH: ; preds = %0
+ ret i32 0
}
+
diff --git a/test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx b/test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx
index 82d33a0..1f58ce1 100644
--- a/test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx
+++ b/test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx
@@ -1,15 +1,13 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
+@global_long_1 = linkonce global i64 7 ; <i64*> [#uses=1]
+@global_long_2 = linkonce global i64 49 ; <i64*> [#uses=1]
-%global_long_1 = linkonce global long 7
-%global_long_2 = linkonce global long 49
-
-implementation ; Functions:
-
-int %main() {
- %l1 = load long* %global_long_1
- %l2 = load long* %global_long_2
- %cond = setle long %l1, %l2
- %cast2 = cast bool %cond to int
- %RV = sub int 1, %cast2
- ret int %RV
+define i32 @main() {
+ %l1 = load i64* @global_long_1 ; <i64> [#uses=1]
+ %l2 = load i64* @global_long_2 ; <i64> [#uses=1]
+ %cond = icmp sle i64 %l1, %l2 ; <i1> [#uses=1]
+ %cast2 = zext i1 %cond to i32 ; <i32> [#uses=1]
+ %RV = sub i32 1, %cast2 ; <i32> [#uses=1]
+ ret i32 %RV
}
+
diff --git a/test/CodeGen/Generic/2005-01-18-SetUO-InfLoop.ll b/test/CodeGen/Generic/2005-01-18-SetUO-InfLoop.ll
index e47aa18..ed8b2a2 100644
--- a/test/CodeGen/Generic/2005-01-18-SetUO-InfLoop.ll
+++ b/test/CodeGen/Generic/2005-01-18-SetUO-InfLoop.ll
@@ -1,19 +1,20 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-void %intersect_pixel() {
+define void @intersect_pixel() {
entry:
- %tmp125 = call bool %llvm.isunordered.f64( double 0.000000e+00, double 0.000000e+00 ) ; <bool> [#uses=1]
- %tmp126 = or bool %tmp125, false ; <bool> [#uses=1]
- %tmp126.not = xor bool %tmp126, true ; <bool> [#uses=1]
- %brmerge1 = or bool %tmp126.not, false ; <bool> [#uses=1]
- br bool %brmerge1, label %bb154, label %cond_false133
+ %tmp125 = fcmp uno double 0.000000e+00, 0.000000e+00 ; <i1> [#uses=1]
+ %tmp126 = or i1 %tmp125, false ; <i1> [#uses=1]
+ %tmp126.not = xor i1 %tmp126, true ; <i1> [#uses=1]
+ %brmerge1 = or i1 %tmp126.not, false ; <i1> [#uses=1]
+ br i1 %brmerge1, label %bb154, label %cond_false133
-cond_false133: ; preds = %entry
- ret void
+cond_false133: ; preds = %entry
+ ret void
-bb154: ; preds = %entry
- %tmp164 = seteq uint 0, 0 ; <bool> [#uses=0]
- ret void
+bb154: ; preds = %entry
+ %tmp164 = icmp eq i32 0, 0 ; <i1> [#uses=0]
+ ret void
}
-declare bool %llvm.isunordered.f64(double, double)
+declare i1 @llvm.isunordered.f64(double, double)
+
diff --git a/test/CodeGen/Generic/2005-04-09-GlobalInPHI.ll b/test/CodeGen/Generic/2005-04-09-GlobalInPHI.ll
index 54f9883..37aaa32 100644
--- a/test/CodeGen/Generic/2005-04-09-GlobalInPHI.ll
+++ b/test/CodeGen/Generic/2005-04-09-GlobalInPHI.ll
@@ -1,21 +1,20 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
- %struct.TypHeader = type { uint, %struct.TypHeader**, [3 x sbyte], ubyte }
-%.str_67 = external global [4 x sbyte] ; <[4 x sbyte]*> [#uses=1]
-%.str_87 = external global [17 x sbyte] ; <[17 x sbyte]*> [#uses=1]
+; RUN: llvm-as < %s | llc
+ %struct.TypHeader = type { i32, %struct.TypHeader**, [3 x i8], i8 }
+@.str_67 = external global [4 x i8] ; <[4 x i8]*> [#uses=1]
+@.str_87 = external global [17 x i8] ; <[17 x i8]*> [#uses=1]
-implementation ; Functions:
-
-void %PrBinop() {
+define void @PrBinop() {
entry:
- br bool false, label %cond_true, label %else.0
+ br i1 false, label %cond_true, label %else.0
-cond_true: ; preds = %entry
- br label %else.0
+cond_true: ; preds = %entry
+ br label %else.0
-else.0:
- %tmp.167.1 = phi int [ cast ([17 x sbyte]* %.str_87 to int), %entry ], [ 0, %cond_true ]
- call void %Pr( sbyte* getelementptr ([4 x sbyte]* %.str_67, int 0, int 0), int 0, int 0 )
- ret void
+else.0: ; preds = %cond_true, %entry
+ %tmp.167.1 = phi i32 [ ptrtoint ([17 x i8]* @.str_87 to i32), %entry ], [ 0, %cond_true ] ; <i32> [#uses=0]
+ call void @Pr( i8* getelementptr ([4 x i8]* @.str_67, i32 0, i32 0), i32 0, i32 0 )
+ ret void
}
-declare void %Pr(sbyte*, int, int)
+declare void @Pr(i8*, i32, i32)
+
diff --git a/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll b/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll
index 3224d1a..ab3a31d 100644
--- a/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll
+++ b/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll
@@ -1,11 +1,11 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
; Test that llvm.memcpy works with a i64 length operand on all targets.
+declare void @llvm.memcpy.i64(i8*, i8*, i64, i32)
-declare void %llvm.memcpy.i64(sbyte*, sbyte*, ulong, uint)
-
-void %l12_l94_bc_divide_endif_2E_3_2E_ce() {
+define void @l12_l94_bc_divide_endif_2E_3_2E_ce() {
newFuncRoot:
- tail call void %llvm.memcpy.i64( sbyte* null, sbyte* null, ulong 0, uint 1 )
- unreachable
+ tail call void @llvm.memcpy.i64( i8* null, i8* null, i64 0, i32 1 )
+ unreachable
}
+
diff --git a/test/CodeGen/Generic/2005-10-18-ZeroSizeStackObject.ll b/test/CodeGen/Generic/2005-10-18-ZeroSizeStackObject.ll
index e7cce1f..b2bea1c 100644
--- a/test/CodeGen/Generic/2005-10-18-ZeroSizeStackObject.ll
+++ b/test/CodeGen/Generic/2005-10-18-ZeroSizeStackObject.ll
@@ -1,6 +1,6 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-void %test() {
- %X = alloca {}
- ret void
+define void @test() {
+ %X = alloca { } ; <{ }*> [#uses=0]
+ ret void
}
diff --git a/test/CodeGen/Generic/2005-10-21-longlonggtu.ll b/test/CodeGen/Generic/2005-10-21-longlonggtu.ll
index d445e59..b355b02 100644
--- a/test/CodeGen/Generic/2005-10-21-longlonggtu.ll
+++ b/test/CodeGen/Generic/2005-10-21-longlonggtu.ll
@@ -1,12 +1,16 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
-float %t(long %u_arg) {
- %u = cast long %u_arg to ulong ; <ulong> [#uses=1]
- %tmp5 = add ulong %u, 9007199254740991 ; <ulong> [#uses=1]
- %tmp = setgt ulong %tmp5, 18014398509481982 ; <bool> [#uses=1]
- br bool %tmp, label %T, label %F
-T:
- ret float 1.0
-F:
- call float %t(long 0)
- ret float 0.0
+; RUN: llvm-as < %s | llc
+
+define float @t(i64 %u_arg) {
+ %u = bitcast i64 %u_arg to i64 ; <i64> [#uses=1]
+ %tmp5 = add i64 %u, 9007199254740991 ; <i64> [#uses=1]
+ %tmp = icmp ugt i64 %tmp5, 18014398509481982 ; <i1> [#uses=1]
+ br i1 %tmp, label %T, label %F
+
+T: ; preds = %0
+ ret float 1.000000e+00
+
+F: ; preds = %0
+ call float @t( i64 0 ) ; <float>:1 [#uses=0]
+ ret float 0.000000e+00
}
+
diff --git a/test/CodeGen/Generic/2005-12-01-Crash.ll b/test/CodeGen/Generic/2005-12-01-Crash.ll
index a9d8deb..ee72ee1 100644
--- a/test/CodeGen/Generic/2005-12-01-Crash.ll
+++ b/test/CodeGen/Generic/2005-12-01-Crash.ll
@@ -1,23 +1,20 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
+@str = external global [36 x i8] ; <[36 x i8]*> [#uses=0]
+@str.upgrd.1 = external global [29 x i8] ; <[29 x i8]*> [#uses=0]
+@str1 = external global [29 x i8] ; <[29 x i8]*> [#uses=0]
+@str2 = external global [29 x i8] ; <[29 x i8]*> [#uses=1]
+@str.upgrd.2 = external global [2 x i8] ; <[2 x i8]*> [#uses=0]
+@str3 = external global [2 x i8] ; <[2 x i8]*> [#uses=0]
+@str4 = external global [2 x i8] ; <[2 x i8]*> [#uses=0]
+@str5 = external global [2 x i8] ; <[2 x i8]*> [#uses=0]
-%str = external global [36 x sbyte] ; <[36 x sbyte]*> [#uses=0]
-%str = external global [29 x sbyte] ; <[29 x sbyte]*> [#uses=0]
-%str1 = external global [29 x sbyte] ; <[29 x sbyte]*> [#uses=0]
-%str2 = external global [29 x sbyte] ; <[29 x sbyte]*> [#uses=1]
-%str = external global [2 x sbyte] ; <[2 x sbyte]*> [#uses=0]
-%str3 = external global [2 x sbyte] ; <[2 x sbyte]*> [#uses=0]
-%str4 = external global [2 x sbyte] ; <[2 x sbyte]*> [#uses=0]
-%str5 = external global [2 x sbyte] ; <[2 x sbyte]*> [#uses=0]
-
-implementation ; Functions:
-
-void %printArgsNoRet(int %a1, float %a2, sbyte %a3, double %a4, sbyte* %a5, int %a6, float %a7, sbyte %a8, double %a9, sbyte* %a10, int %a11, float %a12, sbyte %a13, double %a14, sbyte* %a15) {
+define void @printArgsNoRet(i32 %a1, float %a2, i8 %a3, double %a4, i8* %a5, i32 %a6, float %a7, i8 %a8, double %a9, i8* %a10, i32 %a11, float %a12, i8 %a13, double %a14, i8* %a15) {
entry:
- %tmp17 = cast sbyte %a13 to int ; <int> [#uses=1]
- %tmp23 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([29 x sbyte]* %str2, int 0, uint 0), int %a11, double 0.000000e+00, int %tmp17, double %a14, int 0 ) ; <int> [#uses=0]
+ %tmp17 = sext i8 %a13 to i32 ; <i32> [#uses=1]
+ %tmp23 = call i32 (i8*, ...)* @printf( i8* getelementptr ([29 x i8]* @str2, i32 0, i64 0), i32 %a11, double 0.000000e+00, i32 %tmp17, double %a14, i32 0 ) ; <i32> [#uses=0]
ret void
}
-declare int %printf(sbyte*, ...)
+declare i32 @printf(i8*, ...)
-declare int %main(int, sbyte**)
+declare i32 @main(i32, i8**)
diff --git a/test/CodeGen/Generic/2005-12-12-ExpandSextInreg.ll b/test/CodeGen/Generic/2005-12-12-ExpandSextInreg.ll
index ef1359e..bd2e043 100644
--- a/test/CodeGen/Generic/2005-12-12-ExpandSextInreg.ll
+++ b/test/CodeGen/Generic/2005-12-12-ExpandSextInreg.ll
@@ -1,7 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-long %test(long %A) {
- %B = cast long %A to sbyte
- %C = cast sbyte %B to long
- ret long %C
+define i64 @test(i64 %A) {
+ %B = trunc i64 %A to i8 ; <i8> [#uses=1]
+ %C = sext i8 %B to i64 ; <i64> [#uses=1]
+ ret i64 %C
}
diff --git a/test/CodeGen/Generic/2006-01-12-BadSetCCFold.ll b/test/CodeGen/Generic/2006-01-12-BadSetCCFold.ll
index 876e9f2..1a555b3 100644
--- a/test/CodeGen/Generic/2006-01-12-BadSetCCFold.ll
+++ b/test/CodeGen/Generic/2006-01-12-BadSetCCFold.ll
@@ -1,33 +1,31 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
+; ModuleID = '2006-01-12-BadSetCCFold.ll'
+ %struct.node_t = type { double*, %struct.node_t*, %struct.node_t**, double**, double*, i32, i32 }
- %struct.node_t = type { double*, %struct.node_t*, %struct.node_t**, double**, double*, int, int }
-
-implementation ; Functions:
-
-void %main() {
+define void @main() {
entry:
- br bool false, label %then.2.i, label %endif.2.i
+ br i1 false, label %then.2.i, label %endif.2.i
then.2.i: ; preds = %entry
br label %dealwithargs.exit
endif.2.i: ; preds = %entry
- br bool false, label %then.3.i, label %dealwithargs.exit
+ br i1 false, label %then.3.i, label %dealwithargs.exit
then.3.i: ; preds = %endif.2.i
br label %dealwithargs.exit
dealwithargs.exit: ; preds = %then.3.i, %endif.2.i, %then.2.i
- %n_nodes.4 = phi int [ 64, %then.3.i ], [ 64, %then.2.i ], [ 64, %endif.2.i ] ; <int> [#uses=1]
- %tmp.14.i1134.i.i = setgt int %n_nodes.4, 1 ; <bool> [#uses=2]
- br bool %tmp.14.i1134.i.i, label %no_exit.i12.i.i, label %fill_table.exit22.i.i
+ %n_nodes.4 = phi i32 [ 64, %then.3.i ], [ 64, %then.2.i ], [ 64, %endif.2.i ] ; <i32> [#uses=1]
+ %tmp.14.i1134.i.i = icmp sgt i32 %n_nodes.4, 1 ; <i1> [#uses=2]
+ br i1 %tmp.14.i1134.i.i, label %no_exit.i12.i.i, label %fill_table.exit22.i.i
no_exit.i12.i.i: ; preds = %no_exit.i12.i.i, %dealwithargs.exit
- br bool false, label %fill_table.exit22.i.i, label %no_exit.i12.i.i
+ br i1 false, label %fill_table.exit22.i.i, label %no_exit.i12.i.i
fill_table.exit22.i.i: ; preds = %no_exit.i12.i.i, %dealwithargs.exit
%cur_node.0.i8.1.i.i = phi %struct.node_t* [ undef, %dealwithargs.exit ], [ null, %no_exit.i12.i.i ] ; <%struct.node_t*> [#uses=0]
- br bool %tmp.14.i1134.i.i, label %no_exit.i.preheader.i.i, label %make_tables.exit.i
+ br i1 %tmp.14.i1134.i.i, label %no_exit.i.preheader.i.i, label %make_tables.exit.i
no_exit.i.preheader.i.i: ; preds = %fill_table.exit22.i.i
ret void
diff --git a/test/CodeGen/Generic/2006-01-18-InvalidBranchOpcodeAssert.ll b/test/CodeGen/Generic/2006-01-18-InvalidBranchOpcodeAssert.ll
index 73fd658..b1e08c7 100644
--- a/test/CodeGen/Generic/2006-01-18-InvalidBranchOpcodeAssert.ll
+++ b/test/CodeGen/Generic/2006-01-18-InvalidBranchOpcodeAssert.ll
@@ -1,16 +1,15 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
; This crashed the PPC backend.
-void %test() {
- %tmp125 = call bool %llvm.isunordered.f64( double 0.000000e+00, double 0.000000e+00 ) ; <bool> [#uses=1]
- br bool %tmp125, label %bb154, label %cond_false133
+define void @test() {
+ %tmp125 = fcmp uno double 0.000000e+00, 0.000000e+00 ; <i1> [#uses=1]
+ br i1 %tmp125, label %bb154, label %cond_false133
-cond_false133: ; preds = %entry
- ret void
+cond_false133: ; preds = %0
+ ret void
-bb154: ; preds = %entry
- %tmp164 = seteq uint 0, 0 ; <bool> [#uses=0]
- ret void
+bb154: ; preds = %0
+ %tmp164 = icmp eq i32 0, 0 ; <i1> [#uses=0]
+ ret void
}
-declare bool %llvm.isunordered.f64(double, double)
diff --git a/test/CodeGen/Generic/2006-02-12-InsertLibcall.ll b/test/CodeGen/Generic/2006-02-12-InsertLibcall.ll
index d18ce14..bacf8b5 100644
--- a/test/CodeGen/Generic/2006-02-12-InsertLibcall.ll
+++ b/test/CodeGen/Generic/2006-02-12-InsertLibcall.ll
@@ -1,54 +1,54 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
-%G = external global int
+; RUN: llvm-as < %s | llc
+@G = external global i32 ; <i32*> [#uses=1]
-void %encode_one_frame(long %tmp.2i) {
+define void @encode_one_frame(i64 %tmp.2i) {
entry:
- %tmp.9 = seteq int 0, 0 ; <bool> [#uses=1]
- br bool %tmp.9, label %endif.0, label %shortcirc_next.0
+ %tmp.9 = icmp eq i32 0, 0 ; <i1> [#uses=1]
+ br i1 %tmp.9, label %endif.0, label %shortcirc_next.0
then.5.i: ; preds = %shortcirc_next.i
- %tmp.114.i = div long %tmp.2i, 3 ; <long> [#uses=1]
- %tmp.111.i = call long %lseek( int 0, long %tmp.114.i, int 1 ) ; <long> [#uses=0]
+ %tmp.114.i = sdiv i64 %tmp.2i, 3 ; <i64> [#uses=1]
+ %tmp.111.i = call i64 @lseek( i32 0, i64 %tmp.114.i, i32 1 ) ; <i64> [#uses=0]
ret void
shortcirc_next.0: ; preds = %entry
ret void
endif.0: ; preds = %entry
- %tmp.324.i = seteq int 0, 0 ; <bool> [#uses=2]
- %tmp.362.i = setlt int 0, 0 ; <bool> [#uses=1]
- br bool %tmp.324.i, label %else.4.i, label %then.11.i37
+ %tmp.324.i = icmp eq i32 0, 0 ; <i1> [#uses=2]
+ %tmp.362.i = icmp slt i32 0, 0 ; <i1> [#uses=1]
+ br i1 %tmp.324.i, label %else.4.i, label %then.11.i37
then.11.i37: ; preds = %endif.0
ret void
else.4.i: ; preds = %endif.0
- br bool %tmp.362.i, label %else.5.i, label %then.12.i
+ br i1 %tmp.362.i, label %else.5.i, label %then.12.i
then.12.i: ; preds = %else.4.i
ret void
else.5.i: ; preds = %else.4.i
- br bool %tmp.324.i, label %then.0.i40, label %then.17.i
+ br i1 %tmp.324.i, label %then.0.i40, label %then.17.i
then.17.i: ; preds = %else.5.i
ret void
then.0.i40: ; preds = %else.5.i
- %tmp.8.i42 = seteq int 0, 0 ; <bool> [#uses=1]
- br bool %tmp.8.i42, label %else.1.i56, label %then.1.i52
+ %tmp.8.i42 = icmp eq i32 0, 0 ; <i1> [#uses=1]
+ br i1 %tmp.8.i42, label %else.1.i56, label %then.1.i52
then.1.i52: ; preds = %then.0.i40
ret void
else.1.i56: ; preds = %then.0.i40
- %tmp.28.i = load int* %G
- %tmp.29.i = seteq int %tmp.28.i, 1 ; <bool> [#uses=1]
- br bool %tmp.29.i, label %shortcirc_next.i, label %shortcirc_done.i
+ %tmp.28.i = load i32* @G ; <i32> [#uses=1]
+ %tmp.29.i = icmp eq i32 %tmp.28.i, 1 ; <i1> [#uses=1]
+ br i1 %tmp.29.i, label %shortcirc_next.i, label %shortcirc_done.i
shortcirc_next.i: ; preds = %else.1.i56
- %tmp.34.i = seteq int 0, 3 ; <bool> [#uses=1]
- br bool %tmp.34.i, label %then.5.i, label %endif.5.i
+ %tmp.34.i = icmp eq i32 0, 3 ; <i1> [#uses=1]
+ br i1 %tmp.34.i, label %then.5.i, label %endif.5.i
shortcirc_done.i: ; preds = %else.1.i56
ret void
@@ -57,4 +57,4 @@ endif.5.i: ; preds = %shortcirc_next.i
ret void
}
-declare long %lseek(int, long, int)
+declare i64 @lseek(i32, i64, i32)
diff --git a/test/CodeGen/Generic/2006-03-01-dagcombineinfloop.ll b/test/CodeGen/Generic/2006-03-01-dagcombineinfloop.ll
index 797af74..9607ebe 100644
--- a/test/CodeGen/Generic/2006-03-01-dagcombineinfloop.ll
+++ b/test/CodeGen/Generic/2006-03-01-dagcombineinfloop.ll
@@ -1,98 +1,95 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
-; Infinite loop in the dag combiner, reduced from 176.gcc.
-
- %struct._obstack_chunk = type { sbyte*, %struct._obstack_chunk*, [4 x sbyte] }
- %struct.anon = type { int }
+; RUN: llvm-as < %s | llc
+; Infinite loop in the dag combiner, reduced from 176.gcc.
+%struct._obstack_chunk = type { i8*, %struct._obstack_chunk*, [4 x i8] }
+ %struct.anon = type { i32 }
%struct.lang_decl = type opaque
- %struct.lang_type = type { int, [1 x %struct.tree_node*] }
- %struct.obstack = type { int, %struct._obstack_chunk*, sbyte*, sbyte*, sbyte*, int, int, %struct._obstack_chunk* (...)*, void (...)*, sbyte*, ubyte }
- %struct.rtx_def = type { ushort, ubyte, ubyte, [1 x %struct.anon] }
- %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, ubyte, ubyte, ubyte, ubyte }
- %struct.tree_decl = type { [12 x sbyte], sbyte*, int, %struct.tree_node*, uint, ubyte, ubyte, ubyte, ubyte, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, %struct.anon, { %struct.rtx_def* }, %struct.tree_node*, %struct.lang_decl* }
- %struct.tree_list = type { [12 x sbyte], %struct.tree_node*, %struct.tree_node* }
+ %struct.lang_type = type { i32, [1 x %struct.tree_node*] }
+ %struct.obstack = type { i32, %struct._obstack_chunk*, i8*, i8*, i8*, i32, i32, %struct._obstack_chunk* (...)*, void (...)*, i8*, i8 }
+ %struct.rtx_def = type { i16, i8, i8, [1 x %struct.anon] }
+ %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, i8, i8, i8, i8 }
+ %struct.tree_decl = type { [12 x i8], i8*, i32, %struct.tree_node*, i32, i8, i8, i8, i8, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, %struct.anon, { %struct.rtx_def* }, %struct.tree_node*, %struct.lang_decl* }
+ %struct.tree_list = type { [12 x i8], %struct.tree_node*, %struct.tree_node* }
%struct.tree_node = type { %struct.tree_decl }
- %struct.tree_type = type { [12 x sbyte], %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, uint, ubyte, ubyte, ubyte, ubyte, uint, %struct.tree_node*, %struct.tree_node*, %struct.anon, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.obstack*, %struct.lang_type* }
-%void_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
-%char_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
-%short_integer_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
-%short_unsigned_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
-%float_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
-%signed_char_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
-%unsigned_char_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
-
-implementation ; Functions:
+ %struct.tree_type = type { [12 x i8], %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i32, i8, i8, i8, i8, i32, %struct.tree_node*, %struct.tree_node*, %struct.anon, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.obstack*, %struct.lang_type* }
+@void_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
+@char_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
+@short_integer_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
+@short_unsigned_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
+@float_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
+@signed_char_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
+@unsigned_char_type_node = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=1]
-fastcc int %self_promoting_args_p(%struct.tree_node* %parms) {
+define fastcc i32 @self_promoting_args_p(%struct.tree_node* %parms) {
entry:
- %tmp915 = seteq %struct.tree_node* %parms, null ; <bool> [#uses=1]
- br bool %tmp915, label %return, label %cond_true92.preheader
+ %tmp915 = icmp eq %struct.tree_node* %parms, null ; <i1> [#uses=1]
+ br i1 %tmp915, label %return, label %cond_true92.preheader
cond_true: ; preds = %cond_true92
- %tmp9.not = setne %struct.tree_node* %tmp2, %tmp7 ; <bool> [#uses=1]
- %tmp14 = seteq %struct.tree_node* %tmp2, null ; <bool> [#uses=1]
- %bothcond = or bool %tmp9.not, %tmp14 ; <bool> [#uses=1]
- br bool %bothcond, label %return, label %cond_next18
+ %tmp9.not = icmp ne %struct.tree_node* %tmp2, %tmp7 ; <i1> [#uses=1]
+ %tmp14 = icmp eq %struct.tree_node* %tmp2, null ; <i1> [#uses=1]
+ %bothcond = or i1 %tmp9.not, %tmp14 ; <i1> [#uses=1]
+ br i1 %bothcond, label %return, label %cond_next18
cond_next12: ; preds = %cond_true92
- %tmp14.old = seteq %struct.tree_node* %tmp2, null ; <bool> [#uses=1]
- br bool %tmp14.old, label %return, label %cond_next18
+ %tmp14.old = icmp eq %struct.tree_node* %tmp2, null ; <i1> [#uses=1]
+ br i1 %tmp14.old, label %return, label %cond_next18
cond_next18: ; preds = %cond_next12, %cond_true
- %tmp20 = cast %struct.tree_node* %tmp2 to %struct.tree_type* ; <%struct.tree_type*> [#uses=1]
- %tmp21 = getelementptr %struct.tree_type* %tmp20, int 0, uint 17 ; <%struct.tree_node**> [#uses=1]
+ %tmp20 = bitcast %struct.tree_node* %tmp2 to %struct.tree_type* ; <%struct.tree_type*> [#uses=1]
+ %tmp21 = getelementptr %struct.tree_type* %tmp20, i32 0, i32 17 ; <%struct.tree_node**> [#uses=1]
%tmp22 = load %struct.tree_node** %tmp21 ; <%struct.tree_node*> [#uses=6]
- %tmp24 = seteq %struct.tree_node* %tmp22, %tmp23 ; <bool> [#uses=1]
- br bool %tmp24, label %return, label %cond_next28
+ %tmp24 = icmp eq %struct.tree_node* %tmp22, %tmp23 ; <i1> [#uses=1]
+ br i1 %tmp24, label %return, label %cond_next28
cond_next28: ; preds = %cond_next18
- %tmp30 = cast %struct.tree_node* %tmp2 to %struct.tree_common* ; <%struct.tree_common*> [#uses=1]
- %tmp = getelementptr %struct.tree_common* %tmp30, int 0, uint 2 ; <ubyte*> [#uses=1]
- %tmp = cast ubyte* %tmp to uint* ; <uint*> [#uses=1]
- %tmp = load uint* %tmp ; <uint> [#uses=1]
- %tmp32 = cast uint %tmp to ubyte ; <ubyte> [#uses=1]
- %tmp33 = seteq ubyte %tmp32, 7 ; <bool> [#uses=1]
- br bool %tmp33, label %cond_true34, label %cond_next84
+ %tmp30 = bitcast %struct.tree_node* %tmp2 to %struct.tree_common* ; <%struct.tree_common*> [#uses=1]
+ %tmp = getelementptr %struct.tree_common* %tmp30, i32 0, i32 2 ; <i8*> [#uses=1]
+ %tmp.upgrd.1 = bitcast i8* %tmp to i32* ; <i32*> [#uses=1]
+ %tmp.upgrd.2 = load i32* %tmp.upgrd.1 ; <i32> [#uses=1]
+ %tmp32 = trunc i32 %tmp.upgrd.2 to i8 ; <i8> [#uses=1]
+ %tmp33 = icmp eq i8 %tmp32, 7 ; <i1> [#uses=1]
+ br i1 %tmp33, label %cond_true34, label %cond_next84
cond_true34: ; preds = %cond_next28
- %tmp40 = seteq %struct.tree_node* %tmp22, %tmp39 ; <bool> [#uses=1]
- %tmp49 = seteq %struct.tree_node* %tmp22, %tmp48 ; <bool> [#uses=1]
- %bothcond6 = or bool %tmp40, %tmp49 ; <bool> [#uses=1]
- %tmp58 = seteq %struct.tree_node* %tmp22, %tmp57 ; <bool> [#uses=1]
- %bothcond7 = or bool %bothcond6, %tmp58 ; <bool> [#uses=1]
- %tmp67 = seteq %struct.tree_node* %tmp22, %tmp66 ; <bool> [#uses=1]
- %bothcond8 = or bool %bothcond7, %tmp67 ; <bool> [#uses=1]
- %tmp76 = seteq %struct.tree_node* %tmp22, %tmp75 ; <bool> [#uses=1]
- %bothcond9 = or bool %bothcond8, %tmp76 ; <bool> [#uses=2]
- %brmerge = or bool %bothcond9, %tmp ; <bool> [#uses=1]
- %bothcond9 = cast bool %bothcond9 to int ; <int> [#uses=1]
- %.mux = xor int %bothcond9, 1 ; <int> [#uses=1]
- br bool %brmerge, label %return, label %cond_true92
+ %tmp40 = icmp eq %struct.tree_node* %tmp22, %tmp39 ; <i1> [#uses=1]
+ %tmp49 = icmp eq %struct.tree_node* %tmp22, %tmp48 ; <i1> [#uses=1]
+ %bothcond6 = or i1 %tmp40, %tmp49 ; <i1> [#uses=1]
+ %tmp58 = icmp eq %struct.tree_node* %tmp22, %tmp57 ; <i1> [#uses=1]
+ %bothcond7 = or i1 %bothcond6, %tmp58 ; <i1> [#uses=1]
+ %tmp67 = icmp eq %struct.tree_node* %tmp22, %tmp66 ; <i1> [#uses=1]
+ %bothcond8 = or i1 %bothcond7, %tmp67 ; <i1> [#uses=1]
+ %tmp76 = icmp eq %struct.tree_node* %tmp22, %tmp75 ; <i1> [#uses=1]
+ %bothcond9 = or i1 %bothcond8, %tmp76 ; <i1> [#uses=2]
+ %brmerge = or i1 %bothcond9, %tmp.upgrd.6 ; <i1> [#uses=1]
+ %bothcond9.upgrd.3 = zext i1 %bothcond9 to i32 ; <i32> [#uses=1]
+ %.mux = xor i32 %bothcond9.upgrd.3, 1 ; <i32> [#uses=1]
+ br i1 %brmerge, label %return, label %cond_true92
cond_next84: ; preds = %cond_next28
- br bool %tmp, label %return, label %cond_true92
+ br i1 %tmp.upgrd.6, label %return, label %cond_true92
cond_true92.preheader: ; preds = %entry
- %tmp7 = load %struct.tree_node** %void_type_node ; <%struct.tree_node*> [#uses=1]
- %tmp23 = load %struct.tree_node** %float_type_node ; <%struct.tree_node*> [#uses=1]
- %tmp39 = load %struct.tree_node** %char_type_node ; <%struct.tree_node*> [#uses=1]
- %tmp48 = load %struct.tree_node** %signed_char_type_node ; <%struct.tree_node*> [#uses=1]
- %tmp57 = load %struct.tree_node** %unsigned_char_type_node ; <%struct.tree_node*> [#uses=1]
- %tmp66 = load %struct.tree_node** %short_integer_type_node ; <%struct.tree_node*> [#uses=1]
- %tmp75 = load %struct.tree_node** %short_unsigned_type_node ; <%struct.tree_node*> [#uses=1]
+ %tmp7 = load %struct.tree_node** @void_type_node ; <%struct.tree_node*> [#uses=1]
+ %tmp23 = load %struct.tree_node** @float_type_node ; <%struct.tree_node*> [#uses=1]
+ %tmp39 = load %struct.tree_node** @char_type_node ; <%struct.tree_node*> [#uses=1]
+ %tmp48 = load %struct.tree_node** @signed_char_type_node ; <%struct.tree_node*> [#uses=1]
+ %tmp57 = load %struct.tree_node** @unsigned_char_type_node ; <%struct.tree_node*> [#uses=1]
+ %tmp66 = load %struct.tree_node** @short_integer_type_node ; <%struct.tree_node*> [#uses=1]
+ %tmp75 = load %struct.tree_node** @short_unsigned_type_node ; <%struct.tree_node*> [#uses=1]
br label %cond_true92
cond_true92: ; preds = %cond_true92.preheader, %cond_next84, %cond_true34
%t.0.0 = phi %struct.tree_node* [ %parms, %cond_true92.preheader ], [ %tmp6, %cond_true34 ], [ %tmp6, %cond_next84 ] ; <%struct.tree_node*> [#uses=2]
- %tmp = cast %struct.tree_node* %t.0.0 to %struct.tree_list* ; <%struct.tree_list*> [#uses=1]
- %tmp = getelementptr %struct.tree_list* %tmp, int 0, uint 2 ; <%struct.tree_node**> [#uses=1]
- %tmp2 = load %struct.tree_node** %tmp ; <%struct.tree_node*> [#uses=5]
- %tmp4 = cast %struct.tree_node* %t.0.0 to %struct.tree_common* ; <%struct.tree_common*> [#uses=1]
- %tmp5 = getelementptr %struct.tree_common* %tmp4, int 0, uint 0 ; <%struct.tree_node**> [#uses=1]
+ %tmp.upgrd.4 = bitcast %struct.tree_node* %t.0.0 to %struct.tree_list* ; <%struct.tree_list*> [#uses=1]
+ %tmp.upgrd.5 = getelementptr %struct.tree_list* %tmp.upgrd.4, i32 0, i32 2 ; <%struct.tree_node**> [#uses=1]
+ %tmp2 = load %struct.tree_node** %tmp.upgrd.5 ; <%struct.tree_node*> [#uses=5]
+ %tmp4 = bitcast %struct.tree_node* %t.0.0 to %struct.tree_common* ; <%struct.tree_common*> [#uses=1]
+ %tmp5 = getelementptr %struct.tree_common* %tmp4, i32 0, i32 0 ; <%struct.tree_node**> [#uses=1]
%tmp6 = load %struct.tree_node** %tmp5 ; <%struct.tree_node*> [#uses=3]
- %tmp = seteq %struct.tree_node* %tmp6, null ; <bool> [#uses=3]
- br bool %tmp, label %cond_true, label %cond_next12
+ %tmp.upgrd.6 = icmp eq %struct.tree_node* %tmp6, null ; <i1> [#uses=3]
+ br i1 %tmp.upgrd.6, label %cond_true, label %cond_next12
return: ; preds = %cond_next84, %cond_true34, %cond_next18, %cond_next12, %cond_true, %entry
- %retval.0 = phi int [ 1, %entry ], [ 1, %cond_next84 ], [ %.mux, %cond_true34 ], [ 0, %cond_next18 ], [ 0, %cond_next12 ], [ 0, %cond_true ] ; <int> [#uses=1]
- ret int %retval.0
+ %retval.0 = phi i32 [ 1, %entry ], [ 1, %cond_next84 ], [ %.mux, %cond_true34 ], [ 0, %cond_next18 ], [ 0, %cond_next12 ], [ 0, %cond_true ] ; <i32> [#uses=1]
+ ret i32 %retval.0
}
diff --git a/test/CodeGen/Generic/2006-03-27-DebugInfoNULLDeclare.ll b/test/CodeGen/Generic/2006-03-27-DebugInfoNULLDeclare.ll
index 4e262f8..2f2fb8b 100644
--- a/test/CodeGen/Generic/2006-03-27-DebugInfoNULLDeclare.ll
+++ b/test/CodeGen/Generic/2006-03-27-DebugInfoNULLDeclare.ll
@@ -1,10 +1,9 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-implementation ; Functions:
+declare void @llvm.dbg.declare({ }*, { }*)
-declare void %llvm.dbg.declare({ }*, { }*)
-
-void %foo() {
- call void %llvm.dbg.declare( { }* null, { }* null )
- ret void
+define void @foo() {
+ call void @llvm.dbg.declare( { }* null, { }* null )
+ ret void
}
+
diff --git a/test/CodeGen/Generic/2006-04-11-vecload.ll b/test/CodeGen/Generic/2006-04-11-vecload.ll
index 056edac..cc96d8f 100644
--- a/test/CodeGen/Generic/2006-04-11-vecload.ll
+++ b/test/CodeGen/Generic/2006-04-11-vecload.ll
@@ -1,11 +1,11 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah
+; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah
; The vload was getting memoized to the previous scalar load!
-void %VertexProgram2() {
+define void @VertexProgram2() {
%xFloat0.688 = load float* null ; <float> [#uses=0]
%loadVector37.712 = load <4 x float>* null ; <<4 x float>> [#uses=1]
- %inFloat3.713 = insertelement <4 x float> %loadVector37.712, float 0.000000e+00, uint 3 ; <<4 x float>> [#uses=1]
+ %inFloat3.713 = insertelement <4 x float> %loadVector37.712, float 0.000000e+00, i32 3 ; <<4 x float>> [#uses=1]
store <4 x float> %inFloat3.713, <4 x float>* null
unreachable
}
diff --git a/test/CodeGen/Generic/2006-04-26-SetCCAnd.ll b/test/CodeGen/Generic/2006-04-26-SetCCAnd.ll
index 2a424be..b99aa98 100644
--- a/test/CodeGen/Generic/2006-04-26-SetCCAnd.ll
+++ b/test/CodeGen/Generic/2006-04-26-SetCCAnd.ll
@@ -1,36 +1,33 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
; PR748
+@G = external global i16 ; <i16*> [#uses=1]
-%G = external global ushort ; <ushort*> [#uses=1]
-
-implementation ; Functions:
-
-void %OmNewObjHdr() {
+define void @OmNewObjHdr() {
entry:
- br bool false, label %endif.4, label %then.0
+ br i1 false, label %endif.4, label %then.0
then.0: ; preds = %entry
ret void
endif.4: ; preds = %entry
- br bool false, label %else.3, label %shortcirc_next.3
+ br i1 false, label %else.3, label %shortcirc_next.3
shortcirc_next.3: ; preds = %endif.4
ret void
else.3: ; preds = %endif.4
- switch int 0, label %endif.10 [
- int 5001, label %then.10
- int -5008, label %then.10
+ switch i32 0, label %endif.10 [
+ i32 5001, label %then.10
+ i32 -5008, label %then.10
]
then.10: ; preds = %else.3, %else.3
- %tmp.112 = load ushort* null ; <ushort> [#uses=2]
- %tmp.113 = load ushort* %G ; <ushort> [#uses=2]
- %tmp.114 = setgt ushort %tmp.112, %tmp.113 ; <bool> [#uses=1]
- %tmp.120 = setlt ushort %tmp.112, %tmp.113 ; <bool> [#uses=1]
- %bothcond = and bool %tmp.114, %tmp.120 ; <bool> [#uses=1]
- br bool %bothcond, label %else.4, label %then.11
+ %tmp.112 = load i16* null ; <i16> [#uses=2]
+ %tmp.113 = load i16* @G ; <i16> [#uses=2]
+ %tmp.114 = icmp ugt i16 %tmp.112, %tmp.113 ; <i1> [#uses=1]
+ %tmp.120 = icmp ult i16 %tmp.112, %tmp.113 ; <i1> [#uses=1]
+ %bothcond = and i1 %tmp.114, %tmp.120 ; <i1> [#uses=1]
+ br i1 %bothcond, label %else.4, label %then.11
then.11: ; preds = %then.10
ret void
diff --git a/test/CodeGen/Generic/2006-04-28-Sign-extend-bool.ll b/test/CodeGen/Generic/2006-04-28-Sign-extend-bool.ll
index 068d680..6b9bf11 100644
--- a/test/CodeGen/Generic/2006-04-28-Sign-extend-bool.ll
+++ b/test/CodeGen/Generic/2006-04-28-Sign-extend-bool.ll
@@ -1,10 +1,9 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-int %test(int %tmp93) {
- %tmp98 = shl int %tmp93, ubyte 31 ; <int> [#uses=1]
- %tmp99 = shr int %tmp98, ubyte 31 ; <int> [#uses=1]
- %tmp99 = cast int %tmp99 to sbyte ; <sbyte> [#uses=1]
- %tmp99100 = cast sbyte %tmp99 to int ; <int> [#uses=1]
- ret int %tmp99100
+define i32 @test(i32 %tmp93) {
+ %tmp98 = shl i32 %tmp93, 31 ; <i32> [#uses=1]
+ %tmp99 = ashr i32 %tmp98, 31 ; <i32> [#uses=1]
+ %tmp99.upgrd.1 = trunc i32 %tmp99 to i8 ; <i8> [#uses=1]
+ %tmp99100 = sext i8 %tmp99.upgrd.1 to i32 ; <i32> [#uses=1]
+ ret i32 %tmp99100
}
-
diff --git a/test/CodeGen/Generic/2006-05-06-GEP-Cast-Sink-Crash.ll b/test/CodeGen/Generic/2006-05-06-GEP-Cast-Sink-Crash.ll
index ac7e19d..59ed295 100644
--- a/test/CodeGen/Generic/2006-05-06-GEP-Cast-Sink-Crash.ll
+++ b/test/CodeGen/Generic/2006-05-06-GEP-Cast-Sink-Crash.ll
@@ -1,33 +1,29 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
+%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
+ %struct.SYMBOL_TABLE_ENTRY = type { [9 x i8], [9 x i8], i32, i32, i32, %struct.SYMBOL_TABLE_ENTRY* }
+ %struct.__sFILEX = type opaque
+ %struct.__sbuf = type { i8*, i32 }
+@str14 = external global [6 x i8] ; <[6 x i8]*> [#uses=0]
- %struct.FILE = type { ubyte*, int, int, short, short, %struct.__sbuf, int, sbyte*, int (sbyte*)*, int (sbyte*, sbyte*, int)*, long (sbyte*, long, int)*, int (sbyte*, sbyte*, int)*, %struct.__sbuf, %struct.__sFILEX*, int, [3 x ubyte], [1 x ubyte], %struct.__sbuf, int, long }
- %struct.SYMBOL_TABLE_ENTRY = type { [9 x sbyte], [9 x sbyte], int, int, uint, %struct.SYMBOL_TABLE_ENTRY* }
- %struct.__sFILEX = type opaque
- %struct.__sbuf = type { ubyte*, int }
-%str14 = external global [6 x sbyte] ; <[6 x sbyte]*> [#uses=0]
+declare void @fprintf(i32, ...)
-implementation ; Functions:
-
-declare void %fprintf(int, ...)
-
-void %OUTPUT_TABLE(%struct.SYMBOL_TABLE_ENTRY* %SYM_TAB) {
+define void @OUTPUT_TABLE(%struct.SYMBOL_TABLE_ENTRY* %SYM_TAB) {
entry:
- %tmp11 = getelementptr %struct.SYMBOL_TABLE_ENTRY* %SYM_TAB, int 0, uint 1, int 0 ; <sbyte*> [#uses=2]
- %tmp.i = cast sbyte* %tmp11 to ubyte* ; <ubyte*> [#uses=1]
- br label %bb.i
+ %tmp11 = getelementptr %struct.SYMBOL_TABLE_ENTRY* %SYM_TAB, i32 0, i32 1, i32 0 ; <i8*> [#uses=2]
+ %tmp.i = bitcast i8* %tmp11 to i8* ; <i8*> [#uses=1]
+ br label %bb.i
-bb.i: ; preds = %cond_next.i, %entry
- %s1.0.i = phi ubyte* [ %tmp.i, %entry ], [ null, %cond_next.i ] ; <ubyte*> [#uses=0]
- br bool false, label %cond_true.i31, label %cond_next.i
+bb.i: ; preds = %cond_next.i, %entry
+ %s1.0.i = phi i8* [ %tmp.i, %entry ], [ null, %cond_next.i ] ; <i8*> [#uses=0]
+ br i1 false, label %cond_true.i31, label %cond_next.i
-cond_true.i31: ; preds = %bb.i
- call void (int, ...)* %fprintf( int 0, sbyte* %tmp11, sbyte* null )
- ret void
+cond_true.i31: ; preds = %bb.i
+ call void (i32, ...)* @fprintf( i32 0, i8* %tmp11, i8* null )
+ ret void
-cond_next.i: ; preds = %bb.i
- br bool false, label %bb.i, label %bb19.i
+cond_next.i: ; preds = %bb.i
+ br i1 false, label %bb.i, label %bb19.i
-bb19.i: ; preds = %cond_next.i
- ret void
+bb19.i: ; preds = %cond_next.i
+ ret void
}
-
diff --git a/test/CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll b/test/CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll
index 0cf2e93..47ee7c5 100644
--- a/test/CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll
+++ b/test/CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll
@@ -1,10 +1,10 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -fast
+; RUN: llvm-as < %s | llc -fast
-float %test(uint %tmp12771278) {
- switch uint %tmp12771278, label %bb1279 [
+define float @test(i32 %tmp12771278) {
+ switch i32 %tmp12771278, label %bb1279 [
]
-bb1279: ; preds = %cond_next1272
- ret float 1.0
+bb1279: ; preds = %0
+ ret float 1.000000e+00
}
diff --git a/test/CodeGen/Generic/2006-06-13-ComputeMaskedBitsCrash.ll b/test/CodeGen/Generic/2006-06-13-ComputeMaskedBitsCrash.ll
index a910b58..920cf3c 100644
--- a/test/CodeGen/Generic/2006-06-13-ComputeMaskedBitsCrash.ll
+++ b/test/CodeGen/Generic/2006-06-13-ComputeMaskedBitsCrash.ll
@@ -1,35 +1,33 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -fast
+; RUN: llvm-as < %s | llc -fast
+
+%struct.cl_perfunc_opts = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32 }
+@cl_pf_opts = external global %struct.cl_perfunc_opts ; <%struct.cl_perfunc_opts*> [#uses=2]
- %struct.cl_perfunc_opts = type { ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, int, int, int, int, int, int, int }
-%cl_pf_opts = external global %struct.cl_perfunc_opts ; <%struct.cl_perfunc_opts*> [#uses=2]
-
-implementation ; Functions:
-
-void %set_flags_from_O() {
+define void @set_flags_from_O() {
entry:
- %tmp22 = setgt int 0, 0 ; <bool> [#uses=1]
- br bool %tmp22, label %cond_true23, label %cond_next159
+ %tmp22 = icmp sgt i32 0, 0 ; <i1> [#uses=1]
+ br i1 %tmp22, label %cond_true23, label %cond_next159
cond_true23: ; preds = %entry
- %tmp138 = getelementptr %struct.cl_perfunc_opts* %cl_pf_opts, int 0, uint 8 ; <ubyte*> [#uses=1]
- %tmp138 = cast ubyte* %tmp138 to uint* ; <uint*> [#uses=2]
- %tmp139 = load uint* %tmp138 ; <uint> [#uses=1]
- %tmp140 = shl uint 1, ubyte 27 ; <uint> [#uses=1]
- %tmp141 = and uint %tmp140, 134217728 ; <uint> [#uses=1]
- %tmp142 = and uint %tmp139, 4160749567 ; <uint> [#uses=1]
- %tmp143 = or uint %tmp142, %tmp141 ; <uint> [#uses=1]
- store uint %tmp143, uint* %tmp138
- %tmp144 = getelementptr %struct.cl_perfunc_opts* %cl_pf_opts, int 0, uint 8 ; <ubyte*> [#uses=1]
- %tmp144 = cast ubyte* %tmp144 to uint* ; <uint*> [#uses=1]
- %tmp145 = load uint* %tmp144 ; <uint> [#uses=1]
- %tmp146 = shl uint %tmp145, ubyte 22 ; <uint> [#uses=1]
- %tmp147 = shr uint %tmp146, ubyte 31 ; <uint> [#uses=1]
- %tmp147 = cast uint %tmp147 to ubyte ; <ubyte> [#uses=1]
- %tmp148 = seteq ubyte %tmp147, 0 ; <bool> [#uses=1]
- br bool %tmp148, label %cond_true149, label %cond_next159
+ %tmp138 = getelementptr %struct.cl_perfunc_opts* @cl_pf_opts, i32 0, i32 8 ; <i8*> [#uses=1]
+ %tmp138.upgrd.1 = bitcast i8* %tmp138 to i32* ; <i32*> [#uses=2]
+ %tmp139 = load i32* %tmp138.upgrd.1 ; <i32> [#uses=1]
+ %tmp140 = shl i32 1, 27 ; <i32> [#uses=1]
+ %tmp141 = and i32 %tmp140, 134217728 ; <i32> [#uses=1]
+ %tmp142 = and i32 %tmp139, -134217729 ; <i32> [#uses=1]
+ %tmp143 = or i32 %tmp142, %tmp141 ; <i32> [#uses=1]
+ store i32 %tmp143, i32* %tmp138.upgrd.1
+ %tmp144 = getelementptr %struct.cl_perfunc_opts* @cl_pf_opts, i32 0, i32 8 ; <i8*> [#uses=1]
+ %tmp144.upgrd.2 = bitcast i8* %tmp144 to i32* ; <i32*> [#uses=1]
+ %tmp145 = load i32* %tmp144.upgrd.2 ; <i32> [#uses=1]
+ %tmp146 = shl i32 %tmp145, 22 ; <i32> [#uses=1]
+ %tmp147 = lshr i32 %tmp146, 31 ; <i32> [#uses=1]
+ %tmp147.upgrd.3 = trunc i32 %tmp147 to i8 ; <i8> [#uses=1]
+ %tmp148 = icmp eq i8 %tmp147.upgrd.3, 0 ; <i1> [#uses=1]
+ br i1 %tmp148, label %cond_true149, label %cond_next159
cond_true149: ; preds = %cond_true23
- %tmp150 = cast ubyte* null to uint* ; <uint*> [#uses=0]
+ %tmp150 = bitcast i8* null to i32* ; <i32*> [#uses=0]
ret void
cond_next159: ; preds = %cond_true23, %entry
diff --git a/test/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll b/test/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll
index 1fe13f8..8e8f186 100644
--- a/test/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll
+++ b/test/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll
@@ -1,135 +1,133 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
- %struct.rtunion = type { long }
- %struct.rtx_def = type { ushort, ubyte, ubyte, [1 x %struct.rtunion] }
-%ix86_cpu = external global uint ; <uint*> [#uses=1]
-%which_alternative = external global int ; <int*> [#uses=3]
+; RUN: llvm-as < %s | llc
+%struct.rtunion = type { i64 }
+ %struct.rtx_def = type { i16, i8, i8, [1 x %struct.rtunion] }
+@ix86_cpu = external global i32 ; <i32*> [#uses=1]
+@which_alternative = external global i32 ; <i32*> [#uses=3]
-implementation ; Functions:
+declare fastcc i32 @recog()
-declare fastcc int %recog()
-
-void %athlon_fp_unit_ready_cost() {
+define void @athlon_fp_unit_ready_cost() {
entry:
- %tmp = setlt int 0, 0 ; <bool> [#uses=1]
- br bool %tmp, label %cond_true.i, label %cond_true
+ %tmp = icmp slt i32 0, 0 ; <i1> [#uses=1]
+ br i1 %tmp, label %cond_true.i, label %cond_true
cond_true: ; preds = %entry
ret void
cond_true.i: ; preds = %entry
- %tmp8.i = tail call fastcc int %recog( ) ; <int> [#uses=1]
- switch int %tmp8.i, label %UnifiedReturnBlock [
- int -1, label %bb2063
- int 19, label %bb2035
- int 20, label %bb2035
- int 21, label %bb2035
- int 23, label %bb2035
- int 24, label %bb2035
- int 27, label %bb2035
- int 32, label %bb2035
- int 33, label %bb1994
- int 35, label %bb2035
- int 36, label %bb1994
- int 90, label %bb1948
- int 94, label %bb1948
- int 95, label %bb1948
- int 101, label %bb1648
- int 102, label %bb1648
- int 103, label %bb1648
- int 104, label %bb1648
- int 133, label %bb1419
- int 135, label %bb1238
- int 136, label %bb1238
- int 137, label %bb1238
- int 138, label %bb1238
- int 139, label %bb1201
- int 140, label %bb1201
- int 141, label %bb1154
- int 142, label %bb1126
- int 144, label %bb1201
- int 145, label %bb1126
- int 146, label %bb1201
- int 147, label %bb1126
- int 148, label %bb1201
- int 149, label %bb1126
- int 150, label %bb1201
- int 151, label %bb1126
- int 152, label %bb1096
- int 153, label %bb1096
- int 154, label %bb1096
- int 157, label %bb1096
- int 158, label %bb1096
- int 159, label %bb1096
- int 162, label %bb1096
- int 163, label %bb1096
- int 164, label %bb1096
- int 167, label %bb1201
- int 168, label %bb1201
- int 170, label %bb1201
- int 171, label %bb1201
- int 173, label %bb1201
- int 174, label %bb1201
- int 176, label %bb1201
- int 177, label %bb1201
- int 179, label %bb993
- int 180, label %bb993
- int 181, label %bb993
- int 182, label %bb993
- int 183, label %bb993
- int 184, label %bb993
- int 365, label %bb1126
- int 366, label %bb1126
- int 367, label %bb1126
- int 368, label %bb1126
- int 369, label %bb1126
- int 370, label %bb1126
- int 371, label %bb1126
- int 372, label %bb1126
- int 373, label %bb1126
- int 384, label %bb1126
- int 385, label %bb1126
- int 386, label %bb1126
- int 387, label %bb1126
- int 388, label %bb1126
- int 389, label %bb1126
- int 390, label %bb1126
- int 391, label %bb1126
- int 392, label %bb1126
- int 525, label %bb919
- int 526, label %bb839
- int 528, label %bb919
- int 529, label %bb839
- int 531, label %cond_next6.i119
- int 532, label %cond_next6.i97
- int 533, label %cond_next6.i81
- int 534, label %bb495
- int 536, label %cond_next6.i81
- int 537, label %cond_next6.i81
- int 538, label %bb396
- int 539, label %bb288
- int 541, label %bb396
- int 542, label %bb396
- int 543, label %bb396
- int 544, label %bb396
- int 545, label %bb189
- int 546, label %cond_next6.i
- int 547, label %bb189
- int 548, label %cond_next6.i
- int 549, label %bb189
- int 550, label %cond_next6.i
- int 551, label %bb189
- int 552, label %cond_next6.i
- int 553, label %bb189
- int 554, label %cond_next6.i
- int 555, label %bb189
- int 556, label %cond_next6.i
- int 557, label %bb189
- int 558, label %cond_next6.i
- int 618, label %bb40
- int 619, label %bb18
- int 620, label %bb40
- int 621, label %bb10
- int 622, label %bb10
+ %tmp8.i = tail call fastcc i32 @recog( ) ; <i32> [#uses=1]
+ switch i32 %tmp8.i, label %UnifiedReturnBlock [
+ i32 -1, label %bb2063
+ i32 19, label %bb2035
+ i32 20, label %bb2035
+ i32 21, label %bb2035
+ i32 23, label %bb2035
+ i32 24, label %bb2035
+ i32 27, label %bb2035
+ i32 32, label %bb2035
+ i32 33, label %bb1994
+ i32 35, label %bb2035
+ i32 36, label %bb1994
+ i32 90, label %bb1948
+ i32 94, label %bb1948
+ i32 95, label %bb1948
+ i32 101, label %bb1648
+ i32 102, label %bb1648
+ i32 103, label %bb1648
+ i32 104, label %bb1648
+ i32 133, label %bb1419
+ i32 135, label %bb1238
+ i32 136, label %bb1238
+ i32 137, label %bb1238
+ i32 138, label %bb1238
+ i32 139, label %bb1201
+ i32 140, label %bb1201
+ i32 141, label %bb1154
+ i32 142, label %bb1126
+ i32 144, label %bb1201
+ i32 145, label %bb1126
+ i32 146, label %bb1201
+ i32 147, label %bb1126
+ i32 148, label %bb1201
+ i32 149, label %bb1126
+ i32 150, label %bb1201
+ i32 151, label %bb1126
+ i32 152, label %bb1096
+ i32 153, label %bb1096
+ i32 154, label %bb1096
+ i32 157, label %bb1096
+ i32 158, label %bb1096
+ i32 159, label %bb1096
+ i32 162, label %bb1096
+ i32 163, label %bb1096
+ i32 164, label %bb1096
+ i32 167, label %bb1201
+ i32 168, label %bb1201
+ i32 170, label %bb1201
+ i32 171, label %bb1201
+ i32 173, label %bb1201
+ i32 174, label %bb1201
+ i32 176, label %bb1201
+ i32 177, label %bb1201
+ i32 179, label %bb993
+ i32 180, label %bb993
+ i32 181, label %bb993
+ i32 182, label %bb993
+ i32 183, label %bb993
+ i32 184, label %bb993
+ i32 365, label %bb1126
+ i32 366, label %bb1126
+ i32 367, label %bb1126
+ i32 368, label %bb1126
+ i32 369, label %bb1126
+ i32 370, label %bb1126
+ i32 371, label %bb1126
+ i32 372, label %bb1126
+ i32 373, label %bb1126
+ i32 384, label %bb1126
+ i32 385, label %bb1126
+ i32 386, label %bb1126
+ i32 387, label %bb1126
+ i32 388, label %bb1126
+ i32 389, label %bb1126
+ i32 390, label %bb1126
+ i32 391, label %bb1126
+ i32 392, label %bb1126
+ i32 525, label %bb919
+ i32 526, label %bb839
+ i32 528, label %bb919
+ i32 529, label %bb839
+ i32 531, label %cond_next6.i119
+ i32 532, label %cond_next6.i97
+ i32 533, label %cond_next6.i81
+ i32 534, label %bb495
+ i32 536, label %cond_next6.i81
+ i32 537, label %cond_next6.i81
+ i32 538, label %bb396
+ i32 539, label %bb288
+ i32 541, label %bb396
+ i32 542, label %bb396
+ i32 543, label %bb396
+ i32 544, label %bb396
+ i32 545, label %bb189
+ i32 546, label %cond_next6.i
+ i32 547, label %bb189
+ i32 548, label %cond_next6.i
+ i32 549, label %bb189
+ i32 550, label %cond_next6.i
+ i32 551, label %bb189
+ i32 552, label %cond_next6.i
+ i32 553, label %bb189
+ i32 554, label %cond_next6.i
+ i32 555, label %bb189
+ i32 556, label %cond_next6.i
+ i32 557, label %bb189
+ i32 558, label %cond_next6.i
+ i32 618, label %bb40
+ i32 619, label %bb18
+ i32 620, label %bb40
+ i32 621, label %bb10
+ i32 622, label %bb10
]
bb10: ; preds = %cond_true.i, %cond_true.i
@@ -163,20 +161,20 @@ cond_next6.i97: ; preds = %cond_true.i
ret void
cond_next6.i119: ; preds = %cond_true.i
- %tmp.i126 = seteq ushort 0, 78 ; <bool> [#uses=1]
- br bool %tmp.i126, label %cond_next778, label %bb802
+ %tmp.i126 = icmp eq i16 0, 78 ; <i1> [#uses=1]
+ br i1 %tmp.i126, label %cond_next778, label %bb802
cond_next778: ; preds = %cond_next6.i119
- %tmp781 = seteq uint 0, 1 ; <bool> [#uses=1]
- br bool %tmp781, label %cond_next784, label %bb790
+ %tmp781 = icmp eq i32 0, 1 ; <i1> [#uses=1]
+ br i1 %tmp781, label %cond_next784, label %bb790
cond_next784: ; preds = %cond_next778
- %tmp785 = load uint* %ix86_cpu ; <uint> [#uses=1]
- %tmp786 = seteq uint %tmp785, 5 ; <bool> [#uses=1]
- br bool %tmp786, label %UnifiedReturnBlock, label %bb790
+ %tmp785 = load i32* @ix86_cpu ; <i32> [#uses=1]
+ %tmp786 = icmp eq i32 %tmp785, 5 ; <i1> [#uses=1]
+ br i1 %tmp786, label %UnifiedReturnBlock, label %bb790
bb790: ; preds = %cond_next784, %cond_next778
- %tmp793 = seteq uint 0, 1 ; <bool> [#uses=0]
+ %tmp793 = icmp eq i32 0, 1 ; <i1> [#uses=0]
ret void
bb802: ; preds = %cond_next6.i119
@@ -210,51 +208,51 @@ bb1419: ; preds = %cond_true.i
ret void
bb1648: ; preds = %cond_true.i, %cond_true.i, %cond_true.i, %cond_true.i
- %tmp1650 = load int* %which_alternative ; <int> [#uses=1]
- switch int %tmp1650, label %bb1701 [
- int 0, label %cond_next1675
- int 1, label %cond_next1675
- int 2, label %cond_next1675
+ %tmp1650 = load i32* @which_alternative ; <i32> [#uses=1]
+ switch i32 %tmp1650, label %bb1701 [
+ i32 0, label %cond_next1675
+ i32 1, label %cond_next1675
+ i32 2, label %cond_next1675
]
cond_next1675: ; preds = %bb1648, %bb1648, %bb1648
ret void
bb1701: ; preds = %bb1648
- %tmp1702 = load int* %which_alternative ; <int> [#uses=1]
- switch int %tmp1702, label %bb1808 [
- int 0, label %cond_next1727
- int 1, label %cond_next1727
- int 2, label %cond_next1727
+ %tmp1702 = load i32* @which_alternative ; <i32> [#uses=1]
+ switch i32 %tmp1702, label %bb1808 [
+ i32 0, label %cond_next1727
+ i32 1, label %cond_next1727
+ i32 2, label %cond_next1727
]
cond_next1727: ; preds = %bb1701, %bb1701, %bb1701
ret void
bb1808: ; preds = %bb1701
- %bothcond696 = or bool false, false ; <bool> [#uses=1]
- br bool %bothcond696, label %bb1876, label %cond_next1834
+ %bothcond696 = or i1 false, false ; <i1> [#uses=1]
+ br i1 %bothcond696, label %bb1876, label %cond_next1834
cond_next1834: ; preds = %bb1808
ret void
bb1876: ; preds = %bb1808
- %tmp1877signed = load int* %which_alternative ; <int> [#uses=4]
- %tmp1877 = cast int %tmp1877signed to uint ; <uint> [#uses=1]
- %bothcond699 = setlt uint %tmp1877, 2 ; <bool> [#uses=1]
- %tmp1888 = seteq int %tmp1877signed, 2 ; <bool> [#uses=1]
- %bothcond700 = or bool %bothcond699, %tmp1888 ; <bool> [#uses=1]
- %bothcond700.not = xor bool %bothcond700, true ; <bool> [#uses=1]
- %tmp1894 = seteq int %tmp1877signed, 3 ; <bool> [#uses=1]
- %bothcond701 = or bool %tmp1894, %bothcond700.not ; <bool> [#uses=1]
- %bothcond702 = or bool %bothcond701, false ; <bool> [#uses=1]
- br bool %bothcond702, label %UnifiedReturnBlock, label %cond_next1902
+ %tmp1877signed = load i32* @which_alternative ; <i32> [#uses=4]
+ %tmp1877 = bitcast i32 %tmp1877signed to i32 ; <i32> [#uses=1]
+ %bothcond699 = icmp ult i32 %tmp1877, 2 ; <i1> [#uses=1]
+ %tmp1888 = icmp eq i32 %tmp1877signed, 2 ; <i1> [#uses=1]
+ %bothcond700 = or i1 %bothcond699, %tmp1888 ; <i1> [#uses=1]
+ %bothcond700.not = xor i1 %bothcond700, true ; <i1> [#uses=1]
+ %tmp1894 = icmp eq i32 %tmp1877signed, 3 ; <i1> [#uses=1]
+ %bothcond701 = or i1 %tmp1894, %bothcond700.not ; <i1> [#uses=1]
+ %bothcond702 = or i1 %bothcond701, false ; <i1> [#uses=1]
+ br i1 %bothcond702, label %UnifiedReturnBlock, label %cond_next1902
cond_next1902: ; preds = %bb1876
- switch int %tmp1877signed, label %cond_next1937 [
- int 0, label %bb1918
- int 1, label %bb1918
- int 2, label %bb1918
+ switch i32 %tmp1877signed, label %cond_next1937 [
+ i32 0, label %bb1918
+ i32 1, label %bb1918
+ i32 2, label %bb1918
]
bb1918: ; preds = %cond_next1902, %cond_next1902, %cond_next1902
@@ -276,6 +274,6 @@ bb2063: ; preds = %cond_true.i
ret void
UnifiedReturnBlock: ; preds = %bb1876, %cond_next784, %cond_true.i
- %UnifiedRetVal = phi int [ 100, %bb1876 ], [ 100, %cond_true.i ], [ 4, %cond_next784 ] ; <int> [#uses=0]
+ %UnifiedRetVal = phi i32 [ 100, %bb1876 ], [ 100, %cond_true.i ], [ 4, %cond_next784 ] ; <i32> [#uses=0]
ret void
}
diff --git a/test/CodeGen/Generic/2006-07-03-schedulers.ll b/test/CodeGen/Generic/2006-07-03-schedulers.ll
index 981276b..1e423f8 100644
--- a/test/CodeGen/Generic/2006-07-03-schedulers.ll
+++ b/test/CodeGen/Generic/2006-07-03-schedulers.ll
@@ -1,37 +1,30 @@
-; RUN: llvm-upgrade %s | llvm-as | llc -pre-RA-sched=default
-; RUN: llvm-upgrade %s | llvm-as | llc -pre-RA-sched=list-td
-; RUN: llvm-upgrade %s | llvm-as | llc -pre-RA-sched=list-tdrr
-; RUN: llvm-upgrade %s | llvm-as | llc -pre-RA-sched=list-burr
+; RUN: llvm-as < %s | llc -pre-RA-sched=default
+; RUN: llvm-as < %s | llc -pre-RA-sched=list-td
+; RUN: llvm-as < %s | llc -pre-RA-sched=list-tdrr
+; RUN: llvm-as < %s | llc -pre-RA-sched=list-burr
; PR859
-implementation
-declare int "printf"(sbyte*, int, float)
+declare i32 @printf(i8*, i32, float)
-
-int "testissue"(int %i, float %x, float %y)
-begin
+define i32 @testissue(i32 %i, float %x, float %y) {
br label %bb1
-bb1:
- %x1 = mul float %x, %y ;; x1
- %y1 = mul float %y, 0.75 ;; y1
- %z1 = add float %x1, %y1 ;; z1 = x1 + y1
-
- %x2 = mul float %x, 0.5 ;; x2
- %y2 = mul float %y, 0x3FECCCCCC0000000 ;; y2
- %z2 = add float %x2, %y2 ;; z2 = x2 + y2
-
- %z3 = add float %z1, %z2 ;; z3 = z1 + z2
-
- %i1 = shl int %i, ubyte 3 ;; i1
- %j1 = add int %i, 7 ;; j1
- %m1 = add int %i1, %j1 ;; k1 = i1 + j1
-;; %m1 = div int %k1, 99 ;; m1 = k1 / 99
-
- %b = setle int %m1, 6 ;; (m1 <= 6)?
- br bool %b, label %bb1, label %bb2
-bb2:
- %Msg = cast ulong 0 to sbyte *
- call int %printf(sbyte* %Msg, int %m1, float %z3)
- ret int 0
-end
+bb1: ; preds = %bb1, %0
+ %x1 = mul float %x, %y ; <float> [#uses=1]
+ %y1 = mul float %y, 7.500000e-01 ; <float> [#uses=1]
+ %z1 = add float %x1, %y1 ; <float> [#uses=1]
+ %x2 = mul float %x, 5.000000e-01 ; <float> [#uses=1]
+ %y2 = mul float %y, 0x3FECCCCCC0000000 ; <float> [#uses=1]
+ %z2 = add float %x2, %y2 ; <float> [#uses=1]
+ %z3 = add float %z1, %z2 ; <float> [#uses=1]
+ %i1 = shl i32 %i, 3 ; <i32> [#uses=1]
+ %j1 = add i32 %i, 7 ; <i32> [#uses=1]
+ %m1 = add i32 %i1, %j1 ; <i32> [#uses=2]
+ %b = icmp sle i32 %m1, 6 ; <i1> [#uses=1]
+ br i1 %b, label %bb1, label %bb2
+
+bb2: ; preds = %bb1
+ %Msg = inttoptr i64 0 to i8* ; <i8*> [#uses=1]
+ call i32 @printf( i8* %Msg, i32 %m1, float %z3 ) ; <i32>:1 [#uses=0]
+ ret i32 0
+}
diff --git a/test/CodeGen/Generic/2006-08-30-CoallescerCrash.ll b/test/CodeGen/Generic/2006-08-30-CoallescerCrash.ll
index 68aadc5..7f8af5d 100644
--- a/test/CodeGen/Generic/2006-08-30-CoallescerCrash.ll
+++ b/test/CodeGen/Generic/2006-08-30-CoallescerCrash.ll
@@ -1,115 +1,112 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
-
- %struct.CUMULATIVE_ARGS = type { int, int, int, int, int, int, int, int, int, int, int, int, int, int }
- %struct.VEC_edge = type { uint, uint, [1 x %struct.edge_def*] }
- %struct._obstack_chunk = type { sbyte*, %struct._obstack_chunk*, [4 x sbyte] }
- %struct.basic_block_def = type { %struct.rtx_def*, %struct.rtx_def*, %struct.tree_node*, %struct.VEC_edge*, %struct.VEC_edge*, %struct.bitmap_head_def*, %struct.bitmap_head_def*, sbyte*, %struct.loop*, [2 x %struct.et_node*], %struct.basic_block_def*, %struct.basic_block_def*, %struct.reorder_block_def*, %struct.bb_ann_d*, long, int, int, int, int }
- %struct.bb_ann_d = type { %struct.tree_node*, ubyte, %struct.edge_prediction* }
- %struct.bitmap_element_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, uint, [4 x uint] }
- %struct.bitmap_head_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, uint, %struct.bitmap_obstack* }
+; RUN: llvm-as < %s | llc
+%struct.CUMULATIVE_ARGS = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
+ %struct.VEC_edge = type { i32, i32, [1 x %struct.edge_def*] }
+ %struct._obstack_chunk = type { i8*, %struct._obstack_chunk*, [4 x i8] }
+ %struct.basic_block_def = type { %struct.rtx_def*, %struct.rtx_def*, %struct.tree_node*, %struct.VEC_edge*, %struct.VEC_edge*, %struct.bitmap_head_def*, %struct.bitmap_head_def*, i8*, %struct.loop*, [2 x %struct.et_node*], %struct.basic_block_def*, %struct.basic_block_def*, %struct.reorder_block_def*, %struct.bb_ann_d*, i64, i32, i32, i32, i32 }
+ %struct.bb_ann_d = type { %struct.tree_node*, i8, %struct.edge_prediction* }
+ %struct.bitmap_element_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, [4 x i32] }
+ %struct.bitmap_head_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, %struct.bitmap_obstack* }
%struct.bitmap_obstack = type { %struct.bitmap_element_def*, %struct.bitmap_head_def*, %struct.obstack }
- %struct.cost_pair = type { %struct.iv_cand*, uint, %struct.bitmap_head_def* }
+ %struct.cost_pair = type { %struct.iv_cand*, i32, %struct.bitmap_head_def* }
%struct.dataflow_d = type { %struct.varray_head_tag*, [2 x %struct.tree_node*] }
%struct.def_operand_ptr = type { %struct.tree_node** }
- %struct.def_optype_d = type { uint, [1 x %struct.def_operand_ptr] }
- %struct.edge_def = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.edge_def_insns, sbyte*, %struct.location_t*, int, int, long, uint }
+ %struct.def_optype_d = type { i32, [1 x %struct.def_operand_ptr] }
+ %struct.edge_def = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.edge_def_insns, i8*, %struct.location_t*, i32, i32, i64, i32 }
%struct.edge_def_insns = type { %struct.rtx_def* }
- %struct.edge_prediction = type { %struct.edge_prediction*, %struct.edge_def*, uint, int }
+ %struct.edge_prediction = type { %struct.edge_prediction*, %struct.edge_def*, i32, i32 }
%struct.eh_status = type opaque
- %struct.emit_status = type { int, int, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, int, %struct.location_t, int, ubyte*, %struct.rtx_def** }
+ %struct.emit_status = type { i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, i32, %struct.location_t, i32, i8*, %struct.rtx_def** }
%struct.et_node = type opaque
- %struct.expr_status = type { int, int, int, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def* }
- %struct.function = type { %struct.eh_status*, %struct.expr_status*, %struct.emit_status*, %struct.varasm_status*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.function*, int, int, int, int, %struct.rtx_def*, %struct.CUMULATIVE_ARGS, %struct.rtx_def*, %struct.rtx_def*, %struct.initial_value_struct*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, ubyte, int, long, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, %struct.varray_head_tag*, %struct.temp_slot*, int, %struct.var_refs_queue*, int, int, %struct.rtvec_def*, %struct.tree_node*, int, int, int, %struct.machine_function*, uint, uint, bool, bool, %struct.language_function*, %struct.rtx_def*, uint, int, int, int, %struct.location_t, %struct.varray_head_tag*, %struct.tree_node*, ubyte, ubyte, ubyte }
- %struct.htab = type { uint (sbyte*)*, int (sbyte*, sbyte*)*, void (sbyte*)*, sbyte**, uint, uint, uint, uint, uint, sbyte* (uint, uint)*, void (sbyte*)*, sbyte*, sbyte* (sbyte*, uint, uint)*, void (sbyte*, sbyte*)*, uint }
+ %struct.expr_status = type { i32, i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def* }
+ %struct.function = type { %struct.eh_status*, %struct.expr_status*, %struct.emit_status*, %struct.varasm_status*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.function*, i32, i32, i32, i32, %struct.rtx_def*, %struct.CUMULATIVE_ARGS, %struct.rtx_def*, %struct.rtx_def*, %struct.initial_value_struct*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, i8, i32, i64, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, %struct.varray_head_tag*, %struct.temp_slot*, i32, %struct.var_refs_queue*, i32, i32, %struct.rtvec_def*, %struct.tree_node*, i32, i32, i32, %struct.machine_function*, i32, i32, i1, i1, %struct.language_function*, %struct.rtx_def*, i32, i32, i32, i32, %struct.location_t, %struct.varray_head_tag*, %struct.tree_node*, i8, i8, i8 }
+ %struct.htab = type { i32 (i8*)*, i32 (i8*, i8*)*, void (i8*)*, i8**, i32, i32, i32, i32, i32, i8* (i32, i32)*, void (i8*)*, i8*, i8* (i8*, i32, i32)*, void (i8*, i8*)*, i32 }
%struct.initial_value_struct = type opaque
- %struct.iv = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, bool, bool, uint }
- %struct.iv_cand = type { uint, bool, uint, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.iv*, uint }
- %struct.iv_use = type { uint, uint, %struct.iv*, %struct.tree_node*, %struct.tree_node**, %struct.bitmap_head_def*, uint, %struct.cost_pair*, %struct.iv_cand* }
- %struct.ivopts_data = type { %struct.loop*, %struct.htab*, uint, %struct.version_info*, %struct.bitmap_head_def*, uint, %struct.varray_head_tag*, %struct.varray_head_tag*, %struct.bitmap_head_def*, bool }
+ %struct.iv = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i1, i1, i32 }
+ %struct.iv_cand = type { i32, i1, i32, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.iv*, i32 }
+ %struct.iv_use = type { i32, i32, %struct.iv*, %struct.tree_node*, %struct.tree_node**, %struct.bitmap_head_def*, i32, %struct.cost_pair*, %struct.iv_cand* }
+ %struct.ivopts_data = type { %struct.loop*, %struct.htab*, i32, %struct.version_info*, %struct.bitmap_head_def*, i32, %struct.varray_head_tag*, %struct.varray_head_tag*, %struct.bitmap_head_def*, i1 }
%struct.lang_decl = type opaque
%struct.language_function = type opaque
- %struct.location_t = type { sbyte*, int }
- %struct.loop = type { int, %struct.basic_block_def*, %struct.basic_block_def*, %struct.basic_block_def*, %struct.lpt_decision, uint, uint, %struct.edge_def**, int, %struct.basic_block_def*, %struct.basic_block_def*, uint, %struct.edge_def**, int, %struct.edge_def**, int, %struct.simple_bitmap_def*, int, %struct.loop**, int, %struct.loop*, %struct.loop*, %struct.loop*, %struct.loop*, int, sbyte*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, int, %struct.tree_node*, %struct.tree_node*, %struct.nb_iter_bound*, %struct.edge_def*, bool }
- %struct.lpt_decision = type { uint, uint }
- %struct.machine_function = type { %struct.stack_local_entry*, sbyte*, %struct.rtx_def*, int, int, int, int, int }
+ %struct.location_t = type { i8*, i32 }
+ %struct.loop = type { i32, %struct.basic_block_def*, %struct.basic_block_def*, %struct.basic_block_def*, %struct.lpt_decision, i32, i32, %struct.edge_def**, i32, %struct.basic_block_def*, %struct.basic_block_def*, i32, %struct.edge_def**, i32, %struct.edge_def**, i32, %struct.simple_bitmap_def*, i32, %struct.loop**, i32, %struct.loop*, %struct.loop*, %struct.loop*, %struct.loop*, i32, i8*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, i32, %struct.tree_node*, %struct.tree_node*, %struct.nb_iter_bound*, %struct.edge_def*, i1 }
+ %struct.lpt_decision = type { i32, i32 }
+ %struct.machine_function = type { %struct.stack_local_entry*, i8*, %struct.rtx_def*, i32, i32, i32, i32, i32 }
%struct.nb_iter_bound = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.nb_iter_bound* }
- %struct.obstack = type { int, %struct._obstack_chunk*, sbyte*, sbyte*, sbyte*, int, int, %struct._obstack_chunk* (sbyte*, int)*, void (sbyte*, %struct._obstack_chunk*)*, sbyte*, ubyte }
- %struct.reorder_block_def = type { %struct.rtx_def*, %struct.rtx_def*, %struct.basic_block_def*, %struct.basic_block_def*, %struct.basic_block_def*, int, int, int }
- %struct.rtvec_def = type { int, [1 x %struct.rtx_def*] }
- %struct.rtx_def = type { ushort, ubyte, ubyte, %struct.u }
+ %struct.obstack = type { i32, %struct._obstack_chunk*, i8*, i8*, i8*, i32, i32, %struct._obstack_chunk* (i8*, i32)*, void (i8*, %struct._obstack_chunk*)*, i8*, i8 }
+ %struct.reorder_block_def = type { %struct.rtx_def*, %struct.rtx_def*, %struct.basic_block_def*, %struct.basic_block_def*, %struct.basic_block_def*, i32, i32, i32 }
+ %struct.rtvec_def = type { i32, [1 x %struct.rtx_def*] }
+ %struct.rtx_def = type { i16, i8, i8, %struct.u }
%struct.sequence_stack = type { %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack* }
- %struct.simple_bitmap_def = type { uint, uint, uint, [1 x ulong] }
+ %struct.simple_bitmap_def = type { i32, i32, i32, [1 x i64] }
%struct.stack_local_entry = type opaque
- %struct.stmt_ann_d = type { %struct.tree_ann_common_d, ubyte, %struct.basic_block_def*, %struct.stmt_operands_d, %struct.dataflow_d*, %struct.bitmap_head_def*, uint }
+ %struct.stmt_ann_d = type { %struct.tree_ann_common_d, i8, %struct.basic_block_def*, %struct.stmt_operands_d, %struct.dataflow_d*, %struct.bitmap_head_def*, i32 }
%struct.stmt_operands_d = type { %struct.def_optype_d*, %struct.def_optype_d*, %struct.v_may_def_optype_d*, %struct.vuse_optype_d*, %struct.v_may_def_optype_d* }
%struct.temp_slot = type opaque
- %struct.tree_ann_common_d = type { uint, sbyte*, %struct.tree_node* }
+ %struct.tree_ann_common_d = type { i32, i8*, %struct.tree_node* }
%struct.tree_ann_d = type { %struct.stmt_ann_d }
- %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_ann_d*, ubyte, ubyte, ubyte, ubyte, ubyte }
- %struct.tree_decl = type { %struct.tree_common, %struct.location_t, uint, %struct.tree_node*, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, uint, %struct.tree_decl_u1, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, int, %struct.tree_decl_u2, %struct.tree_node*, %struct.tree_node*, long, %struct.lang_decl* }
- %struct.tree_decl_u1 = type { long }
+ %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_ann_d*, i8, i8, i8, i8, i8 }
+ %struct.tree_decl = type { %struct.tree_common, %struct.location_t, i32, %struct.tree_node*, i8, i8, i8, i8, i8, i8, i8, i32, %struct.tree_decl_u1, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, i32, %struct.tree_decl_u2, %struct.tree_node*, %struct.tree_node*, i64, %struct.lang_decl* }
+ %struct.tree_decl_u1 = type { i64 }
%struct.tree_decl_u2 = type { %struct.function* }
%struct.tree_node = type { %struct.tree_decl }
- %struct.u = type { [1 x long] }
+ %struct.u = type { [1 x i64] }
%struct.v_def_use_operand_type_t = type { %struct.tree_node*, %struct.tree_node* }
- %struct.v_may_def_optype_d = type { uint, [1 x %struct.v_def_use_operand_type_t] }
- %struct.var_refs_queue = type { %struct.rtx_def*, uint, int, %struct.var_refs_queue* }
+ %struct.v_may_def_optype_d = type { i32, [1 x %struct.v_def_use_operand_type_t] }
+ %struct.var_refs_queue = type { %struct.rtx_def*, i32, i32, %struct.var_refs_queue* }
%struct.varasm_status = type opaque
- %struct.varray_head_tag = type { uint, uint, uint, sbyte*, %struct.u }
- %struct.version_info = type { %struct.tree_node*, %struct.iv*, bool, uint, bool }
- %struct.vuse_optype_d = type { uint, [1 x %struct.tree_node*] }
-
-implementation ; Functions:
+ %struct.varray_head_tag = type { i32, i32, i32, i8*, %struct.u }
+ %struct.version_info = type { %struct.tree_node*, %struct.iv*, i1, i32, i1 }
+ %struct.vuse_optype_d = type { i32, [1 x %struct.tree_node*] }
-bool %determine_use_iv_cost(%struct.ivopts_data* %data, %struct.iv_use* %use, %struct.iv_cand* %cand) {
+define i1 @determine_use_iv_cost(%struct.ivopts_data* %data, %struct.iv_use* %use, %struct.iv_cand* %cand) {
entry:
- switch uint 0, label %bb91 [
- uint 0, label %bb
- uint 1, label %bb6
- uint 3, label %cond_next135
+ switch i32 0, label %bb91 [
+ i32 0, label %bb
+ i32 1, label %bb6
+ i32 3, label %cond_next135
]
bb: ; preds = %entry
- ret bool false
+ ret i1 false
bb6: ; preds = %entry
- br bool false, label %bb87, label %cond_next27
+ br i1 false, label %bb87, label %cond_next27
cond_next27: ; preds = %bb6
- br bool false, label %cond_true30, label %cond_next55
+ br i1 false, label %cond_true30, label %cond_next55
cond_true30: ; preds = %cond_next27
- br bool false, label %cond_next41, label %cond_true35
+ br i1 false, label %cond_next41, label %cond_true35
cond_true35: ; preds = %cond_true30
- ret bool false
+ ret i1 false
cond_next41: ; preds = %cond_true30
- %tmp44 = call uint %force_var_cost( %struct.ivopts_data* %data, %struct.tree_node* null, %struct.bitmap_head_def** null ) ; <uint> [#uses=2]
- %tmp46 = div uint %tmp44, 5 ; <uint> [#uses=1]
- call void %set_use_iv_cost( %struct.ivopts_data* %data, %struct.iv_use* %use, %struct.iv_cand* %cand, uint %tmp46, %struct.bitmap_head_def* null )
- %tmp44.off = add uint %tmp44, 4244967296 ; <uint> [#uses=1]
- %tmp52 = setgt uint %tmp44.off, 4 ; <bool> [#uses=1]
- %tmp52 = cast bool %tmp52 to int ; <int> [#uses=1]
+ %tmp44 = call i32 @force_var_cost( %struct.ivopts_data* %data, %struct.tree_node* null, %struct.bitmap_head_def** null ) ; <i32> [#uses=2]
+ %tmp46 = udiv i32 %tmp44, 5 ; <i32> [#uses=1]
+ call void @set_use_iv_cost( %struct.ivopts_data* %data, %struct.iv_use* %use, %struct.iv_cand* %cand, i32 %tmp46, %struct.bitmap_head_def* null )
+ %tmp44.off = add i32 %tmp44, -50000000 ; <i32> [#uses=1]
+ %tmp52 = icmp ugt i32 %tmp44.off, 4 ; <i1> [#uses=1]
+ %tmp52.upgrd.1 = zext i1 %tmp52 to i32 ; <i32> [#uses=1]
br label %bb87
cond_next55: ; preds = %cond_next27
- ret bool false
+ ret i1 false
bb87: ; preds = %cond_next41, %bb6
- %tmp2.0 = phi int [ %tmp52, %cond_next41 ], [ 1, %bb6 ] ; <int> [#uses=0]
- ret bool false
+ %tmp2.0 = phi i32 [ %tmp52.upgrd.1, %cond_next41 ], [ 1, %bb6 ] ; <i32> [#uses=0]
+ ret i1 false
bb91: ; preds = %entry
- ret bool false
+ ret i1 false
cond_next135: ; preds = %entry
- %tmp193 = call bool %determine_use_iv_cost_generic( %struct.ivopts_data* %data, %struct.iv_use* %use, %struct.iv_cand* %cand ) ; <bool> [#uses=0]
- ret bool false
+ %tmp193 = call i1 @determine_use_iv_cost_generic( %struct.ivopts_data* %data, %struct.iv_use* %use, %struct.iv_cand* %cand ) ; <i1> [#uses=0]
+ ret i1 false
}
-declare void %set_use_iv_cost(%struct.ivopts_data*, %struct.iv_use*, %struct.iv_cand*, uint, %struct.bitmap_head_def*)
+declare void @set_use_iv_cost(%struct.ivopts_data*, %struct.iv_use*, %struct.iv_cand*, i32, %struct.bitmap_head_def*)
-declare uint %force_var_cost(%struct.ivopts_data*, %struct.tree_node*, %struct.bitmap_head_def**)
+declare i32 @force_var_cost(%struct.ivopts_data*, %struct.tree_node*, %struct.bitmap_head_def**)
-declare bool %determine_use_iv_cost_generic(%struct.ivopts_data*, %struct.iv_use*, %struct.iv_cand*)
+declare i1 @determine_use_iv_cost_generic(%struct.ivopts_data*, %struct.iv_use*, %struct.iv_cand*)
diff --git a/test/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll b/test/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll
index e2f07e8..c6d0dfe 100644
--- a/test/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll
+++ b/test/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll
@@ -1,35 +1,33 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -regalloc=local
-
- %struct.CHESS_POSITION = type { ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, uint, int, sbyte, sbyte, [64 x sbyte], sbyte, sbyte, sbyte, sbyte, sbyte }
-%search = external global %struct.CHESS_POSITION ; <%struct.CHESS_POSITION*> [#uses=2]
-%bishop_shift_rl45 = external global [64 x int] ; <[64 x int]*> [#uses=1]
-%bishop_shift_rr45 = external global [64 x int] ; <[64 x int]*> [#uses=1]
-%black_outpost = external global [64 x sbyte] ; <[64 x sbyte]*> [#uses=1]
-%bishop_mobility_rl45 = external global [64 x [256 x int]] ; <[64 x [256 x int]]*> [#uses=1]
-%bishop_mobility_rr45 = external global [64 x [256 x int]] ; <[64 x [256 x int]]*> [#uses=1]
-
-implementation ; Functions:
-
-declare fastcc int %FirstOne()
-
-fastcc void %Evaluate() {
+; RUN: llvm-as < %s | llc -regalloc=local
+
+%struct.CHESS_POSITION = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32, i32, i8, i8, [64 x i8], i8, i8, i8, i8, i8 }
+@search = external global %struct.CHESS_POSITION ; <%struct.CHESS_POSITION*> [#uses=2]
+@bishop_shift_rl45 = external global [64 x i32] ; <[64 x i32]*> [#uses=1]
+@bishop_shift_rr45 = external global [64 x i32] ; <[64 x i32]*> [#uses=1]
+@black_outpost = external global [64 x i8] ; <[64 x i8]*> [#uses=1]
+@bishop_mobility_rl45 = external global [64 x [256 x i32]] ; <[64 x [256 x i32]]*> [#uses=1]
+@bishop_mobility_rr45 = external global [64 x [256 x i32]] ; <[64 x [256 x i32]]*> [#uses=1]
+
+declare fastcc i32 @FirstOne()
+
+define fastcc void @Evaluate() {
entry:
- br bool false, label %cond_false186, label %cond_true
+ br i1 false, label %cond_false186, label %cond_true
cond_true: ; preds = %entry
ret void
cond_false186: ; preds = %entry
- br bool false, label %cond_true293, label %bb203
+ br i1 false, label %cond_true293, label %bb203
bb203: ; preds = %cond_false186
ret void
cond_true293: ; preds = %cond_false186
- br bool false, label %cond_true298, label %cond_next317
+ br i1 false, label %cond_true298, label %cond_next317
cond_true298: ; preds = %cond_true293
- br bool false, label %cond_next518, label %cond_true397.preheader
+ br i1 false, label %cond_next518, label %cond_true397.preheader
cond_next317: ; preds = %cond_true293
ret void
@@ -38,37 +36,37 @@ cond_true397.preheader: ; preds = %cond_true298
ret void
cond_next518: ; preds = %cond_true298
- br bool false, label %bb1069, label %cond_true522
+ br i1 false, label %bb1069, label %cond_true522
cond_true522: ; preds = %cond_next518
ret void
bb1069: ; preds = %cond_next518
- br bool false, label %cond_next1131, label %bb1096
+ br i1 false, label %cond_next1131, label %bb1096
bb1096: ; preds = %bb1069
ret void
cond_next1131: ; preds = %bb1069
- br bool false, label %cond_next1207, label %cond_true1150
+ br i1 false, label %cond_next1207, label %cond_true1150
cond_true1150: ; preds = %cond_next1131
ret void
cond_next1207: ; preds = %cond_next1131
- br bool false, label %cond_next1219, label %cond_true1211
+ br i1 false, label %cond_next1219, label %cond_true1211
cond_true1211: ; preds = %cond_next1207
ret void
cond_next1219: ; preds = %cond_next1207
- br bool false, label %cond_true1223, label %cond_next1283
+ br i1 false, label %cond_true1223, label %cond_next1283
cond_true1223: ; preds = %cond_next1219
- br bool false, label %cond_true1254, label %cond_true1264
+ br i1 false, label %cond_true1254, label %cond_true1264
cond_true1254: ; preds = %cond_true1223
- br bool false, label %bb1567, label %cond_true1369.preheader
+ br i1 false, label %bb1567, label %cond_true1369.preheader
cond_true1264: ; preds = %cond_true1223
ret void
@@ -80,36 +78,40 @@ cond_true1369.preheader: ; preds = %cond_true1254
ret void
bb1567: ; preds = %cond_true1254
- %tmp1580 = load ulong* getelementptr (%struct.CHESS_POSITION* %search, int 0, uint 3) ; <ulong> [#uses=1]
- %tmp1591 = load ulong* getelementptr (%struct.CHESS_POSITION* %search, int 0, uint 4) ; <ulong> [#uses=1]
- %tmp1572 = tail call fastcc int %FirstOne( ) ; <int> [#uses=5]
- %tmp1582 = getelementptr [64 x int]* %bishop_shift_rl45, int 0, int %tmp1572 ; <int*> [#uses=1]
- %tmp1583 = load int* %tmp1582 ; <int> [#uses=1]
- %tmp1583 = cast int %tmp1583 to ubyte ; <ubyte> [#uses=1]
- %tmp1584 = shr ulong %tmp1580, ubyte %tmp1583 ; <ulong> [#uses=1]
- %tmp1584 = cast ulong %tmp1584 to uint ; <uint> [#uses=1]
- %tmp1585 = and uint %tmp1584, 255 ; <uint> [#uses=1]
- %tmp1587 = getelementptr [64 x [256 x int]]* %bishop_mobility_rl45, int 0, int %tmp1572, uint %tmp1585 ; <int*> [#uses=1]
- %tmp1588 = load int* %tmp1587 ; <int> [#uses=1]
- %tmp1593 = getelementptr [64 x int]* %bishop_shift_rr45, int 0, int %tmp1572 ; <int*> [#uses=1]
- %tmp1594 = load int* %tmp1593 ; <int> [#uses=1]
- %tmp1594 = cast int %tmp1594 to ubyte ; <ubyte> [#uses=1]
- %tmp1595 = shr ulong %tmp1591, ubyte %tmp1594 ; <ulong> [#uses=1]
- %tmp1595 = cast ulong %tmp1595 to uint ; <uint> [#uses=1]
- %tmp1596 = and uint %tmp1595, 255 ; <uint> [#uses=1]
- %tmp1598 = getelementptr [64 x [256 x int]]* %bishop_mobility_rr45, int 0, int %tmp1572, uint %tmp1596 ; <int*> [#uses=1]
- %tmp1599 = load int* %tmp1598 ; <int> [#uses=1]
- %tmp1600.neg = sub int 0, %tmp1588 ; <int> [#uses=1]
- %tmp1602 = sub int %tmp1600.neg, %tmp1599 ; <int> [#uses=1]
- %tmp1604 = getelementptr [64 x sbyte]* %black_outpost, int 0, int %tmp1572 ; <sbyte*> [#uses=1]
- %tmp1605 = load sbyte* %tmp1604 ; <sbyte> [#uses=1]
- %tmp1606 = seteq sbyte %tmp1605, 0 ; <bool> [#uses=1]
- br bool %tmp1606, label %cond_next1637, label %cond_true1607
+ %tmp1580 = load i64* getelementptr (%struct.CHESS_POSITION* @search, i32 0, i32 3) ; <i64> [#uses=1]
+ %tmp1591 = load i64* getelementptr (%struct.CHESS_POSITION* @search, i32 0, i32 4) ; <i64> [#uses=1]
+ %tmp1572 = tail call fastcc i32 @FirstOne( ) ; <i32> [#uses=5]
+ %tmp1582 = getelementptr [64 x i32]* @bishop_shift_rl45, i32 0, i32 %tmp1572 ; <i32*> [#uses=1]
+ %tmp1583 = load i32* %tmp1582 ; <i32> [#uses=1]
+ %tmp1583.upgrd.1 = trunc i32 %tmp1583 to i8 ; <i8> [#uses=1]
+ %shift.upgrd.2 = zext i8 %tmp1583.upgrd.1 to i64 ; <i64> [#uses=1]
+ %tmp1584 = lshr i64 %tmp1580, %shift.upgrd.2 ; <i64> [#uses=1]
+ %tmp1584.upgrd.3 = trunc i64 %tmp1584 to i32 ; <i32> [#uses=1]
+ %tmp1585 = and i32 %tmp1584.upgrd.3, 255 ; <i32> [#uses=1]
+ %gep.upgrd.4 = zext i32 %tmp1585 to i64 ; <i64> [#uses=1]
+ %tmp1587 = getelementptr [64 x [256 x i32]]* @bishop_mobility_rl45, i32 0, i32 %tmp1572, i64 %gep.upgrd.4 ; <i32*> [#uses=1]
+ %tmp1588 = load i32* %tmp1587 ; <i32> [#uses=1]
+ %tmp1593 = getelementptr [64 x i32]* @bishop_shift_rr45, i32 0, i32 %tmp1572 ; <i32*> [#uses=1]
+ %tmp1594 = load i32* %tmp1593 ; <i32> [#uses=1]
+ %tmp1594.upgrd.5 = trunc i32 %tmp1594 to i8 ; <i8> [#uses=1]
+ %shift.upgrd.6 = zext i8 %tmp1594.upgrd.5 to i64 ; <i64> [#uses=1]
+ %tmp1595 = lshr i64 %tmp1591, %shift.upgrd.6 ; <i64> [#uses=1]
+ %tmp1595.upgrd.7 = trunc i64 %tmp1595 to i32 ; <i32> [#uses=1]
+ %tmp1596 = and i32 %tmp1595.upgrd.7, 255 ; <i32> [#uses=1]
+ %gep.upgrd.8 = zext i32 %tmp1596 to i64 ; <i64> [#uses=1]
+ %tmp1598 = getelementptr [64 x [256 x i32]]* @bishop_mobility_rr45, i32 0, i32 %tmp1572, i64 %gep.upgrd.8 ; <i32*> [#uses=1]
+ %tmp1599 = load i32* %tmp1598 ; <i32> [#uses=1]
+ %tmp1600.neg = sub i32 0, %tmp1588 ; <i32> [#uses=1]
+ %tmp1602 = sub i32 %tmp1600.neg, %tmp1599 ; <i32> [#uses=1]
+ %tmp1604 = getelementptr [64 x i8]* @black_outpost, i32 0, i32 %tmp1572 ; <i8*> [#uses=1]
+ %tmp1605 = load i8* %tmp1604 ; <i8> [#uses=1]
+ %tmp1606 = icmp eq i8 %tmp1605, 0 ; <i1> [#uses=1]
+ br i1 %tmp1606, label %cond_next1637, label %cond_true1607
cond_true1607: ; preds = %bb1567
ret void
cond_next1637: ; preds = %bb1567
- %tmp1662 = sub int %tmp1602, 0 ; <int> [#uses=0]
+ %tmp1662 = sub i32 %tmp1602, 0 ; <i32> [#uses=0]
ret void
}
diff --git a/test/CodeGen/Generic/2006-09-06-SwitchLowering.ll b/test/CodeGen/Generic/2006-09-06-SwitchLowering.ll
index 2b12926..2134d33 100644
--- a/test/CodeGen/Generic/2006-09-06-SwitchLowering.ll
+++ b/test/CodeGen/Generic/2006-09-06-SwitchLowering.ll
@@ -1,29 +1,29 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-void %foo() {
+define void @foo() {
br label %cond_true813.i
cond_true813.i: ; preds = %0
- br bool false, label %cond_true818.i, label %cond_next1146.i
+ br i1 false, label %cond_true818.i, label %cond_next1146.i
cond_true818.i: ; preds = %cond_true813.i
- br bool false, label %recog_memoized.exit52, label %cond_next1146.i
+ br i1 false, label %recog_memoized.exit52, label %cond_next1146.i
recog_memoized.exit52: ; preds = %cond_true818.i
- switch int 0, label %bb886.i.preheader [
- int 0, label %bb907.i
- int 44, label %bb866.i
- int 103, label %bb874.i
- int 114, label %bb874.i
+ switch i32 0, label %bb886.i.preheader [
+ i32 0, label %bb907.i
+ i32 44, label %bb866.i
+ i32 103, label %bb874.i
+ i32 114, label %bb874.i
]
bb857.i: ; preds = %bb886.i, %bb866.i
- %tmp862.i494.24 = phi sbyte* [ null, %bb866.i ], [ %tmp862.i494.26, %bb886.i ] ; <sbyte*> [#uses=4]
- switch int 0, label %bb886.i.preheader [
- int 0, label %bb907.i
- int 44, label %bb866.i
- int 103, label %bb874.i
- int 114, label %bb874.i
+ %tmp862.i494.24 = phi i8* [ null, %bb866.i ], [ %tmp862.i494.26, %bb886.i ] ; <i8*> [#uses=4]
+ switch i32 0, label %bb886.i.preheader [
+ i32 0, label %bb907.i
+ i32 44, label %bb866.i
+ i32 103, label %bb874.i
+ i32 114, label %bb874.i
]
bb866.i.loopexit: ; preds = %bb874.i
@@ -33,18 +33,18 @@ bb866.i.loopexit31: ; preds = %cond_true903.i
br label %bb866.i
bb866.i: ; preds = %bb866.i.loopexit31, %bb866.i.loopexit, %bb857.i, %recog_memoized.exit52
- br bool false, label %bb907.i, label %bb857.i
+ br i1 false, label %bb907.i, label %bb857.i
bb874.i.preheader.loopexit: ; preds = %cond_true903.i, %cond_true903.i
ret void
bb874.i: ; preds = %bb857.i, %bb857.i, %recog_memoized.exit52, %recog_memoized.exit52
- %tmp862.i494.25 = phi sbyte* [ %tmp862.i494.24, %bb857.i ], [ %tmp862.i494.24, %bb857.i ], [ undef, %recog_memoized.exit52 ], [ undef, %recog_memoized.exit52 ] ; <sbyte*> [#uses=1]
- switch int 0, label %bb886.i.preheader.loopexit [
- int 0, label %bb907.i
- int 44, label %bb866.i.loopexit
- int 103, label %bb874.i.backedge
- int 114, label %bb874.i.backedge
+ %tmp862.i494.25 = phi i8* [ %tmp862.i494.24, %bb857.i ], [ %tmp862.i494.24, %bb857.i ], [ undef, %recog_memoized.exit52 ], [ undef, %recog_memoized.exit52 ] ; <i8*> [#uses=1]
+ switch i32 0, label %bb886.i.preheader.loopexit [
+ i32 0, label %bb907.i
+ i32 44, label %bb866.i.loopexit
+ i32 103, label %bb874.i.backedge
+ i32 114, label %bb874.i.backedge
]
bb874.i.backedge: ; preds = %bb874.i, %bb874.i
@@ -54,33 +54,33 @@ bb886.i.preheader.loopexit: ; preds = %bb874.i
ret void
bb886.i.preheader: ; preds = %bb857.i, %recog_memoized.exit52
- %tmp862.i494.26 = phi sbyte* [ undef, %recog_memoized.exit52 ], [ %tmp862.i494.24, %bb857.i ] ; <sbyte*> [#uses=1]
+ %tmp862.i494.26 = phi i8* [ undef, %recog_memoized.exit52 ], [ %tmp862.i494.24, %bb857.i ] ; <i8*> [#uses=1]
br label %bb886.i
bb886.i: ; preds = %cond_true903.i, %bb886.i.preheader
- br bool false, label %bb857.i, label %cond_true903.i
+ br i1 false, label %bb857.i, label %cond_true903.i
cond_true903.i: ; preds = %bb886.i
- switch int 0, label %bb886.i [
- int 0, label %bb907.i
- int 44, label %bb866.i.loopexit31
- int 103, label %bb874.i.preheader.loopexit
- int 114, label %bb874.i.preheader.loopexit
+ switch i32 0, label %bb886.i [
+ i32 0, label %bb907.i
+ i32 44, label %bb866.i.loopexit31
+ i32 103, label %bb874.i.preheader.loopexit
+ i32 114, label %bb874.i.preheader.loopexit
]
bb907.i: ; preds = %cond_true903.i, %bb874.i, %bb866.i, %bb857.i, %recog_memoized.exit52
- %tmp862.i494.0 = phi sbyte* [ %tmp862.i494.24, %bb857.i ], [ null, %bb866.i ], [ undef, %recog_memoized.exit52 ], [ %tmp862.i494.25, %bb874.i ], [ null, %cond_true903.i ] ; <sbyte*> [#uses=1]
- br bool false, label %cond_next1146.i, label %cond_true910.i
+ %tmp862.i494.0 = phi i8* [ %tmp862.i494.24, %bb857.i ], [ null, %bb866.i ], [ undef, %recog_memoized.exit52 ], [ %tmp862.i494.25, %bb874.i ], [ null, %cond_true903.i ] ; <i8*> [#uses=1]
+ br i1 false, label %cond_next1146.i, label %cond_true910.i
cond_true910.i: ; preds = %bb907.i
ret void
cond_next1146.i: ; preds = %bb907.i, %cond_true818.i, %cond_true813.i
- %tmp862.i494.1 = phi sbyte* [ %tmp862.i494.0, %bb907.i ], [ undef, %cond_true818.i ], [ undef, %cond_true813.i ] ; <sbyte*> [#uses=0]
+ %tmp862.i494.1 = phi i8* [ %tmp862.i494.0, %bb907.i ], [ undef, %cond_true818.i ], [ undef, %cond_true813.i ] ; <i8*> [#uses=0]
ret void
bb2060.i: ; No predecessors!
- br bool false, label %cond_true2064.i, label %bb2067.i
+ br i1 false, label %cond_true2064.i, label %bb2067.i
cond_true2064.i: ; preds = %bb2060.i
unreachable
diff --git a/test/CodeGen/Generic/2006-10-27-CondFolding.ll b/test/CodeGen/Generic/2006-10-27-CondFolding.ll
index 8bf3c11..b3cfb99 100644
--- a/test/CodeGen/Generic/2006-10-27-CondFolding.ll
+++ b/test/CodeGen/Generic/2006-10-27-CondFolding.ll
@@ -1,13 +1,13 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-void %start_pass_huff(int %gather_statistics) {
+define void @start_pass_huff(i32 %gather_statistics) {
entry:
- %tmp = seteq int %gather_statistics, 0 ; <bool> [#uses=1]
- br bool false, label %cond_next22, label %bb166
+ %tmp = icmp eq i32 %gather_statistics, 0 ; <i1> [#uses=1]
+ br i1 false, label %cond_next22, label %bb166
cond_next22: ; preds = %entry
- %bothcond = and bool false, %tmp ; <bool> [#uses=1]
- br bool %bothcond, label %bb34, label %bb46
+ %bothcond = and i1 false, %tmp ; <i1> [#uses=1]
+ br i1 %bothcond, label %bb34, label %bb46
bb34: ; preds = %cond_next22
ret void
diff --git a/test/CodeGen/Generic/2006-10-29-Crash.ll b/test/CodeGen/Generic/2006-10-29-Crash.ll
index 8857c93..cabec54 100644
--- a/test/CodeGen/Generic/2006-10-29-Crash.ll
+++ b/test/CodeGen/Generic/2006-10-29-Crash.ll
@@ -1,21 +1,22 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-void %form_component_prediction(int %dy) {
+define void @form_component_prediction(i32 %dy) {
entry:
- %tmp7 = and int %dy, 1 ; <int> [#uses=1]
- %tmp27 = seteq int %tmp7, 0 ; <bool> [#uses=1]
- br bool false, label %cond_next30, label %bb115
+ %tmp7 = and i32 %dy, 1 ; <i32> [#uses=1]
+ %tmp27 = icmp eq i32 %tmp7, 0 ; <i1> [#uses=1]
+ br i1 false, label %cond_next30, label %bb115
-cond_next30: ; preds = %entry
- ret void
+cond_next30: ; preds = %entry
+ ret void
-bb115: ; preds = %entry
- %bothcond1 = or bool %tmp27, false ; <bool> [#uses=1]
- br bool %bothcond1, label %bb228, label %cond_next125
+bb115: ; preds = %entry
+ %bothcond1 = or i1 %tmp27, false ; <i1> [#uses=1]
+ br i1 %bothcond1, label %bb228, label %cond_next125
-cond_next125: ; preds = %bb115
- ret void
+cond_next125: ; preds = %bb115
+ ret void
-bb228: ; preds = %bb115
- ret void
+bb228: ; preds = %bb115
+ ret void
}
+
diff --git a/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll b/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll
index 330bee6..a773759 100644
--- a/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll
+++ b/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll
@@ -1,11 +1,11 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep adc
-
+; RUN: llvm-as < %s | llc -march=x86 | not grep adc
; PR987
-declare void %llvm.memcpy.i64(sbyte*, sbyte*, ulong, uint)
+declare void @llvm.memcpy.i64(i8*, i8*, i64, i32)
-void %foo(ulong %a) {
- %b = add ulong %a, 1
-call void %llvm.memcpy.i64( sbyte* null, sbyte* null, ulong %b, uint 1 )
- ret void
+define void @foo(i64 %a) {
+ %b = add i64 %a, 1 ; <i64> [#uses=1]
+ call void @llvm.memcpy.i64( i8* null, i8* null, i64 %b, i32 1 )
+ ret void
}
+
diff --git a/test/CodeGen/Generic/2006-11-20-DAGCombineCrash.ll b/test/CodeGen/Generic/2006-11-20-DAGCombineCrash.ll
index 6a76079..95ef53c 100644
--- a/test/CodeGen/Generic/2006-11-20-DAGCombineCrash.ll
+++ b/test/CodeGen/Generic/2006-11-20-DAGCombineCrash.ll
@@ -1,39 +1,36 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
-; PR1011
+; RUN: llvm-as < %s | llc
+; PR1011
+%struct.mng_data = type { i8* (%struct.mng_data*, i32)*, i32, i32, i32, i8, i8, i32, i32, i32, i32, i32 }
- %struct.mng_data = type { sbyte* (%struct.mng_data*, uint)*, int, int, int, sbyte, sbyte, int, int, int, int, int }
-
-implementation ; Functions:
-
-void %mng_display_bgr565() {
+define void @mng_display_bgr565() {
entry:
- br bool false, label %bb.preheader, label %return
+ br i1 false, label %bb.preheader, label %return
bb.preheader: ; preds = %entry
- br bool false, label %cond_true48, label %cond_next80
+ br i1 false, label %cond_true48, label %cond_next80
cond_true48: ; preds = %bb.preheader
- %tmp = load ubyte* null ; <ubyte> [#uses=1]
- %tmp51 = cast ubyte %tmp to ushort ; <ushort> [#uses=1]
- %tmp99 = load sbyte* null ; <sbyte> [#uses=1]
- %tmp54 = cast sbyte %tmp99 to ubyte ; <ubyte> [#uses=1]
- %tmp54 = cast ubyte %tmp54 to int ; <int> [#uses=1]
- %tmp55 = lshr int %tmp54, ubyte 3 ; <int> [#uses=1]
- %tmp55 = cast int %tmp55 to ushort ; <ushort> [#uses=1]
- %tmp52 = shl ushort %tmp51, ubyte 5 ; <ushort> [#uses=1]
- %tmp56 = and ushort %tmp55, 28 ; <ushort> [#uses=1]
- %tmp57 = or ushort %tmp56, %tmp52 ; <ushort> [#uses=1]
- %tmp60 = cast ushort %tmp57 to uint ; <uint> [#uses=1]
- %tmp62 = xor uint 0, 65535 ; <uint> [#uses=1]
- %tmp63 = mul uint %tmp60, %tmp62 ; <uint> [#uses=1]
- %tmp65 = add uint 0, %tmp63 ; <uint> [#uses=1]
- %tmp69 = add uint 0, %tmp65 ; <uint> [#uses=1]
- %tmp70 = lshr uint %tmp69, ubyte 16 ; <uint> [#uses=1]
- %tmp70 = cast uint %tmp70 to ushort ; <ushort> [#uses=1]
- %tmp75 = lshr ushort %tmp70, ubyte 8 ; <ushort> [#uses=1]
- %tmp75 = cast ushort %tmp75 to ubyte ; <ubyte> [#uses=1]
- %tmp76 = lshr ubyte %tmp75, ubyte 5 ; <ubyte> [#uses=1]
- store ubyte %tmp76, ubyte* null
+ %tmp = load i8* null ; <i8> [#uses=1]
+ %tmp51 = zext i8 %tmp to i16 ; <i16> [#uses=1]
+ %tmp99 = load i8* null ; <i8> [#uses=1]
+ %tmp54 = bitcast i8 %tmp99 to i8 ; <i8> [#uses=1]
+ %tmp54.upgrd.1 = zext i8 %tmp54 to i32 ; <i32> [#uses=1]
+ %tmp55 = lshr i32 %tmp54.upgrd.1, 3 ; <i32> [#uses=1]
+ %tmp55.upgrd.2 = trunc i32 %tmp55 to i16 ; <i16> [#uses=1]
+ %tmp52 = shl i16 %tmp51, 5 ; <i16> [#uses=1]
+ %tmp56 = and i16 %tmp55.upgrd.2, 28 ; <i16> [#uses=1]
+ %tmp57 = or i16 %tmp56, %tmp52 ; <i16> [#uses=1]
+ %tmp60 = zext i16 %tmp57 to i32 ; <i32> [#uses=1]
+ %tmp62 = xor i32 0, 65535 ; <i32> [#uses=1]
+ %tmp63 = mul i32 %tmp60, %tmp62 ; <i32> [#uses=1]
+ %tmp65 = add i32 0, %tmp63 ; <i32> [#uses=1]
+ %tmp69 = add i32 0, %tmp65 ; <i32> [#uses=1]
+ %tmp70 = lshr i32 %tmp69, 16 ; <i32> [#uses=1]
+ %tmp70.upgrd.3 = trunc i32 %tmp70 to i16 ; <i16> [#uses=1]
+ %tmp75 = lshr i16 %tmp70.upgrd.3, 8 ; <i16> [#uses=1]
+ %tmp75.upgrd.4 = trunc i16 %tmp75 to i8 ; <i8> [#uses=1]
+ %tmp76 = lshr i8 %tmp75.upgrd.4, 5 ; <i8> [#uses=1]
+ store i8 %tmp76, i8* null
ret void
cond_next80: ; preds = %bb.preheader
diff --git a/test/CodeGen/Generic/2006-12-16-InlineAsmCrash.ll b/test/CodeGen/Generic/2006-12-16-InlineAsmCrash.ll
index e4a3906..91ac3b9 100644
--- a/test/CodeGen/Generic/2006-12-16-InlineAsmCrash.ll
+++ b/test/CodeGen/Generic/2006-12-16-InlineAsmCrash.ll
@@ -1,34 +1,30 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
+; RUN: llvm-as < %s | llc -march=x86
; PR1049
target datalayout = "e-p:32:32"
-target endian = little
-target pointersize = 32
target triple = "i686-pc-linux-gnu"
- %struct.QBasicAtomic = type { int }
- %struct.QByteArray = type { "struct.QByteArray::Data"* }
- "struct.QByteArray::Data" = type { %struct.QBasicAtomic, int, int, sbyte*, [1 x sbyte] }
+ %struct.QBasicAtomic = type { i32 }
+ %struct.QByteArray = type { %"struct.QByteArray::Data"* }
+ %"struct.QByteArray::Data" = type { %struct.QBasicAtomic, i32, i32, i8*, [1 x i8] }
%struct.QFactoryLoader = type { %struct.QObject }
- %struct.QImageIOHandler = type { int (...)**, %struct.QImageIOHandlerPrivate* }
+ %struct.QImageIOHandler = type { i32 (...)**, %struct.QImageIOHandlerPrivate* }
%struct.QImageIOHandlerPrivate = type opaque
%struct.QImageWriter = type { %struct.QImageWriterPrivate* }
- %struct.QImageWriterPrivate = type { %struct.QByteArray, %struct.QFactoryLoader*, bool, %struct.QImageIOHandler*, int, float, %struct.QString, %struct.QString, uint, %struct.QString, %struct.QImageWriter* }
- "struct.QList<QByteArray>" = type { "struct.QList<QByteArray>::._20" }
- "struct.QList<QByteArray>::._20" = type { %struct.QListData }
- %struct.QListData = type { "struct.QListData::Data"* }
- "struct.QListData::Data" = type { %struct.QBasicAtomic, int, int, int, ubyte, [1 x sbyte*] }
- %struct.QObject = type { int (...)**, %struct.QObjectData* }
- %struct.QObjectData = type { int (...)**, %struct.QObject*, %struct.QObject*, "struct.QList<QByteArray>", ubyte, [3 x ubyte], int, int }
- %struct.QString = type { "struct.QString::Data"* }
- "struct.QString::Data" = type { %struct.QBasicAtomic, int, int, ushort*, ubyte, ubyte, [1 x ushort] }
+ %struct.QImageWriterPrivate = type { %struct.QByteArray, %struct.QFactoryLoader*, i1, %struct.QImageIOHandler*, i32, float, %struct.QString, %struct.QString, i32, %struct.QString, %struct.QImageWriter* }
+ %"struct.QList<QByteArray>" = type { %"struct.QList<QByteArray>::._20" }
+ %"struct.QList<QByteArray>::._20" = type { %struct.QListData }
+ %struct.QListData = type { %"struct.QListData::Data"* }
+ %"struct.QListData::Data" = type { %struct.QBasicAtomic, i32, i32, i32, i8, [1 x i8*] }
+ %struct.QObject = type { i32 (...)**, %struct.QObjectData* }
+ %struct.QObjectData = type { i32 (...)**, %struct.QObject*, %struct.QObject*, %"struct.QList<QByteArray>", i8, [3 x i8], i32, i32 }
+ %struct.QString = type { %"struct.QString::Data"* }
+ %"struct.QString::Data" = type { %struct.QBasicAtomic, i32, i32, i16*, i8, i8, [1 x i16] }
-implementation ; Functions:
-
-bool %_ZNK12QImageWriter8canWriteEv() {
+define i1 @_ZNK12QImageWriter8canWriteEv() {
%tmp62 = load %struct.QImageWriterPrivate** null ; <%struct.QImageWriterPrivate*> [#uses=1]
- %tmp = getelementptr %struct.QImageWriterPrivate* %tmp62, int 0, uint 9 ; <%struct.QString*> [#uses=1]
- %tmp75 = call %struct.QString* %_ZN7QStringaSERKS_( %struct.QString* %tmp, %struct.QString* null ) ; <%struct.QString*> [#uses=0]
- call void asm sideeffect "lock\0Adecl $0\0Asetne 1", "=*m"( int* null )
- ret bool false
+ %tmp = getelementptr %struct.QImageWriterPrivate* %tmp62, i32 0, i32 9 ; <%struct.QString*> [#uses=1]
+ %tmp75 = call %struct.QString* @_ZN7QStringaSERKS_( %struct.QString* %tmp, %struct.QString* null ) ; <%struct.QString*> [#uses=0]
+ call void asm sideeffect "lock\0Adecl $0\0Asetne 1", "=*m"( i32* null )
+ ret i1 false
}
-declare %struct.QString* %_ZN7QStringaSERKS_(%struct.QString*, %struct.QString*)
+declare %struct.QString* @_ZN7QStringaSERKS_(%struct.QString*, %struct.QString*)
diff --git a/test/CodeGen/Generic/BasicInstrs.llx b/test/CodeGen/Generic/BasicInstrs.llx
index 8260609..e65cbf7 100644
--- a/test/CodeGen/Generic/BasicInstrs.llx
+++ b/test/CodeGen/Generic/BasicInstrs.llx
@@ -1,54 +1,54 @@
-; New testcase, this contains a bunch of simple instructions that should be
+; New testcase, this contains a bunch of simple instructions that should be
; handled by a code generator.
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-int %add(int %A, int %B) {
- %R = add int %A, %B
- ret int %R
+define i32 @add(i32 %A, i32 %B) {
+ %R = add i32 %A, %B ; <i32> [#uses=1]
+ ret i32 %R
}
-int %sub(int %A, int %B) {
- %R = sub int %A, %B
- ret int %R
+define i32 @sub(i32 %A, i32 %B) {
+ %R = sub i32 %A, %B ; <i32> [#uses=1]
+ ret i32 %R
}
-int %mul(int %A, int %B) {
- %R = mul int %A, %B
- ret int %R
+define i32 @mul(i32 %A, i32 %B) {
+ %R = mul i32 %A, %B ; <i32> [#uses=1]
+ ret i32 %R
}
-int %sdiv(int %A, int %B) {
- %R = div int %A, %B
- ret int %R
+define i32 @sdiv(i32 %A, i32 %B) {
+ %R = sdiv i32 %A, %B ; <i32> [#uses=1]
+ ret i32 %R
}
-uint %udiv(uint %A, uint %B) {
- %R = div uint %A, %B
- ret uint %R
+define i32 @udiv(i32 %A, i32 %B) {
+ %R = udiv i32 %A, %B ; <i32> [#uses=1]
+ ret i32 %R
}
-int %srem(int %A, int %B) {
- %R = rem int %A, %B
- ret int %R
+define i32 @srem(i32 %A, i32 %B) {
+ %R = srem i32 %A, %B ; <i32> [#uses=1]
+ ret i32 %R
}
-uint %urem(uint %A, uint %B) {
- %R = rem uint %A, %B
- ret uint %R
+define i32 @urem(i32 %A, i32 %B) {
+ %R = urem i32 %A, %B ; <i32> [#uses=1]
+ ret i32 %R
}
-int %and(int %A, int %B) {
- %R = and int %A, %B
- ret int %R
+define i32 @and(i32 %A, i32 %B) {
+ %R = and i32 %A, %B ; <i32> [#uses=1]
+ ret i32 %R
}
-int %or(int %A, int %B) {
- %R = or int %A, %B
- ret int %R
+define i32 @or(i32 %A, i32 %B) {
+ %R = or i32 %A, %B ; <i32> [#uses=1]
+ ret i32 %R
}
-int %xor(int %A, int %B) {
- %R = xor int %A, %B
- ret int %R
+define i32 @xor(i32 %A, i32 %B) {
+ %R = xor i32 %A, %B ; <i32> [#uses=1]
+ ret i32 %R
}
diff --git a/test/CodeGen/Generic/BurgBadRegAlloc.ll b/test/CodeGen/Generic/BurgBadRegAlloc.ll
index af74a81..3ccc9a0 100644
--- a/test/CodeGen/Generic/BurgBadRegAlloc.ll
+++ b/test/CodeGen/Generic/BurgBadRegAlloc.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
;; Register allocation is doing a very poor job on this routine from yyparse
;; in Burg:
@@ -7,12 +7,12 @@
;; at function calls, even though there are no intervening uses.
;; -- outgoing args of some function calls have to be swapped, causing
;; another write/read from stack to do the exchange (use -dregalloc=y).
-;;
- %Arity = type %struct.arity*
+;;
+%Arity = type %struct.arity*
%Binding = type %struct.binding*
- %DeltaCost = type [4 x short]
+ %DeltaCost = type [4 x i16]
%Dimension = type %struct.dimension*
- %Index_Map = type { int, %Item_Set* }
+ %Index_Map = type { i32, %Item_Set* }
%IntList = type %struct.intlist*
%Item = type { %DeltaCost, %Rule }
%ItemArray = type %Item*
@@ -25,7 +25,7 @@
%PatternAST = type %struct.patternAST*
%Plank = type %struct.plank*
%PlankMap = type %struct.plankMap*
- %ReadFn = type int ()*
+ %ReadFn = type i32 ()*
%Rule = type %struct.rule*
%RuleAST = type %struct.ruleAST*
%StateMap = type %struct.stateMap*
@@ -33,799 +33,797 @@
%Symbol = type %struct.symbol*
%Table = type %struct.table*
%YYSTYPE = type { %IntList }
- %struct.arity = type { int, %List }
- %struct.binding = type { sbyte*, int }
- %struct.dimension = type { short*, %Index_Map, %Mapping, int, %PlankMap }
- %struct.index_map = type { int, %Item_Set* }
- %struct.intlist = type { int, %IntList }
+ %struct.arity = type { i32, %List }
+ %struct.binding = type { i8*, i32 }
+ %struct.dimension = type { i16*, %Index_Map, %Mapping, i32, %PlankMap }
+ %struct.index_map = type { i32, %Item_Set* }
+ %struct.intlist = type { i32, %IntList }
%struct.item = type { %DeltaCost, %Rule }
- %struct.item_set = type { int, int, %Operator, [2 x %Item_Set], %Item_Set, short*, %ItemArray, %ItemArray }
- %struct.list = type { sbyte*, %List }
- %struct.mapping = type { %List*, int, int, int, %Item_Set* }
- %struct.nonterminal = type { sbyte*, int, int, int, %PlankMap, %Rule }
- %struct.operator = type { sbyte*, uint, int, int, int, int, %Table }
+ %struct.item_set = type { i32, i32, %Operator, [2 x %Item_Set], %Item_Set, i16*, %ItemArray, %ItemArray }
+ %struct.list = type { i8*, %List }
+ %struct.mapping = type { %List*, i32, i32, i32, %Item_Set* }
+ %struct.nonterminal = type { i8*, i32, i32, i32, %PlankMap, %Rule }
+ %struct.operator = type { i8*, i32, i32, i32, i32, i32, %Table }
%struct.pattern = type { %NonTerminal, %Operator, [2 x %NonTerminal] }
- %struct.patternAST = type { %Symbol, sbyte*, %List }
- %struct.plank = type { sbyte*, %List, int }
- %struct.plankMap = type { %List, int, %StateMap }
- %struct.rule = type { %DeltaCost, int, int, int, %NonTerminal, %Pattern, uint }
- %struct.ruleAST = type { sbyte*, %PatternAST, int, %IntList, %Rule, %StrTableElement, %StrTableElement }
- %struct.stateMap = type { sbyte*, %Plank, int, short* }
- %struct.strTableElement = type { sbyte*, %IntList, sbyte* }
- %struct.symbol = type { sbyte*, int, { %Operator } }
- %struct.table = type { %Operator, %List, short*, [2 x %Dimension], %Item_Set* }
-%yylval = external global %YYSTYPE ; <%YYSTYPE*> [#uses=1]
-%yylhs = external global [25 x short] ; <[25 x short]*> [#uses=1]
-%yylen = external global [25 x short] ; <[25 x short]*> [#uses=1]
-%yydefred = external global [43 x short] ; <[43 x short]*> [#uses=1]
-%yydgoto = external global [12 x short] ; <[12 x short]*> [#uses=1]
-%yysindex = external global [43 x short] ; <[43 x short]*> [#uses=2]
-%yyrindex = external global [43 x short] ; <[43 x short]*> [#uses=1]
-%yygindex = external global [12 x short] ; <[12 x short]*> [#uses=1]
-%yytable = external global [263 x short] ; <[263 x short]*> [#uses=4]
-%yycheck = external global [263 x short] ; <[263 x short]*> [#uses=4]
-%yynerrs = external global int ; <int*> [#uses=3]
-%yyerrflag = external global int ; <int*> [#uses=6]
-%yychar = external global int ; <int*> [#uses=15]
-%yyssp = external global short* ; <short**> [#uses=15]
-%yyvsp = external global %YYSTYPE* ; <%YYSTYPE**> [#uses=30]
-%yyval = external global %YYSTYPE ; <%YYSTYPE*> [#uses=1]
-%yyss = external global short* ; <short**> [#uses=3]
-%yysslim = external global short* ; <short**> [#uses=3]
-%yyvs = external global %YYSTYPE* ; <%YYSTYPE**> [#uses=1]
-%.LC01 = external global [13 x sbyte] ; <[13 x sbyte]*> [#uses=1]
-%.LC1 = external global [20 x sbyte] ; <[20 x sbyte]*> [#uses=1]
-
-implementation ; Functions:
-
-int %yyparse() {
-bb0: ; No predecessors!
- store int 0, int* %yynerrs
- store int 0, int* %yyerrflag
- store int -1, int* %yychar
- %reg113 = load short** %yyss ; <short*> [#uses=1]
- %cond581 = setne short* %reg113, null ; <bool> [#uses=1]
- br bool %cond581, label %bb3, label %bb2
+ %struct.patternAST = type { %Symbol, i8*, %List }
+ %struct.plank = type { i8*, %List, i32 }
+ %struct.plankMap = type { %List, i32, %StateMap }
+ %struct.rule = type { %DeltaCost, i32, i32, i32, %NonTerminal, %Pattern, i32 }
+ %struct.ruleAST = type { i8*, %PatternAST, i32, %IntList, %Rule, %StrTableElement, %StrTableElement }
+ %struct.stateMap = type { i8*, %Plank, i32, i16* }
+ %struct.strTableElement = type { i8*, %IntList, i8* }
+ %struct.symbol = type { i8*, i32, { %Operator } }
+ %struct.table = type { %Operator, %List, i16*, [2 x %Dimension], %Item_Set* }
+@yylval = external global %YYSTYPE ; <%YYSTYPE*> [#uses=1]
+@yylhs = external global [25 x i16] ; <[25 x i16]*> [#uses=1]
+@yylen = external global [25 x i16] ; <[25 x i16]*> [#uses=1]
+@yydefred = external global [43 x i16] ; <[43 x i16]*> [#uses=1]
+@yydgoto = external global [12 x i16] ; <[12 x i16]*> [#uses=1]
+@yysindex = external global [43 x i16] ; <[43 x i16]*> [#uses=2]
+@yyrindex = external global [43 x i16] ; <[43 x i16]*> [#uses=1]
+@yygindex = external global [12 x i16] ; <[12 x i16]*> [#uses=1]
+@yytable = external global [263 x i16] ; <[263 x i16]*> [#uses=4]
+@yycheck = external global [263 x i16] ; <[263 x i16]*> [#uses=4]
+@yynerrs = external global i32 ; <i32*> [#uses=3]
+@yyerrflag = external global i32 ; <i32*> [#uses=6]
+@yychar = external global i32 ; <i32*> [#uses=15]
+@yyssp = external global i16* ; <i16**> [#uses=15]
+@yyvsp = external global %YYSTYPE* ; <%YYSTYPE**> [#uses=30]
+@yyval = external global %YYSTYPE ; <%YYSTYPE*> [#uses=1]
+@yyss = external global i16* ; <i16**> [#uses=3]
+@yysslim = external global i16* ; <i16**> [#uses=3]
+@yyvs = external global %YYSTYPE* ; <%YYSTYPE**> [#uses=1]
+@.LC01 = external global [13 x i8] ; <[13 x i8]*> [#uses=1]
+@.LC1 = external global [20 x i8] ; <[20 x i8]*> [#uses=1]
+
+define i32 @yyparse() {
+bb0:
+ store i32 0, i32* @yynerrs
+ store i32 0, i32* @yyerrflag
+ store i32 -1, i32* @yychar
+ %reg113 = load i16** @yyss ; <i16*> [#uses=1]
+ %cond581 = icmp ne i16* %reg113, null ; <i1> [#uses=1]
+ br i1 %cond581, label %bb3, label %bb2
bb2: ; preds = %bb0
- %reg584 = call int %yygrowstack( ) ; <int> [#uses=1]
- %cond584 = setne int %reg584, 0 ; <bool> [#uses=1]
- br bool %cond584, label %bb113, label %bb3
+ %reg584 = call i32 @yygrowstack( ) ; <i32> [#uses=1]
+ %cond584 = icmp ne i32 %reg584, 0 ; <i1> [#uses=1]
+ br i1 %cond584, label %bb113, label %bb3
bb3: ; preds = %bb2, %bb0
- %reg115 = load short** %yyss ; <short*> [#uses=1]
- store short* %reg115, short** %yyssp
- %reg116 = load %YYSTYPE** %yyvs ; <%YYSTYPE*> [#uses=1]
- store %YYSTYPE* %reg116, %YYSTYPE** %yyvsp
- %reg117 = load short** %yyssp ; <short*> [#uses=1]
- store short 0, short* %reg117
+ %reg115 = load i16** @yyss ; <i16*> [#uses=1]
+ store i16* %reg115, i16** @yyssp
+ %reg116 = load %YYSTYPE** @yyvs ; <%YYSTYPE*> [#uses=1]
+ store %YYSTYPE* %reg116, %YYSTYPE** @yyvsp
+ %reg117 = load i16** @yyssp ; <i16*> [#uses=1]
+ store i16 0, i16* %reg117
br label %bb4
-bb4: ; preds = %bb14, %bb15, %bb31, %bb35, %bb102, %bb112, %bb3
- %reg458 = phi uint [ %reg476, %bb112 ], [ 1, %bb102 ], [ %reg458, %bb35 ], [ %cast768, %bb31 ], [ %cast658, %bb15 ], [ %cast658, %bb14 ], [ 0, %bb3 ] ; <uint> [#uses=2]
- %reg458-idxcast = cast uint %reg458 to long ; <long> [#uses=3]
- %reg594 = getelementptr [43 x short]* %yydefred, long 0, long %reg458-idxcast ; <short*> [#uses=1]
- %reg125 = load short* %reg594 ; <short> [#uses=1]
- %cast599 = cast short %reg125 to int ; <int> [#uses=2]
- %cond600 = setne int %cast599, 0 ; <bool> [#uses=1]
- br bool %cond600, label %bb36, label %bb5
+bb4: ; preds = %bb112, %bb102, %bb35, %bb31, %bb15, %bb14, %bb3
+ %reg458 = phi i32 [ %reg476, %bb112 ], [ 1, %bb102 ], [ %reg458, %bb35 ], [ %cast768, %bb31 ], [ %cast658, %bb15 ], [ %cast658, %bb14 ], [ 0, %bb3 ] ; <i32> [#uses=2]
+ %reg458-idxcast = zext i32 %reg458 to i64 ; <i64> [#uses=3]
+ %reg594 = getelementptr [43 x i16]* @yydefred, i64 0, i64 %reg458-idxcast ; <i16*> [#uses=1]
+ %reg125 = load i16* %reg594 ; <i16> [#uses=1]
+ %cast599 = sext i16 %reg125 to i32 ; <i32> [#uses=2]
+ %cond600 = icmp ne i32 %cast599, 0 ; <i1> [#uses=1]
+ br i1 %cond600, label %bb36, label %bb5
bb5: ; preds = %bb4
- %reg127 = load int* %yychar ; <int> [#uses=1]
- %cond603 = setge int %reg127, 0 ; <bool> [#uses=1]
- br bool %cond603, label %bb8, label %bb6
+ %reg127 = load i32* @yychar ; <i32> [#uses=1]
+ %cond603 = icmp sge i32 %reg127, 0 ; <i1> [#uses=1]
+ br i1 %cond603, label %bb8, label %bb6
bb6: ; preds = %bb5
- %reg607 = call int %yylex( ) ; <int> [#uses=1]
- store int %reg607, int* %yychar
- %reg129 = load int* %yychar ; <int> [#uses=1]
- %cond609 = setge int %reg129, 0 ; <bool> [#uses=1]
- br bool %cond609, label %bb8, label %bb7
+ %reg607 = call i32 @yylex( ) ; <i32> [#uses=1]
+ store i32 %reg607, i32* @yychar
+ %reg129 = load i32* @yychar ; <i32> [#uses=1]
+ %cond609 = icmp sge i32 %reg129, 0 ; <i1> [#uses=1]
+ br i1 %cond609, label %bb8, label %bb7
bb7: ; preds = %bb6
- store int 0, int* %yychar
+ store i32 0, i32* @yychar
br label %bb8
bb8: ; preds = %bb7, %bb6, %bb5
- %reg615 = getelementptr [43 x short]* %yysindex, long 0, long %reg458-idxcast ; <short*> [#uses=1]
- %reg137 = load short* %reg615 ; <short> [#uses=1]
- %cast620 = cast short %reg137 to int ; <int> [#uses=2]
- %cond621 = seteq int %cast620, 0 ; <bool> [#uses=1]
- br bool %cond621, label %bb16, label %bb9
+ %reg615 = getelementptr [43 x i16]* @yysindex, i64 0, i64 %reg458-idxcast ; <i16*> [#uses=1]
+ %reg137 = load i16* %reg615 ; <i16> [#uses=1]
+ %cast620 = sext i16 %reg137 to i32 ; <i32> [#uses=2]
+ %cond621 = icmp eq i32 %cast620, 0 ; <i1> [#uses=1]
+ br i1 %cond621, label %bb16, label %bb9
bb9: ; preds = %bb8
- %reg139 = load int* %yychar ; <int> [#uses=2]
- %reg460 = add int %cast620, %reg139 ; <int> [#uses=3]
- %cond624 = setlt int %reg460, 0 ; <bool> [#uses=1]
- br bool %cond624, label %bb16, label %bb10
+ %reg139 = load i32* @yychar ; <i32> [#uses=2]
+ %reg460 = add i32 %cast620, %reg139 ; <i32> [#uses=3]
+ %cond624 = icmp slt i32 %reg460, 0 ; <i1> [#uses=1]
+ br i1 %cond624, label %bb16, label %bb10
bb10: ; preds = %bb9
- %cond627 = setgt int %reg460, 262 ; <bool> [#uses=1]
- br bool %cond627, label %bb16, label %bb11
+ %cond627 = icmp sgt i32 %reg460, 262 ; <i1> [#uses=1]
+ br i1 %cond627, label %bb16, label %bb11
bb11: ; preds = %bb10
- %reg460-idxcast = cast int %reg460 to long ; <long> [#uses=2]
- %reg632 = getelementptr [263 x short]* %yycheck, long 0, long %reg460-idxcast ; <short*> [#uses=1]
- %reg148 = load short* %reg632 ; <short> [#uses=1]
- %cast637 = cast short %reg148 to int ; <int> [#uses=1]
- %cond639 = setne int %cast637, %reg139 ; <bool> [#uses=1]
- br bool %cond639, label %bb16, label %bb12
+ %reg460-idxcast = sext i32 %reg460 to i64 ; <i64> [#uses=2]
+ %reg632 = getelementptr [263 x i16]* @yycheck, i64 0, i64 %reg460-idxcast ; <i16*> [#uses=1]
+ %reg148 = load i16* %reg632 ; <i16> [#uses=1]
+ %cast637 = sext i16 %reg148 to i32 ; <i32> [#uses=1]
+ %cond639 = icmp ne i32 %cast637, %reg139 ; <i1> [#uses=1]
+ br i1 %cond639, label %bb16, label %bb12
bb12: ; preds = %bb11
- %reg150 = load short** %yyssp ; <short*> [#uses=1]
- %cast640 = cast short* %reg150 to sbyte* ; <sbyte*> [#uses=1]
- %reg151 = load short** %yysslim ; <short*> [#uses=1]
- %cast641 = cast short* %reg151 to sbyte* ; <sbyte*> [#uses=1]
- %cond642 = setlt sbyte* %cast640, %cast641 ; <bool> [#uses=1]
- br bool %cond642, label %bb14, label %bb13
+ %reg150 = load i16** @yyssp ; <i16*> [#uses=1]
+ %cast640 = bitcast i16* %reg150 to i8* ; <i8*> [#uses=1]
+ %reg151 = load i16** @yysslim ; <i16*> [#uses=1]
+ %cast641 = bitcast i16* %reg151 to i8* ; <i8*> [#uses=1]
+ %cond642 = icmp ult i8* %cast640, %cast641 ; <i1> [#uses=1]
+ br i1 %cond642, label %bb14, label %bb13
bb13: ; preds = %bb12
- %reg644 = call int %yygrowstack( ) ; <int> [#uses=1]
- %cond644 = setne int %reg644, 0 ; <bool> [#uses=1]
- br bool %cond644, label %bb113, label %bb14
+ %reg644 = call i32 @yygrowstack( ) ; <i32> [#uses=1]
+ %cond644 = icmp ne i32 %reg644, 0 ; <i1> [#uses=1]
+ br i1 %cond644, label %bb113, label %bb14
bb14: ; preds = %bb13, %bb12
- %reg153 = load short** %yyssp ; <short*> [#uses=1]
- %reg647 = getelementptr short* %reg153, long 1 ; <short*> [#uses=2]
- store short* %reg647, short** %yyssp
- %reg653 = getelementptr [263 x short]* %yytable, long 0, long %reg460-idxcast ; <short*> [#uses=1]
- %reg162 = load short* %reg653 ; <short> [#uses=2]
- %cast658 = cast short %reg162 to uint ; <uint> [#uses=2]
- store short %reg162, short* %reg647
- %reg164 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %reg661 = getelementptr %YYSTYPE* %reg164, long 1 ; <%YYSTYPE*> [#uses=1]
- store %YYSTYPE* %reg661, %YYSTYPE** %yyvsp
- %reg167 = load %IntList* getelementptr (%YYSTYPE* %yylval, long 0, uint 0) ; <%IntList> [#uses=1]
- %reg661.idx1 = getelementptr %YYSTYPE* %reg164, long 1, uint 0 ; <%IntList*> [#uses=1]
+ %reg153 = load i16** @yyssp ; <i16*> [#uses=1]
+ %reg647 = getelementptr i16* %reg153, i64 1 ; <i16*> [#uses=2]
+ store i16* %reg647, i16** @yyssp
+ %reg653 = getelementptr [263 x i16]* @yytable, i64 0, i64 %reg460-idxcast ; <i16*> [#uses=1]
+ %reg162 = load i16* %reg653 ; <i16> [#uses=2]
+ %cast658 = sext i16 %reg162 to i32 ; <i32> [#uses=2]
+ store i16 %reg162, i16* %reg647
+ %reg164 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %reg661 = getelementptr %YYSTYPE* %reg164, i64 1 ; <%YYSTYPE*> [#uses=1]
+ store %YYSTYPE* %reg661, %YYSTYPE** @yyvsp
+ %reg167 = load %IntList* getelementptr (%YYSTYPE* @yylval, i64 0, i32 0) ; <%IntList> [#uses=1]
+ %reg661.idx1 = getelementptr %YYSTYPE* %reg164, i64 1, i32 0 ; <%IntList*> [#uses=1]
store %IntList %reg167, %IntList* %reg661.idx1
- store int -1, int* %yychar
- %reg169 = load int* %yyerrflag ; <int> [#uses=2]
- %cond669 = setle int %reg169, 0 ; <bool> [#uses=1]
- br bool %cond669, label %bb4, label %bb15
+ store i32 -1, i32* @yychar
+ %reg169 = load i32* @yyerrflag ; <i32> [#uses=2]
+ %cond669 = icmp sle i32 %reg169, 0 ; <i1> [#uses=1]
+ br i1 %cond669, label %bb4, label %bb15
bb15: ; preds = %bb14
- %reg171 = add int %reg169, -1 ; <int> [#uses=1]
- store int %reg171, int* %yyerrflag
+ %reg171 = add i32 %reg169, -1 ; <i32> [#uses=1]
+ store i32 %reg171, i32* @yyerrflag
br label %bb4
bb16: ; preds = %bb11, %bb10, %bb9, %bb8
- %reg677 = getelementptr [43 x short]* %yyrindex, long 0, long %reg458-idxcast ; <short*> [#uses=1]
- %reg178 = load short* %reg677 ; <short> [#uses=1]
- %cast682 = cast short %reg178 to int ; <int> [#uses=2]
- %cond683 = seteq int %cast682, 0 ; <bool> [#uses=1]
- br bool %cond683, label %bb21, label %bb17
+ %reg677 = getelementptr [43 x i16]* @yyrindex, i64 0, i64 %reg458-idxcast ; <i16*> [#uses=1]
+ %reg178 = load i16* %reg677 ; <i16> [#uses=1]
+ %cast682 = sext i16 %reg178 to i32 ; <i32> [#uses=2]
+ %cond683 = icmp eq i32 %cast682, 0 ; <i1> [#uses=1]
+ br i1 %cond683, label %bb21, label %bb17
bb17: ; preds = %bb16
- %reg180 = load int* %yychar ; <int> [#uses=2]
- %reg463 = add int %cast682, %reg180 ; <int> [#uses=3]
- %cond686 = setlt int %reg463, 0 ; <bool> [#uses=1]
- br bool %cond686, label %bb21, label %bb18
+ %reg180 = load i32* @yychar ; <i32> [#uses=2]
+ %reg463 = add i32 %cast682, %reg180 ; <i32> [#uses=3]
+ %cond686 = icmp slt i32 %reg463, 0 ; <i1> [#uses=1]
+ br i1 %cond686, label %bb21, label %bb18
bb18: ; preds = %bb17
- %cond689 = setgt int %reg463, 262 ; <bool> [#uses=1]
- br bool %cond689, label %bb21, label %bb19
+ %cond689 = icmp sgt i32 %reg463, 262 ; <i1> [#uses=1]
+ br i1 %cond689, label %bb21, label %bb19
bb19: ; preds = %bb18
- %reg463-idxcast = cast int %reg463 to long ; <long> [#uses=2]
- %reg694 = getelementptr [263 x short]* %yycheck, long 0, long %reg463-idxcast ; <short*> [#uses=1]
- %reg189 = load short* %reg694 ; <short> [#uses=1]
- %cast699 = cast short %reg189 to int ; <int> [#uses=1]
- %cond701 = setne int %cast699, %reg180 ; <bool> [#uses=1]
- br bool %cond701, label %bb21, label %bb20
+ %reg463-idxcast = sext i32 %reg463 to i64 ; <i64> [#uses=2]
+ %reg694 = getelementptr [263 x i16]* @yycheck, i64 0, i64 %reg463-idxcast ; <i16*> [#uses=1]
+ %reg189 = load i16* %reg694 ; <i16> [#uses=1]
+ %cast699 = sext i16 %reg189 to i32 ; <i32> [#uses=1]
+ %cond701 = icmp ne i32 %cast699, %reg180 ; <i1> [#uses=1]
+ br i1 %cond701, label %bb21, label %bb20
bb20: ; preds = %bb19
- %reg704 = getelementptr [263 x short]* %yytable, long 0, long %reg463-idxcast ; <short*> [#uses=1]
- %reg197 = load short* %reg704 ; <short> [#uses=1]
- %cast709 = cast short %reg197 to int ; <int> [#uses=1]
+ %reg704 = getelementptr [263 x i16]* @yytable, i64 0, i64 %reg463-idxcast ; <i16*> [#uses=1]
+ %reg197 = load i16* %reg704 ; <i16> [#uses=1]
+ %cast709 = sext i16 %reg197 to i32 ; <i32> [#uses=1]
br label %bb36
bb21: ; preds = %bb19, %bb18, %bb17, %bb16
- %reg198 = load int* %yyerrflag ; <int> [#uses=1]
- %cond711 = setne int %reg198, 0 ; <bool> [#uses=1]
- br bool %cond711, label %bb23, label %bb22
+ %reg198 = load i32* @yyerrflag ; <i32> [#uses=1]
+ %cond711 = icmp ne i32 %reg198, 0 ; <i1> [#uses=1]
+ br i1 %cond711, label %bb23, label %bb22
bb22: ; preds = %bb21
- call void %yyerror( sbyte* getelementptr ([13 x sbyte]* %.LC01, long 0, long 0) )
- %reg200 = load int* %yynerrs ; <int> [#uses=1]
- %reg201 = add int %reg200, 1 ; <int> [#uses=1]
- store int %reg201, int* %yynerrs
+ call void @yyerror( i8* getelementptr ([13 x i8]* @.LC01, i64 0, i64 0) )
+ %reg200 = load i32* @yynerrs ; <i32> [#uses=1]
+ %reg201 = add i32 %reg200, 1 ; <i32> [#uses=1]
+ store i32 %reg201, i32* @yynerrs
br label %bb23
bb23: ; preds = %bb22, %bb21
- %reg202 = load int* %yyerrflag ; <int> [#uses=1]
- %cond719 = setgt int %reg202, 2 ; <bool> [#uses=1]
- br bool %cond719, label %bb34, label %bb24
+ %reg202 = load i32* @yyerrflag ; <i32> [#uses=1]
+ %cond719 = icmp sgt i32 %reg202, 2 ; <i1> [#uses=1]
+ br i1 %cond719, label %bb34, label %bb24
bb24: ; preds = %bb23
- store int 3, int* %yyerrflag
- %reg241 = load short** %yyss ; <short*> [#uses=1]
- %cast778 = cast short* %reg241 to sbyte* ; <sbyte*> [#uses=1]
+ store i32 3, i32* @yyerrflag
+ %reg241 = load i16** @yyss ; <i16*> [#uses=1]
+ %cast778 = bitcast i16* %reg241 to i8* ; <i8*> [#uses=1]
br label %bb25
bb25: ; preds = %bb33, %bb24
- %reg204 = load short** %yyssp ; <short*> [#uses=4]
- %reg206 = load short* %reg204 ; <short> [#uses=1]
- %reg206-idxcast = cast short %reg206 to long ; <long> [#uses=1]
- %reg727 = getelementptr [43 x short]* %yysindex, long 0, long %reg206-idxcast ; <short*> [#uses=1]
- %reg212 = load short* %reg727 ; <short> [#uses=2]
- %cast732 = cast short %reg212 to int ; <int> [#uses=2]
- %cond733 = seteq int %cast732, 0 ; <bool> [#uses=1]
- br bool %cond733, label %bb32, label %bb26
+ %reg204 = load i16** @yyssp ; <i16*> [#uses=4]
+ %reg206 = load i16* %reg204 ; <i16> [#uses=1]
+ %reg206-idxcast = sext i16 %reg206 to i64 ; <i64> [#uses=1]
+ %reg727 = getelementptr [43 x i16]* @yysindex, i64 0, i64 %reg206-idxcast ; <i16*> [#uses=1]
+ %reg212 = load i16* %reg727 ; <i16> [#uses=2]
+ %cast732 = sext i16 %reg212 to i32 ; <i32> [#uses=2]
+ %cond733 = icmp eq i32 %cast732, 0 ; <i1> [#uses=1]
+ br i1 %cond733, label %bb32, label %bb26
bb26: ; preds = %bb25
- %reg466 = add int %cast732, 256 ; <int> [#uses=2]
- %cond736 = setlt int %reg466, 0 ; <bool> [#uses=1]
- br bool %cond736, label %bb32, label %bb27
+ %reg466 = add i32 %cast732, 256 ; <i32> [#uses=2]
+ %cond736 = icmp slt i32 %reg466, 0 ; <i1> [#uses=1]
+ br i1 %cond736, label %bb32, label %bb27
bb27: ; preds = %bb26
- %cond739 = setgt int %reg466, 262 ; <bool> [#uses=1]
- br bool %cond739, label %bb32, label %bb28
+ %cond739 = icmp sgt i32 %reg466, 262 ; <i1> [#uses=1]
+ br i1 %cond739, label %bb32, label %bb28
bb28: ; preds = %bb27
- %reg212-idxcast = cast short %reg212 to long ; <long> [#uses=1]
- %reg212-idxcast-offset = add long %reg212-idxcast, 256 ; <long> [#uses=2]
- %reg744 = getelementptr [263 x short]* %yycheck, long 0, long %reg212-idxcast-offset ; <short*> [#uses=1]
- %reg221 = load short* %reg744 ; <short> [#uses=1]
- %cond748 = setne short %reg221, 256 ; <bool> [#uses=1]
- br bool %cond748, label %bb32, label %bb29
+ %reg212-idxcast = sext i16 %reg212 to i64 ; <i64> [#uses=1]
+ %reg212-idxcast-offset = add i64 %reg212-idxcast, 256 ; <i64> [#uses=2]
+ %reg744 = getelementptr [263 x i16]* @yycheck, i64 0, i64 %reg212-idxcast-offset ; <i16*> [#uses=1]
+ %reg221 = load i16* %reg744 ; <i16> [#uses=1]
+ %cond748 = icmp ne i16 %reg221, 256 ; <i1> [#uses=1]
+ br i1 %cond748, label %bb32, label %bb29
bb29: ; preds = %bb28
- %cast750 = cast short* %reg204 to sbyte* ; <sbyte*> [#uses=1]
- %reg223 = load short** %yysslim ; <short*> [#uses=1]
- %cast751 = cast short* %reg223 to sbyte* ; <sbyte*> [#uses=1]
- %cond752 = setlt sbyte* %cast750, %cast751 ; <bool> [#uses=1]
- br bool %cond752, label %bb31, label %bb30
+ %cast750 = bitcast i16* %reg204 to i8* ; <i8*> [#uses=1]
+ %reg223 = load i16** @yysslim ; <i16*> [#uses=1]
+ %cast751 = bitcast i16* %reg223 to i8* ; <i8*> [#uses=1]
+ %cond752 = icmp ult i8* %cast750, %cast751 ; <i1> [#uses=1]
+ br i1 %cond752, label %bb31, label %bb30
bb30: ; preds = %bb29
- %reg754 = call int %yygrowstack( ) ; <int> [#uses=1]
- %cond754 = setne int %reg754, 0 ; <bool> [#uses=1]
- br bool %cond754, label %bb113, label %bb31
+ %reg754 = call i32 @yygrowstack( ) ; <i32> [#uses=1]
+ %cond754 = icmp ne i32 %reg754, 0 ; <i1> [#uses=1]
+ br i1 %cond754, label %bb113, label %bb31
bb31: ; preds = %bb30, %bb29
- %reg225 = load short** %yyssp ; <short*> [#uses=1]
- %reg757 = getelementptr short* %reg225, long 1 ; <short*> [#uses=2]
- store short* %reg757, short** %yyssp
- %reg763 = getelementptr [263 x short]* %yytable, long 0, long %reg212-idxcast-offset ; <short*> [#uses=1]
- %reg234 = load short* %reg763 ; <short> [#uses=2]
- %cast768 = cast short %reg234 to uint ; <uint> [#uses=1]
- store short %reg234, short* %reg757
- %reg236 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %reg771 = getelementptr %YYSTYPE* %reg236, long 1 ; <%YYSTYPE*> [#uses=1]
- store %YYSTYPE* %reg771, %YYSTYPE** %yyvsp
- %reg239 = load %IntList* getelementptr (%YYSTYPE* %yylval, long 0, uint 0) ; <%IntList> [#uses=1]
- %reg771.idx1 = getelementptr %YYSTYPE* %reg236, long 1, uint 0 ; <%IntList*> [#uses=1]
+ %reg225 = load i16** @yyssp ; <i16*> [#uses=1]
+ %reg757 = getelementptr i16* %reg225, i64 1 ; <i16*> [#uses=2]
+ store i16* %reg757, i16** @yyssp
+ %reg763 = getelementptr [263 x i16]* @yytable, i64 0, i64 %reg212-idxcast-offset ; <i16*> [#uses=1]
+ %reg234 = load i16* %reg763 ; <i16> [#uses=2]
+ %cast768 = sext i16 %reg234 to i32 ; <i32> [#uses=1]
+ store i16 %reg234, i16* %reg757
+ %reg236 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %reg771 = getelementptr %YYSTYPE* %reg236, i64 1 ; <%YYSTYPE*> [#uses=1]
+ store %YYSTYPE* %reg771, %YYSTYPE** @yyvsp
+ %reg239 = load %IntList* getelementptr (%YYSTYPE* @yylval, i64 0, i32 0) ; <%IntList> [#uses=1]
+ %reg771.idx1 = getelementptr %YYSTYPE* %reg236, i64 1, i32 0 ; <%IntList*> [#uses=1]
store %IntList %reg239, %IntList* %reg771.idx1
br label %bb4
bb32: ; preds = %bb28, %bb27, %bb26, %bb25
- %cast777 = cast short* %reg204 to sbyte* ; <sbyte*> [#uses=1]
- %cond779 = setle sbyte* %cast777, %cast778 ; <bool> [#uses=1]
- br bool %cond779, label %UnifiedExitNode, label %bb33
+ %cast777 = bitcast i16* %reg204 to i8* ; <i8*> [#uses=1]
+ %cond779 = icmp ule i8* %cast777, %cast778 ; <i1> [#uses=1]
+ br i1 %cond779, label %UnifiedExitNode, label %bb33
bb33: ; preds = %bb32
- %reg781 = getelementptr short* %reg204, long -1 ; <short*> [#uses=1]
- store short* %reg781, short** %yyssp
- %reg244 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
- %reg786 = getelementptr %YYSTYPE* %reg244, long -1 ; <%YYSTYPE*> [#uses=1]
- store %YYSTYPE* %reg786, %YYSTYPE** %yyvsp
+ %reg781 = getelementptr i16* %reg204, i64 -1 ; <i16*> [#uses=1]
+ store i16* %reg781, i16** @yyssp
+ %reg244 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=1]
+ %reg786 = getelementptr %YYSTYPE* %reg244, i64 -1 ; <%YYSTYPE*> [#uses=1]
+ store %YYSTYPE* %reg786, %YYSTYPE** @yyvsp
br label %bb25
bb34: ; preds = %bb23
- %reg246 = load int* %yychar ; <int> [#uses=1]
- %cond791 = seteq int %reg246, 0 ; <bool> [#uses=1]
- br bool %cond791, label %UnifiedExitNode, label %bb35
+ %reg246 = load i32* @yychar ; <i32> [#uses=1]
+ %cond791 = icmp eq i32 %reg246, 0 ; <i1> [#uses=1]
+ br i1 %cond791, label %UnifiedExitNode, label %bb35
bb35: ; preds = %bb34
- store int -1, int* %yychar
+ store i32 -1, i32* @yychar
br label %bb4
bb36: ; preds = %bb20, %bb4
- %reg468 = phi int [ %cast709, %bb20 ], [ %cast599, %bb4 ] ; <int> [#uses=31]
- %reg468-idxcast = cast int %reg468 to long ; <long> [#uses=2]
- %reg796 = getelementptr [25 x short]* %yylen, long 0, long %reg468-idxcast ; <short*> [#uses=1]
- %reg254 = load short* %reg796 ; <short> [#uses=2]
- %reg259 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
- %reg254-idxcast = cast short %reg254 to long ; <long> [#uses=1]
- %reg254-idxcast-scale = mul long %reg254-idxcast, -1 ; <long> [#uses=1]
- %reg254-idxcast-scale-offset = add long %reg254-idxcast-scale, 1 ; <long> [#uses=1]
- %reg261.idx1 = getelementptr %YYSTYPE* %reg259, long %reg254-idxcast-scale-offset, uint 0 ; <%IntList*> [#uses=1]
+ %reg468 = phi i32 [ %cast709, %bb20 ], [ %cast599, %bb4 ] ; <i32> [#uses=31]
+ %reg468-idxcast = sext i32 %reg468 to i64 ; <i64> [#uses=2]
+ %reg796 = getelementptr [25 x i16]* @yylen, i64 0, i64 %reg468-idxcast ; <i16*> [#uses=1]
+ %reg254 = load i16* %reg796 ; <i16> [#uses=2]
+ %reg259 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=1]
+ %reg254-idxcast = sext i16 %reg254 to i64 ; <i64> [#uses=1]
+ %reg254-idxcast-scale = mul i64 %reg254-idxcast, -1 ; <i64> [#uses=1]
+ %reg254-idxcast-scale-offset = add i64 %reg254-idxcast-scale, 1 ; <i64> [#uses=1]
+ %reg261.idx1 = getelementptr %YYSTYPE* %reg259, i64 %reg254-idxcast-scale-offset, i32 0 ; <%IntList*> [#uses=1]
%reg261 = load %IntList* %reg261.idx1 ; <%IntList> [#uses=1]
- store %IntList %reg261, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
- %cond812 = seteq int %reg468, 13 ; <bool> [#uses=1]
- br bool %cond812, label %bb85, label %bb37
+ store %IntList %reg261, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
+ %cond812 = icmp eq i32 %reg468, 13 ; <i1> [#uses=1]
+ br i1 %cond812, label %bb85, label %bb37
bb37: ; preds = %bb36
- %cond814 = setgt int %reg468, 13 ; <bool> [#uses=1]
- br bool %cond814, label %bb56, label %bb38
+ %cond814 = icmp sgt i32 %reg468, 13 ; <i1> [#uses=1]
+ br i1 %cond814, label %bb56, label %bb38
bb38: ; preds = %bb37
- %cond817 = seteq int %reg468, 7 ; <bool> [#uses=1]
- br bool %cond817, label %bb79, label %bb39
+ %cond817 = icmp eq i32 %reg468, 7 ; <i1> [#uses=1]
+ br i1 %cond817, label %bb79, label %bb39
bb39: ; preds = %bb38
- %cond819 = setgt int %reg468, 7 ; <bool> [#uses=1]
- br bool %cond819, label %bb48, label %bb40
+ %cond819 = icmp sgt i32 %reg468, 7 ; <i1> [#uses=1]
+ br i1 %cond819, label %bb48, label %bb40
bb40: ; preds = %bb39
- %cond822 = seteq int %reg468, 4 ; <bool> [#uses=1]
- br bool %cond822, label %bb76, label %bb41
+ %cond822 = icmp eq i32 %reg468, 4 ; <i1> [#uses=1]
+ br i1 %cond822, label %bb76, label %bb41
bb41: ; preds = %bb40
- %cond824 = setgt int %reg468, 4 ; <bool> [#uses=1]
- br bool %cond824, label %bb45, label %bb42
+ %cond824 = icmp sgt i32 %reg468, 4 ; <i1> [#uses=1]
+ br i1 %cond824, label %bb45, label %bb42
bb42: ; preds = %bb41
- %cond827 = seteq int %reg468, 2 ; <bool> [#uses=1]
- br bool %cond827, label %bb74, label %bb43
+ %cond827 = icmp eq i32 %reg468, 2 ; <i1> [#uses=1]
+ br i1 %cond827, label %bb74, label %bb43
bb43: ; preds = %bb42
- %cond829 = seteq int %reg468, 3 ; <bool> [#uses=1]
- br bool %cond829, label %bb75, label %bb97
+ %cond829 = icmp eq i32 %reg468, 3 ; <i1> [#uses=1]
+ br i1 %cond829, label %bb75, label %bb97
bb45: ; preds = %bb41
- %cond831 = seteq int %reg468, 5 ; <bool> [#uses=1]
- br bool %cond831, label %bb77, label %bb46
+ %cond831 = icmp eq i32 %reg468, 5 ; <i1> [#uses=1]
+ br i1 %cond831, label %bb77, label %bb46
bb46: ; preds = %bb45
- %cond833 = seteq int %reg468, 6 ; <bool> [#uses=1]
- br bool %cond833, label %bb78, label %bb97
+ %cond833 = icmp eq i32 %reg468, 6 ; <i1> [#uses=1]
+ br i1 %cond833, label %bb78, label %bb97
bb48: ; preds = %bb39
- %cond835 = seteq int %reg468, 10 ; <bool> [#uses=1]
- br bool %cond835, label %bb82, label %bb49
+ %cond835 = icmp eq i32 %reg468, 10 ; <i1> [#uses=1]
+ br i1 %cond835, label %bb82, label %bb49
bb49: ; preds = %bb48
- %cond837 = setgt int %reg468, 10 ; <bool> [#uses=1]
- br bool %cond837, label %bb53, label %bb50
+ %cond837 = icmp sgt i32 %reg468, 10 ; <i1> [#uses=1]
+ br i1 %cond837, label %bb53, label %bb50
bb50: ; preds = %bb49
- %cond840 = seteq int %reg468, 8 ; <bool> [#uses=1]
- br bool %cond840, label %bb80, label %bb51
+ %cond840 = icmp eq i32 %reg468, 8 ; <i1> [#uses=1]
+ br i1 %cond840, label %bb80, label %bb51
bb51: ; preds = %bb50
- %cond842 = seteq int %reg468, 9 ; <bool> [#uses=1]
- br bool %cond842, label %bb81, label %bb97
+ %cond842 = icmp eq i32 %reg468, 9 ; <i1> [#uses=1]
+ br i1 %cond842, label %bb81, label %bb97
bb53: ; preds = %bb49
- %cond844 = seteq int %reg468, 11 ; <bool> [#uses=1]
- br bool %cond844, label %bb83, label %bb54
+ %cond844 = icmp eq i32 %reg468, 11 ; <i1> [#uses=1]
+ br i1 %cond844, label %bb83, label %bb54
bb54: ; preds = %bb53
- %cond846 = seteq int %reg468, 12 ; <bool> [#uses=1]
- br bool %cond846, label %bb84, label %bb97
+ %cond846 = icmp eq i32 %reg468, 12 ; <i1> [#uses=1]
+ br i1 %cond846, label %bb84, label %bb97
bb56: ; preds = %bb37
- %cond848 = seteq int %reg468, 19 ; <bool> [#uses=1]
- br bool %cond848, label %bb91, label %bb57
+ %cond848 = icmp eq i32 %reg468, 19 ; <i1> [#uses=1]
+ br i1 %cond848, label %bb91, label %bb57
bb57: ; preds = %bb56
- %cond850 = setgt int %reg468, 19 ; <bool> [#uses=1]
- br bool %cond850, label %bb66, label %bb58
+ %cond850 = icmp sgt i32 %reg468, 19 ; <i1> [#uses=1]
+ br i1 %cond850, label %bb66, label %bb58
bb58: ; preds = %bb57
- %cond853 = seteq int %reg468, 16 ; <bool> [#uses=1]
- br bool %cond853, label %bb88, label %bb59
+ %cond853 = icmp eq i32 %reg468, 16 ; <i1> [#uses=1]
+ br i1 %cond853, label %bb88, label %bb59
bb59: ; preds = %bb58
- %cond855 = setgt int %reg468, 16 ; <bool> [#uses=1]
- br bool %cond855, label %bb63, label %bb60
+ %cond855 = icmp sgt i32 %reg468, 16 ; <i1> [#uses=1]
+ br i1 %cond855, label %bb63, label %bb60
bb60: ; preds = %bb59
- %cond858 = seteq int %reg468, 14 ; <bool> [#uses=1]
- br bool %cond858, label %bb86, label %bb61
+ %cond858 = icmp eq i32 %reg468, 14 ; <i1> [#uses=1]
+ br i1 %cond858, label %bb86, label %bb61
bb61: ; preds = %bb60
- %cond860 = seteq int %reg468, 15 ; <bool> [#uses=1]
- br bool %cond860, label %bb87, label %bb97
+ %cond860 = icmp eq i32 %reg468, 15 ; <i1> [#uses=1]
+ br i1 %cond860, label %bb87, label %bb97
bb63: ; preds = %bb59
- %cond862 = seteq int %reg468, 17 ; <bool> [#uses=1]
- br bool %cond862, label %bb89, label %bb64
+ %cond862 = icmp eq i32 %reg468, 17 ; <i1> [#uses=1]
+ br i1 %cond862, label %bb89, label %bb64
bb64: ; preds = %bb63
- %cond864 = seteq int %reg468, 18 ; <bool> [#uses=1]
- br bool %cond864, label %bb90, label %bb97
+ %cond864 = icmp eq i32 %reg468, 18 ; <i1> [#uses=1]
+ br i1 %cond864, label %bb90, label %bb97
bb66: ; preds = %bb57
- %cond866 = seteq int %reg468, 22 ; <bool> [#uses=1]
- br bool %cond866, label %bb94, label %bb67
+ %cond866 = icmp eq i32 %reg468, 22 ; <i1> [#uses=1]
+ br i1 %cond866, label %bb94, label %bb67
bb67: ; preds = %bb66
- %cond868 = setgt int %reg468, 22 ; <bool> [#uses=1]
- br bool %cond868, label %bb71, label %bb68
+ %cond868 = icmp sgt i32 %reg468, 22 ; <i1> [#uses=1]
+ br i1 %cond868, label %bb71, label %bb68
bb68: ; preds = %bb67
- %cond871 = seteq int %reg468, 20 ; <bool> [#uses=1]
- br bool %cond871, label %bb92, label %bb69
+ %cond871 = icmp eq i32 %reg468, 20 ; <i1> [#uses=1]
+ br i1 %cond871, label %bb92, label %bb69
bb69: ; preds = %bb68
- %cond873 = seteq int %reg468, 21 ; <bool> [#uses=1]
- br bool %cond873, label %bb93, label %bb97
+ %cond873 = icmp eq i32 %reg468, 21 ; <i1> [#uses=1]
+ br i1 %cond873, label %bb93, label %bb97
bb71: ; preds = %bb67
- %cond875 = seteq int %reg468, 23 ; <bool> [#uses=1]
- br bool %cond875, label %bb95, label %bb72
+ %cond875 = icmp eq i32 %reg468, 23 ; <i1> [#uses=1]
+ br i1 %cond875, label %bb95, label %bb72
bb72: ; preds = %bb71
- %cond877 = seteq int %reg468, 24 ; <bool> [#uses=1]
- br bool %cond877, label %bb96, label %bb97
+ %cond877 = icmp eq i32 %reg468, 24 ; <i1> [#uses=1]
+ br i1 %cond877, label %bb96, label %bb97
bb74: ; preds = %bb42
- call void %yyfinished( )
+ call void @yyfinished( )
br label %bb97
bb75: ; preds = %bb43
- %reg262 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %reg264.idx1 = getelementptr %YYSTYPE* %reg262, long -2, uint 0 ; <%IntList*> [#uses=1]
+ %reg262 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %reg264.idx1 = getelementptr %YYSTYPE* %reg262, i64 -2, i32 0 ; <%IntList*> [#uses=1]
%reg264 = load %IntList* %reg264.idx1 ; <%IntList> [#uses=1]
- %reg265.idx = getelementptr %YYSTYPE* %reg262, long 0, uint 0 ; <%IntList*> [#uses=1]
+ %reg265.idx = getelementptr %YYSTYPE* %reg262, i64 0, i32 0 ; <%IntList*> [#uses=1]
%reg265 = load %IntList* %reg265.idx ; <%IntList> [#uses=1]
- %cast889 = cast %IntList %reg265 to %List ; <%List> [#uses=1]
- %cast890 = cast %IntList %reg264 to %List ; <%List> [#uses=1]
- call void %doSpec( %List %cast890, %List %cast889 )
+ %cast889 = bitcast %IntList %reg265 to %List ; <%List> [#uses=1]
+ %cast890 = bitcast %IntList %reg264 to %List ; <%List> [#uses=1]
+ call void @doSpec( %List %cast890, %List %cast889 )
br label %bb97
bb76: ; preds = %bb40
- store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ store %IntList null, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb77: ; preds = %bb45
- %reg269 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %cast894 = getelementptr %YYSTYPE* %reg269, long 0, uint 0 ; <%IntList*> [#uses=1]
+ %reg269 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %cast894 = getelementptr %YYSTYPE* %reg269, i64 0, i32 0 ; <%IntList*> [#uses=1]
%reg271 = load %IntList* %cast894 ; <%IntList> [#uses=1]
- %reg271 = cast %IntList %reg271 to sbyte* ; <sbyte*> [#uses=1]
- %reg272.idx1 = getelementptr %YYSTYPE* %reg269, long -1, uint 0 ; <%IntList*> [#uses=1]
+ %reg271.upgrd.1 = bitcast %IntList %reg271 to i8* ; <i8*> [#uses=1]
+ %reg272.idx1 = getelementptr %YYSTYPE* %reg269, i64 -1, i32 0 ; <%IntList*> [#uses=1]
%reg272 = load %IntList* %reg272.idx1 ; <%IntList> [#uses=1]
- %cast901 = cast %IntList %reg272 to %List ; <%List> [#uses=1]
- %reg901 = call %List %newList( sbyte* %reg271, %List %cast901 ) ; <%List> [#uses=1]
- cast %List %reg901 to %IntList ; <%IntList>:0 [#uses=1]
- store %IntList %0, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %cast901 = bitcast %IntList %reg272 to %List ; <%List> [#uses=1]
+ %reg901 = call %List @newList( i8* %reg271.upgrd.1, %List %cast901 ) ; <%List> [#uses=1]
+ bitcast %List %reg901 to %IntList ; <%IntList>:0 [#uses=1]
+ store %IntList %0, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb78: ; preds = %bb46
- %reg275 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
- %reg277.idx = getelementptr %YYSTYPE* %reg275, long 0, uint 0 ; <%IntList*> [#uses=1]
+ %reg275 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=1]
+ %reg277.idx = getelementptr %YYSTYPE* %reg275, i64 0, i32 0 ; <%IntList*> [#uses=1]
%reg277 = load %IntList* %reg277.idx ; <%IntList> [#uses=1]
- %cast907 = cast %IntList %reg277 to %List ; <%List> [#uses=1]
- %reg907 = call %Arity %newArity( int -1, %List %cast907 ) ; <%Arity> [#uses=1]
- cast %Arity %reg907 to %IntList ; <%IntList>:1 [#uses=1]
- store %IntList %1, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %cast907 = bitcast %IntList %reg277 to %List ; <%List> [#uses=1]
+ %reg907 = call %Arity @newArity( i32 -1, %List %cast907 ) ; <%Arity> [#uses=1]
+ bitcast %Arity %reg907 to %IntList ; <%IntList>:1 [#uses=1]
+ store %IntList %1, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb79: ; preds = %bb38
- store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
- %reg281 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
- %cast912 = getelementptr %YYSTYPE* %reg281, long 0, uint 0 ; <%IntList*> [#uses=1]
+ store %IntList null, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
+ %reg281 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=1]
+ %cast912 = getelementptr %YYSTYPE* %reg281, i64 0, i32 0 ; <%IntList*> [#uses=1]
%reg282 = load %IntList* %cast912 ; <%IntList> [#uses=1]
- %reg282 = cast %IntList %reg282 to %List ; <%List> [#uses=1]
- call void %doGram( %List %reg282 )
+ %reg282.upgrd.2 = bitcast %IntList %reg282 to %List ; <%List> [#uses=1]
+ call void @doGram( %List %reg282.upgrd.2 )
br label %bb97
bb80: ; preds = %bb50
- store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
- %reg285 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
- %cast917 = getelementptr %YYSTYPE* %reg285, long 0, uint 0 ; <%IntList*> [#uses=1]
+ store %IntList null, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
+ %reg285 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=1]
+ %cast917 = getelementptr %YYSTYPE* %reg285, i64 0, i32 0 ; <%IntList*> [#uses=1]
%reg286 = load %IntList* %cast917 ; <%IntList> [#uses=1]
- %reg286 = cast %IntList %reg286 to sbyte* ; <sbyte*> [#uses=1]
- call void %doStart( sbyte* %reg286 )
+ %reg286.upgrd.3 = bitcast %IntList %reg286 to i8* ; <i8*> [#uses=1]
+ call void @doStart( i8* %reg286.upgrd.3 )
br label %bb97
bb81: ; preds = %bb51
- store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ store %IntList null, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb82: ; preds = %bb48
- %reg290 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %cast923 = getelementptr %YYSTYPE* %reg290, long 0, uint 0 ; <%IntList*> [#uses=1]
+ %reg290 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %cast923 = getelementptr %YYSTYPE* %reg290, i64 0, i32 0 ; <%IntList*> [#uses=1]
%reg292 = load %IntList* %cast923 ; <%IntList> [#uses=1]
- %reg292 = cast %IntList %reg292 to sbyte* ; <sbyte*> [#uses=1]
- %reg293.idx1 = getelementptr %YYSTYPE* %reg290, long -1, uint 0 ; <%IntList*> [#uses=1]
+ %reg292.upgrd.4 = bitcast %IntList %reg292 to i8* ; <i8*> [#uses=1]
+ %reg293.idx1 = getelementptr %YYSTYPE* %reg290, i64 -1, i32 0 ; <%IntList*> [#uses=1]
%reg293 = load %IntList* %reg293.idx1 ; <%IntList> [#uses=1]
- %cast930 = cast %IntList %reg293 to %List ; <%List> [#uses=1]
- %reg930 = call %List %newList( sbyte* %reg292, %List %cast930 ) ; <%List> [#uses=1]
- cast %List %reg930 to %IntList ; <%IntList>:2 [#uses=1]
- store %IntList %2, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %cast930 = bitcast %IntList %reg293 to %List ; <%List> [#uses=1]
+ %reg930 = call %List @newList( i8* %reg292.upgrd.4, %List %cast930 ) ; <%List> [#uses=1]
+ bitcast %List %reg930 to %IntList ; <%IntList>:2 [#uses=1]
+ store %IntList %2, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb83: ; preds = %bb53
- store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ store %IntList null, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb84: ; preds = %bb54
- %reg298 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %cast936 = getelementptr %YYSTYPE* %reg298, long 0, uint 0 ; <%IntList*> [#uses=1]
+ %reg298 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %cast936 = getelementptr %YYSTYPE* %reg298, i64 0, i32 0 ; <%IntList*> [#uses=1]
%reg300 = load %IntList* %cast936 ; <%IntList> [#uses=1]
- %reg300 = cast %IntList %reg300 to sbyte* ; <sbyte*> [#uses=1]
- %reg301.idx1 = getelementptr %YYSTYPE* %reg298, long -1, uint 0 ; <%IntList*> [#uses=1]
+ %reg300.upgrd.5 = bitcast %IntList %reg300 to i8* ; <i8*> [#uses=1]
+ %reg301.idx1 = getelementptr %YYSTYPE* %reg298, i64 -1, i32 0 ; <%IntList*> [#uses=1]
%reg301 = load %IntList* %reg301.idx1 ; <%IntList> [#uses=1]
- %cast943 = cast %IntList %reg301 to %List ; <%List> [#uses=1]
- %reg943 = call %List %newList( sbyte* %reg300, %List %cast943 ) ; <%List> [#uses=1]
- cast %List %reg943 to %IntList ; <%IntList>:3 [#uses=1]
- store %IntList %3, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %cast943 = bitcast %IntList %reg301 to %List ; <%List> [#uses=1]
+ %reg943 = call %List @newList( i8* %reg300.upgrd.5, %List %cast943 ) ; <%List> [#uses=1]
+ bitcast %List %reg943 to %IntList ; <%IntList>:3 [#uses=1]
+ store %IntList %3, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb85: ; preds = %bb36
- %reg304 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %cast9521 = getelementptr %YYSTYPE* %reg304, long -2, uint 0 ; <%IntList*> [#uses=1]
+ %reg304 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %cast9521 = getelementptr %YYSTYPE* %reg304, i64 -2, i32 0 ; <%IntList*> [#uses=1]
%reg306 = load %IntList* %cast9521 ; <%IntList> [#uses=1]
- %reg306 = cast %IntList %reg306 to sbyte* ; <sbyte*> [#uses=1]
- %cast953 = cast %YYSTYPE* %reg304 to int* ; <int*> [#uses=1]
- %reg307 = load int* %cast953 ; <int> [#uses=1]
- %reg955 = call %Binding %newBinding( sbyte* %reg306, int %reg307 ) ; <%Binding> [#uses=1]
- cast %Binding %reg955 to %IntList ; <%IntList>:4 [#uses=1]
- store %IntList %4, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %reg306.upgrd.6 = bitcast %IntList %reg306 to i8* ; <i8*> [#uses=1]
+ %cast953 = bitcast %YYSTYPE* %reg304 to i32* ; <i32*> [#uses=1]
+ %reg307 = load i32* %cast953 ; <i32> [#uses=1]
+ %reg955 = call %Binding @newBinding( i8* %reg306.upgrd.6, i32 %reg307 ) ; <%Binding> [#uses=1]
+ bitcast %Binding %reg955 to %IntList ; <%IntList>:4 [#uses=1]
+ store %IntList %4, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb86: ; preds = %bb60
- store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ store %IntList null, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb87: ; preds = %bb61
- %reg312 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %cast961 = getelementptr %YYSTYPE* %reg312, long 0, uint 0 ; <%IntList*> [#uses=1]
+ %reg312 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %cast961 = getelementptr %YYSTYPE* %reg312, i64 0, i32 0 ; <%IntList*> [#uses=1]
%reg314 = load %IntList* %cast961 ; <%IntList> [#uses=1]
- %reg314 = cast %IntList %reg314 to sbyte* ; <sbyte*> [#uses=1]
- %reg315.idx1 = getelementptr %YYSTYPE* %reg312, long -1, uint 0 ; <%IntList*> [#uses=1]
+ %reg314.upgrd.7 = bitcast %IntList %reg314 to i8* ; <i8*> [#uses=1]
+ %reg315.idx1 = getelementptr %YYSTYPE* %reg312, i64 -1, i32 0 ; <%IntList*> [#uses=1]
%reg315 = load %IntList* %reg315.idx1 ; <%IntList> [#uses=1]
- %cast968 = cast %IntList %reg315 to %List ; <%List> [#uses=1]
- %reg968 = call %List %newList( sbyte* %reg314, %List %cast968 ) ; <%List> [#uses=1]
- cast %List %reg968 to %IntList ; <%IntList>:5 [#uses=1]
- store %IntList %5, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %cast968 = bitcast %IntList %reg315 to %List ; <%List> [#uses=1]
+ %reg968 = call %List @newList( i8* %reg314.upgrd.7, %List %cast968 ) ; <%List> [#uses=1]
+ bitcast %List %reg968 to %IntList ; <%IntList>:5 [#uses=1]
+ store %IntList %5, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb88: ; preds = %bb58
- %reg318 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=4]
- %cast9791 = getelementptr %YYSTYPE* %reg318, long -6, uint 0 ; <%IntList*> [#uses=1]
+ %reg318 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=4]
+ %cast9791 = getelementptr %YYSTYPE* %reg318, i64 -6, i32 0 ; <%IntList*> [#uses=1]
%reg322 = load %IntList* %cast9791 ; <%IntList> [#uses=1]
- %reg322 = cast %IntList %reg322 to sbyte* ; <sbyte*> [#uses=1]
- %reg323.idx1 = getelementptr %YYSTYPE* %reg318, long -4, uint 0 ; <%IntList*> [#uses=1]
+ %reg322.upgrd.8 = bitcast %IntList %reg322 to i8* ; <i8*> [#uses=1]
+ %reg323.idx1 = getelementptr %YYSTYPE* %reg318, i64 -4, i32 0 ; <%IntList*> [#uses=1]
%reg323 = load %IntList* %reg323.idx1 ; <%IntList> [#uses=1]
- %reg987 = getelementptr %YYSTYPE* %reg318, long -2 ; <%YYSTYPE*> [#uses=1]
- %cast989 = cast %YYSTYPE* %reg987 to int* ; <int*> [#uses=1]
- %reg324 = load int* %cast989 ; <int> [#uses=1]
- %reg325.idx1 = getelementptr %YYSTYPE* %reg318, long -1, uint 0 ; <%IntList*> [#uses=1]
+ %reg987 = getelementptr %YYSTYPE* %reg318, i64 -2 ; <%YYSTYPE*> [#uses=1]
+ %cast989 = bitcast %YYSTYPE* %reg987 to i32* ; <i32*> [#uses=1]
+ %reg324 = load i32* %cast989 ; <i32> [#uses=1]
+ %reg325.idx1 = getelementptr %YYSTYPE* %reg318, i64 -1, i32 0 ; <%IntList*> [#uses=1]
%reg325 = load %IntList* %reg325.idx1 ; <%IntList> [#uses=1]
- %cast998 = cast %IntList %reg323 to %PatternAST ; <%PatternAST> [#uses=1]
- %reg996 = call %RuleAST %newRuleAST( sbyte* %reg322, %PatternAST %cast998, int %reg324, %IntList %reg325 ) ; <%RuleAST> [#uses=1]
- cast %RuleAST %reg996 to %IntList ; <%IntList>:6 [#uses=1]
- store %IntList %6, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %cast998 = bitcast %IntList %reg323 to %PatternAST ; <%PatternAST> [#uses=1]
+ %reg996 = call %RuleAST @newRuleAST( i8* %reg322.upgrd.8, %PatternAST %cast998, i32 %reg324, %IntList %reg325 ) ; <%RuleAST> [#uses=1]
+ bitcast %RuleAST %reg996 to %IntList ; <%IntList>:6 [#uses=1]
+ store %IntList %6, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb89: ; preds = %bb63
- %reg328 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
- %cast1002 = getelementptr %YYSTYPE* %reg328, long 0, uint 0 ; <%IntList*> [#uses=1]
+ %reg328 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=1]
+ %cast1002 = getelementptr %YYSTYPE* %reg328, i64 0, i32 0 ; <%IntList*> [#uses=1]
%reg329 = load %IntList* %cast1002 ; <%IntList> [#uses=1]
- %reg329 = cast %IntList %reg329 to sbyte* ; <sbyte*> [#uses=1]
- %reg1004 = call %PatternAST %newPatternAST( sbyte* %reg329, %List null ) ; <%PatternAST> [#uses=1]
- cast %PatternAST %reg1004 to %IntList ; <%IntList>:7 [#uses=1]
- store %IntList %7, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %reg329.upgrd.9 = bitcast %IntList %reg329 to i8* ; <i8*> [#uses=1]
+ %reg1004 = call %PatternAST @newPatternAST( i8* %reg329.upgrd.9, %List null ) ; <%PatternAST> [#uses=1]
+ bitcast %PatternAST %reg1004 to %IntList ; <%IntList>:7 [#uses=1]
+ store %IntList %7, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb90: ; preds = %bb64
- %reg333 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %cast10131 = getelementptr %YYSTYPE* %reg333, long -1, uint 0 ; <%IntList*> [#uses=1]
+ %reg333 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %cast10131 = getelementptr %YYSTYPE* %reg333, i64 -1, i32 0 ; <%IntList*> [#uses=1]
%reg335 = load %IntList* %cast10131 ; <%IntList> [#uses=1]
- %reg335 = cast %IntList %reg335 to sbyte* ; <sbyte*> [#uses=1]
- %reg1015 = call %List %newList( sbyte* %reg335, %List null ) ; <%List> [#uses=1]
- %cast10211 = getelementptr %YYSTYPE* %reg333, long -3, uint 0 ; <%IntList*> [#uses=1]
+ %reg335.upgrd.10 = bitcast %IntList %reg335 to i8* ; <i8*> [#uses=1]
+ %reg1015 = call %List @newList( i8* %reg335.upgrd.10, %List null ) ; <%List> [#uses=1]
+ %cast10211 = getelementptr %YYSTYPE* %reg333, i64 -3, i32 0 ; <%IntList*> [#uses=1]
%reg338 = load %IntList* %cast10211 ; <%IntList> [#uses=1]
- %reg338 = cast %IntList %reg338 to sbyte* ; <sbyte*> [#uses=1]
- %reg1023 = call %PatternAST %newPatternAST( sbyte* %reg338, %List %reg1015 ) ; <%PatternAST> [#uses=1]
- cast %PatternAST %reg1023 to %IntList ; <%IntList>:8 [#uses=1]
- store %IntList %8, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %reg338.upgrd.11 = bitcast %IntList %reg338 to i8* ; <i8*> [#uses=1]
+ %reg1023 = call %PatternAST @newPatternAST( i8* %reg338.upgrd.11, %List %reg1015 ) ; <%PatternAST> [#uses=1]
+ bitcast %PatternAST %reg1023 to %IntList ; <%IntList>:8 [#uses=1]
+ store %IntList %8, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb91: ; preds = %bb56
- %reg341 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=3]
- %cast10331 = getelementptr %YYSTYPE* %reg341, long -1, uint 0 ; <%IntList*> [#uses=1]
+ %reg341 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=3]
+ %cast10331 = getelementptr %YYSTYPE* %reg341, i64 -1, i32 0 ; <%IntList*> [#uses=1]
%reg344 = load %IntList* %cast10331 ; <%IntList> [#uses=1]
- %reg344 = cast %IntList %reg344 to sbyte* ; <sbyte*> [#uses=1]
- %reg1035 = call %List %newList( sbyte* %reg344, %List null ) ; <%List> [#uses=1]
- %cast10411 = getelementptr %YYSTYPE* %reg341, long -3, uint 0 ; <%IntList*> [#uses=1]
+ %reg344.upgrd.12 = bitcast %IntList %reg344 to i8* ; <i8*> [#uses=1]
+ %reg1035 = call %List @newList( i8* %reg344.upgrd.12, %List null ) ; <%List> [#uses=1]
+ %cast10411 = getelementptr %YYSTYPE* %reg341, i64 -3, i32 0 ; <%IntList*> [#uses=1]
%reg347 = load %IntList* %cast10411 ; <%IntList> [#uses=1]
- %reg347 = cast %IntList %reg347 to sbyte* ; <sbyte*> [#uses=1]
- %reg1043 = call %List %newList( sbyte* %reg347, %List %reg1035 ) ; <%List> [#uses=1]
- %cast10491 = getelementptr %YYSTYPE* %reg341, long -5, uint 0 ; <%IntList*> [#uses=1]
+ %reg347.upgrd.13 = bitcast %IntList %reg347 to i8* ; <i8*> [#uses=1]
+ %reg1043 = call %List @newList( i8* %reg347.upgrd.13, %List %reg1035 ) ; <%List> [#uses=1]
+ %cast10491 = getelementptr %YYSTYPE* %reg341, i64 -5, i32 0 ; <%IntList*> [#uses=1]
%reg349 = load %IntList* %cast10491 ; <%IntList> [#uses=1]
- %reg349 = cast %IntList %reg349 to sbyte* ; <sbyte*> [#uses=1]
- %reg1051 = call %PatternAST %newPatternAST( sbyte* %reg349, %List %reg1043 ) ; <%PatternAST> [#uses=1]
- cast %PatternAST %reg1051 to %IntList ; <%IntList>:9 [#uses=1]
- store %IntList %9, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %reg349.upgrd.14 = bitcast %IntList %reg349 to i8* ; <i8*> [#uses=1]
+ %reg1051 = call %PatternAST @newPatternAST( i8* %reg349.upgrd.14, %List %reg1043 ) ; <%PatternAST> [#uses=1]
+ bitcast %PatternAST %reg1051 to %IntList ; <%IntList>:9 [#uses=1]
+ store %IntList %9, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb92: ; preds = %bb68
- store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ store %IntList null, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb93: ; preds = %bb69
- %reg354 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %reg1059 = getelementptr %YYSTYPE* %reg354, long -2 ; <%YYSTYPE*> [#uses=1]
- %cast1061 = cast %YYSTYPE* %reg1059 to int* ; <int*> [#uses=1]
- %reg356 = load int* %cast1061 ; <int> [#uses=1]
- %reg357.idx1 = getelementptr %YYSTYPE* %reg354, long -1, uint 0 ; <%IntList*> [#uses=1]
+ %reg354 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %reg1059 = getelementptr %YYSTYPE* %reg354, i64 -2 ; <%YYSTYPE*> [#uses=1]
+ %cast1061 = bitcast %YYSTYPE* %reg1059 to i32* ; <i32*> [#uses=1]
+ %reg356 = load i32* %cast1061 ; <i32> [#uses=1]
+ %reg357.idx1 = getelementptr %YYSTYPE* %reg354, i64 -1, i32 0 ; <%IntList*> [#uses=1]
%reg357 = load %IntList* %reg357.idx1 ; <%IntList> [#uses=1]
- %reg1068 = call %IntList %newIntList( int %reg356, %IntList %reg357 ) ; <%IntList> [#uses=1]
- store %IntList %reg1068, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %reg1068 = call %IntList @newIntList( i32 %reg356, %IntList %reg357 ) ; <%IntList> [#uses=1]
+ store %IntList %reg1068, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb94: ; preds = %bb66
- store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ store %IntList null, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb95: ; preds = %bb71
- %reg362 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %reg1076 = getelementptr %YYSTYPE* %reg362, long -1 ; <%YYSTYPE*> [#uses=1]
- %cast1078 = cast %YYSTYPE* %reg1076 to int* ; <int*> [#uses=1]
- %reg364 = load int* %cast1078 ; <int> [#uses=1]
- %reg365.idx = getelementptr %YYSTYPE* %reg362, long 0, uint 0 ; <%IntList*> [#uses=1]
+ %reg362 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %reg1076 = getelementptr %YYSTYPE* %reg362, i64 -1 ; <%YYSTYPE*> [#uses=1]
+ %cast1078 = bitcast %YYSTYPE* %reg1076 to i32* ; <i32*> [#uses=1]
+ %reg364 = load i32* %cast1078 ; <i32> [#uses=1]
+ %reg365.idx = getelementptr %YYSTYPE* %reg362, i64 0, i32 0 ; <%IntList*> [#uses=1]
%reg365 = load %IntList* %reg365.idx ; <%IntList> [#uses=1]
- %reg1081 = call %IntList %newIntList( int %reg364, %IntList %reg365 ) ; <%IntList> [#uses=1]
- store %IntList %reg1081, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %reg1081 = call %IntList @newIntList( i32 %reg364, %IntList %reg365 ) ; <%IntList> [#uses=1]
+ store %IntList %reg1081, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb96: ; preds = %bb72
- %reg368 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %reg1088 = getelementptr %YYSTYPE* %reg368, long -1 ; <%YYSTYPE*> [#uses=1]
- %cast1090 = cast %YYSTYPE* %reg1088 to int* ; <int*> [#uses=1]
- %reg370 = load int* %cast1090 ; <int> [#uses=1]
- %reg371.idx = getelementptr %YYSTYPE* %reg368, long 0, uint 0 ; <%IntList*> [#uses=1]
+ %reg368 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %reg1088 = getelementptr %YYSTYPE* %reg368, i64 -1 ; <%YYSTYPE*> [#uses=1]
+ %cast1090 = bitcast %YYSTYPE* %reg1088 to i32* ; <i32*> [#uses=1]
+ %reg370 = load i32* %cast1090 ; <i32> [#uses=1]
+ %reg371.idx = getelementptr %YYSTYPE* %reg368, i64 0, i32 0 ; <%IntList*> [#uses=1]
%reg371 = load %IntList* %reg371.idx ; <%IntList> [#uses=1]
- %reg1093 = call %IntList %newIntList( int %reg370, %IntList %reg371 ) ; <%IntList> [#uses=1]
- store %IntList %reg1093, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0)
+ %reg1093 = call %IntList @newIntList( i32 %reg370, %IntList %reg371 ) ; <%IntList> [#uses=1]
+ store %IntList %reg1093, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
br label %bb97
bb97: ; preds = %bb96, %bb95, %bb94, %bb93, %bb92, %bb91, %bb90, %bb89, %bb88, %bb87, %bb86, %bb85, %bb84, %bb83, %bb82, %bb81, %bb80, %bb79, %bb78, %bb77, %bb76, %bb75, %bb74, %bb72, %bb69, %bb64, %bb61, %bb54, %bb51, %bb46, %bb43
- %cast1097 = cast short %reg254 to ulong ; <ulong> [#uses=3]
- %reg375 = add ulong %cast1097, %cast1097 ; <ulong> [#uses=1]
- %reg377 = load short** %yyssp ; <short*> [#uses=1]
- %cast379 = cast short* %reg377 to ulong ; <ulong> [#uses=1]
- %reg381 = sub ulong %cast379, %reg375 ; <ulong> [#uses=1]
- %cast1099 = cast ulong %reg381 to short* ; <short*> [#uses=1]
- store short* %cast1099, short** %yyssp
- %reg382 = load short** %yyssp ; <short*> [#uses=3]
- %reg383 = load short* %reg382 ; <short> [#uses=1]
- %cast1103 = cast short %reg383 to int ; <int> [#uses=3]
- %reg385 = mul ulong %cast1097, 8 ; <ulong> [#uses=1]
- %reg387 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
- %cast389 = cast %YYSTYPE* %reg387 to ulong ; <ulong> [#uses=1]
- %reg391 = sub ulong %cast389, %reg385 ; <ulong> [#uses=1]
- %cast1108 = cast ulong %reg391 to %YYSTYPE* ; <%YYSTYPE*> [#uses=1]
- store %YYSTYPE* %cast1108, %YYSTYPE** %yyvsp
- %reg1111 = getelementptr [25 x short]* %yylhs, long 0, long %reg468-idxcast ; <short*> [#uses=1]
- %reg398 = load short* %reg1111 ; <short> [#uses=2]
- %cast1116 = cast short %reg398 to int ; <int> [#uses=1]
- %cond1117 = setne int %cast1103, 0 ; <bool> [#uses=1]
- br bool %cond1117, label %bb104, label %bb98
+ %cast1097 = sext i16 %reg254 to i64 ; <i64> [#uses=3]
+ %reg375 = add i64 %cast1097, %cast1097 ; <i64> [#uses=1]
+ %reg377 = load i16** @yyssp ; <i16*> [#uses=1]
+ %cast379 = ptrtoint i16* %reg377 to i64 ; <i64> [#uses=1]
+ %reg381 = sub i64 %cast379, %reg375 ; <i64> [#uses=1]
+ %cast1099 = inttoptr i64 %reg381 to i16* ; <i16*> [#uses=1]
+ store i16* %cast1099, i16** @yyssp
+ %reg382 = load i16** @yyssp ; <i16*> [#uses=3]
+ %reg383 = load i16* %reg382 ; <i16> [#uses=1]
+ %cast1103 = sext i16 %reg383 to i32 ; <i32> [#uses=3]
+ %reg385 = mul i64 %cast1097, 8 ; <i64> [#uses=1]
+ %reg387 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=1]
+ %cast389 = ptrtoint %YYSTYPE* %reg387 to i64 ; <i64> [#uses=1]
+ %reg391 = sub i64 %cast389, %reg385 ; <i64> [#uses=1]
+ %cast1108 = inttoptr i64 %reg391 to %YYSTYPE* ; <%YYSTYPE*> [#uses=1]
+ store %YYSTYPE* %cast1108, %YYSTYPE** @yyvsp
+ %reg1111 = getelementptr [25 x i16]* @yylhs, i64 0, i64 %reg468-idxcast ; <i16*> [#uses=1]
+ %reg398 = load i16* %reg1111 ; <i16> [#uses=2]
+ %cast1116 = sext i16 %reg398 to i32 ; <i32> [#uses=1]
+ %cond1117 = icmp ne i32 %cast1103, 0 ; <i1> [#uses=1]
+ br i1 %cond1117, label %bb104, label %bb98
bb98: ; preds = %bb97
- %cond1119 = setne int %cast1116, 0 ; <bool> [#uses=1]
- br bool %cond1119, label %bb104, label %bb99
+ %cond1119 = icmp ne i32 %cast1116, 0 ; <i1> [#uses=1]
+ br i1 %cond1119, label %bb104, label %bb99
bb99: ; preds = %bb98
- %reg1122 = getelementptr short* %reg382, long 1 ; <short*> [#uses=2]
- store short* %reg1122, short** %yyssp
- store short 1, short* %reg1122
- %reg403 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %reg1128 = getelementptr %YYSTYPE* %reg403, long 1 ; <%YYSTYPE*> [#uses=1]
- store %YYSTYPE* %reg1128, %YYSTYPE** %yyvsp
- %reg406 = load %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0) ; <%IntList> [#uses=1]
- %reg1128.idx1 = getelementptr %YYSTYPE* %reg403, long 1, uint 0 ; <%IntList*> [#uses=1]
+ %reg1122 = getelementptr i16* %reg382, i64 1 ; <i16*> [#uses=2]
+ store i16* %reg1122, i16** @yyssp
+ store i16 1, i16* %reg1122
+ %reg403 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %reg1128 = getelementptr %YYSTYPE* %reg403, i64 1 ; <%YYSTYPE*> [#uses=1]
+ store %YYSTYPE* %reg1128, %YYSTYPE** @yyvsp
+ %reg406 = load %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0) ; <%IntList> [#uses=1]
+ %reg1128.idx1 = getelementptr %YYSTYPE* %reg403, i64 1, i32 0 ; <%IntList*> [#uses=1]
store %IntList %reg406, %IntList* %reg1128.idx1
- %reg407 = load int* %yychar ; <int> [#uses=1]
- %cond1135 = setge int %reg407, 0 ; <bool> [#uses=1]
- br bool %cond1135, label %bb102, label %bb100
+ %reg407 = load i32* @yychar ; <i32> [#uses=1]
+ %cond1135 = icmp sge i32 %reg407, 0 ; <i1> [#uses=1]
+ br i1 %cond1135, label %bb102, label %bb100
bb100: ; preds = %bb99
- %reg1139 = call int %yylex( ) ; <int> [#uses=1]
- store int %reg1139, int* %yychar
- %reg409 = load int* %yychar ; <int> [#uses=1]
- %cond1141 = setge int %reg409, 0 ; <bool> [#uses=1]
- br bool %cond1141, label %bb102, label %bb101
+ %reg1139 = call i32 @yylex( ) ; <i32> [#uses=1]
+ store i32 %reg1139, i32* @yychar
+ %reg409 = load i32* @yychar ; <i32> [#uses=1]
+ %cond1141 = icmp sge i32 %reg409, 0 ; <i1> [#uses=1]
+ br i1 %cond1141, label %bb102, label %bb101
bb101: ; preds = %bb100
- store int 0, int* %yychar
+ store i32 0, i32* @yychar
br label %bb102
bb102: ; preds = %bb101, %bb100, %bb99
- %reg411 = load int* %yychar ; <int> [#uses=1]
- %cond1146 = setne int %reg411, 0 ; <bool> [#uses=1]
- br bool %cond1146, label %bb4, label %UnifiedExitNode
+ %reg411 = load i32* @yychar ; <i32> [#uses=1]
+ %cond1146 = icmp ne i32 %reg411, 0 ; <i1> [#uses=1]
+ br i1 %cond1146, label %bb4, label %UnifiedExitNode
bb104: ; preds = %bb98, %bb97
- %reg398-idxcast = cast short %reg398 to long ; <long> [#uses=2]
- %reg1150 = getelementptr [12 x short]* %yygindex, long 0, long %reg398-idxcast ; <short*> [#uses=1]
- %reg418 = load short* %reg1150 ; <short> [#uses=1]
- %cast1155 = cast short %reg418 to int ; <int> [#uses=2]
- %cond1156 = seteq int %cast1155, 0 ; <bool> [#uses=1]
- br bool %cond1156, label %bb109, label %bb105
+ %reg398-idxcast = sext i16 %reg398 to i64 ; <i64> [#uses=2]
+ %reg1150 = getelementptr [12 x i16]* @yygindex, i64 0, i64 %reg398-idxcast ; <i16*> [#uses=1]
+ %reg418 = load i16* %reg1150 ; <i16> [#uses=1]
+ %cast1155 = sext i16 %reg418 to i32 ; <i32> [#uses=2]
+ %cond1156 = icmp eq i32 %cast1155, 0 ; <i1> [#uses=1]
+ br i1 %cond1156, label %bb109, label %bb105
bb105: ; preds = %bb104
- %reg473 = add int %cast1155, %cast1103 ; <int> [#uses=3]
- %cond1158 = setlt int %reg473, 0 ; <bool> [#uses=1]
- br bool %cond1158, label %bb109, label %bb106
+ %reg473 = add i32 %cast1155, %cast1103 ; <i32> [#uses=3]
+ %cond1158 = icmp slt i32 %reg473, 0 ; <i1> [#uses=1]
+ br i1 %cond1158, label %bb109, label %bb106
bb106: ; preds = %bb105
- %cond1161 = setgt int %reg473, 262 ; <bool> [#uses=1]
- br bool %cond1161, label %bb109, label %bb107
+ %cond1161 = icmp sgt i32 %reg473, 262 ; <i1> [#uses=1]
+ br i1 %cond1161, label %bb109, label %bb107
bb107: ; preds = %bb106
- %reg473-idxcast = cast int %reg473 to long ; <long> [#uses=2]
- %reg1166 = getelementptr [263 x short]* %yycheck, long 0, long %reg473-idxcast ; <short*> [#uses=1]
- %reg428 = load short* %reg1166 ; <short> [#uses=1]
- %cast1171 = cast short %reg428 to int ; <int> [#uses=1]
- %cond1172 = setne int %cast1171, %cast1103 ; <bool> [#uses=1]
- br bool %cond1172, label %bb109, label %bb108
+ %reg473-idxcast = sext i32 %reg473 to i64 ; <i64> [#uses=2]
+ %reg1166 = getelementptr [263 x i16]* @yycheck, i64 0, i64 %reg473-idxcast ; <i16*> [#uses=1]
+ %reg428 = load i16* %reg1166 ; <i16> [#uses=1]
+ %cast1171 = sext i16 %reg428 to i32 ; <i32> [#uses=1]
+ %cond1172 = icmp ne i32 %cast1171, %cast1103 ; <i1> [#uses=1]
+ br i1 %cond1172, label %bb109, label %bb108
bb108: ; preds = %bb107
- %reg1175 = getelementptr [263 x short]* %yytable, long 0, long %reg473-idxcast ; <short*> [#uses=1]
- %reg435 = load short* %reg1175 ; <short> [#uses=1]
- %cast1180 = cast short %reg435 to uint ; <uint> [#uses=1]
+ %reg1175 = getelementptr [263 x i16]* @yytable, i64 0, i64 %reg473-idxcast ; <i16*> [#uses=1]
+ %reg435 = load i16* %reg1175 ; <i16> [#uses=1]
+ %cast1180 = sext i16 %reg435 to i32 ; <i32> [#uses=1]
br label %bb110
bb109: ; preds = %bb107, %bb106, %bb105, %bb104
- %reg1183 = getelementptr [12 x short]* %yydgoto, long 0, long %reg398-idxcast ; <short*> [#uses=1]
- %reg442 = load short* %reg1183 ; <short> [#uses=1]
- %cast1188 = cast short %reg442 to uint ; <uint> [#uses=1]
+ %reg1183 = getelementptr [12 x i16]* @yydgoto, i64 0, i64 %reg398-idxcast ; <i16*> [#uses=1]
+ %reg442 = load i16* %reg1183 ; <i16> [#uses=1]
+ %cast1188 = sext i16 %reg442 to i32 ; <i32> [#uses=1]
br label %bb110
bb110: ; preds = %bb109, %bb108
- %reg476 = phi uint [ %cast1188, %bb109 ], [ %cast1180, %bb108 ] ; <uint> [#uses=2]
- %cast1189 = cast short* %reg382 to sbyte* ; <sbyte*> [#uses=1]
- %reg444 = load short** %yysslim ; <short*> [#uses=1]
- %cast1190 = cast short* %reg444 to sbyte* ; <sbyte*> [#uses=1]
- %cond1191 = setlt sbyte* %cast1189, %cast1190 ; <bool> [#uses=1]
- br bool %cond1191, label %bb112, label %bb111
+ %reg476 = phi i32 [ %cast1188, %bb109 ], [ %cast1180, %bb108 ] ; <i32> [#uses=2]
+ %cast1189 = bitcast i16* %reg382 to i8* ; <i8*> [#uses=1]
+ %reg444 = load i16** @yysslim ; <i16*> [#uses=1]
+ %cast1190 = bitcast i16* %reg444 to i8* ; <i8*> [#uses=1]
+ %cond1191 = icmp ult i8* %cast1189, %cast1190 ; <i1> [#uses=1]
+ br i1 %cond1191, label %bb112, label %bb111
bb111: ; preds = %bb110
- %reg1193 = call int %yygrowstack( ) ; <int> [#uses=1]
- %cond1193 = setne int %reg1193, 0 ; <bool> [#uses=1]
- br bool %cond1193, label %bb113, label %bb112
+ %reg1193 = call i32 @yygrowstack( ) ; <i32> [#uses=1]
+ %cond1193 = icmp ne i32 %reg1193, 0 ; <i1> [#uses=1]
+ br i1 %cond1193, label %bb113, label %bb112
bb112: ; preds = %bb111, %bb110
- %reg446 = load short** %yyssp ; <short*> [#uses=1]
- %reg1196 = getelementptr short* %reg446, long 1 ; <short*> [#uses=2]
- store short* %reg1196, short** %yyssp
- %cast1357 = cast uint %reg476 to short ; <short> [#uses=1]
- store short %cast1357, short* %reg1196
- %reg449 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
- %reg1202 = getelementptr %YYSTYPE* %reg449, long 1 ; <%YYSTYPE*> [#uses=1]
- store %YYSTYPE* %reg1202, %YYSTYPE** %yyvsp
- %reg452 = load %IntList* getelementptr (%YYSTYPE* %yyval, long 0, uint 0) ; <%IntList> [#uses=1]
- %reg1202.idx1 = getelementptr %YYSTYPE* %reg449, long 1, uint 0 ; <%IntList*> [#uses=1]
+ %reg446 = load i16** @yyssp ; <i16*> [#uses=1]
+ %reg1196 = getelementptr i16* %reg446, i64 1 ; <i16*> [#uses=2]
+ store i16* %reg1196, i16** @yyssp
+ %cast1357 = trunc i32 %reg476 to i16 ; <i16> [#uses=1]
+ store i16 %cast1357, i16* %reg1196
+ %reg449 = load %YYSTYPE** @yyvsp ; <%YYSTYPE*> [#uses=2]
+ %reg1202 = getelementptr %YYSTYPE* %reg449, i64 1 ; <%YYSTYPE*> [#uses=1]
+ store %YYSTYPE* %reg1202, %YYSTYPE** @yyvsp
+ %reg452 = load %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0) ; <%IntList> [#uses=1]
+ %reg1202.idx1 = getelementptr %YYSTYPE* %reg449, i64 1, i32 0 ; <%IntList*> [#uses=1]
store %IntList %reg452, %IntList* %reg1202.idx1
br label %bb4
bb113: ; preds = %bb111, %bb30, %bb13, %bb2
- call void %yyerror( sbyte* getelementptr ([20 x sbyte]* %.LC1, long 0, long 0) )
+ call void @yyerror( i8* getelementptr ([20 x i8]* @.LC1, i64 0, i64 0) )
br label %UnifiedExitNode
UnifiedExitNode: ; preds = %bb113, %bb102, %bb34, %bb32
- %UnifiedRetVal = phi int [ 1, %bb113 ], [ 1, %bb34 ], [ 1, %bb32 ], [ 0, %bb102 ] ; <int> [#uses=1]
- ret int %UnifiedRetVal
+ %UnifiedRetVal = phi i32 [ 1, %bb113 ], [ 1, %bb34 ], [ 1, %bb32 ], [ 0, %bb102 ] ; <i32> [#uses=1]
+ ret i32 %UnifiedRetVal
}
-declare %List %newList(sbyte*, %List)
+declare %List @newList(i8*, %List)
-declare %IntList %newIntList(int, %IntList)
+declare %IntList @newIntList(i32, %IntList)
-declare void %doStart(sbyte*)
+declare void @doStart(i8*)
-declare void %yyerror(sbyte*)
+declare void @yyerror(i8*)
-declare void %doSpec(%List, %List)
+declare void @doSpec(%List, %List)
-declare %Arity %newArity(int, %List)
+declare %Arity @newArity(i32, %List)
-declare %Binding %newBinding(sbyte*, int)
+declare %Binding @newBinding(i8*, i32)
-declare %PatternAST %newPatternAST(sbyte*, %List)
+declare %PatternAST @newPatternAST(i8*, %List)
-declare %RuleAST %newRuleAST(sbyte*, %PatternAST, int, %IntList)
+declare %RuleAST @newRuleAST(i8*, %PatternAST, i32, %IntList)
-declare void %yyfinished()
+declare void @yyfinished()
-declare int %yylex()
+declare i32 @yylex()
-declare void %doGram(%List)
+declare void @doGram(%List)
-declare int %yygrowstack()
+declare i32 @yygrowstack()
diff --git a/test/CodeGen/Generic/ConstantExprLowering.llx b/test/CodeGen/Generic/ConstantExprLowering.llx
index afb6530..d265415 100644
--- a/test/CodeGen/Generic/ConstantExprLowering.llx
+++ b/test/CodeGen/Generic/ConstantExprLowering.llx
@@ -1,26 +1,22 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-%.str_1 = internal constant [16 x sbyte] c"%d %d %d %d %d\0A\00"
+@.str_1 = internal constant [16 x i8] c"%d %d %d %d %d\0A\00" ; <[16 x i8]*> [#uses=1]
+@XA = external global i32 ; <i32*> [#uses=1]
+@XB = external global i32 ; <i32*> [#uses=1]
-%XA = external global int
-%XB = external global int
+declare i32 @printf(i8*, ...)
-implementation ; Functions:
-
-declare int %printf(sbyte*, ...)
-
-void %test(int %A, int %B, int %C, int %D) {
+define void @test(i32 %A, i32 %B, i32 %C, i32 %D) {
entry:
- %t1 = setlt int %A, 0
- br bool %t1, label %less, label %not_less
-less:
+ %t1 = icmp slt i32 %A, 0 ; <i1> [#uses=1]
+ br i1 %t1, label %less, label %not_less
+
+less: ; preds = %entry
br label %not_less
-not_less:
- %t2 = phi int [ sub ( int cast (int* %XA to int),
- int cast (int* %XB to int) ), %less],
- [ sub ( int cast (int* %XA to int),
- int cast (int* %XB to int) ), %entry]
- %tmp.39 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([16 x sbyte]* %.str_1, long 0, long 0), int %t2 )
- ret void
+
+not_less: ; preds = %less, %entry
+ %t2 = phi i32 [ sub (i32 ptrtoint (i32* @XA to i32), i32 ptrtoint (i32* @XB to i32)), %less ], [ sub (i32 ptrtoint (i32* @XA to i32), i32 ptrtoint (i32* @XB to i32)), %entry ] ; <i32> [#uses=1]
+ %tmp.39 = call i32 (i8*, ...)* @printf( i8* getelementptr ([16 x i8]* @.str_1, i64 0, i64 0), i32 %t2 ) ; <i32> [#uses=0]
+ ret void
}
diff --git a/test/CodeGen/Generic/SwitchLowering.ll b/test/CodeGen/Generic/SwitchLowering.ll
index a8c14f1..9fdfd8d 100644
--- a/test/CodeGen/Generic/SwitchLowering.ll
+++ b/test/CodeGen/Generic/SwitchLowering.ll
@@ -1,27 +1,28 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep cmp | count 1
+; RUN: llvm-as < %s | llc -march=x86 | grep cmp | count 1
; PR964
-sbyte* %FindChar(sbyte* %CurPtr) {
+define i8* @FindChar(i8* %CurPtr) {
entry:
- br label %bb
+ br label %bb
-bb: ; preds = %bb, %entry
- %indvar = phi uint [ 0, %entry ], [ %indvar.next, %bb ] ; <uint> [#uses=3]
- %CurPtr_addr.0.rec = cast uint %indvar to int ; <int> [#uses=1]
- %CurPtr_addr.0 = getelementptr sbyte* %CurPtr, uint %indvar ; <sbyte*> [#uses=1]
- %tmp = load sbyte* %CurPtr_addr.0 ; <sbyte> [#uses=2]
- %tmp2.rec = add int %CurPtr_addr.0.rec, 1 ; <int> [#uses=1]
- %tmp2 = getelementptr sbyte* %CurPtr, int %tmp2.rec ; <sbyte*> [#uses=1]
- %indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
- switch sbyte %tmp, label %bb [
- sbyte 0, label %bb7
- sbyte 120, label %bb7
- ]
+bb: ; preds = %bb, %entry
+ %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb ] ; <i32> [#uses=3]
+ %CurPtr_addr.0.rec = bitcast i32 %indvar to i32 ; <i32> [#uses=1]
+ %gep.upgrd.1 = zext i32 %indvar to i64 ; <i64> [#uses=1]
+ %CurPtr_addr.0 = getelementptr i8* %CurPtr, i64 %gep.upgrd.1 ; <i8*> [#uses=1]
+ %tmp = load i8* %CurPtr_addr.0 ; <i8> [#uses=3]
+ %tmp2.rec = add i32 %CurPtr_addr.0.rec, 1 ; <i32> [#uses=1]
+ %tmp2 = getelementptr i8* %CurPtr, i32 %tmp2.rec ; <i8*> [#uses=1]
+ %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1]
+ switch i8 %tmp, label %bb [
+ i8 0, label %bb7
+ i8 120, label %bb7
+ ]
-bb7: ; preds = %bb, %bb
- %tmp = cast sbyte %tmp to ubyte ; <ubyte> [#uses=1]
- tail call void %foo( ubyte %tmp )
- ret sbyte* %tmp2
+bb7: ; preds = %bb, %bb
+ tail call void @foo( i8 %tmp )
+ ret i8* %tmp2
}
-declare void %foo(ubyte)
+declare void @foo(i8)
+
diff --git a/test/CodeGen/Generic/badCallArgLRLLVM.ll b/test/CodeGen/Generic/badCallArgLRLLVM.ll
index 734d2b2..5638474 100644
--- a/test/CodeGen/Generic/badCallArgLRLLVM.ll
+++ b/test/CodeGen/Generic/badCallArgLRLLVM.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
; This caused a problem because the argument of a call was defined by
; the return value of another call that appears later in the code.
@@ -8,25 +8,24 @@
; llc dies in UltraSparcRegInfo::suggestRegs4CallArgs() with:
; ERROR: In call instr, no LR for arg: 0x1009e0740
;
-implementation ; Functions:
-declare int %getInt(int)
+declare i32 @getInt(i32)
-int %main(int %argc, sbyte** %argv) {
-bb0: ;[#uses=0]
+define i32 @main(i32 %argc, i8** %argv) {
+bb0:
br label %bb2
-bb1:
- %reg222 = call int (int)* %getInt(int %reg218) ;; ARG #1 HAS NO LR
- %reg110 = add int %reg222, 1
- %b = setle int %reg110, 0
- br bool %b, label %bb2, label %bb3
+bb1: ; preds = %bb2
+ %reg222 = call i32 @getInt( i32 %reg218 ) ; <i32> [#uses=1]
+ %reg110 = add i32 %reg222, 1 ; <i32> [#uses=2]
+ %b = icmp sle i32 %reg110, 0 ; <i1> [#uses=1]
+ br i1 %b, label %bb2, label %bb3
-bb2:
- %reg218 = call int (int)* %getInt(int %argc) ;; THIS CALL NOT YET SEEN
- br label %bb1
+bb2: ; preds = %bb1, %bb0
+ %reg218 = call i32 @getInt( i32 %argc ) ; <i32> [#uses=1]
+ br label %bb1
-bb3:
- ret int %reg110
+bb3: ; preds = %bb1
+ ret i32 %reg110
}
diff --git a/test/CodeGen/Generic/badFoldGEP.ll b/test/CodeGen/Generic/badFoldGEP.ll
index 63acd46..8de1251 100644
--- a/test/CodeGen/Generic/badFoldGEP.ll
+++ b/test/CodeGen/Generic/badFoldGEP.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
;; GetMemInstArgs() folded the two getElementPtr instructions together,
;; producing an illegal getElementPtr. That's because the type generated
@@ -10,20 +10,18 @@
;; file post_process.c, function build_domain().
;; (Modified to replace store with load and return load value.)
;;
+ %Domain = type { i8*, i32, i32*, i32, i32, i32*, %Domain* }
+@domain_array = external global [497 x %Domain] ; <[497 x %Domain]*> [#uses=2]
-%Domain = type { sbyte*, int, int*, int, int, int*, %Domain* }
-%domain_array = uninitialized global [497 x %Domain]
+declare void @opaque([497 x %Domain]*)
-implementation; Functions:
-
-declare void %opaque([497 x %Domain]*)
-
-int %main(int %argc, sbyte** %argv) {
-bb0: ;[#uses=0]
- call void %opaque([497 x %Domain]* %domain_array)
- %cann-indvar-idxcast = cast int %argc to long
- %reg841 = getelementptr [497 x %Domain]* %domain_array, long 0, long %cann-indvar-idxcast, uint 3
- %reg846 = getelementptr int* %reg841, long 1
- %reg820 = load int* %reg846
- ret int %reg820
+define i32 @main(i32 %argc, i8** %argv) {
+bb0:
+ call void @opaque( [497 x %Domain]* @domain_array )
+ %cann-indvar-idxcast = sext i32 %argc to i64 ; <i64> [#uses=1]
+ %reg841 = getelementptr [497 x %Domain]* @domain_array, i64 0, i64 %cann-indvar-idxcast, i32 3 ; <i32*> [#uses=1]
+ %reg846 = getelementptr i32* %reg841, i64 1 ; <i32*> [#uses=1]
+ %reg820 = load i32* %reg846 ; <i32> [#uses=1]
+ ret i32 %reg820
}
+
diff --git a/test/CodeGen/Generic/badarg6.ll b/test/CodeGen/Generic/badarg6.ll
index 542e6b3..1ff7df4 100644
--- a/test/CodeGen/Generic/badarg6.ll
+++ b/test/CodeGen/Generic/badarg6.ll
@@ -1,38 +1,32 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
; On this code, llc did not pass the sixth argument (%reg321) to printf.
; It passed the first five in %o0 - %o4, but never initialized %o5.
+@.LC12 = internal global [44 x i8] c"\09\09M = %g, I = %g, V = %g\0A\09\09O = %g, E = %g\0A\0A\00" ; <[44 x i8]*> [#uses=1]
-%.LC12 = internal global [44 x sbyte] c"\09\09M = %g, I = %g, V = %g\0A\09\09O = %g, E = %g\0A\0A\00" ; <[44 x sbyte]*>
+declare i32 @printf(i8*, ...)
-implementation;
-
-declare int %printf(sbyte*, ...)
-
-declare double %opaque(double)
-
-int %main(int %argc, sbyte** %argv) {
+declare double @opaque(double)
+define i32 @main(i32 %argc, i8** %argv) {
bb25:
- %b = setle int %argc, 2
- br bool %b, label %bb42, label %bb43
-
-bb42:
- %reg315 = call double (double)* %opaque(double 3.0)
- %reg316 = call double (double)* %opaque(double 3.1)
- %reg317 = call double (double)* %opaque(double 3.2)
- %reg318 = call double (double)* %opaque(double 3.3)
- %reg319 = call double (double)* %opaque(double 3.4)
+ %b = icmp sle i32 %argc, 2 ; <i1> [#uses=1]
+ br i1 %b, label %bb42, label %bb43
+
+bb42: ; preds = %bb25
+ %reg315 = call double @opaque( double 3.000000e+00 ) ; <double> [#uses=1]
+ %reg316 = call double @opaque( double 3.100000e+00 ) ; <double> [#uses=1]
+ %reg317 = call double @opaque( double 3.200000e+00 ) ; <double> [#uses=1]
+ %reg318 = call double @opaque( double 3.300000e+00 ) ; <double> [#uses=1]
+ %reg319 = call double @opaque( double 3.400000e+00 ) ; <double> [#uses=1]
br label %bb43
-bb43:
- %reg321 = phi double [ 2.000000e-01, %bb25 ], [ %reg315, %bb42 ]
- %reg322 = phi double [ 6.000000e+00, %bb25 ], [ %reg316, %bb42 ]
- %reg323 = phi double [ 0xBFF0000000000000, %bb25 ], [ %reg317, %bb42 ]
- %reg324 = phi double [ 0xBFF0000000000000, %bb25 ], [ %reg318, %bb42 ]
- %reg325 = phi double [ 1.000000e+00, %bb25 ], [ %reg319, %bb42 ]
-
- %reg609 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([44 x sbyte]* %.LC12, long 0, long 0), double %reg325, double %reg324, double %reg323, double %reg322, double %reg321 )
-
- ret int 0
+bb43: ; preds = %bb42, %bb25
+ %reg321 = phi double [ 2.000000e-01, %bb25 ], [ %reg315, %bb42 ] ; <double> [#uses=1]
+ %reg322 = phi double [ 6.000000e+00, %bb25 ], [ %reg316, %bb42 ] ; <double> [#uses=1]
+ %reg323 = phi double [ -1.000000e+00, %bb25 ], [ %reg317, %bb42 ] ; <double> [#uses=1]
+ %reg324 = phi double [ -1.000000e+00, %bb25 ], [ %reg318, %bb42 ] ; <double> [#uses=1]
+ %reg325 = phi double [ 1.000000e+00, %bb25 ], [ %reg319, %bb42 ] ; <double> [#uses=1]
+ %reg609 = call i32 (i8*, ...)* @printf( i8* getelementptr ([44 x i8]* @.LC12, i64 0, i64 0), double %reg325, double %reg324, double %reg323, double %reg322, double %reg321 ) ; <i32> [#uses=0]
+ ret i32 0
}
diff --git a/test/CodeGen/Generic/badlive.ll b/test/CodeGen/Generic/badlive.ll
index 8c08153..0114fb0 100644
--- a/test/CodeGen/Generic/badlive.ll
+++ b/test/CodeGen/Generic/badlive.ll
@@ -1,30 +1,28 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-implementation
-
-int "main"()
-begin
+define i32 @main() {
bb0:
- %reg109 = malloc int, uint 100
- br label %bb2
+ %reg109 = malloc i32, i32 100 ; <i32*> [#uses=2]
+ br label %bb2
+
+bb2: ; preds = %bb2, %bb0
+ %cann-indvar1 = phi i32 [ 0, %bb0 ], [ %add1-indvar1, %bb2 ] ; <i32> [#uses=2]
+ %reg127 = mul i32 %cann-indvar1, 2 ; <i32> [#uses=1]
+ %add1-indvar1 = add i32 %cann-indvar1, 1 ; <i32> [#uses=1]
+ store i32 999, i32* %reg109
+ %cond1015 = icmp sle i32 1, 99 ; <i1> [#uses=1]
+ %reg128 = add i32 %reg127, 2 ; <i32> [#uses=0]
+ br i1 %cond1015, label %bb2, label %bb4
-bb2:
- %cann-indvar1 = phi int [ 0, %bb0 ], [ %add1-indvar1, %bb2 ]
- %reg127 = mul int %cann-indvar1, 2
- %add1-indvar1 = add int %cann-indvar1, 1
- store int 999, int * %reg109
- %cond1015 = setle int 1, 99
- %reg128 = add int %reg127, 2
- br bool %cond1015, label %bb2, label %bb4
+bb4: ; preds = %bb4, %bb2
+ %cann-indvar = phi i32 [ %add1-indvar, %bb4 ], [ 0, %bb2 ] ; <i32> [#uses=1]
+ %add1-indvar = add i32 %cann-indvar, 1 ; <i32> [#uses=2]
+ store i32 333, i32* %reg109
+ %reg131 = add i32 %add1-indvar, 3 ; <i32> [#uses=1]
+ %cond1017 = icmp ule i32 %reg131, 99 ; <i1> [#uses=1]
+ br i1 %cond1017, label %bb4, label %bb5
-bb4: ;[#uses=3]
- %cann-indvar = phi uint [ %add1-indvar, %bb4 ], [ 0, %bb2 ]
- %add1-indvar = add uint %cann-indvar, 1 ; <uint> [#uses=1]
- store int 333, int * %reg109
- %reg131 = add uint %add1-indvar, 3 ; <int> [#uses=1]
- %cond1017 = setle uint %reg131, 99 ; <bool> [#uses=1]
- br bool %cond1017, label %bb4, label %bb5
+bb5: ; preds = %bb4
+ ret i32 0
+}
-bb5:
- ret int 0
-end
diff --git a/test/CodeGen/Generic/bool-to-double.ll b/test/CodeGen/Generic/bool-to-double.ll
index ad9bc8e..d6c9e52 100644
--- a/test/CodeGen/Generic/bool-to-double.ll
+++ b/test/CodeGen/Generic/bool-to-double.ll
@@ -1,5 +1,6 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
-double %test(bool %X) {
- %Y = cast bool %X to double
+; RUN: llvm-as < %s | llc
+define double @test(i1 %X) {
+ %Y = uitofp i1 %X to double ; <double> [#uses=1]
ret double %Y
}
+
diff --git a/test/CodeGen/Generic/call-ret0.ll b/test/CodeGen/Generic/call-ret0.ll
index 44c30d3..7ab966b 100644
--- a/test/CodeGen/Generic/call-ret0.ll
+++ b/test/CodeGen/Generic/call-ret0.ll
@@ -1,10 +1,10 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
-
-int %foo(int %x) {
- ret int %x
+; RUN: llvm-as < %s | llc
+define i32 @foo(i32 %x) {
+ ret i32 %x
}
-int %main() {
- %r = call int %foo(int 0)
- ret int %r
+define i32 @main() {
+ %r = call i32 @foo( i32 0 ) ; <i32> [#uses=1]
+ ret i32 %r
}
+
diff --git a/test/CodeGen/Generic/call-ret42.ll b/test/CodeGen/Generic/call-ret42.ll
index b0a480f..ac9bd92 100644
--- a/test/CodeGen/Generic/call-ret42.ll
+++ b/test/CodeGen/Generic/call-ret42.ll
@@ -1,10 +1,10 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-int %foo(int %x) {
- ret int 42
+define i32 @foo(i32 %x) {
+ ret i32 42
}
-int %main() {
- %r = call int %foo(int 15)
- ret int %r
+define i32 @main() {
+ %r = call i32 @foo( i32 15 ) ; <i32> [#uses=1]
+ ret i32 %r
}
diff --git a/test/CodeGen/Generic/call-void.ll b/test/CodeGen/Generic/call-void.ll
index 64e6336..b882689 100644
--- a/test/CodeGen/Generic/call-void.ll
+++ b/test/CodeGen/Generic/call-void.ll
@@ -1,10 +1,11 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-void %foo() {
- ret void
+define void @foo() {
+ ret void
}
-int %main() {
- call void ()* %foo()
- ret int 0
+define i32 @main() {
+ call void @foo( )
+ ret i32 0
}
+
diff --git a/test/CodeGen/Generic/call2-ret0.ll b/test/CodeGen/Generic/call2-ret0.ll
index 55be5c6..8c7e892 100644
--- a/test/CodeGen/Generic/call2-ret0.ll
+++ b/test/CodeGen/Generic/call2-ret0.ll
@@ -1,15 +1,16 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-int %bar(int %x) {
- ret int 0
+define i32 @bar(i32 %x) {
+ ret i32 0
}
-int %foo(int %x) {
- %q = call int %bar(int 1)
- ret int %q
+define i32 @foo(i32 %x) {
+ %q = call i32 @bar( i32 1 ) ; <i32> [#uses=1]
+ ret i32 %q
}
-int %main() {
- %r = call int %foo(int 2)
- ret int %r
+define i32 @main() {
+ %r = call i32 @foo( i32 2 ) ; <i32> [#uses=1]
+ ret i32 %r
}
+
diff --git a/test/CodeGen/Generic/cast-fp.ll b/test/CodeGen/Generic/cast-fp.ll
index 8359329..5f05d85 100644
--- a/test/CodeGen/Generic/cast-fp.ll
+++ b/test/CodeGen/Generic/cast-fp.ll
@@ -1,49 +1,33 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
-
-%a_fstr = internal constant [8 x sbyte] c"a = %f\0A\00"
-%a_lstr = internal constant [10 x sbyte] c"a = %lld\0A\00"
-%a_dstr = internal constant [8 x sbyte] c"a = %d\0A\00"
-
-%b_dstr = internal constant [8 x sbyte] c"b = %d\0A\00"
-%b_fstr = internal constant [8 x sbyte] c"b = %f\0A\00"
-
-declare int %printf(sbyte*, ...)
-%A = global double 2.0
-%B = global int 2
-
-int %main() {
- ;; A
- %a = load double* %A
- %a_fs = getelementptr [8 x sbyte]* %a_fstr, long 0, long 0
- call int (sbyte*, ...)* %printf(sbyte* %a_fs, double %a)
-
- ;; cast double to long
- %a_d2l = cast double %a to long
- %a_ls = getelementptr [10 x sbyte]* %a_lstr, long 0, long 0
- call int (sbyte*, ...)* %printf(sbyte* %a_ls, long %a_d2l)
-
- ;; cast double to int
- %a_d2i = cast double %a to int
- %a_ds = getelementptr [8 x sbyte]* %a_dstr, long 0, long 0
- call int (sbyte*, ...)* %printf(sbyte* %a_ds, int %a_d2i)
-
- ;; cast double to sbyte
- %a_d2sb = cast double %a to sbyte
- call int (sbyte*, ...)* %printf(sbyte* %a_ds, sbyte %a_d2sb)
-
- ;; cast int to sbyte
- %a_d2i2sb = cast int %a_d2i to sbyte
- call int (sbyte*, ...)* %printf(sbyte* %a_ds, sbyte %a_d2i2sb)
-
- ;; B
- %b = load int* %B
- %b_ds = getelementptr [8 x sbyte]* %b_dstr, long 0, long 0
- call int (sbyte*, ...)* %printf(sbyte* %b_ds, int %b)
-
- ;; cast int to double
- %b_i2d = cast int %b to double
- %b_fs = getelementptr [8 x sbyte]* %b_fstr, long 0, long 0
- call int (sbyte*, ...)* %printf(sbyte* %b_fs, double %b_i2d)
-
- ret int 0
+; RUN: llvm-as < %s | llc
+@a_fstr = internal constant [8 x i8] c"a = %f\0A\00" ; <[8 x i8]*> [#uses=1]
+@a_lstr = internal constant [10 x i8] c"a = %lld\0A\00" ; <[10 x i8]*> [#uses=1]
+@a_dstr = internal constant [8 x i8] c"a = %d\0A\00" ; <[8 x i8]*> [#uses=1]
+@b_dstr = internal constant [8 x i8] c"b = %d\0A\00" ; <[8 x i8]*> [#uses=1]
+@b_fstr = internal constant [8 x i8] c"b = %f\0A\00" ; <[8 x i8]*> [#uses=1]
+@A = global double 2.000000e+00 ; <double*> [#uses=1]
+@B = global i32 2 ; <i32*> [#uses=1]
+
+declare i32 @printf(i8*, ...)
+
+define i32 @main() {
+ %a = load double* @A ; <double> [#uses=4]
+ %a_fs = getelementptr [8 x i8]* @a_fstr, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %a_fs, double %a ) ; <i32>:1 [#uses=0]
+ %a_d2l = fptosi double %a to i64 ; <i64> [#uses=1]
+ %a_ls = getelementptr [10 x i8]* @a_lstr, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %a_ls, i64 %a_d2l ) ; <i32>:2 [#uses=0]
+ %a_d2i = fptosi double %a to i32 ; <i32> [#uses=2]
+ %a_ds = getelementptr [8 x i8]* @a_dstr, i64 0, i64 0 ; <i8*> [#uses=3]
+ call i32 (i8*, ...)* @printf( i8* %a_ds, i32 %a_d2i ) ; <i32>:3 [#uses=0]
+ %a_d2sb = fptosi double %a to i8 ; <i8> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %a_ds, i8 %a_d2sb ) ; <i32>:4 [#uses=0]
+ %a_d2i2sb = trunc i32 %a_d2i to i8 ; <i8> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %a_ds, i8 %a_d2i2sb ) ; <i32>:5 [#uses=0]
+ %b = load i32* @B ; <i32> [#uses=2]
+ %b_ds = getelementptr [8 x i8]* @b_dstr, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %b_ds, i32 %b ) ; <i32>:6 [#uses=0]
+ %b_i2d = sitofp i32 %b to double ; <double> [#uses=1]
+ %b_fs = getelementptr [8 x i8]* @b_fstr, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %b_fs, double %b_i2d ) ; <i32>:7 [#uses=0]
+ ret i32 0
}
diff --git a/test/CodeGen/Generic/constindices.ll b/test/CodeGen/Generic/constindices.ll
index 2467c37..6366fd5 100644
--- a/test/CodeGen/Generic/constindices.ll
+++ b/test/CodeGen/Generic/constindices.ll
@@ -1,56 +1,44 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
; Test that a sequence of constant indices are folded correctly
; into the equivalent offset at compile-time.
-%MixedA = type { float, [15 x int], sbyte, float }
-
-%MixedB = type { float, %MixedA, float }
-
-%fmtArg = internal global [44 x sbyte] c"sqrt(2) = %g\0Aexp(1) = %g\0Api = %g\0Afive = %g\0A\00"; <[44 x sbyte]*> [#uses=1]
-
-implementation
-
-declare int "printf"(sbyte*, ...)
-
-int "main"()
-begin
- %ScalarA = alloca %MixedA
- %ScalarB = alloca %MixedB
- %ArrayA = alloca %MixedA, uint 4
- %ArrayB = alloca %MixedB, uint 3
-
- %I1 = getelementptr %MixedA* %ScalarA, long 0, uint 0
- store float 0x3FF6A09020000000, float *%I1
- %I2 = getelementptr %MixedB* %ScalarB, long 0, uint 1, uint 0
- store float 0x4005BF1420000000, float *%I2
-
- %fptrA = getelementptr %MixedA* %ArrayA, long 1, uint 0
- %fptrB = getelementptr %MixedB* %ArrayB, long 2, uint 1, uint 0
-
- store float 0x400921CAC0000000, float* %fptrA
- store float 5.0, float* %fptrB
-
- ;; Test that a sequence of GEPs with constant indices are folded right
- %fptrA1 = getelementptr %MixedA* %ArrayA, long 3 ; &ArrayA[3]
- %fptrA2 = getelementptr %MixedA* %fptrA1, long 0, uint 1 ; &(*fptrA1).1
- %fptrA3 = getelementptr [15 x int]* %fptrA2, long 0, long 8 ; &(*fptrA2)[8]
- store int 5, int* %fptrA3 ; ArrayA[3].1[8] = 5
-
- %sqrtTwo = load float *%I1
- %exp = load float *%I2
- %I3 = getelementptr %MixedA* %ArrayA, long 1, uint 0
- %pi = load float* %I3
- %I4 = getelementptr %MixedB* %ArrayB, long 2, uint 1, uint 0
- %five = load float* %I4
-
- %dsqrtTwo = cast float %sqrtTwo to double
- %dexp = cast float %exp to double
- %dpi = cast float %pi to double
- %dfive = cast float %five to double
-
- %castFmt = getelementptr [44 x sbyte]* %fmtArg, long 0, long 0
- call int (sbyte*, ...)* %printf(sbyte* %castFmt, double %dsqrtTwo, double %dexp, double %dpi, double %dfive)
-
- ret int 0
-end
+ %MixedA = type { float, [15 x i32], i8, float }
+ %MixedB = type { float, %MixedA, float }
+@fmtArg = internal global [44 x i8] c"sqrt(2) = %g\0Aexp(1) = %g\0Api = %g\0Afive = %g\0A\00" ; <[44 x i8]*> [#uses=1]
+
+declare i32 @printf(i8*, ...)
+
+define i32 @main() {
+ %ScalarA = alloca %MixedA ; <%MixedA*> [#uses=1]
+ %ScalarB = alloca %MixedB ; <%MixedB*> [#uses=1]
+ %ArrayA = alloca %MixedA, i32 4 ; <%MixedA*> [#uses=3]
+ %ArrayB = alloca %MixedB, i32 3 ; <%MixedB*> [#uses=2]
+ %I1 = getelementptr %MixedA* %ScalarA, i64 0, i32 0 ; <float*> [#uses=2]
+ store float 0x3FF6A09020000000, float* %I1
+ %I2 = getelementptr %MixedB* %ScalarB, i64 0, i32 1, i32 0 ; <float*> [#uses=2]
+ store float 0x4005BF1420000000, float* %I2
+ %fptrA = getelementptr %MixedA* %ArrayA, i64 1, i32 0 ; <float*> [#uses=1]
+ %fptrB = getelementptr %MixedB* %ArrayB, i64 2, i32 1, i32 0 ; <float*> [#uses=1]
+ store float 0x400921CAC0000000, float* %fptrA
+ store float 5.000000e+00, float* %fptrB
+
+ ;; Test that a sequence of GEPs with constant indices are folded right
+ %fptrA1 = getelementptr %MixedA* %ArrayA, i64 3 ; <%MixedA*> [#uses=1]
+ %fptrA2 = getelementptr %MixedA* %fptrA1, i64 0, i32 1 ; <[15 x i32]*> [#uses=1]
+ %fptrA3 = getelementptr [15 x i32]* %fptrA2, i64 0, i64 8 ; <i32*> [#uses=1]
+ store i32 5, i32* %fptrA3
+ %sqrtTwo = load float* %I1 ; <float> [#uses=1]
+ %exp = load float* %I2 ; <float> [#uses=1]
+ %I3 = getelementptr %MixedA* %ArrayA, i64 1, i32 0 ; <float*> [#uses=1]
+ %pi = load float* %I3 ; <float> [#uses=1]
+ %I4 = getelementptr %MixedB* %ArrayB, i64 2, i32 1, i32 0 ; <float*> [#uses=1]
+ %five = load float* %I4 ; <float> [#uses=1]
+ %dsqrtTwo = fpext float %sqrtTwo to double ; <double> [#uses=1]
+ %dexp = fpext float %exp to double ; <double> [#uses=1]
+ %dpi = fpext float %pi to double ; <double> [#uses=1]
+ %dfive = fpext float %five to double ; <double> [#uses=1]
+ %castFmt = getelementptr [44 x i8]* @fmtArg, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %castFmt, double %dsqrtTwo, double %dexp, double %dpi, double %dfive ) ; <i32>:1 [#uses=0]
+ ret i32 0
+}
diff --git a/test/CodeGen/Generic/debug-info.ll b/test/CodeGen/Generic/debug-info.ll
index 49f693a..d1bb66d 100644
--- a/test/CodeGen/Generic/debug-info.ll
+++ b/test/CodeGen/Generic/debug-info.ll
@@ -1,19 +1,19 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
-%lldb.compile_unit = type { uint, ushort, ushort, sbyte*, sbyte*, sbyte*, { }* }
-%d.compile_unit7 = external global %lldb.compile_unit ; <%lldb.compile_unit*> [#uses=1]
+; RUN: llvm-as < %s | llc
-implementation ; Functions:
+ %lldb.compile_unit = type { i32, i16, i16, i8*, i8*, i8*, { }* }
+@d.compile_unit7 = external global %lldb.compile_unit ; <%lldb.compile_unit*> [#uses=1]
-declare void %llvm.dbg.stoppoint(uint, uint, %lldb.compile_unit*)
+declare void @llvm.dbg.stoppoint(i32, i32, %lldb.compile_unit*)
-void %rb_raise(int, ...) {
+define void @rb_raise(i32, ...) {
entry:
- br bool false, label %strlen.exit, label %no_exit.i
+ br i1 false, label %strlen.exit, label %no_exit.i
-no_exit.i: ; preds = %entry
- ret void
+no_exit.i: ; preds = %entry
+ ret void
-strlen.exit: ; preds = %entry
- call void %llvm.dbg.stoppoint(uint 4358, uint 0, %lldb.compile_unit* %d.compile_unit7 ) ; <{ }*> [#uses=0]
- unreachable
+strlen.exit: ; preds = %entry
+ call void @llvm.dbg.stoppoint( i32 4358, i32 0, %lldb.compile_unit* @d.compile_unit7 )
+ unreachable
}
+
diff --git a/test/CodeGen/Generic/div-neg-power-2.ll b/test/CodeGen/Generic/div-neg-power-2.ll
index 7452c7e..3bc4899 100644
--- a/test/CodeGen/Generic/div-neg-power-2.ll
+++ b/test/CodeGen/Generic/div-neg-power-2.ll
@@ -1,6 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-int %test(int %X) {
- %Y = div int %X, -2
- ret int %Y
+define i32 @test(i32 %X) {
+ %Y = sdiv i32 %X, -2 ; <i32> [#uses=1]
+ ret i32 %Y
}
+
diff --git a/test/CodeGen/Generic/fneg-fabs.ll b/test/CodeGen/Generic/fneg-fabs.ll
index 3dc4588..f9580b1 100644
--- a/test/CodeGen/Generic/fneg-fabs.ll
+++ b/test/CodeGen/Generic/fneg-fabs.ll
@@ -1,26 +1,26 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-double %fneg(double %X) {
- %Y = sub double -0.0, %X
- ret double %Y
+define double @fneg(double %X) {
+ %Y = sub double -0.000000e+00, %X ; <double> [#uses=1]
+ ret double %Y
}
-float %fnegf(float %X) {
- %Y = sub float -0.0, %X
- ret float %Y
+define float @fnegf(float %X) {
+ %Y = sub float -0.000000e+00, %X ; <float> [#uses=1]
+ ret float %Y
}
-declare double %fabs(double)
-declare float %fabsf(float)
+declare double @fabs(double)
+declare float @fabsf(float)
-double %fabstest(double %X) {
- %Y = call double %fabs(double %X)
- ret double %Y
+define double @fabstest(double %X) {
+ %Y = call double @fabs( double %X ) ; <double> [#uses=1]
+ ret double %Y
}
-float %fabsftest(float %X) {
- %Y = call float %fabsf(float %X)
- ret float %Y
+define float @fabsftest(float %X) {
+ %Y = call float @fabsf( float %X ) ; <float> [#uses=1]
+ ret float %Y
}
diff --git a/test/CodeGen/Generic/fwdtwice.ll b/test/CodeGen/Generic/fwdtwice.ll
index 84ea87e..05e831a 100644
--- a/test/CodeGen/Generic/fwdtwice.ll
+++ b/test/CodeGen/Generic/fwdtwice.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
;;
;; Test the sequence:
@@ -12,17 +12,18 @@
;; brlez <NULL VALUE>, .L_SumArray_bb3.
;; This came from %bb1 of sumarrray.ll generated from sumarray.c.
-
-int %SumArray(int %Num) {
- %Num = alloca int
+define i32 @SumArray(i32 %Num) {
+ %Num.upgrd.1 = alloca i32 ; <i32*> [#uses=2]
br label %Top
-Top:
- store int %Num, int * %Num
- %reg108 = load int * %Num
- %cast1006 = cast int %reg108 to uint
- %cond1001 = setle uint %cast1006, 0
- br bool %cond1001, label %bb6, label %Top
-bb6:
- ret int 42
+Top: ; preds = %Top, %0
+ store i32 %Num, i32* %Num.upgrd.1
+ %reg108 = load i32* %Num.upgrd.1 ; <i32> [#uses=1]
+ %cast1006 = bitcast i32 %reg108 to i32 ; <i32> [#uses=1]
+ %cond1001 = icmp ule i32 %cast1006, 0 ; <i1> [#uses=1]
+ br i1 %cond1001, label %bb6, label %Top
+
+bb6: ; preds = %Top
+ ret i32 42
}
+
diff --git a/test/CodeGen/Generic/global-ret0.ll b/test/CodeGen/Generic/global-ret0.ll
index dfe6aef..8fcef33 100644
--- a/test/CodeGen/Generic/global-ret0.ll
+++ b/test/CodeGen/Generic/global-ret0.ll
@@ -1,8 +1,8 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-%g = global int 0
+@g = global i32 0 ; <i32*> [#uses=1]
-int %main() {
- %h = load int* %g
- ret int %h
+define i32 @main() {
+ %h = load i32* @g ; <i32> [#uses=1]
+ ret i32 %h
}
diff --git a/test/CodeGen/Generic/hello.ll b/test/CodeGen/Generic/hello.ll
index d9e9d58..705423f 100644
--- a/test/CodeGen/Generic/hello.ll
+++ b/test/CodeGen/Generic/hello.ll
@@ -1,11 +1,11 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-%.str_1 = internal constant [7 x sbyte] c"hello\0A\00"
+@.str_1 = internal constant [7 x i8] c"hello\0A\00" ; <[7 x i8]*> [#uses=1]
-declare int %printf(sbyte*, ...)
+declare i32 @printf(i8*, ...)
-int %main() {
- %s = getelementptr [7 x sbyte]* %.str_1, long 0, long 0
- call int (sbyte*, ...)* %printf(sbyte* %s)
- ret int 0
+define i32 @main() {
+ %s = getelementptr [7 x i8]* @.str_1, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %s ) ; <i32>:1 [#uses=0]
+ ret i32 0
}
diff --git a/test/CodeGen/Generic/intrinsics.ll b/test/CodeGen/Generic/intrinsics.ll
index eb3148a..373bec9 100644
--- a/test/CodeGen/Generic/intrinsics.ll
+++ b/test/CodeGen/Generic/intrinsics.ll
@@ -1,31 +1,40 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
;; SQRT
-declare float %llvm.sqrt.f32(float)
-declare double %llvm.sqrt.f64(double)
-double %test_sqrt(float %F) {
- %G = call float %llvm.sqrt.f32(float %F)
- %H = cast float %G to double
- %I = call double %llvm.sqrt.f64(double %H)
- ret double %I
+declare float @llvm.sqrt.f32(float)
+
+declare double @llvm.sqrt.f64(double)
+
+define double @test_sqrt(float %F) {
+ %G = call float @llvm.sqrt.f32( float %F ) ; <float> [#uses=1]
+ %H = fpext float %G to double ; <double> [#uses=1]
+ %I = call double @llvm.sqrt.f64( double %H ) ; <double> [#uses=1]
+ ret double %I
}
+
; SIN
-declare float %sinf(float)
-declare double %sin(double)
-double %test_sin(float %F) {
- %G = call float %sinf(float %F)
- %H = cast float %G to double
- %I = call double %sin(double %H)
- ret double %I
+declare float @sinf(float)
+
+declare double @sin(double)
+
+define double @test_sin(float %F) {
+ %G = call float @sinf( float %F ) ; <float> [#uses=1]
+ %H = fpext float %G to double ; <double> [#uses=1]
+ %I = call double @sin( double %H ) ; <double> [#uses=1]
+ ret double %I
}
+
; COS
-declare float %cosf(float)
-declare double %cos(double)
-double %test_cos(float %F) {
- %G = call float %cosf(float %F)
- %H = cast float %G to double
- %I = call double %cos(double %H)
- ret double %I
+declare float @cosf(float)
+
+declare double @cos(double)
+
+define double @test_cos(float %F) {
+ %G = call float @cosf( float %F ) ; <float> [#uses=1]
+ %H = fpext float %G to double ; <double> [#uses=1]
+ %I = call double @cos( double %H ) ; <double> [#uses=1]
+ ret double %I
}
+
diff --git a/test/CodeGen/Generic/isunord.ll b/test/CodeGen/Generic/isunord.ll
index 1495bd0..589f496 100644
--- a/test/CodeGen/Generic/isunord.ll
+++ b/test/CodeGen/Generic/isunord.ll
@@ -1,10 +1,10 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
; XFAIL: ia64
+declare i1 @llvm.isunordered.f64(double, double)
-declare bool %llvm.isunordered.f64(double, double)
-
-bool %test(double %X, double %Y) {
- %tmp27 = call bool %llvm.isunordered.f64( double %X, double %Y)
- ret bool %tmp27
+define i1 @test(double %X, double %Y) {
+ %tmp27 = fcmp uno double %X, %Y ; <i1> [#uses=1]
+ ret i1 %tmp27
}
+
diff --git a/test/CodeGen/Generic/llvm-ct-intrinsics.ll b/test/CodeGen/Generic/llvm-ct-intrinsics.ll
index 014d261..66f409e 100644
--- a/test/CodeGen/Generic/llvm-ct-intrinsics.ll
+++ b/test/CodeGen/Generic/llvm-ct-intrinsics.ll
@@ -1,59 +1,62 @@
; Make sure this testcase is supported by all code generators
-; RUN: llvm-upgrade < %s | llvm-as | llc
-
-declare ulong %llvm.ctpop.i64(ulong)
-declare uint %llvm.ctpop.i32(uint)
-declare ushort %llvm.ctpop.i16(ushort)
-declare ubyte %llvm.ctpop.i8(ubyte)
-
-void %ctpoptest(ubyte %A, ushort %B, uint %C, ulong %D,
- ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
- %a = call ubyte %llvm.ctpop.i8(ubyte %A)
- %b = call ushort %llvm.ctpop.i16(ushort %B)
- %c = call uint %llvm.ctpop.i32(uint %C)
- %d = call ulong %llvm.ctpop.i64(ulong %D)
-
- store ubyte %a, ubyte* %AP
- store ushort %b, ushort* %BP
- store uint %c, uint* %CP
- store ulong %d, ulong* %DP
+; RUN: llvm-as < %s | llc
+
+declare i64 @llvm.ctpop.i64(i64)
+
+declare i32 @llvm.ctpop.i32(i32)
+
+declare i16 @llvm.ctpop.i16(i16)
+
+declare i8 @llvm.ctpop.i8(i8)
+
+define void @ctpoptest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
+ %a = call i8 @llvm.ctpop.i8( i8 %A ) ; <i8> [#uses=1]
+ %b = call i16 @llvm.ctpop.i16( i16 %B ) ; <i16> [#uses=1]
+ %c = call i32 @llvm.ctpop.i32( i32 %C ) ; <i32> [#uses=1]
+ %d = call i64 @llvm.ctpop.i64( i64 %D ) ; <i64> [#uses=1]
+ store i8 %a, i8* %AP
+ store i16 %b, i16* %BP
+ store i32 %c, i32* %CP
+ store i64 %d, i64* %DP
ret void
}
-declare ulong %llvm.ctlz.i64(ulong)
-declare uint %llvm.ctlz.i32(uint)
-declare ushort %llvm.ctlz.i16(ushort)
-declare ubyte %llvm.ctlz.i8(ubyte)
-
-void %ctlztest(ubyte %A, ushort %B, uint %C, ulong %D,
- ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
- %a = call ubyte %llvm.ctlz.i8(ubyte %A)
- %b = call ushort %llvm.ctlz.i16(ushort %B)
- %c = call uint %llvm.ctlz.i32(uint %C)
- %d = call ulong %llvm.ctlz.i64(ulong %D)
-
- store ubyte %a, ubyte* %AP
- store ushort %b, ushort* %BP
- store uint %c, uint* %CP
- store ulong %d, ulong* %DP
+declare i64 @llvm.ctlz.i64(i64)
+
+declare i32 @llvm.ctlz.i32(i32)
+
+declare i16 @llvm.ctlz.i16(i16)
+
+declare i8 @llvm.ctlz.i8(i8)
+
+define void @ctlztest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
+ %a = call i8 @llvm.ctlz.i8( i8 %A ) ; <i8> [#uses=1]
+ %b = call i16 @llvm.ctlz.i16( i16 %B ) ; <i16> [#uses=1]
+ %c = call i32 @llvm.ctlz.i32( i32 %C ) ; <i32> [#uses=1]
+ %d = call i64 @llvm.ctlz.i64( i64 %D ) ; <i64> [#uses=1]
+ store i8 %a, i8* %AP
+ store i16 %b, i16* %BP
+ store i32 %c, i32* %CP
+ store i64 %d, i64* %DP
ret void
}
-declare ulong %llvm.cttz.i64(ulong)
-declare uint %llvm.cttz.i32(uint)
-declare ushort %llvm.cttz.i16(ushort)
-declare ubyte %llvm.cttz.i8(ubyte)
-
-void %cttztest(ubyte %A, ushort %B, uint %C, ulong %D,
- ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
- %a = call ubyte %llvm.cttz.i8(ubyte %A)
- %b = call ushort %llvm.cttz.i16(ushort %B)
- %c = call uint %llvm.cttz.i32(uint %C)
- %d = call ulong %llvm.cttz.i64(ulong %D)
-
- store ubyte %a, ubyte* %AP
- store ushort %b, ushort* %BP
- store uint %c, uint* %CP
- store ulong %d, ulong* %DP
+declare i64 @llvm.cttz.i64(i64)
+
+declare i32 @llvm.cttz.i32(i32)
+
+declare i16 @llvm.cttz.i16(i16)
+
+declare i8 @llvm.cttz.i8(i8)
+
+define void @cttztest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
+ %a = call i8 @llvm.cttz.i8( i8 %A ) ; <i8> [#uses=1]
+ %b = call i16 @llvm.cttz.i16( i16 %B ) ; <i16> [#uses=1]
+ %c = call i32 @llvm.cttz.i32( i32 %C ) ; <i32> [#uses=1]
+ %d = call i64 @llvm.cttz.i64( i64 %D ) ; <i64> [#uses=1]
+ store i8 %a, i8* %AP
+ store i16 %b, i16* %BP
+ store i32 %c, i32* %CP
+ store i64 %d, i64* %DP
ret void
}
diff --git a/test/CodeGen/Generic/negintconst.ll b/test/CodeGen/Generic/negintconst.ll
index 020b6bb..a2b3d69 100644
--- a/test/CodeGen/Generic/negintconst.ll
+++ b/test/CodeGen/Generic/negintconst.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
; Test that a negative constant smaller than 64 bits (e.g., int)
; is correctly implemented with sign-extension.
@@ -28,24 +28,20 @@
; instead of:
; ioff = 2 fval = 0xffffffff7fffec90 &fval[2] = 0xffffffff7fffeca8
;
+ %Results = type { float, float, float }
+@fmtArg = internal global [39 x i8] c"ioff = %u\09fval = 0x%p\09&fval[2] = 0x%p\0A\00" ; <[39 x i8]*> [#uses=1]
-%Results = type { float, float, float }
+declare i32 @printf(i8*, ...)
-%fmtArg = internal global [39 x sbyte] c"ioff = %u\09fval = 0x%p\09&fval[2] = 0x%p\0A\00"; <[39 x sbyte]*> [#uses=1]
+define i32 @main() {
+ %fval = alloca %Results, i32 4 ; <%Results*> [#uses=2]
+ %i = add i32 1, 0 ; <i32> [#uses=1]
+ %iscale = mul i32 %i, -1 ; <i32> [#uses=1]
+ %ioff = add i32 %iscale, 3 ; <i32> [#uses=2]
+ %ioff.upgrd.1 = zext i32 %ioff to i64 ; <i64> [#uses=1]
+ %fptr = getelementptr %Results* %fval, i64 %ioff.upgrd.1 ; <%Results*> [#uses=1]
+ %castFmt = getelementptr [39 x i8]* @fmtArg, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %castFmt, i32 %ioff, %Results* %fval, %Results* %fptr ) ; <i32>:1 [#uses=0]
+ ret i32 0
+}
-implementation
-
-declare int "printf"(sbyte*, ...)
-
-int "main"()
-begin
- %fval = alloca %Results, uint 4
- %i = add uint 1, 0 ; i = 1
- %iscale = mul uint %i, 4294967295 ; i*-1 = -1
- %ioff = add uint %iscale, 3 ; 3+(-i) = 2
- %ioff = cast uint %ioff to long
- %fptr = getelementptr %Results* %fval, long %ioff ; &fval[2]
- %castFmt = getelementptr [39 x sbyte]* %fmtArg, long 0, long 0
- call int (sbyte*, ...)* %printf(sbyte* %castFmt, uint %ioff, %Results* %fval, %Results* %fptr)
- ret int 0
-end
diff --git a/test/CodeGen/Generic/nested-select.ll b/test/CodeGen/Generic/nested-select.ll
index 192d29f..a723a4d 100644
--- a/test/CodeGen/Generic/nested-select.ll
+++ b/test/CodeGen/Generic/nested-select.ll
@@ -1,20 +1,19 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -o /dev/null -f
+; RUN: llvm-as < %s | llc -o /dev/null -f
; Test that select of a select works
%typedef.tree = type opaque
-implementation
+define i32 @ic_test(double %p.0.2.0.val, double %p.0.2.1.val, double %p.0.2.2.val, %typedef.tree* %t) {
+ %result.1.0 = zext i1 false to i32 ; <i32> [#uses=1]
+ %tmp.55 = fcmp oge double 0.000000e+00, 1.000000e+00 ; <i1> [#uses=1]
+ %tmp.66 = fdiv double 0.000000e+00, 0.000000e+00 ; <double> [#uses=1]
+ br label %N
-int %ic_test(double %p.0.2.0.val, double %p.0.2.1.val, double %p.0.2.2.val, %typedef.tree* %t) {
- %result.1.0 = cast bool false to int ; <int> [#uses=1]
- %tmp.55 = setge double 0.000000e+00, 1.000000e+00 ; <bool> [#uses=1]
- %tmp.66 = div double 0.000000e+00, 0.000000e+00 ; <double> [#uses=1]
- br label %N
-N:
- %result.1.1 = select bool %tmp.55, int 0, int %result.1.0 ; <int> [#uses=1]
- %tmp.75 = setge double %tmp.66, 1.000000e+00 ; <bool> [#uses=1]
- %retval1 = select bool %tmp.75, int 0, int %result.1.1 ; <int> [#uses=1]
- ret int %retval1
+N: ; preds = %0
+ %result.1.1 = select i1 %tmp.55, i32 0, i32 %result.1.0 ; <i32> [#uses=1]
+ %tmp.75 = fcmp oge double %tmp.66, 1.000000e+00 ; <i1> [#uses=1]
+ %retval1 = select i1 %tmp.75, i32 0, i32 %result.1.1 ; <i32> [#uses=1]
+ ret i32 %retval1
}
diff --git a/test/CodeGen/Generic/print-add.ll b/test/CodeGen/Generic/print-add.ll
index ef224a1..4f1cb5e 100644
--- a/test/CodeGen/Generic/print-add.ll
+++ b/test/CodeGen/Generic/print-add.ll
@@ -1,18 +1,18 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-%.str_1 = internal constant [4 x sbyte] c"%d\0A\00"
+@.str_1 = internal constant [4 x i8] c"%d\0A\00" ; <[4 x i8]*> [#uses=1]
-declare int %printf(sbyte*, ...)
+declare i32 @printf(i8*, ...)
-int %main() {
- %f = getelementptr [4 x sbyte]* %.str_1, long 0, long 0
- %d = add int 1, 0
- call int (sbyte*, ...)* %printf(sbyte* %f, int %d)
- %e = add int 38, 2
- call int (sbyte*, ...)* %printf(sbyte* %f, int %e)
- %g = add int %d, %d
- %h = add int %e, %g
- call int (sbyte*, ...)* %printf(sbyte* %f, int %h)
- ret int 0
+define i32 @main() {
+ %f = getelementptr [4 x i8]* @.str_1, i64 0, i64 0 ; <i8*> [#uses=3]
+ %d = add i32 1, 0 ; <i32> [#uses=3]
+ call i32 (i8*, ...)* @printf( i8* %f, i32 %d ) ; <i32>:1 [#uses=0]
+ %e = add i32 38, 2 ; <i32> [#uses=2]
+ call i32 (i8*, ...)* @printf( i8* %f, i32 %e ) ; <i32>:2 [#uses=0]
+ %g = add i32 %d, %d ; <i32> [#uses=1]
+ %h = add i32 %e, %g ; <i32> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %f, i32 %h ) ; <i32>:3 [#uses=0]
+ ret i32 0
}
diff --git a/test/CodeGen/Generic/print-arith-fp.ll b/test/CodeGen/Generic/print-arith-fp.ll
index cfa7583..87aa1a0 100644
--- a/test/CodeGen/Generic/print-arith-fp.ll
+++ b/test/CodeGen/Generic/print-arith-fp.ll
@@ -1,76 +1,61 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
-
-%a_str = internal constant [8 x sbyte] c"a = %f\0A\00"
-%b_str = internal constant [8 x sbyte] c"b = %f\0A\00"
-;; binary ops: arith
-%add_str = internal constant [12 x sbyte] c"a + b = %f\0A\00"
-%sub_str = internal constant [12 x sbyte] c"a - b = %f\0A\00"
-%mul_str = internal constant [12 x sbyte] c"a * b = %f\0A\00"
-%div_str = internal constant [12 x sbyte] c"b / a = %f\0A\00"
-%rem_str = internal constant [13 x sbyte] c"b %% a = %f\0A\00"
-;; binary ops: setcc
-%lt_str = internal constant [12 x sbyte] c"a < b = %d\0A\00"
-%le_str = internal constant [13 x sbyte] c"a <= b = %d\0A\00"
-%gt_str = internal constant [12 x sbyte] c"a > b = %d\0A\00"
-%ge_str = internal constant [13 x sbyte] c"a >= b = %d\0A\00"
-%eq_str = internal constant [13 x sbyte] c"a == b = %d\0A\00"
-%ne_str = internal constant [13 x sbyte] c"a != b = %d\0A\00"
-
-declare int %printf(sbyte*, ...)
-%A = global double 2.0
-%B = global double 5.0
-
-int %main() {
- ;; main vars
- %a = load double* %A
- %b = load double* %B
-
- %a_s = getelementptr [8 x sbyte]* %a_str, long 0, long 0
- %b_s = getelementptr [8 x sbyte]* %b_str, long 0, long 0
-
- call int (sbyte*, ...)* %printf(sbyte* %a_s, double %a)
- call int (sbyte*, ...)* %printf(sbyte* %b_s, double %b)
-
- ;; arithmetic
- %add_r = add double %a, %b
- %sub_r = sub double %a, %b
- %mul_r = mul double %a, %b
- %div_r = div double %b, %a
- %rem_r = rem double %b, %a
-
- %add_s = getelementptr [12 x sbyte]* %add_str, long 0, long 0
- %sub_s = getelementptr [12 x sbyte]* %sub_str, long 0, long 0
- %mul_s = getelementptr [12 x sbyte]* %mul_str, long 0, long 0
- %div_s = getelementptr [12 x sbyte]* %div_str, long 0, long 0
- %rem_s = getelementptr [13 x sbyte]* %rem_str, long 0, long 0
-
- call int (sbyte*, ...)* %printf(sbyte* %add_s, double %add_r)
- call int (sbyte*, ...)* %printf(sbyte* %sub_s, double %sub_r)
- call int (sbyte*, ...)* %printf(sbyte* %mul_s, double %mul_r)
- call int (sbyte*, ...)* %printf(sbyte* %div_s, double %div_r)
- call int (sbyte*, ...)* %printf(sbyte* %rem_s, double %rem_r)
-
- ;; setcc
- %lt_r = setlt double %a, %b
- %le_r = setle double %a, %b
- %gt_r = setgt double %a, %b
- %ge_r = setge double %a, %b
- %eq_r = seteq double %a, %b
- %ne_r = setne double %a, %b
-
- %lt_s = getelementptr [12 x sbyte]* %lt_str, long 0, long 0
- %le_s = getelementptr [13 x sbyte]* %le_str, long 0, long 0
- %gt_s = getelementptr [12 x sbyte]* %gt_str, long 0, long 0
- %ge_s = getelementptr [13 x sbyte]* %ge_str, long 0, long 0
- %eq_s = getelementptr [13 x sbyte]* %eq_str, long 0, long 0
- %ne_s = getelementptr [13 x sbyte]* %ne_str, long 0, long 0
-
- call int (sbyte*, ...)* %printf(sbyte* %lt_s, bool %lt_r)
- call int (sbyte*, ...)* %printf(sbyte* %le_s, bool %le_r)
- call int (sbyte*, ...)* %printf(sbyte* %gt_s, bool %gt_r)
- call int (sbyte*, ...)* %printf(sbyte* %ge_s, bool %ge_r)
- call int (sbyte*, ...)* %printf(sbyte* %eq_s, bool %eq_r)
- call int (sbyte*, ...)* %printf(sbyte* %ne_s, bool %ne_r)
-
- ret int 0
+; RUN: llvm-as < %s | llc
+@a_str = internal constant [8 x i8] c"a = %f\0A\00" ; <[8 x i8]*> [#uses=1]
+@b_str = internal constant [8 x i8] c"b = %f\0A\00" ; <[8 x i8]*> [#uses=1]
+@add_str = internal constant [12 x i8] c"a + b = %f\0A\00" ; <[12 x i8]*> [#uses=1]
+@sub_str = internal constant [12 x i8] c"a - b = %f\0A\00" ; <[12 x i8]*> [#uses=1]
+@mul_str = internal constant [12 x i8] c"a * b = %f\0A\00" ; <[12 x i8]*> [#uses=1]
+@div_str = internal constant [12 x i8] c"b / a = %f\0A\00" ; <[12 x i8]*> [#uses=1]
+@rem_str = internal constant [13 x i8] c"b %% a = %f\0A\00" ; <[13 x i8]*> [#uses=1]
+@lt_str = internal constant [12 x i8] c"a < b = %d\0A\00" ; <[12 x i8]*> [#uses=1]
+@le_str = internal constant [13 x i8] c"a <= b = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@gt_str = internal constant [12 x i8] c"a > b = %d\0A\00" ; <[12 x i8]*> [#uses=1]
+@ge_str = internal constant [13 x i8] c"a >= b = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@eq_str = internal constant [13 x i8] c"a == b = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@ne_str = internal constant [13 x i8] c"a != b = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@A = global double 2.000000e+00 ; <double*> [#uses=1]
+@B = global double 5.000000e+00 ; <double*> [#uses=1]
+
+declare i32 @printf(i8*, ...)
+
+define i32 @main() {
+ %a = load double* @A ; <double> [#uses=12]
+ %b = load double* @B ; <double> [#uses=12]
+ %a_s = getelementptr [8 x i8]* @a_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %b_s = getelementptr [8 x i8]* @b_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %a_s, double %a ) ; <i32>:1 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %b_s, double %b ) ; <i32>:2 [#uses=0]
+ %add_r = add double %a, %b ; <double> [#uses=1]
+ %sub_r = sub double %a, %b ; <double> [#uses=1]
+ %mul_r = mul double %a, %b ; <double> [#uses=1]
+ %div_r = fdiv double %b, %a ; <double> [#uses=1]
+ %rem_r = frem double %b, %a ; <double> [#uses=1]
+ %add_s = getelementptr [12 x i8]* @add_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %sub_s = getelementptr [12 x i8]* @sub_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %mul_s = getelementptr [12 x i8]* @mul_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %div_s = getelementptr [12 x i8]* @div_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %rem_s = getelementptr [13 x i8]* @rem_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %add_s, double %add_r ) ; <i32>:3 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %sub_s, double %sub_r ) ; <i32>:4 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %mul_s, double %mul_r ) ; <i32>:5 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %div_s, double %div_r ) ; <i32>:6 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %rem_s, double %rem_r ) ; <i32>:7 [#uses=0]
+ %lt_r = fcmp olt double %a, %b ; <i1> [#uses=1]
+ %le_r = fcmp ole double %a, %b ; <i1> [#uses=1]
+ %gt_r = fcmp ogt double %a, %b ; <i1> [#uses=1]
+ %ge_r = fcmp oge double %a, %b ; <i1> [#uses=1]
+ %eq_r = fcmp oeq double %a, %b ; <i1> [#uses=1]
+ %ne_r = fcmp une double %a, %b ; <i1> [#uses=1]
+ %lt_s = getelementptr [12 x i8]* @lt_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %le_s = getelementptr [13 x i8]* @le_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %gt_s = getelementptr [12 x i8]* @gt_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %ge_s = getelementptr [13 x i8]* @ge_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %eq_s = getelementptr [13 x i8]* @eq_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %ne_s = getelementptr [13 x i8]* @ne_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %lt_s, i1 %lt_r ) ; <i32>:8 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %le_s, i1 %le_r ) ; <i32>:9 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %gt_s, i1 %gt_r ) ; <i32>:10 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %ge_s, i1 %ge_r ) ; <i32>:11 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %eq_s, i1 %eq_r ) ; <i32>:12 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %ne_s, i1 %ne_r ) ; <i32>:13 [#uses=0]
+ ret i32 0
}
diff --git a/test/CodeGen/Generic/print-arith-int.ll b/test/CodeGen/Generic/print-arith-int.ll
index 708abec..cf27515 100644
--- a/test/CodeGen/Generic/print-arith-int.ll
+++ b/test/CodeGen/Generic/print-arith-int.ll
@@ -1,102 +1,84 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
+@a_str = internal constant [8 x i8] c"a = %d\0A\00" ; <[8 x i8]*> [#uses=1]
+@b_str = internal constant [8 x i8] c"b = %d\0A\00" ; <[8 x i8]*> [#uses=1]
+@add_str = internal constant [12 x i8] c"a + b = %d\0A\00" ; <[12 x i8]*> [#uses=1]
+@sub_str = internal constant [12 x i8] c"a - b = %d\0A\00" ; <[12 x i8]*> [#uses=1]
+@mul_str = internal constant [12 x i8] c"a * b = %d\0A\00" ; <[12 x i8]*> [#uses=1]
+@div_str = internal constant [12 x i8] c"b / a = %d\0A\00" ; <[12 x i8]*> [#uses=1]
+@rem_str = internal constant [13 x i8] c"b \5C% a = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@lt_str = internal constant [12 x i8] c"a < b = %d\0A\00" ; <[12 x i8]*> [#uses=1]
+@le_str = internal constant [13 x i8] c"a <= b = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@gt_str = internal constant [12 x i8] c"a > b = %d\0A\00" ; <[12 x i8]*> [#uses=1]
+@ge_str = internal constant [13 x i8] c"a >= b = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@eq_str = internal constant [13 x i8] c"a == b = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@ne_str = internal constant [13 x i8] c"a != b = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@and_str = internal constant [12 x i8] c"a & b = %d\0A\00" ; <[12 x i8]*> [#uses=1]
+@or_str = internal constant [12 x i8] c"a | b = %d\0A\00" ; <[12 x i8]*> [#uses=1]
+@xor_str = internal constant [12 x i8] c"a ^ b = %d\0A\00" ; <[12 x i8]*> [#uses=1]
+@shl_str = internal constant [13 x i8] c"b << a = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@shr_str = internal constant [13 x i8] c"b >> a = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@A = global i32 2 ; <i32*> [#uses=1]
+@B = global i32 5 ; <i32*> [#uses=1]
-%a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
-%b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
-;; binary ops: arith
-%add_str = internal constant [12 x sbyte] c"a + b = %d\0A\00"
-%sub_str = internal constant [12 x sbyte] c"a - b = %d\0A\00"
-%mul_str = internal constant [12 x sbyte] c"a * b = %d\0A\00"
-%div_str = internal constant [12 x sbyte] c"b / a = %d\0A\00"
-%rem_str = internal constant [13 x sbyte] c"b \% a = %d\0A\00"
-;; binary ops: setcc
-%lt_str = internal constant [12 x sbyte] c"a < b = %d\0A\00"
-%le_str = internal constant [13 x sbyte] c"a <= b = %d\0A\00"
-%gt_str = internal constant [12 x sbyte] c"a > b = %d\0A\00"
-%ge_str = internal constant [13 x sbyte] c"a >= b = %d\0A\00"
-%eq_str = internal constant [13 x sbyte] c"a == b = %d\0A\00"
-%ne_str = internal constant [13 x sbyte] c"a != b = %d\0A\00"
-;; logical
-%and_str = internal constant [12 x sbyte] c"a & b = %d\0A\00"
-%or_str = internal constant [12 x sbyte] c"a | b = %d\0A\00"
-%xor_str = internal constant [12 x sbyte] c"a ^ b = %d\0A\00"
-%shl_str = internal constant [13 x sbyte] c"b << a = %d\0A\00"
-%shr_str = internal constant [13 x sbyte] c"b >> a = %d\0A\00"
+declare i32 @printf(i8*, ...)
-declare int %printf(sbyte*, ...)
-%A = global int 2
-%B = global int 5
-
-int %main() {
- ;; main vars
- %a = load int* %A
- %b = load int* %B
-
- %a_s = getelementptr [8 x sbyte]* %a_str, long 0, long 0
- %b_s = getelementptr [8 x sbyte]* %b_str, long 0, long 0
-
- call int (sbyte*, ...)* %printf(sbyte* %a_s, int %a)
- call int (sbyte*, ...)* %printf(sbyte* %b_s, int %b)
-
- ;; arithmetic
- %add_r = add int %a, %b
- %sub_r = sub int %a, %b
- %mul_r = mul int %a, %b
- %div_r = div int %b, %a
- %rem_r = rem int %b, %a
-
- %add_s = getelementptr [12 x sbyte]* %add_str, long 0, long 0
- %sub_s = getelementptr [12 x sbyte]* %sub_str, long 0, long 0
- %mul_s = getelementptr [12 x sbyte]* %mul_str, long 0, long 0
- %div_s = getelementptr [12 x sbyte]* %div_str, long 0, long 0
- %rem_s = getelementptr [13 x sbyte]* %rem_str, long 0, long 0
-
- call int (sbyte*, ...)* %printf(sbyte* %add_s, int %add_r)
- call int (sbyte*, ...)* %printf(sbyte* %sub_s, int %sub_r)
- call int (sbyte*, ...)* %printf(sbyte* %mul_s, int %mul_r)
- call int (sbyte*, ...)* %printf(sbyte* %div_s, int %div_r)
- call int (sbyte*, ...)* %printf(sbyte* %rem_s, int %rem_r)
-
- ;; setcc
- %lt_r = setlt int %a, %b
- %le_r = setle int %a, %b
- %gt_r = setgt int %a, %b
- %ge_r = setge int %a, %b
- %eq_r = seteq int %a, %b
- %ne_r = setne int %a, %b
-
- %lt_s = getelementptr [12 x sbyte]* %lt_str, long 0, long 0
- %le_s = getelementptr [13 x sbyte]* %le_str, long 0, long 0
- %gt_s = getelementptr [12 x sbyte]* %gt_str, long 0, long 0
- %ge_s = getelementptr [13 x sbyte]* %ge_str, long 0, long 0
- %eq_s = getelementptr [13 x sbyte]* %eq_str, long 0, long 0
- %ne_s = getelementptr [13 x sbyte]* %ne_str, long 0, long 0
-
- call int (sbyte*, ...)* %printf(sbyte* %lt_s, bool %lt_r)
- call int (sbyte*, ...)* %printf(sbyte* %le_s, bool %le_r)
- call int (sbyte*, ...)* %printf(sbyte* %gt_s, bool %gt_r)
- call int (sbyte*, ...)* %printf(sbyte* %ge_s, bool %ge_r)
- call int (sbyte*, ...)* %printf(sbyte* %eq_s, bool %eq_r)
- call int (sbyte*, ...)* %printf(sbyte* %ne_s, bool %ne_r)
-
- ;; logical
- %and_r = and int %a, %b
- %or_r = or int %a, %b
- %xor_r = xor int %a, %b
- %u = cast int %a to ubyte
- %shl_r = shl int %b, ubyte %u
- %shr_r = shr int %b, ubyte %u
-
- %and_s = getelementptr [12 x sbyte]* %and_str, long 0, long 0
- %or_s = getelementptr [12 x sbyte]* %or_str, long 0, long 0
- %xor_s = getelementptr [12 x sbyte]* %xor_str, long 0, long 0
- %shl_s = getelementptr [13 x sbyte]* %shl_str, long 0, long 0
- %shr_s = getelementptr [13 x sbyte]* %shr_str, long 0, long 0
-
- call int (sbyte*, ...)* %printf(sbyte* %and_s, int %and_r)
- call int (sbyte*, ...)* %printf(sbyte* %or_s, int %or_r)
- call int (sbyte*, ...)* %printf(sbyte* %xor_s, int %xor_r)
- call int (sbyte*, ...)* %printf(sbyte* %shl_s, int %shl_r)
- call int (sbyte*, ...)* %printf(sbyte* %shr_s, int %shr_r)
-
- ret int 0
+define i32 @main() {
+ %a = load i32* @A ; <i32> [#uses=16]
+ %b = load i32* @B ; <i32> [#uses=17]
+ %a_s = getelementptr [8 x i8]* @a_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %b_s = getelementptr [8 x i8]* @b_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %a_s, i32 %a ) ; <i32>:1 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %b_s, i32 %b ) ; <i32>:2 [#uses=0]
+ %add_r = add i32 %a, %b ; <i32> [#uses=1]
+ %sub_r = sub i32 %a, %b ; <i32> [#uses=1]
+ %mul_r = mul i32 %a, %b ; <i32> [#uses=1]
+ %div_r = sdiv i32 %b, %a ; <i32> [#uses=1]
+ %rem_r = srem i32 %b, %a ; <i32> [#uses=1]
+ %add_s = getelementptr [12 x i8]* @add_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %sub_s = getelementptr [12 x i8]* @sub_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %mul_s = getelementptr [12 x i8]* @mul_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %div_s = getelementptr [12 x i8]* @div_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %rem_s = getelementptr [13 x i8]* @rem_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %add_s, i32 %add_r ) ; <i32>:3 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %sub_s, i32 %sub_r ) ; <i32>:4 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %mul_s, i32 %mul_r ) ; <i32>:5 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %div_s, i32 %div_r ) ; <i32>:6 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %rem_s, i32 %rem_r ) ; <i32>:7 [#uses=0]
+ %lt_r = icmp slt i32 %a, %b ; <i1> [#uses=1]
+ %le_r = icmp sle i32 %a, %b ; <i1> [#uses=1]
+ %gt_r = icmp sgt i32 %a, %b ; <i1> [#uses=1]
+ %ge_r = icmp sge i32 %a, %b ; <i1> [#uses=1]
+ %eq_r = icmp eq i32 %a, %b ; <i1> [#uses=1]
+ %ne_r = icmp ne i32 %a, %b ; <i1> [#uses=1]
+ %lt_s = getelementptr [12 x i8]* @lt_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %le_s = getelementptr [13 x i8]* @le_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %gt_s = getelementptr [12 x i8]* @gt_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %ge_s = getelementptr [13 x i8]* @ge_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %eq_s = getelementptr [13 x i8]* @eq_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %ne_s = getelementptr [13 x i8]* @ne_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %lt_s, i1 %lt_r ) ; <i32>:8 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %le_s, i1 %le_r ) ; <i32>:9 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %gt_s, i1 %gt_r ) ; <i32>:10 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %ge_s, i1 %ge_r ) ; <i32>:11 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %eq_s, i1 %eq_r ) ; <i32>:12 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %ne_s, i1 %ne_r ) ; <i32>:13 [#uses=0]
+ %and_r = and i32 %a, %b ; <i32> [#uses=1]
+ %or_r = or i32 %a, %b ; <i32> [#uses=1]
+ %xor_r = xor i32 %a, %b ; <i32> [#uses=1]
+ %u = trunc i32 %a to i8 ; <i8> [#uses=2]
+ %shift.upgrd.1 = zext i8 %u to i32 ; <i32> [#uses=1]
+ %shl_r = shl i32 %b, %shift.upgrd.1 ; <i32> [#uses=1]
+ %shift.upgrd.2 = zext i8 %u to i32 ; <i32> [#uses=1]
+ %shr_r = ashr i32 %b, %shift.upgrd.2 ; <i32> [#uses=1]
+ %and_s = getelementptr [12 x i8]* @and_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %or_s = getelementptr [12 x i8]* @or_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %xor_s = getelementptr [12 x i8]* @xor_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %shl_s = getelementptr [13 x i8]* @shl_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %shr_s = getelementptr [13 x i8]* @shr_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %and_s, i32 %and_r ) ; <i32>:14 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %or_s, i32 %or_r ) ; <i32>:15 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %xor_s, i32 %xor_r ) ; <i32>:16 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %shl_s, i32 %shl_r ) ; <i32>:17 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %shr_s, i32 %shr_r ) ; <i32>:18 [#uses=0]
+ ret i32 0
}
diff --git a/test/CodeGen/Generic/print-int.ll b/test/CodeGen/Generic/print-int.ll
index 27cf637..58f5047 100644
--- a/test/CodeGen/Generic/print-int.ll
+++ b/test/CodeGen/Generic/print-int.ll
@@ -1,13 +1,13 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-%.str_1 = internal constant [4 x sbyte] c"%d\0A\00"
+@.str_1 = internal constant [4 x i8] c"%d\0A\00" ; <[4 x i8]*> [#uses=1]
-declare int %printf(sbyte*, ...)
+declare i32 @printf(i8*, ...)
-int %main() {
- %f = getelementptr [4 x sbyte]* %.str_1, long 0, long 0
- %d = add int 0, 0
- %tmp.0 = call int (sbyte*, ...)* %printf(sbyte* %f, int %d)
- ret int 0
+define i32 @main() {
+ %f = getelementptr [4 x i8]* @.str_1, i64 0, i64 0 ; <i8*> [#uses=1]
+ %d = add i32 0, 0 ; <i32> [#uses=1]
+ %tmp.0 = call i32 (i8*, ...)* @printf( i8* %f, i32 %d ) ; <i32> [#uses=0]
+ ret i32 0
}
diff --git a/test/CodeGen/Generic/print-mul-exp.ll b/test/CodeGen/Generic/print-mul-exp.ll
index d5f5f93..0666775 100644
--- a/test/CodeGen/Generic/print-mul-exp.ll
+++ b/test/CodeGen/Generic/print-mul-exp.ll
@@ -1,57 +1,55 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-%a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
-%a_mul_str = internal constant [13 x sbyte] c"a * %d = %d\0A\00"
-%A = global int 2
-declare int %printf(sbyte*, ...)
+@a_str = internal constant [8 x i8] c"a = %d\0A\00" ; <[8 x i8]*> [#uses=1]
+@a_mul_str = internal constant [13 x i8] c"a * %d = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@A = global i32 2 ; <i32*> [#uses=1]
-int %main() {
- %a = load int* %A
- %a_s = getelementptr [8 x sbyte]* %a_str, long 0, long 0
- %a_mul_s = getelementptr [13 x sbyte]* %a_mul_str, long 0, long 0
- call int (sbyte*, ...)* %printf(sbyte* %a_s, int %a)
+declare i32 @printf(i8*, ...)
- %r_0 = mul int %a, 0
- %r_1 = mul int %a, 1
- %r_2 = mul int %a, 2
- %r_3 = mul int %a, 3
- %r_4 = mul int %a, 4
- %r_5 = mul int %a, 5
- %r_6 = mul int %a, 6
- %r_7 = mul int %a, 7
- %r_8 = mul int %a, 8
- %r_9 = mul int %a, 9
- %r_10 = mul int %a, 10
- %r_11 = mul int %a, 11
- %r_12 = mul int %a, 12
- %r_13 = mul int %a, 13
- %r_14 = mul int %a, 14
- %r_15 = mul int %a, 15
- %r_16 = mul int %a, 16
- %r_17 = mul int %a, 17
- %r_18 = mul int %a, 18
- %r_19 = mul int %a, 19
-
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 0, int %r_0)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 1, int %r_1)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 2, int %r_2)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 3, int %r_3)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 4, int %r_4)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 5, int %r_5)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 6, int %r_6)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 7, int %r_7)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 8, int %r_8)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 9, int %r_9)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 10, int %r_10)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 11, int %r_11)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 12, int %r_12)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 13, int %r_13)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 14, int %r_14)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 15, int %r_15)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 16, int %r_16)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 17, int %r_17)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 18, int %r_18)
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int 19, int %r_19)
-
- ret int 0
+define i32 @main() {
+ %a = load i32* @A ; <i32> [#uses=21]
+ %a_s = getelementptr [8 x i8]* @a_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %a_mul_s = getelementptr [13 x i8]* @a_mul_str, i64 0, i64 0 ; <i8*> [#uses=20]
+ call i32 (i8*, ...)* @printf( i8* %a_s, i32 %a ) ; <i32>:1 [#uses=0]
+ %r_0 = mul i32 %a, 0 ; <i32> [#uses=1]
+ %r_1 = mul i32 %a, 1 ; <i32> [#uses=1]
+ %r_2 = mul i32 %a, 2 ; <i32> [#uses=1]
+ %r_3 = mul i32 %a, 3 ; <i32> [#uses=1]
+ %r_4 = mul i32 %a, 4 ; <i32> [#uses=1]
+ %r_5 = mul i32 %a, 5 ; <i32> [#uses=1]
+ %r_6 = mul i32 %a, 6 ; <i32> [#uses=1]
+ %r_7 = mul i32 %a, 7 ; <i32> [#uses=1]
+ %r_8 = mul i32 %a, 8 ; <i32> [#uses=1]
+ %r_9 = mul i32 %a, 9 ; <i32> [#uses=1]
+ %r_10 = mul i32 %a, 10 ; <i32> [#uses=1]
+ %r_11 = mul i32 %a, 11 ; <i32> [#uses=1]
+ %r_12 = mul i32 %a, 12 ; <i32> [#uses=1]
+ %r_13 = mul i32 %a, 13 ; <i32> [#uses=1]
+ %r_14 = mul i32 %a, 14 ; <i32> [#uses=1]
+ %r_15 = mul i32 %a, 15 ; <i32> [#uses=1]
+ %r_16 = mul i32 %a, 16 ; <i32> [#uses=1]
+ %r_17 = mul i32 %a, 17 ; <i32> [#uses=1]
+ %r_18 = mul i32 %a, 18 ; <i32> [#uses=1]
+ %r_19 = mul i32 %a, 19 ; <i32> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 0, i32 %r_0 ) ; <i32>:2 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 1, i32 %r_1 ) ; <i32>:3 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 2, i32 %r_2 ) ; <i32>:4 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 3, i32 %r_3 ) ; <i32>:5 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 4, i32 %r_4 ) ; <i32>:6 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 5, i32 %r_5 ) ; <i32>:7 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 6, i32 %r_6 ) ; <i32>:8 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 7, i32 %r_7 ) ; <i32>:9 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 8, i32 %r_8 ) ; <i32>:10 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 9, i32 %r_9 ) ; <i32>:11 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 10, i32 %r_10 ) ; <i32>:12 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 11, i32 %r_11 ) ; <i32>:13 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 12, i32 %r_12 ) ; <i32>:14 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 13, i32 %r_13 ) ; <i32>:15 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 14, i32 %r_14 ) ; <i32>:16 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 15, i32 %r_15 ) ; <i32>:17 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 16, i32 %r_16 ) ; <i32>:18 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 17, i32 %r_17 ) ; <i32>:19 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 18, i32 %r_18 ) ; <i32>:20 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 19, i32 %r_19 ) ; <i32>:21 [#uses=0]
+ ret i32 0
}
diff --git a/test/CodeGen/Generic/print-mul.ll b/test/CodeGen/Generic/print-mul.ll
index 911c73e..1d9452a 100644
--- a/test/CodeGen/Generic/print-mul.ll
+++ b/test/CodeGen/Generic/print-mul.ll
@@ -1,35 +1,32 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-%a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
-%b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
+@a_str = internal constant [8 x i8] c"a = %d\0A\00" ; <[8 x i8]*> [#uses=1]
+@b_str = internal constant [8 x i8] c"b = %d\0A\00" ; <[8 x i8]*> [#uses=1]
+@a_mul_str = internal constant [13 x i8] c"a * %d = %d\0A\00" ; <[13 x i8]*> [#uses=1]
+@A = global i32 2 ; <i32*> [#uses=1]
+@B = global i32 5 ; <i32*> [#uses=1]
-;; mul
-%a_mul_str = internal constant [13 x sbyte] c"a * %d = %d\0A\00"
+declare i32 @printf(i8*, ...)
-declare int %printf(sbyte*, ...)
-%A = global int 2
-%B = global int 5
-
-int %main() {
+define i32 @main() {
entry:
- %a = load int* %A
- %b = load int* %B
- %a_s = getelementptr [8 x sbyte]* %a_str, long 0, long 0
- %b_s = getelementptr [8 x sbyte]* %b_str, long 0, long 0
- %a_mul_s = getelementptr [13 x sbyte]* %a_mul_str, long 0, long 0
- call int (sbyte*, ...)* %printf(sbyte* %a_s, int %a)
- call int (sbyte*, ...)* %printf(sbyte* %b_s, int %b)
- br label %shl_test
+ %a = load i32* @A ; <i32> [#uses=2]
+ %b = load i32* @B ; <i32> [#uses=1]
+ %a_s = getelementptr [8 x i8]* @a_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %b_s = getelementptr [8 x i8]* @b_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %a_mul_s = getelementptr [13 x i8]* @a_mul_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %a_s, i32 %a ) ; <i32>:0 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %b_s, i32 %b ) ; <i32>:1 [#uses=0]
+ br label %shl_test
-shl_test:
- ;; test mul by 0-255
- %s = phi int [ 0, %entry ], [ %s_inc, %shl_test ]
- %result = mul int %a, %s
- call int (sbyte*, ...)* %printf(sbyte* %a_mul_s, int %s, int %result)
- %s_inc = add int %s, 1
- %done = seteq int %s, 256
- br bool %done, label %fini, label %shl_test
+shl_test: ; preds = %shl_test, %entry
+ %s = phi i32 [ 0, %entry ], [ %s_inc, %shl_test ] ; <i32> [#uses=4]
+ %result = mul i32 %a, %s ; <i32> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %a_mul_s, i32 %s, i32 %result ) ; <i32>:2 [#uses=0]
+ %s_inc = add i32 %s, 1 ; <i32> [#uses=1]
+ %done = icmp eq i32 %s, 256 ; <i1> [#uses=1]
+ br i1 %done, label %fini, label %shl_test
-fini:
- ret int 0
+fini: ; preds = %shl_test
+ ret i32 0
}
diff --git a/test/CodeGen/Generic/print-shift.ll b/test/CodeGen/Generic/print-shift.ll
index 4f699d5..8992e8d 100644
--- a/test/CodeGen/Generic/print-shift.ll
+++ b/test/CodeGen/Generic/print-shift.ll
@@ -1,35 +1,34 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-%a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
-%b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
+@a_str = internal constant [8 x i8] c"a = %d\0A\00" ; <[8 x i8]*> [#uses=1]
+@b_str = internal constant [8 x i8] c"b = %d\0A\00" ; <[8 x i8]*> [#uses=1]
+@a_shl_str = internal constant [14 x i8] c"a << %d = %d\0A\00" ; <[14 x i8]*> [#uses=1]
+@A = global i32 2 ; <i32*> [#uses=1]
+@B = global i32 5 ; <i32*> [#uses=1]
-;; shl
-%a_shl_str = internal constant [14 x sbyte] c"a << %d = %d\0A\00"
+declare i32 @printf(i8*, ...)
-declare int %printf(sbyte*, ...)
-%A = global int 2
-%B = global int 5
-
-int %main() {
+define i32 @main() {
entry:
- %a = load int* %A
- %b = load int* %B
- %a_s = getelementptr [8 x sbyte]* %a_str, long 0, long 0
- %b_s = getelementptr [8 x sbyte]* %b_str, long 0, long 0
- %a_shl_s = getelementptr [14 x sbyte]* %a_shl_str, long 0, long 0
- call int (sbyte*, ...)* %printf(sbyte* %a_s, int %a)
- call int (sbyte*, ...)* %printf(sbyte* %b_s, int %b)
- br label %shl_test
+ %a = load i32* @A ; <i32> [#uses=2]
+ %b = load i32* @B ; <i32> [#uses=1]
+ %a_s = getelementptr [8 x i8]* @a_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %b_s = getelementptr [8 x i8]* @b_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ %a_shl_s = getelementptr [14 x i8]* @a_shl_str, i64 0, i64 0 ; <i8*> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %a_s, i32 %a ) ; <i32>:0 [#uses=0]
+ call i32 (i8*, ...)* @printf( i8* %b_s, i32 %b ) ; <i32>:1 [#uses=0]
+ br label %shl_test
-shl_test:
- ;; test left shifts 0-31
- %s = phi ubyte [ 0, %entry ], [ %s_inc, %shl_test ]
- %result = shl int %a, ubyte %s
- call int (sbyte*, ...)* %printf(sbyte* %a_shl_s, ubyte %s, int %result)
- %s_inc = add ubyte %s, 1
- %done = seteq ubyte %s, 32
- br bool %done, label %fini, label %shl_test
+shl_test: ; preds = %shl_test, %entry
+ %s = phi i8 [ 0, %entry ], [ %s_inc, %shl_test ] ; <i8> [#uses=4]
+ %shift.upgrd.1 = zext i8 %s to i32 ; <i32> [#uses=1]
+ %result = shl i32 %a, %shift.upgrd.1 ; <i32> [#uses=1]
+ call i32 (i8*, ...)* @printf( i8* %a_shl_s, i8 %s, i32 %result ) ; <i32>:2 [#uses=0]
+ %s_inc = add i8 %s, 1 ; <i8> [#uses=1]
+ %done = icmp eq i8 %s, 32 ; <i1> [#uses=1]
+ br i1 %done, label %fini, label %shl_test
-fini:
- ret int 0
+fini: ; preds = %shl_test
+ ret i32 0
}
+
diff --git a/test/CodeGen/Generic/ret0.ll b/test/CodeGen/Generic/ret0.ll
index 4d0d10b..489f31c 100644
--- a/test/CodeGen/Generic/ret0.ll
+++ b/test/CodeGen/Generic/ret0.ll
@@ -1,5 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-int %main() {
- ret int 0
+define i32 @main() {
+ ret i32 0
}
diff --git a/test/CodeGen/Generic/ret42.ll b/test/CodeGen/Generic/ret42.ll
index 88d3c98..0cbe176 100644
--- a/test/CodeGen/Generic/ret42.ll
+++ b/test/CodeGen/Generic/ret42.ll
@@ -1,5 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-int %main() {
- ret int 42
+define i32 @main() {
+ ret i32 42
}
diff --git a/test/CodeGen/Generic/sched.ll b/test/CodeGen/Generic/sched.ll
index f66e9f0..2b6746c 100644
--- a/test/CodeGen/Generic/sched.ll
+++ b/test/CodeGen/Generic/sched.ll
@@ -1,33 +1,27 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-implementation
-declare int "printf"(sbyte*, int, float)
+declare i32 @printf(i8*, i32, float)
+define i32 @testissue(i32 %i, float %x, float %y) {
+ br label %bb1
-int "testissue"(int %i, float %x, float %y)
-begin
- br label %bb1
-bb1:
- %x1 = mul float %x, %y ;; x1
- %y1 = mul float %y, 0.75 ;; y1
- %z1 = add float %x1, %y1 ;; z1 = x1 + y1
-
- %x2 = mul float %x, 0.5 ;; x2
- %y2 = mul float %y, 0x3FECCCCCC0000000 ;; y2
- %z2 = add float %x2, %y2 ;; z2 = x2 + y2
-
- %z3 = add float %z1, %z2 ;; z3 = z1 + z2
-
- %i1 = shl int %i, ubyte 3 ;; i1
- %j1 = add int %i, 7 ;; j1
- %m1 = add int %i1, %j1 ;; k1 = i1 + j1
-;; %m1 = div int %k1, 99 ;; m1 = k1 / 99
-
- %b = setle int %m1, 6 ;; (m1 <= 6)?
- br bool %b, label %bb1, label %bb2
+bb1: ; preds = %bb1, %0
+ %x1 = mul float %x, %y ; <float> [#uses=1]
+ %y1 = mul float %y, 7.500000e-01 ; <float> [#uses=1]
+ %z1 = add float %x1, %y1 ; <float> [#uses=1]
+ %x2 = mul float %x, 5.000000e-01 ; <float> [#uses=1]
+ %y2 = mul float %y, 0x3FECCCCCC0000000 ; <float> [#uses=1]
+ %z2 = add float %x2, %y2 ; <float> [#uses=1]
+ %z3 = add float %z1, %z2 ; <float> [#uses=1]
+ %i1 = shl i32 %i, 3 ; <i32> [#uses=1]
+ %j1 = add i32 %i, 7 ; <i32> [#uses=1]
+ %m1 = add i32 %i1, %j1 ; <i32> [#uses=2]
+ %b = icmp sle i32 %m1, 6 ; <i1> [#uses=1]
+ br i1 %b, label %bb1, label %bb2
+
+bb2: ; preds = %bb1
+ %Msg = inttoptr i64 0 to i8* ; <i8*> [#uses=1]
+ call i32 @printf( i8* %Msg, i32 %m1, float %z3 ) ; <i32>:1 [#uses=0]
+ ret i32 0
+}
-bb2:
- %Msg = cast ulong 0 to sbyte *
- call int %printf(sbyte* %Msg, int %m1, float %z3)
- ret int 0
-end
diff --git a/test/CodeGen/Generic/select.ll b/test/CodeGen/Generic/select.ll
index 87ea405..fc573f3 100644
--- a/test/CodeGen/Generic/select.ll
+++ b/test/CodeGen/Generic/select.ll
@@ -1,43 +1,35 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-%AConst = constant int 123
-
-%Domain = type { sbyte*, int, int*, int, int, int*, %Domain* }
-
-implementation
+%Domain = type { i8*, i32, i32*, i32, i32, i32*, %Domain* }
+@AConst = constant i32 123 ; <i32*> [#uses=1]
; Test setting values of different constants in registers.
;
-void "testConsts"(int %N, float %X)
-begin
-; <label>:0
- %a = add int %N, 1 ; 1 should be put in immed field
- %i = add int %N, 12345678 ; constant has to be loaded
- %b = add short 4, 3 ; one of the operands shd be immed
- %c = add float %X, 0.0 ; will this be optimzzed?
- %d = add float %X, 0x400921CAC0000000 ; constant has to be loaded
- %f = add uint 4294967295, 10 ; result shd be 9 (not in immed fld)
- %g = add ushort 20, 65535 ; result shd be 19 (65536 in immed fld)
- %j = add ushort 65535, 30 ; result shd be 29 (not in immed fld)
- %h = add ubyte 40, 255 ; result shd be 39 (255 in immed fld)
- %k = add ubyte 255, 50 ; result shd be 49 (not in immed fld)
-
- ret void
-end
+define void @testConsts(i32 %N, float %X) {
+ %a = add i32 %N, 1 ; <i32> [#uses=0]
+ %i = add i32 %N, 12345678 ; <i32> [#uses=0]
+ %b = add i16 4, 3 ; <i16> [#uses=0]
+ %c = add float %X, 0.000000e+00 ; <float> [#uses=0]
+ %d = add float %X, 0x400921CAC0000000 ; <float> [#uses=0]
+ %f = add i32 -1, 10 ; <i32> [#uses=0]
+ %g = add i16 20, -1 ; <i16> [#uses=0]
+ %j = add i16 -1, 30 ; <i16> [#uses=0]
+ %h = add i8 40, -1 ; <i8> [#uses=0]
+ %k = add i8 -1, 50 ; <i8> [#uses=0]
+ ret void
+}
; A SetCC whose result is used should produce instructions to
; compute the boolean value in a register. One whose result
; is unused will only generate the condition code but not
; the boolean result.
;
-void "unusedBool"(int * %x, int * %y)
-begin
-; <label>:0 ; [#uses=0]
- seteq int * %x, %y ; <bool>:0 [#uses=1]
- xor bool %0, true ; <bool>:1 [#uses=0]
- setne int * %x, %y ; <bool>:2 [#uses=0]
- ret void
-end
+define void @unusedBool(i32* %x, i32* %y) {
+ icmp eq i32* %x, %y ; <i1>:1 [#uses=1]
+ xor i1 %1, true ; <i1>:2 [#uses=0]
+ icmp ne i32* %x, %y ; <i1>:3 [#uses=0]
+ ret void
+}
; A constant argument to a Phi produces a Cast instruction in the
; corresponding predecessor basic block. This checks a few things:
@@ -47,19 +39,20 @@ end
; -- use of immediate fields for integral constants of different sizes
; -- branch on a constant condition
;
-void "mergeConstants"(int * %x, int * %y)
-begin
+define void @mergeConstants(i32* %x, i32* %y) {
; <label>:0
- br label %Top
-Top:
- phi int [ 0, %0 ], [ 1, %Top ], [ 524288, %Next ]
- phi float [ 0.0, %0 ], [ 1.0, %Top ], [ 2.0, %Next ]
- phi double [ 0.5, %0 ], [ 1.5, %Top ], [ 2.5, %Next ]
- phi bool [ true, %0 ], [ false,%Top ], [ true, %Next ]
- br bool true, label %Top, label %Next
-Next:
- br label %Top
-end
+ br label %Top
+
+Top: ; preds = %Next, %Top, %0
+ phi i32 [ 0, %0 ], [ 1, %Top ], [ 524288, %Next ] ; <i32>:1 [#uses=0]
+ phi float [ 0.000000e+00, %0 ], [ 1.000000e+00, %Top ], [ 2.000000e+00, %Next ] ; <float>:2 [#uses=0]
+ phi double [ 5.000000e-01, %0 ], [ 1.500000e+00, %Top ], [ 2.500000e+00, %Next ]
+ phi i1 [ true, %0 ], [ false, %Top ], [ true, %Next ] ; <i1>:4 [#uses=0]
+ br i1 true, label %Top, label %Next
+
+Next: ; preds = %Top
+ br label %Top
+}
@@ -72,85 +65,76 @@ end
; use but has to be loaded into a virtual register so that the reg.
; allocator can allocate the appropriate phys. reg. for it
;
-int* "castconst"(float)
-begin
-; <label>:0
- %castbig = cast ulong 99999999 to int
- %castsmall = cast ulong 1 to int
- %usebig = add int %castbig, %castsmall
-
- %castglob = cast int* %AConst to long*
- %dummyl = load long* %castglob
-
- %castnull = cast ulong 0 to int*
- ret int* %castnull
-end
-
-
+define i32* @castconst(float) {
+ %castbig = trunc i64 99999999 to i32 ; <i32> [#uses=1]
+ %castsmall = trunc i64 1 to i32 ; <i32> [#uses=1]
+ %usebig = add i32 %castbig, %castsmall ; <i32> [#uses=0]
+ %castglob = bitcast i32* @AConst to i64* ; <i64*> [#uses=1]
+ %dummyl = load i64* %castglob ; <i64> [#uses=0]
+ %castnull = inttoptr i64 0 to i32* ; <i32*> [#uses=1]
+ ret i32* %castnull
+}
; Test branch-on-comparison-with-zero, in two ways:
; 1. can be folded
; 2. cannot be folded because result of comparison is used twice
;
-void "testbool"(int %A, int %B) {
- br label %Top
-Top:
- %D = add int %A, %B
- %E = sub int %D, -4
- %C = setle int %E, 0
- br bool %C, label %retlbl, label %loop
-
-loop:
- %F = add int %A, %B
- %G = sub int %D, -4
- %D = setle int %G, 0
- %E = xor bool %D, true
- br bool %E, label %loop, label %Top
-
-retlbl:
- ret void
-end
+define void @testbool(i32 %A, i32 %B) {
+ br label %Top
+
+Top: ; preds = %loop, %0
+ %D = add i32 %A, %B ; <i32> [#uses=2]
+ %E = sub i32 %D, -4 ; <i32> [#uses=1]
+ %C = icmp sle i32 %E, 0 ; <i1> [#uses=1]
+ br i1 %C, label %retlbl, label %loop
+
+loop: ; preds = %loop, %Top
+ %F = add i32 %A, %B ; <i32> [#uses=0]
+ %G = sub i32 %D, -4 ; <i32> [#uses=1]
+ %D.upgrd.1 = icmp sle i32 %G, 0 ; <i1> [#uses=1]
+ %E.upgrd.2 = xor i1 %D.upgrd.1, true ; <i1> [#uses=1]
+ br i1 %E.upgrd.2, label %loop, label %Top
+
+retlbl: ; preds = %Top
+ ret void
+}
;; Test use of a boolean result in cast operations.
;; Requires converting a condition code result into a 0/1 value in a reg.
;;
-implementation
-
-int %castbool(int %A, int %B) {
-bb0: ; [#uses=0]
- %cond213 = setlt int %A, %B ; <bool> [#uses=1]
- %cast110 = cast bool %cond213 to ubyte ; <ubyte> [#uses=1]
- %cast109 = cast ubyte %cast110 to int ; <int> [#uses=1]
- ret int %cast109
+define i32 @castbool(i32 %A, i32 %B) {
+bb0:
+ %cond213 = icmp slt i32 %A, %B ; <i1> [#uses=1]
+ %cast110 = zext i1 %cond213 to i8 ; <i8> [#uses=1]
+ %cast109 = zext i8 %cast110 to i32 ; <i32> [#uses=1]
+ ret i32 %cast109
}
-
;; Test use of a boolean result in arithmetic and logical operations.
;; Requires converting a condition code result into a 0/1 value in a reg.
;;
-bool %boolexpr(bool %b, int %N) {
- %b2 = setge int %N, 0
- %b3 = and bool %b, %b2
- ret bool %b3
+define i1 @boolexpr(i1 %b, i32 %N) {
+ %b2 = icmp sge i32 %N, 0 ; <i1> [#uses=1]
+ %b3 = and i1 %b, %b2 ; <i1> [#uses=1]
+ ret i1 %b3
}
-
; Test branch on floating point comparison
;
-void "testfloatbool"(float %x, float %y) ; Def %0, %1 - float
-begin
-; <label>:0
- br label %Top
-Top:
- %p = add float %x, %y ; Def 2 - float
- %z = sub float %x, %y ; Def 3 - float
- %b = setle float %p, %z ; Def 0 - bool
- %c = xor bool %b, true ; Def 1 - bool
- br bool %b, label %Top, label %goon
-goon:
- ret void
-end
+define void @testfloatbool(float %x, float %y) {
+ br label %Top
+
+Top: ; preds = %Top, %0
+ %p = add float %x, %y ; <float> [#uses=1]
+ %z = sub float %x, %y ; <float> [#uses=1]
+ %b = fcmp ole float %p, %z ; <i1> [#uses=2]
+ %c = xor i1 %b, true ; <i1> [#uses=0]
+ br i1 %b, label %Top, label %goon
+
+goon: ; preds = %Top
+ ret void
+}
; Test cases where an LLVM instruction requires no machine
@@ -164,46 +148,40 @@ end
; copy instruction (add-with-0), but this copy should get coalesced
; away by the register allocator.
;
-int "checkForward"(int %N, int* %A)
-begin
-
-bb2: ;;<label>
- %reg114 = shl int %N, ubyte 2 ;;
- %cast115 = cast int %reg114 to long ;; reg114 will be propagated
- %cast116 = cast int* %A to long ;; %A will be propagated
- %reg116 = add long %cast116, %cast115 ;;
- %castPtr = cast long %reg116 to int* ;; %A will be propagated
- %reg118 = load int* %castPtr ;;
- %cast117 = cast int %reg118 to long ;; reg118 will be copied 'cos
- %reg159 = add long 1234567, %cast117 ;; cast117 has 2 uses, here
- %reg160 = add long 7654321, %cast117 ;; and here.
- ret int 0
-end
+define i32 @checkForward(i32 %N, i32* %A) {
+bb2:
+ %reg114 = shl i32 %N, 2 ; <i32> [#uses=1]
+ %cast115 = sext i32 %reg114 to i64 ; <i64> [#uses=1]
+ %cast116 = ptrtoint i32* %A to i64 ; <i64> [#uses=1]
+ %reg116 = add i64 %cast116, %cast115 ; <i64> [#uses=1]
+ %castPtr = inttoptr i64 %reg116 to i32* ; <i32*> [#uses=1]
+ %reg118 = load i32* %castPtr ; <i32> [#uses=1]
+ %cast117 = sext i32 %reg118 to i64 ; <i64> [#uses=2]
+ %reg159 = add i64 1234567, %cast117 ; <i64> [#uses=0]
+ %reg160 = add i64 7654321, %cast117 ; <i64> [#uses=0]
+ ret i32 0
+}
; Test case for unary NOT operation constructed from XOR.
;
-void "checkNot"(bool %b, int %i)
-begin
- %notB = xor bool %b, true
- %notI = xor int %i, -1
- %F = setge int %notI, 100
- %J = add int %i, %i
- %andNotB = and bool %F, %notB ;; should get folded with notB
- %andNotI = and int %J, %notI ;; should get folded with notI
-
- %notB2 = xor bool true, %b ;; should become XNOR
- %notI2 = xor int -1, %i ;; should become XNOR
-
- ret void
-end
-
+define void @checkNot(i1 %b, i32 %i) {
+ %notB = xor i1 %b, true ; <i1> [#uses=1]
+ %notI = xor i32 %i, -1 ; <i32> [#uses=2]
+ %F = icmp sge i32 %notI, 100 ; <i1> [#uses=1]
+ %J = add i32 %i, %i ; <i32> [#uses=1]
+ %andNotB = and i1 %F, %notB ; <i1> [#uses=0]
+ %andNotI = and i32 %J, %notI ; <i32> [#uses=0]
+ %notB2 = xor i1 true, %b ; <i1> [#uses=0]
+ %notI2 = xor i32 -1, %i ; <i32> [#uses=0]
+ ret void
+}
; Test case for folding getelementptr into a load/store
;
-int "checkFoldGEP"(%Domain* %D, long %idx)
-begin
- %reg841 = getelementptr %Domain* %D, long 0, uint 1
- %reg820 = load int* %reg841
- ret int %reg820
-end
+define i32 @checkFoldGEP(%Domain* %D, i64 %idx) {
+ %reg841 = getelementptr %Domain* %D, i64 0, i32 1 ; <i32*> [#uses=1]
+ %reg820 = load i32* %reg841 ; <i32> [#uses=1]
+ ret i32 %reg820
+}
+
diff --git a/test/CodeGen/Generic/shift-int64.ll b/test/CodeGen/Generic/shift-int64.ll
index a5ab37d..31be2d6 100644
--- a/test/CodeGen/Generic/shift-int64.ll
+++ b/test/CodeGen/Generic/shift-int64.ll
@@ -1,11 +1,12 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-long %test_imm(long %X) {
- %Y = shr long %X, ubyte 17
- ret long %Y
+define i64 @test_imm(i64 %X) {
+ %Y = ashr i64 %X, 17 ; <i64> [#uses=1]
+ ret i64 %Y
}
-long %test_variable(long %X, ubyte %Amt) {
- %Y = shr long %X, ubyte %Amt
- ret long %Y
+define i64 @test_variable(i64 %X, i8 %Amt) {
+ %shift.upgrd.1 = zext i8 %Amt to i64 ; <i64> [#uses=1]
+ %Y = ashr i64 %X, %shift.upgrd.1 ; <i64> [#uses=1]
+ ret i64 %Y
}
diff --git a/test/CodeGen/Generic/spillccr.ll b/test/CodeGen/Generic/spillccr.ll
index 6ae7506..120668a 100644
--- a/test/CodeGen/Generic/spillccr.ll
+++ b/test/CodeGen/Generic/spillccr.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade %s | llvm-as | llc
+; RUN: llvm-as < %s -o - | llc
; July 6, 2002 -- LLC Regression test
; This test case checks if the integer CC register %xcc (or %ccr)
@@ -10,41 +10,40 @@
; branch-on-register instruction cannot be used directly, i.e.,
; the %xcc register is needed for the first branch.
;
- %Graph = type %struct.graph_st*
- %Hash = type %struct.hash*
- %HashEntry = type %struct.hash_entry*
- %Vertex = type %struct.vert_st*
- %struct.graph_st = type { [1 x %Vertex] }
- %struct.hash = type { %HashEntry*, int (uint)*, int }
- %struct.hash_entry = type { uint, sbyte*, %HashEntry }
- %struct.vert_st = type { int, %Vertex, %Hash }
-%HashRange = uninitialized global int ; <int*> [#uses=1]
-%.LC0 = internal global [13 x sbyte] c"Make phase 2\00" ; <[13 x sbyte]*> [#uses=1]
-%.LC1 = internal global [13 x sbyte] c"Make phase 3\00" ; <[13 x sbyte]*> [#uses=1]
-%.LC2 = internal global [13 x sbyte] c"Make phase 4\00" ; <[13 x sbyte]*> [#uses=1]
-%.LC3 = internal global [15 x sbyte] c"Make returning\00" ; <[15 x sbyte]*> [#uses=1]
-
-implementation ; Functions:
-
-%Graph %MakeGraph(int %numvert, int %numproc) {
-bb1: ;[#uses=1]
- %reg111 = add int %numproc, -1 ; <int> [#uses=3]
- %cond275 = setlt int %reg111, 1 ; <bool> [#uses=2]
- %cond276 = setle int %reg111, 0 ; <bool> [#uses=1]
- %cond277 = setge int %numvert, 0 ; <bool> [#uses=2]
- %reg162 = add int %numvert, 3 ; <int> [#uses=2]
- br bool %cond275, label %bb7, label %bb4
-
-bb4:
- br bool %cond276, label %bb7, label %bb5
-
-bb5:
- br bool %cond277, label %bb7, label %bb6
-
-bb6: ;[#uses=2]
- ret %Graph null
-
-bb7: ;[#uses=2]
- ret %Graph null
+
+ %Graph = type %struct.graph_st*
+ %Hash = type %struct.hash*
+ %HashEntry = type %struct.hash_entry*
+ %Vertex = type %struct.vert_st*
+ %struct.graph_st = type { [1 x %Vertex] }
+ %struct.hash = type { %HashEntry*, i32 (i32)*, i32 }
+ %struct.hash_entry = type { i32, i8*, %HashEntry }
+ %struct.vert_st = type { i32, %Vertex, %Hash }
+@HashRange = external global i32 ; <i32*> [#uses=0]
+@.LC0 = internal global [13 x i8] c"Make phase 2\00" ; <[13 x i8]*> [#uses=0]
+@.LC1 = internal global [13 x i8] c"Make phase 3\00" ; <[13 x i8]*> [#uses=0]
+@.LC2 = internal global [13 x i8] c"Make phase 4\00" ; <[13 x i8]*> [#uses=0]
+@.LC3 = internal global [15 x i8] c"Make returning\00" ; <[15 x i8]*> [#uses=0]
+
+define %Graph @MakeGraph(i32 %numvert, i32 %numproc) {
+bb1:
+ %reg111 = add i32 %numproc, -1 ; <i32> [#uses=2]
+ %cond275 = icmp slt i32 %reg111, 1 ; <i1> [#uses=1]
+ %cond276 = icmp sle i32 %reg111, 0 ; <i1> [#uses=1]
+ %cond277 = icmp sge i32 %numvert, 0 ; <i1> [#uses=1]
+ %reg162 = add i32 %numvert, 3 ; <i32> [#uses=0]
+ br i1 %cond275, label %bb7, label %bb4
+
+bb4: ; preds = %bb1
+ br i1 %cond276, label %bb7, label %bb5
+
+bb5: ; preds = %bb4
+ br i1 %cond277, label %bb7, label %bb6
+
+bb6: ; preds = %bb5
+ ret %Graph null
+
+bb7: ; preds = %bb5, %bb4, %bb1
+ ret %Graph null
}
diff --git a/test/CodeGen/Generic/stacksave-restore.ll b/test/CodeGen/Generic/stacksave-restore.ll
index 65cf6c1..fd3dd67 100644
--- a/test/CodeGen/Generic/stacksave-restore.ll
+++ b/test/CodeGen/Generic/stacksave-restore.ll
@@ -1,12 +1,14 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-declare sbyte* %llvm.stacksave()
-declare void %llvm.stackrestore(sbyte*)
+declare i8* @llvm.stacksave()
-int *%test(uint %N) {
- %tmp = call sbyte* %llvm.stacksave()
- %P = alloca int, uint %N
- call void %llvm.stackrestore(sbyte* %tmp)
- %Q = alloca int, uint %N
- ret int* %P
+declare void @llvm.stackrestore(i8*)
+
+define i32* @test(i32 %N) {
+ %tmp = call i8* @llvm.stacksave( ) ; <i8*> [#uses=1]
+ %P = alloca i32, i32 %N ; <i32*> [#uses=1]
+ call void @llvm.stackrestore( i8* %tmp )
+ %Q = alloca i32, i32 %N ; <i32*> [#uses=0]
+ ret i32* %P
}
+
diff --git a/test/CodeGen/Generic/switch-crit-edge-constant.ll b/test/CodeGen/Generic/switch-crit-edge-constant.ll
index c9d027b..d71fe56 100644
--- a/test/CodeGen/Generic/switch-crit-edge-constant.ll
+++ b/test/CodeGen/Generic/switch-crit-edge-constant.ll
@@ -1,55 +1,52 @@
; PR925
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
+; RUN: llvm-as < %s | llc -march=x86 | \
; RUN: grep mov.*str1 | count 1
-target endian = little
-target pointersize = 32
+target datalayout = "e-p:32:32"
target triple = "i686-apple-darwin8.7.2"
-%str1 = internal constant [5 x sbyte] c"bonk\00" ; <[5 x sbyte]*> [#uses=1]
-%str2 = internal constant [5 x sbyte] c"bork\00" ; <[5 x sbyte]*> [#uses=1]
-%str = internal constant [8 x sbyte] c"perfwap\00" ; <[8 x sbyte]*> [#uses=1]
+@str1 = internal constant [5 x i8] c"bonk\00" ; <[5 x i8]*> [#uses=1]
+@str2 = internal constant [5 x i8] c"bork\00" ; <[5 x i8]*> [#uses=1]
+@str = internal constant [8 x i8] c"perfwap\00" ; <[8 x i8]*> [#uses=1]
-implementation ; Functions:
-
-void %foo(int %C) {
+define void @foo(i32 %C) {
entry:
- switch int %C, label %bb2 [
- int 1, label %blahaha
- int 2, label %blahaha
- int 3, label %blahaha
- int 4, label %blahaha
- int 5, label %blahaha
- int 6, label %blahaha
- int 7, label %blahaha
- int 8, label %blahaha
- int 9, label %blahaha
- int 10, label %blahaha
+ switch i32 %C, label %bb2 [
+ i32 1, label %blahaha
+ i32 2, label %blahaha
+ i32 3, label %blahaha
+ i32 4, label %blahaha
+ i32 5, label %blahaha
+ i32 6, label %blahaha
+ i32 7, label %blahaha
+ i32 8, label %blahaha
+ i32 9, label %blahaha
+ i32 10, label %blahaha
]
bb2: ; preds = %entry
- %tmp5 = and int %C, 123 ; <int> [#uses=1]
- %tmp = seteq int %tmp5, 0 ; <bool> [#uses=1]
- br bool %tmp, label %blahaha, label %cond_true
+ %tmp5 = and i32 %C, 123 ; <i32> [#uses=1]
+ %tmp = icmp eq i32 %tmp5, 0 ; <i1> [#uses=1]
+ br i1 %tmp, label %blahaha, label %cond_true
cond_true: ; preds = %bb2
br label %blahaha
blahaha: ; preds = %cond_true, %bb2, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry
- %s.0 = phi sbyte* [ getelementptr ([8 x sbyte]* %str, int 0, uint 0), %cond_true ], [ getelementptr ([5 x sbyte]* %str1, int 0, uint 0), %entry ], [ getelementptr ([5 x sbyte]* %str1, int 0, uint 0), %entry ], [ getelementptr ([5 x sbyte]* %str1, int 0, uint 0), %entry ], [ getelementptr ([5 x sbyte]* %str1, int 0, uint 0), %entry ], [ getelementptr ([5 x sbyte]* %str1, int 0, uint 0), %entry ], [ getelementptr ([5 x sbyte]* %str1, int 0, uint 0), %entry ], [ getelementptr ([5 x sbyte]* %str1, int 0, uint 0), %entry ], [ getelementptr ([5 x sbyte]* %str1, int 0, uint 0), %entry ], [ getelementptr ([5 x sbyte]* %str1, int 0, uint 0), %entry ], [ getelementptr ([5 x sbyte]* %str1, int 0, uint 0), %entry ], [ getelementptr ([5 x sbyte]* %str2, int 0, uint 0), %bb2 ] ; <sbyte*> [#uses=13]
- %tmp8 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp10 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp12 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp14 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp16 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp18 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp20 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp22 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp24 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp26 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp28 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp30 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
- %tmp32 = tail call int (sbyte*, ...)* %printf( sbyte* %s.0 ) ; <int> [#uses=0]
+ %s.0 = phi i8* [ getelementptr ([8 x i8]* @str, i32 0, i64 0), %cond_true ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str2, i32 0, i64 0), %bb2 ] ; <i8*> [#uses=13]
+ %tmp8 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp10 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp12 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp14 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp16 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp18 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp20 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp22 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp24 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp26 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp28 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp30 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
+ %tmp32 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
ret void
}
-declare int %printf(sbyte*, ...)
+declare i32 @printf(i8*, ...)
diff --git a/test/CodeGen/Generic/vector-constantexpr.ll b/test/CodeGen/Generic/vector-constantexpr.ll
index 31b60a4..441c4a0 100644
--- a/test/CodeGen/Generic/vector-constantexpr.ll
+++ b/test/CodeGen/Generic/vector-constantexpr.ll
@@ -1,10 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-void ""(float* %inregs, float* %outregs) {
+define void @""(float* %inregs, float* %outregs) {
%a_addr.i = alloca <4 x float> ; <<4 x float>*> [#uses=1]
- store <4 x float> < float extractelement (<4 x float> undef, uint 3), float extractelement (<4 x float> undef, uint 0), float extractelement (<4 x float> undef, uint 1), float extractelement (<4 x float> undef, uint 2) >, <4 x float>* %a_addr.i
+ store <4 x float> < float undef, float undef, float undef, float undef >, <4 x float>* %a_addr.i
ret void
}
-
-
-
diff --git a/test/CodeGen/Generic/vector-identity-shuffle.ll b/test/CodeGen/Generic/vector-identity-shuffle.ll
index 0f7e03b..61b44af 100644
--- a/test/CodeGen/Generic/vector-identity-shuffle.ll
+++ b/test/CodeGen/Generic/vector-identity-shuffle.ll
@@ -1,15 +1,17 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
-void %test(<4 x float> *%tmp2.i) {
- %tmp2.i = load <4x float>* %tmp2.i
- %xFloat0.48 = extractelement <4 x float> %tmp2.i, uint 0 ; <float> [#uses=1]
- %inFloat0.49 = insertelement <4 x float> undef, float %xFloat0.48, uint 0 ; <<4 x float>> [#uses=1]
- %xFloat1.50 = extractelement <4 x float> %tmp2.i, uint 1 ; <float> [#uses=1]
- %inFloat1.52 = insertelement <4 x float> %inFloat0.49, float %xFloat1.50, uint 1 ; <<4 x float>> [#uses=1]
- %xFloat2.53 = extractelement <4 x float> %tmp2.i, uint 2 ; <float> [#uses=1]
- %inFloat2.55 = insertelement <4 x float> %inFloat1.52, float %xFloat2.53, uint 2 ; <<4 x float>> [#uses=1]
- %xFloat3.56 = extractelement <4 x float> %tmp2.i, uint 3 ; <float> [#uses=1]
- %inFloat3.58 = insertelement <4 x float> %inFloat2.55, float %xFloat3.56, uint 3 ; <<4 x float>> [#uses=4]
- store <4 x float> %inFloat3.58, <4x float>* %tmp2.i
- ret void
+
+define void @test(<4 x float>* %tmp2.i) {
+ %tmp2.i.upgrd.1 = load <4 x float>* %tmp2.i ; <<4 x float>> [#uses=4]
+ %xFloat0.48 = extractelement <4 x float> %tmp2.i.upgrd.1, i32 0 ; <float> [#uses=1]
+ %inFloat0.49 = insertelement <4 x float> undef, float %xFloat0.48, i32 0 ; <<4 x float>> [#uses=1]
+ %xFloat1.50 = extractelement <4 x float> %tmp2.i.upgrd.1, i32 1 ; <float> [#uses=1]
+ %inFloat1.52 = insertelement <4 x float> %inFloat0.49, float %xFloat1.50, i32 1 ; <<4 x float>> [#uses=1]
+ %xFloat2.53 = extractelement <4 x float> %tmp2.i.upgrd.1, i32 2 ; <float> [#uses=1]
+ %inFloat2.55 = insertelement <4 x float> %inFloat1.52, float %xFloat2.53, i32 2 ; <<4 x float>> [#uses=1]
+ %xFloat3.56 = extractelement <4 x float> %tmp2.i.upgrd.1, i32 3 ; <float> [#uses=1]
+ %inFloat3.58 = insertelement <4 x float> %inFloat2.55, float %xFloat3.56, i32 3 ; <<4 x float>> [#uses=1]
+ store <4 x float> %inFloat3.58, <4 x float>* %tmp2.i
+ ret void
}
+
diff --git a/test/CodeGen/Generic/vector.ll b/test/CodeGen/Generic/vector.ll
index 0b21c75..9105757 100644
--- a/test/CodeGen/Generic/vector.ll
+++ b/test/CodeGen/Generic/vector.ll
@@ -1,156 +1,154 @@
; Test that vectors are scalarized/lowered correctly.
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
+
+%d8 = type <8 x double>
%f1 = type <1 x float>
%f2 = type <2 x float>
%f4 = type <4 x float>
-%i4 = type <4 x int>
%f8 = type <8 x float>
-%d8 = type <8 x double>
-
-implementation
+%i4 = type <4 x i32>
;;; TEST HANDLING OF VARIOUS VECTOR SIZES
-void %test_f1(%f1 *%P, %f1* %Q, %f1 *%S) {
- %p = load %f1 *%P
- %q = load %f1* %Q
- %R = add %f1 %p, %q
- store %f1 %R, %f1 *%S
- ret void
+define void @test_f1(%f1* %P, %f1* %Q, %f1* %S) {
+ %p = load %f1* %P ; <%f1> [#uses=1]
+ %q = load %f1* %Q ; <%f1> [#uses=1]
+ %R = add %f1 %p, %q ; <%f1> [#uses=1]
+ store %f1 %R, %f1* %S
+ ret void
}
-void %test_f2(%f2 *%P, %f2* %Q, %f2 *%S) {
- %p = load %f2* %P
- %q = load %f2* %Q
- %R = add %f2 %p, %q
- store %f2 %R, %f2 *%S
- ret void
+define void @test_f2(%f2* %P, %f2* %Q, %f2* %S) {
+ %p = load %f2* %P ; <%f2> [#uses=1]
+ %q = load %f2* %Q ; <%f2> [#uses=1]
+ %R = add %f2 %p, %q ; <%f2> [#uses=1]
+ store %f2 %R, %f2* %S
+ ret void
}
-void %test_f4(%f4 *%P, %f4* %Q, %f4 *%S) {
- %p = load %f4* %P
- %q = load %f4* %Q
- %R = add %f4 %p, %q
- store %f4 %R, %f4 *%S
- ret void
+define void @test_f4(%f4* %P, %f4* %Q, %f4* %S) {
+ %p = load %f4* %P ; <%f4> [#uses=1]
+ %q = load %f4* %Q ; <%f4> [#uses=1]
+ %R = add %f4 %p, %q ; <%f4> [#uses=1]
+ store %f4 %R, %f4* %S
+ ret void
}
-void %test_f8(%f8 *%P, %f8* %Q, %f8 *%S) {
- %p = load %f8* %P
- %q = load %f8* %Q
- %R = add %f8 %p, %q
- store %f8 %R, %f8 *%S
- ret void
+define void @test_f8(%f8* %P, %f8* %Q, %f8* %S) {
+ %p = load %f8* %P ; <%f8> [#uses=1]
+ %q = load %f8* %Q ; <%f8> [#uses=1]
+ %R = add %f8 %p, %q ; <%f8> [#uses=1]
+ store %f8 %R, %f8* %S
+ ret void
}
-void %test_fmul(%f8 *%P, %f8* %Q, %f8 *%S) {
- %p = load %f8* %P
- %q = load %f8* %Q
- %R = mul %f8 %p, %q
- store %f8 %R, %f8 *%S
- ret void
+define void @test_fmul(%f8* %P, %f8* %Q, %f8* %S) {
+ %p = load %f8* %P ; <%f8> [#uses=1]
+ %q = load %f8* %Q ; <%f8> [#uses=1]
+ %R = mul %f8 %p, %q ; <%f8> [#uses=1]
+ store %f8 %R, %f8* %S
+ ret void
}
-void %test_div(%f8 *%P, %f8* %Q, %f8 *%S) {
- %p = load %f8* %P
- %q = load %f8* %Q
- %R = div %f8 %p, %q
- store %f8 %R, %f8 *%S
- ret void
+define void @test_div(%f8* %P, %f8* %Q, %f8* %S) {
+ %p = load %f8* %P ; <%f8> [#uses=1]
+ %q = load %f8* %Q ; <%f8> [#uses=1]
+ %R = fdiv %f8 %p, %q ; <%f8> [#uses=1]
+ store %f8 %R, %f8* %S
+ ret void
}
;;; TEST VECTOR CONSTRUCTS
-void %test_cst(%f4 *%P, %f4 *%S) {
- %p = load %f4* %P
- %R = add %f4 %p, <float 0x3FB99999A0000000, float 1.0, float 2.0, float 4.5>
- store %f4 %R, %f4 *%S
- ret void
-}
-void %test_zero(%f4 *%P, %f4 *%S) {
- %p = load %f4* %P
- %R = add %f4 %p, zeroinitializer
- store %f4 %R, %f4 *%S
- ret void
+define void @test_cst(%f4* %P, %f4* %S) {
+ %p = load %f4* %P ; <%f4> [#uses=1]
+ %R = add %f4 %p, < float 0x3FB99999A0000000, float 1.000000e+00, float 2.000000e+00, float 4.500000e+00 > ; <%f4> [#uses=1]
+ store %f4 %R, %f4* %S
+ ret void
}
-void %test_undef(%f4 *%P, %f4 *%S) {
- %p = load %f4* %P
- %R = add %f4 %p, undef
- store %f4 %R, %f4 *%S
- ret void
+define void @test_zero(%f4* %P, %f4* %S) {
+ %p = load %f4* %P ; <%f4> [#uses=1]
+ %R = add %f4 %p, zeroinitializer ; <%f4> [#uses=1]
+ store %f4 %R, %f4* %S
+ ret void
}
-void %test_constant_insert(%f4 *%S) {
- %R = insertelement %f4 zeroinitializer, float 10.0, uint 0
- store %f4 %R, %f4 *%S
- ret void
+define void @test_undef(%f4* %P, %f4* %S) {
+ %p = load %f4* %P ; <%f4> [#uses=1]
+ %R = add %f4 %p, undef ; <%f4> [#uses=1]
+ store %f4 %R, %f4* %S
+ ret void
}
-void %test_variable_buildvector(float %F, %f4 *%S) {
- %R = insertelement %f4 zeroinitializer, float %F, uint 0
- store %f4 %R, %f4 *%S
- ret void
+define void @test_constant_insert(%f4* %S) {
+ %R = insertelement %f4 zeroinitializer, float 1.000000e+01, i32 0 ; <%f4> [#uses=1]
+ store %f4 %R, %f4* %S
+ ret void
}
-void %test_scalar_to_vector(float %F, %f4 *%S) {
- %R = insertelement %f4 undef, float %F, uint 0 ;; R = scalar_to_vector F
- store %f4 %R, %f4 *%S
- ret void
+define void @test_variable_buildvector(float %F, %f4* %S) {
+ %R = insertelement %f4 zeroinitializer, float %F, i32 0 ; <%f4> [#uses=1]
+ store %f4 %R, %f4* %S
+ ret void
}
-float %test_extract_elt(%f8 *%P) {
- %p = load %f8* %P
- %R = extractelement %f8 %p, uint 3
- ret float %R
+define void @test_scalar_to_vector(float %F, %f4* %S) {
+ %R = insertelement %f4 undef, float %F, i32 0 ; <%f4> [#uses=1]
+ store %f4 %R, %f4* %S
+ ret void
}
-double %test_extract_elt2(%d8 *%P) {
- %p = load %d8* %P
- %R = extractelement %d8 %p, uint 3
- ret double %R
+define float @test_extract_elt(%f8* %P) {
+ %p = load %f8* %P ; <%f8> [#uses=1]
+ %R = extractelement %f8 %p, i32 3 ; <float> [#uses=1]
+ ret float %R
}
-void %test_cast_1(<4 x float>* %b, <4 x int>* %a) {
- %tmp = load <4 x float>* %b
- %tmp2 = add <4 x float> %tmp, <float 1.0, float 2.0, float 3.0, float 4.0>
- %tmp3 = cast <4 x float> %tmp2 to <4 x int>
- %tmp4 = add <4 x int> %tmp3, <int 1, int 2, int 3, int 4>
- store <4 x int> %tmp4, <4 x int>* %a
- ret void
+define double @test_extract_elt2(%d8* %P) {
+ %p = load %d8* %P ; <%d8> [#uses=1]
+ %R = extractelement %d8 %p, i32 3 ; <double> [#uses=1]
+ ret double %R
}
-void %test_cast_2(<8 x float>* %a, <8 x int>* %b) {
- %T = load <8 x float>* %a
- %T2 = cast <8 x float> %T to <8 x int>
- store <8 x int> %T2, <8 x int>* %b
- ret void
+define void @test_cast_1(%f4* %b, %i4* %a) {
+ %tmp = load %f4* %b ; <%f4> [#uses=1]
+ %tmp2 = add %f4 %tmp, < float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00 > ; <%f4> [#uses=1]
+ %tmp3 = bitcast %f4 %tmp2 to %i4 ; <%i4> [#uses=1]
+ %tmp4 = add %i4 %tmp3, < i32 1, i32 2, i32 3, i32 4 > ; <%i4> [#uses=1]
+ store %i4 %tmp4, %i4* %a
+ ret void
}
+define void @test_cast_2(%f8* %a, <8 x i32>* %b) {
+ %T = load %f8* %a ; <%f8> [#uses=1]
+ %T2 = bitcast %f8 %T to <8 x i32> ; <<8 x i32>> [#uses=1]
+ store <8 x i32> %T2, <8 x i32>* %b
+ ret void
+}
;;; TEST IMPORTANT IDIOMS
-void %splat(%f4* %P, %f4* %Q, float %X) {
- %tmp = insertelement %f4 undef, float %X, uint 0
- %tmp2 = insertelement %f4 %tmp, float %X, uint 1
- %tmp4 = insertelement %f4 %tmp2, float %X, uint 2
- %tmp6 = insertelement %f4 %tmp4, float %X, uint 3
- %q = load %f4* %Q
- %R = add %f4 %q, %tmp6
- store %f4 %R, %f4* %P
- ret void
-}
-
-void %splat_i4(%i4* %P, %i4* %Q, int %X) {
- %tmp = insertelement %i4 undef, int %X, uint 0
- %tmp2 = insertelement %i4 %tmp, int %X, uint 1
- %tmp4 = insertelement %i4 %tmp2, int %X, uint 2
- %tmp6 = insertelement %i4 %tmp4, int %X, uint 3
- %q = load %i4* %Q
- %R = add %i4 %q, %tmp6
- store %i4 %R, %i4* %P
- ret void
+define void @splat(%f4* %P, %f4* %Q, float %X) {
+ %tmp = insertelement %f4 undef, float %X, i32 0 ; <%f4> [#uses=1]
+ %tmp2 = insertelement %f4 %tmp, float %X, i32 1 ; <%f4> [#uses=1]
+ %tmp4 = insertelement %f4 %tmp2, float %X, i32 2 ; <%f4> [#uses=1]
+ %tmp6 = insertelement %f4 %tmp4, float %X, i32 3 ; <%f4> [#uses=1]
+ %q = load %f4* %Q ; <%f4> [#uses=1]
+ %R = add %f4 %q, %tmp6 ; <%f4> [#uses=1]
+ store %f4 %R, %f4* %P
+ ret void
+}
+
+define void @splat_i4(%i4* %P, %i4* %Q, i32 %X) {
+ %tmp = insertelement %i4 undef, i32 %X, i32 0 ; <%i4> [#uses=1]
+ %tmp2 = insertelement %i4 %tmp, i32 %X, i32 1 ; <%i4> [#uses=1]
+ %tmp4 = insertelement %i4 %tmp2, i32 %X, i32 2 ; <%i4> [#uses=1]
+ %tmp6 = insertelement %i4 %tmp4, i32 %X, i32 3 ; <%i4> [#uses=1]
+ %q = load %i4* %Q ; <%i4> [#uses=1]
+ %R = add %i4 %q, %tmp6 ; <%i4> [#uses=1]
+ store %i4 %R, %i4* %P
+ ret void
}
-
diff --git a/test/CodeGen/IA64/2005-08-22-LegalizerCrash.ll b/test/CodeGen/IA64/2005-08-22-LegalizerCrash.ll
index c160e7f..0551290 100644
--- a/test/CodeGen/IA64/2005-08-22-LegalizerCrash.ll
+++ b/test/CodeGen/IA64/2005-08-22-LegalizerCrash.ll
@@ -1,11 +1,10 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=ia64
+; RUN: llvm-as < %s | llc -march=ia64
-%_ZN9__gnu_cxx16__stl_prime_listE = external global [28 x uint] ; <[28 x uint]*> [#uses=3]
+@_ZN9__gnu_cxx16__stl_prime_listE = external global [28 x i32] ; <[28 x i32]*> [#uses=3]
-implementation ; Functions:
-
-fastcc uint* %_ZSt11lower_boundIPKmmET_S2_S2_RKT0_(uint %__val.val) {
+define fastcc i32* @_ZSt11lower_boundIPKmmET_S2_S2_RKT0_(i32 %__val.val) {
entry:
- %retval = select bool setgt (int shr (int sub (int cast (uint* getelementptr ([28 x uint]* %_ZN9__gnu_cxx16__stl_prime_listE, int 0, int 28) to int), int cast ([28 x uint]* %_ZN9__gnu_cxx16__stl_prime_listE to int)), ubyte 2), int 0), uint* null, uint* getelementptr ([28 x uint]* %_ZN9__gnu_cxx16__stl_prime_listE, int 0, int 0) ; <uint*> [#uses=1]
- ret uint* %retval
+ %retval = select i1 icmp slt (i32 ashr (i32 sub (i32 ptrtoint (i32* getelementptr ([28 x i32]* @_ZN9__gnu_cxx16__stl_prime_listE, i32 0, i32 28) to i32), i32 ptrtoint ([28 x i32]* @_ZN9__gnu_cxx16__stl_prime_listE to i32)), i32 2), i32 0), i32* null, i32* getelementptr ([28 x i32]* @_ZN9__gnu_cxx16__stl_prime_listE, i32 0, i32 0) ; <i32*> [#uses=1]
+ ret i32* %retval
}
+
diff --git a/test/CodeGen/IA64/2005-10-29-shladd.ll b/test/CodeGen/IA64/2005-10-29-shladd.ll
index 186e5e8..01ef68c 100644
--- a/test/CodeGen/IA64/2005-10-29-shladd.ll
+++ b/test/CodeGen/IA64/2005-10-29-shladd.ll
@@ -1,11 +1,9 @@
; this should turn into shladd
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=ia64 | grep shladd
+; RUN: llvm-as < %s | llc -march=ia64 | grep shladd
-implementation ; Functions:
-
-long %bogglesmoggle(long %X, long %Y) {
- %A = shl long %X, ubyte 3
- %B = add long %A, %Y
- ret long %B
+define i64 @bogglesmoggle(i64 %X, i64 %Y) {
+ %A = shl i64 %X, 3 ; <i64> [#uses=1]
+ %B = add i64 %A, %Y ; <i64> [#uses=1]
+ ret i64 %B
}
diff --git a/test/CodeGen/IA64/ret-0.ll b/test/CodeGen/IA64/ret-0.ll
index 0f5cf89..fa2aac3 100644
--- a/test/CodeGen/IA64/ret-0.ll
+++ b/test/CodeGen/IA64/ret-0.ll
@@ -1,5 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=ia64
+; RUN: llvm-as < %s | llc -march=ia64
-double %test() {
+define double @test() {
ret double 0.0
}
diff --git a/test/CodeGen/SPARC/2006-01-22-BitConvertLegalize.ll b/test/CodeGen/SPARC/2006-01-22-BitConvertLegalize.ll
index d93c839..15af046 100644
--- a/test/CodeGen/SPARC/2006-01-22-BitConvertLegalize.ll
+++ b/test/CodeGen/SPARC/2006-01-22-BitConvertLegalize.ll
@@ -1,12 +1,12 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc
+; RUN: llvm-as < %s | llc -march=sparc
-void %execute_list() {
- %tmp.33.i = div float 0.000000e+00, 0.000000e+00 ; <float> [#uses=1]
- %tmp.37.i = mul float 0.000000e+00, %tmp.33.i ; <float> [#uses=1]
- %tmp.42.i = add float %tmp.37.i, 0.000000e+00 ; <float> [#uses=1]
- call void %gl_EvalCoord1f( float %tmp.42.i )
- ret void
+define void @execute_list() {
+ %tmp.33.i = fdiv float 0.000000e+00, 0.000000e+00 ; <float> [#uses=1]
+ %tmp.37.i = mul float 0.000000e+00, %tmp.33.i ; <float> [#uses=1]
+ %tmp.42.i = add float %tmp.37.i, 0.000000e+00 ; <float> [#uses=1]
+ call void @gl_EvalCoord1f( float %tmp.42.i )
+ ret void
}
-declare void %gl_EvalCoord1f( float)
+declare void @gl_EvalCoord1f(float)
diff --git a/test/CodeGen/SPARC/ctpop.ll b/test/CodeGen/SPARC/ctpop.ll
index 55fa8c5..d603baa 100644
--- a/test/CodeGen/SPARC/ctpop.ll
+++ b/test/CodeGen/SPARC/ctpop.ll
@@ -1,13 +1,14 @@
-; RUN: llvm-upgrade < %s | llvm-as | \
+; RUN: llvm-as < %s | \
; RUN: llc -march=sparc -mattr=v9 -enable-sparc-v9-insts
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc -mattr=-v9 | \
+; RUN: llvm-as < %s | llc -march=sparc -mattr=-v9 | \
; RUN: not grep popc
-; RUN: llvm-upgrade < %s | llvm-as | \
+; RUN: llvm-as < %s | \
; RUN: llc -march=sparc -mattr=v9 -enable-sparc-v9-insts | grep popc
-declare uint %llvm.ctpop.i32(uint)
-uint %test(uint %X) {
- %Y = call uint %llvm.ctpop.i32(uint %X)
- ret uint %Y
+declare i32 @llvm.ctpop.i32(i32)
+
+define i32 @test(i32 %X) {
+ %Y = call i32 @llvm.ctpop.i32( i32 %X ) ; <i32> [#uses=1]
+ ret i32 %Y
}
diff --git a/test/CodeGen/SPARC/xnor.ll b/test/CodeGen/SPARC/xnor.ll
index 2cef49d..9d8994c 100644
--- a/test/CodeGen/SPARC/xnor.ll
+++ b/test/CodeGen/SPARC/xnor.ll
@@ -1,14 +1,15 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc | \
+; RUN: llvm-as < %s | llc -march=sparc | \
; RUN: grep xnor | count 2
-int %test1(int %X, int %Y) {
- %A = xor int %X, %Y
- %B = xor int %A, -1
- ret int %B
+define i32 @test1(i32 %X, i32 %Y) {
+ %A = xor i32 %X, %Y ; <i32> [#uses=1]
+ %B = xor i32 %A, -1 ; <i32> [#uses=1]
+ ret i32 %B
}
-int %test2(int %X, int %Y) {
- %A = xor int %X, -1
- %B = xor int %A, %Y
- ret int %B
+define i32 @test2(i32 %X, i32 %Y) {
+ %A = xor i32 %X, -1 ; <i32> [#uses=1]
+ %B = xor i32 %A, %Y ; <i32> [#uses=1]
+ ret i32 %B
}
+