For PR761:
authorReid Spencer <rspencer@reidspencer.com>
Fri, 26 Jan 2007 08:25:06 +0000 (08:25 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Fri, 26 Jan 2007 08:25:06 +0000 (08:25 +0000)
Remove "target endian/pointersize" or add "target datalayout" to make
the test parse properly or set the datalayout because defaults changes.

For PR645:
Make global names use the @ prefix.

For llvm-upgrade changes:
Fix test cases or completely remove use of llvm-upgrade for test cases
that cannot survive the new renaming or upgrade capabilities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33533 91177308-0d34-0410-b5e6-96231b3b80d8

152 files changed:
test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll
test/Analysis/Dominators/2007-01-14-BreakCritEdges.ll
test/Analysis/ScalarEvolution/trip-count.ll
test/Assembler/2002-05-02-ParseError.ll
test/Assembler/2002-07-25-ParserAssertionFailure.llx
test/Assembler/2002-12-15-GlobalResolve.ll
test/Assembler/2003-04-15-ConstantInitAssertion.llx
test/Assembler/2003-05-21-MalformedShiftCrash.llx
test/Assembler/2003-05-21-MalformedStructCrash.llx
test/Assembler/2003-12-30-TypeMapInvalidMemory.llx
test/Assembler/2004-11-28-InvalidTypeCrash.ll
test/Assembler/2005-01-31-CallingAggregateFunction.ll
test/Assembler/2006-09-28-CrashOnInvalid.ll
test/Assembler/2006-12-09-Cast-To-Bool.ll
test/Assembler/2007-01-02-Undefined-Arg-Type.ll
test/Assembler/2007-01-05-Local-Name-Conflict.ll
test/Assembler/2007-01-12-Varargs-Upgrade.ll
test/Assembler/2007-01-16-CrashOnBadCast.ll
test/Assembler/2007-01-16-CrashOnBadCast2.ll
test/Assembler/2007-01-21-UpgradeNoArgs.ll [new file with mode: 0644]
test/Assembler/2007-01-22-UpgradeMalformedShift.ll [new file with mode: 0644]
test/Assembler/2007-01-22-UpgradeMalformedStruct.ll [new file with mode: 0644]
test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll [new file with mode: 0644]
test/CodeGen/ARM/2007-01-19-InfiniteLoop.ll
test/CodeGen/ARM/fcopysign.ll
test/CodeGen/ARM/fpcmp_ueq.ll
test/CodeGen/ARM/large-stack.ll
test/CodeGen/ARM/ldr_ext.ll
test/CodeGen/ARM/ldr_frame.ll
test/CodeGen/ARM/mul.ll
test/CodeGen/ARM/select.ll
test/CodeGen/ARM/sxt_rot.ll
test/CodeGen/ARM/thumb-imm.ll
test/CodeGen/ARM/uxt_rot.ll
test/CodeGen/Alpha/add.ll
test/CodeGen/Alpha/i32_sub_1.ll
test/CodeGen/Alpha/zapnot.ll
test/CodeGen/CBackend/2007-01-08-ParamAttr-ICmp.ll
test/CodeGen/CBackend/2007-01-17-StackSaveNRestore.ll
test/CodeGen/Generic/2007-01-15-LoadSelectCycle.ll
test/CodeGen/PowerPC/2007-01-04-ArgExtension.ll
test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll
test/CodeGen/PowerPC/and-elim.ll
test/CodeGen/PowerPC/and_sext.ll
test/CodeGen/PowerPC/small-arguments.ll
test/CodeGen/PowerPC/unsafe-math.ll
test/CodeGen/X86/2006-05-11-InstrSched.ll
test/CodeGen/X86/2007-01-08-InstrSched.ll
test/CodeGen/X86/2007-01-13-StackPtrIndex.ll
test/CodeGen/X86/sse-fcopysign.ll
test/CodeGen/X86/test-hidden.ll
test/CodeGen/X86/test-pic-1.ll
test/CodeGen/X86/test-pic-2.ll
test/CodeGen/X86/test-pic-3.ll
test/CodeGen/X86/test-pic-4.ll
test/CodeGen/X86/test-pic-5.ll
test/CodeGen/X86/test-pic-6.ll
test/CodeGen/X86/test-pic-cpool.ll
test/CodeGen/X86/test-pic-jtbl.ll
test/CodeGen/X86/trunc-to-bool.ll
test/Feature/globalredefinition2.ll
test/Feature/globalredefinition3.ll
test/Feature/newcasts.ll
test/Feature/packed_struct.ll
test/Feature/paramattrs.ll
test/Integer/2007-01-19-TruncSext.ll
test/Integer/BitArith.ll
test/Integer/BitBit.ll
test/Integer/BitCast.ll
test/Integer/BitIcmp.ll
test/Integer/BitMem.ll
test/Integer/BitMisc.ll
test/Integer/BitPacked.ll
test/Integer/a1.ll
test/Integer/a1.ll.out
test/Integer/a15.ll
test/Integer/a15.ll.out
test/Integer/a17.ll
test/Integer/a17.ll.out
test/Integer/a31.ll
test/Integer/a31.ll.out
test/Integer/a33.ll
test/Integer/a33.ll.out
test/Integer/a63.ll
test/Integer/a63.ll.out
test/Integer/a7.ll
test/Integer/a7.ll.out
test/Integer/a9.ll
test/Integer/a9.ll.out
test/Integer/alignment_bt.ll
test/Integer/basictest_bt.ll
test/Integer/calltest_bt.ll
test/Integer/cfgstructures_bt.ll
test/Integer/constexpr_bt.ll
test/Integer/constpointer_bt.ll
test/Integer/forwardreftest_bt.ll
test/Integer/globalredefinition_bt.ll
test/Integer/globalvars_bt.ll
test/Integer/indirectcall2_bt.ll
test/Integer/indirectcall_bt.ll
test/Integer/instructions_bt.ll
test/Integer/newcasts_bt.ll
test/Integer/packed_bt.ll
test/Integer/packed_struct_bt.ll
test/Integer/paramattrs_bt.ll
test/Integer/properties_bt.ll
test/Integer/prototype_bt.ll
test/Integer/recursivetype_bt.ll
test/Integer/simplecalltest_bt.ll
test/Integer/small_bt.ll
test/Integer/testalloca_bt.ll
test/Integer/testarith_bt.ll
test/Integer/testconstants_bt.ll
test/Integer/testicmp_bt.ll
test/Integer/testlogical_bt.ll
test/Integer/testlogical_new_bt.ll
test/Integer/testmemory_bt.ll
test/Integer/testswitch_bt.ll
test/Integer/testvarargs_bt.ll
test/Integer/undefined_bt.ll
test/Integer/unreachable_bt.ll
test/Integer/varargs_bt.ll
test/Integer/varargs_new_bt.ll
test/Linker/2003-01-30-LinkerRename.ll
test/Linker/2003-11-18-TypeResolution.ll
test/Linker/2005-12-06-AppendingZeroLengthArrays.ll
test/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVars.ll
test/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVarsEasier.ll
test/Transforms/FunctionResolve/2003-10-21-GlobalResolveHack.ll
test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll
test/Transforms/GlobalOpt/storepointer-compare.llx
test/Transforms/IndVarsSimplify/2007-01-06-TripCount.ll
test/Transforms/IndVarsSimplify/2007-01-08-X86-64-Pointer.ll
test/Transforms/InstCombine/2007-01-13-ExtCompareMiscompile.ll
test/Transforms/InstCombine/2007-01-14-FcmpSelf.ll
test/Transforms/InstCombine/2007-01-18-VectorInfLoop.ll
test/Transforms/InstCombine/IntPtrCast.ll
test/Transforms/InstCombine/add.ll
test/Transforms/InstCombine/cast-malloc.ll
test/Transforms/InstCombine/sub.ll
test/Transforms/InstCombine/vec_shuffle.ll
test/Transforms/InstCombine/xor.ll
test/Transforms/InstCombine/zeroext-and-reduce.ll
test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll
test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll
test/Transforms/LCSSA/basictest.ll
test/Transforms/LevelRaise/2002-03-21-MissedRaise.ll
test/Transforms/SimplifyLibCalls/StrLen.ll
test/Transforms/TailCallElim/dont-tce-tail-marked-call.ll
test/Transforms/TailCallElim/move_alloca_for_tail_call.ll
test/Transforms/TailCallElim/trivial_codegen_tailcall.ll
test/Verifier/2006-10-15-AddrLabel.ll

index 19c5c06c6b698e790bc28deeb4657889e4b3c784..f742c18fd3b33ba1f07265d6fa71fe54e09ba558 100644 (file)
@@ -3,8 +3,6 @@
 ; PR1109
 
 target datalayout = "e-p:32:32"
-target endian = little
-target pointersize = 32
 target triple = "i686-apple-darwin8"
        %struct.CONSTRAINT = type { i32, i32, i32, i32 }
        %struct.FILE_POS = type { i8, i8, i16, i32 }
@@ -21,7 +19,7 @@ target triple = "i686-apple-darwin8"
 
 implementation   ; Functions:
 
-define i32 %test(%struct.closure_type* %tmp18169) {
+define i32 @test(%struct.closure_type* %tmp18169) {
        %tmp18174 = getelementptr %struct.closure_type* %tmp18169, i32 0, i32 4, i32 0, i32 0           ; <i32*> [#uses=2]
        %tmp18269 = bitcast i32* %tmp18174  to %struct.STYLE*           ; <%struct.STYLE*> [#uses=1]
        %A = load i32* %tmp18174                ; <i32> [#uses=1]
index 866505d7c70232c5164fe7f6811398fd0072451a..5e8fce72eed0cd3b10bf0a135d2c89a1de99da00 100644 (file)
@@ -14,7 +14,7 @@
 
 implementation   ; Functions:
 
-define void %ov_read() {
+define void @ov_read() {
 entry:
        br i1 false, label %bb, label %return
 
index 347cffd4c8e79fe96df534234222c82a5b57dbea..6905d6dd38efa96999cf378062466505ba86e1b9 100644 (file)
@@ -1,17 +1,18 @@
-; RUN: llvm-as < %s | opt -analyze -scalar-evolution 2>&1 | grep '10000 iterations'
+; RUN: llvm-as < %s | opt -analyze -scalar-evolution 2>&1 | \
+; RUN:   grep '10000 iterations'
 ; PR1101
 
-%A = weak global [1000 x i32] zeroinitializer, align 32         
+@A = weak global [1000 x i32] zeroinitializer, align 32         
 
 implementation   ; Functions:
 
-define void %test(i32 %N) {
+define void @test(i32 %N) {
 entry:
         "alloca point" = bitcast i32 0 to i32           ; <i32> [#uses=0]
         br label %bb3
 
 bb:             ; preds = %bb3
-        %tmp = getelementptr [1000 x i32]* %A, i32 0, i32 %i.0          ; <i32*> [#uses=1]
+        %tmp = getelementptr [1000 x i32]* @A, i32 0, i32 %i.0          ; <i32*> [#uses=1]
         store i32 123, i32* %tmp
         %tmp2 = add i32 %i.0, 1         ; <i32> [#uses=1]
         br label %bb3
index d63784bd68837e3f7dfb9f53486d9cf28198127e..130c02e1c32dd64e3d2fc25ae7061956fde759be 100644 (file)
@@ -5,6 +5,6 @@
 
 %T = type i32 *
 
-define %T %test() {
+define %T @test() {
        ret %T null
 }
index f7fdae8c82389ebee4b43ea3ff65e84b67279cf3..c36964edd5c623ca4fc4478b79711bf372d9834c 100644 (file)
@@ -1,13 +1,13 @@
 ; Make sure we don't get an assertion failure, even though this is a parse 
 ; error
-; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f 2>&1 | grep 'No arguments'
+; RUN: llvm-as 2>&1 < %s -o /dev/null -f | grep 'No arguments'
 
-%ty = type void (int)
+%ty = type void (i32)
 
-declare %ty* %foo()
+declare %ty* @foo()
 
-void %test() {
-        call %ty* %foo( )               ; <%ty*>:0 [#uses=0]
+define void @test() {
+        call %ty* @foo( )               ; <%ty*>:0 [#uses=0]
         ret void
 }
 
index c17a20d7fd8fee92f6db0d7bbae3ebb4db64b832..3d32ac780e2855389783ff8d2fe479665327e0f6 100644 (file)
@@ -1,6 +1,5 @@
 ; RUN: llvm-upgrade < %s 2>/dev/null | llvm-as -o /dev/null -f &&
-; RUN: llvm-upgrade < %s 2>&1 | grep "Cannot disambiguate global value '%X'" &&
-; RUN: llvm-upgrade < %s 2>&1 | grep "Renaming global value '%X' to '%X.un"
+; RUN: llvm-upgrade < %s 2>&1 | grep "Renaming global variable 'X' to"
 
 %X = external global uint *
 %X = external global %T* 
index 33f6448c7e708ca369446c64bc0a1dcc313b3314..2d881c3ecd71ec907936f48813ede6033337f957 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as 2>&1 >/dev/null | grep Expected
+; RUN: llvm-as 2>&1 < %s >/dev/null | grep "Expected type 'i32' for element #0"
 ; Test the case of a misformed constant initializer
 ; This should cause an assembler error, not an assertion failure!
-%X = constant {int} { float 1.0 }
+constant { i32 } { float 1.0 }
index 24f4c98cc18680c194695a13a0caebb6accf6a73..d1618dae9695e5bbdd8d968f8f1516d3cc4b023a 100644 (file)
@@ -1,4 +1,4 @@
 ; Found by inspection of the code
-; RUN: llvm-upgrade < %s | llvm-as 2>&1 > /dev/null | grep "Shift constant expression"
+; RUN: llvm-as 2>&1 < %s > /dev/null | grep "Shift constant expression"
 
-global int shr (float 1.0, ubyte 2)
+global i32 ashr (float 1.0, i8 2)
index 98c84282dc721c3c82b1752c026fc6a2f7bdbf76..89c89bc59f490f2636a60290c05d4f5d0e302b92 100644 (file)
@@ -1,4 +1,4 @@
 ; Found by inspection of the code
-; RUN: llvm-upgrade < %s | llvm-as 2>&1 > /dev/null | grep "Illegal"
+; RUN: llvm-as 2>&1 < %s  > /dev/null | grep "Illegal number of init"
 
-global {} { int 7, float 1.0, int 7, int 8 }
+global {} { i32 7, float 1.0, i32 7, i32 8 }
index 5438825a711efee8ec8767da5b9dafde573ffe22..079ef6e6c3c9ec74707b96549568a6eb976101c5 100644 (file)
@@ -1,7 +1,6 @@
-; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f 2>&1 | \
-; RUN:   grep 'Reference to an undefined type'
+; RUN: llvm-as      2>&1 < %s -o /dev/null -f | grep 'Reference to an undef'
 
 
-%d_reduction_0_dparser_gram = global { int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)*, int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)** } { int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)* null, int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)** null }
+@d_reduction_0_dparser_gram = global { i32 (i8*, i8**, i32, i32, { %struct.Grammar*, void (\4, %struct.d_loc_t*, i8**)*, %struct.D_Scope*, void (\4)*, { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, i32, { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }*)*, i32 (i8*, i8**, i32, i32, { %struct.Grammar*, void (\4, %struct.d_loc_t*, i8**)*, %struct.D_Scope*, void (\4)*, { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, i32, { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }*)** } { i32 (i8*, i8**, i32, i32, { %struct.Grammar*, void (\4, %struct.d_loc_t*, i8**)*, %struct.D_Scope*, void (\4)*, { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, i32, { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }*)* null, i32 (i8*, i8**, i32, i32, { %struct.Grammar*, void (\4, %struct.d_loc_t*, i8**)*, %struct.D_Scope*, void (\4)*, { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, i32, { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, i8**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }*)** null }
 
 implementation
index d0ecd9102ad6bf436089cdcc1ea2b5fd4bf6db89..ce3f0610905b43ee07416d33b23aa8d23b187e6b 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: (llvm-upgrade < %s | llvm-as -o /dev/null -f) 2>&1 | \
+; RUN: llvm-as 2>&1 < %s -o /dev/null -f | \
 ; RUN:   grep 'Cannot create a null initialized value of this type!'
 ; Test for PR463.  This program is erroneous, but should not crash llvm-as.
-%.FOO  = internal global %struct.none zeroinitializer
+@.FOO  = internal global %struct.none zeroinitializer
index a5de2bace9646aa24fb8805fdf7fdb3a0621c80e..7eff6343f28f1ef6758257a1efbc022b8fa6ffaa 100644 (file)
@@ -1,8 +1,9 @@
-; RUN: llvm-upgrade %s | llvm-as -o /dev/null -f 2>&1 | grep "LLVM functions cannot return aggregate types"
+; RUN: llvm-as 2>&1 < %s -o /dev/null -f | \
+; RUN:    grep "LLVM functions cannot return aggregate types"
 
-void %test() {
-       call {} %foo()
+define void @test() {
+       call {} @foo()
        ret void
 }
 
-declare {} %foo()
+declare {} @foo()
index 1f67c9cd65045feb2418a947c222ccde64fe9072..1691b3c4c505c99ce7f472aad7e52ee4595f665f 100644 (file)
@@ -1,7 +1,8 @@
 ; Test for PR902.  This program is erroneous, but should not crash llvm-as.
 ; This tests that a simple error is caught and processed correctly.
-; RUN: llvm-upgrade < %s | llvm-as 2>&1 | grep 'FP constant invalid for type'
-void %test() {
-  add int 1, 2.0
+; RUN: llvm-as < %s 2>&1 >/dev/null | grep 'FP constant invalid for type'
+
+define void @test() {
+  add i32 1, 2.0
   ret void
 }
index 3fc4d23070c5668939aad727611a4810faece4e6..a70262c802c1689a432a387d5a19b1e9069b46bb 100644 (file)
@@ -1,5 +1,6 @@
 ; RUN: llvm-as < %s | llvm-dis | grep bitcast
-define i1 %main(i32 %X) {
+
+define i1 @main(i32 %X) {
   %res = bitcast i1 true to i1
   ret i1 %res
 }
index 96e6d6c4e981dd6b1484634b29fff5d8b40493ca..10eb96443ca4bcb805c09f285f73dc6672c487d0 100644 (file)
@@ -5,6 +5,6 @@
 
 implementation   ; Functions:
 
-define i1 %someFunc(i32* %tmp.71.reload, %typedef.bc_struct* %n1) {
+define i1 @someFunc(i32* %tmp.71.reload, %typedef.bc_struct* %n1) {
        ret i1 true
 }
index cb3a484089a7c1cea98d2dda7df66a6eecb74bff..b35aed52a8f43a0254ce753b5846cea626bf9398 100644 (file)
@@ -1,5 +1,4 @@
 ; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f
-; XFAIL: *
 
 implementation   ; Functions:
 
index 3de12a3b0474c908ea6716c3cf35f22871e48ca3..3c1f5bbe277eccdfb58765330bbb4b9166edd260 100644 (file)
@@ -1,45 +1,18 @@
 ; For PR1093: This test checks that llvm-upgrade correctly translates
 ; the llvm.va_* intrinsics to their cannonical argument form (i8*).
 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \
-; RUN:   grep 'va_upgrade[0-9] = bitcast' | wc -l | grep 5
+; RUN:   grep ' bitcast' | wc -l | grep 5
 %str = internal constant [7 x ubyte] c"%d %d\0A\00"            ; <[7 x ubyte]*> [#uses=1]
 
 implementation   ; Functions:
 
 void %f(int %a_arg, ...) {
 entry:
-       %a = cast int %a_arg to uint            ; <uint> [#uses=1]
        %l1 = alloca sbyte*, align 4            ; <sbyte**> [#uses=5]
        %l2 = alloca sbyte*, align 4            ; <sbyte**> [#uses=4]
-       %memtmp = alloca sbyte*         ; <sbyte**> [#uses=2]
+       %l3 = alloca sbyte*             ; <sbyte**> [#uses=2]
        call void %llvm.va_start( sbyte** %l1 )
-       %tmp22 = seteq int %a_arg, 0            ; <bool> [#uses=1]
-       %tmp23 = volatile load sbyte** %l1              ; <sbyte*> [#uses=2]
-       br bool %tmp22, label %bb8, label %bb
-
-bb:            ; preds = %bb, %entry
-       %indvar = phi uint [ 0, %entry ], [ %indvar.next, %bb ]         ; <uint> [#uses=1]
-       %tmp.0 = phi sbyte* [ %tmp23, %entry ], [ %tmp, %bb ]           ; <sbyte*> [#uses=2]
-       %tmp2 = getelementptr sbyte* %tmp.0, int 4              ; <sbyte*> [#uses=1]
-       volatile store sbyte* %tmp2, sbyte** %l1
-       %tmp3 = cast sbyte* %tmp.0 to int*              ; <int*> [#uses=1]
-       %tmp = load int* %tmp3          ; <int> [#uses=1]
-       %tmp = volatile load sbyte** %l1                ; <sbyte*> [#uses=2]
-       %indvar.next = add uint %indvar, 1              ; <uint> [#uses=2]
-       %exitcond = seteq uint %indvar.next, %a         ; <bool> [#uses=1]
-       br bool %exitcond, label %bb8, label %bb
-
-bb8:           ; preds = %bb, %entry
-       %p1.0.1 = phi int [ undef, %entry ], [ %tmp, %bb ]              ; <int> [#uses=1]
-       %tmp.1 = phi sbyte* [ %tmp23, %entry ], [ %tmp, %bb ]           ; <sbyte*> [#uses=1]
-       store sbyte* %tmp.1, sbyte** %memtmp
-       call void %llvm.va_copy( sbyte** %l2, sbyte** %memtmp )
-       %tmp10 = volatile load sbyte** %l2              ; <sbyte*> [#uses=2]
-       %tmp12 = getelementptr sbyte* %tmp10, int 4             ; <sbyte*> [#uses=1]
-       volatile store sbyte* %tmp12, sbyte** %l2
-       %tmp13 = cast sbyte* %tmp10 to int*             ; <int*> [#uses=1]
-       %tmp14 = load int* %tmp13               ; <int> [#uses=1]
-       %tmp17 = call int (ubyte*, ...)* %printf( ubyte* getelementptr ([7 x ubyte]* %str, int 0, uint 0), int %p1.0.1, int %tmp14 )            ; <int> [#uses=0]
+       call void %llvm.va_copy( sbyte** %l2, sbyte** %l3 )
        call void %llvm.va_end( sbyte** %l1 )
        call void %llvm.va_end( sbyte** %l2 )
        ret void
index 5e113001642fd1354d7ff446ea9286a8e54531bf..859e83721aa3565c5e443fa69c0722d3db8fe262 100644 (file)
@@ -2,7 +2,7 @@
 ; RUN: llvm-as < %s 2>&1 > /dev/null | \
 ; RUN:  grep "invalid cast opcode for cast from"
 
-define i8* %nada(i64 %X) {
+define i8* @nada(i64 %X) {
     %result = trunc i64 %X to i8*
     ret i8* %result
 }
index 80cbeaccb75c9e33a8cc8922c90d66a794563843..bcc6f0e120083c72b2c296ee0509885b2ff8e971 100644 (file)
@@ -2,4 +2,4 @@
 ; RUN: llvm-as < %s 2>&1 > /dev/null | \
 ; RUN:  grep "invalid cast opcode for cast from"
 
-%X = constant i8* trunc (i64 0 to i8*)
+@X = constant i8* trunc (i64 0 to i8*)
diff --git a/test/Assembler/2007-01-21-UpgradeNoArgs.ll b/test/Assembler/2007-01-21-UpgradeNoArgs.ll
new file mode 100644 (file)
index 0000000..e36704c
--- /dev/null
@@ -0,0 +1,13 @@
+; Make sure we don't get an assertion failure, even though this is a parse 
+; error
+; RUN: llvm-upgrade 2>&1 < %s > /dev/null | grep 'No arguments passed to a '
+
+%ty = type void (int)
+
+declare %ty* %foo()
+
+void %test() {
+        call %ty* %foo( )               ; <%ty*>:0 [#uses=0]
+        ret void
+}
+
diff --git a/test/Assembler/2007-01-22-UpgradeMalformedShift.ll b/test/Assembler/2007-01-22-UpgradeMalformedShift.ll
new file mode 100644 (file)
index 0000000..5ebd86c
--- /dev/null
@@ -0,0 +1,4 @@
+; Found by inspection of the code
+; RUN: llvm-upgrade 2>&1 < %s > /dev/null | grep "Shift constant expression"
+
+global int shr (float 1.0, ubyte 2)
diff --git a/test/Assembler/2007-01-22-UpgradeMalformedStruct.ll b/test/Assembler/2007-01-22-UpgradeMalformedStruct.ll
new file mode 100644 (file)
index 0000000..28c840c
--- /dev/null
@@ -0,0 +1,4 @@
+; Found by inspection of the code
+; RUN: llvm-upgrade 2>&1 < %s  > /dev/null | grep "Illegal number of init"
+
+global {} { int 7, float 1.0, int 7, int 8 }
diff --git a/test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll b/test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll
new file mode 100644 (file)
index 0000000..0c3c4be
--- /dev/null
@@ -0,0 +1,5 @@
+; RUN: llvm-upgrade 2>&1 < %s -o /dev/null -f | grep 'Reference to an undef'
+
+%d_reduction_0_dparser_gram = global { int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)*, int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)** } { int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)* null, int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)** null }
+
+implementation
index c88a8673cf9a898d0215e621a059584ed22e95e0..0dbf79562d965c541313d8165ffe3cc81cddef25 100644 (file)
@@ -1,10 +1,10 @@
 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2
 
-%quant_coef = external global [6 x [4 x [4 x i32]]]            ; <[6 x [4 x [4 x i32]]]*> [#uses=1]
-%dequant_coef = external global [6 x [4 x [4 x i32]]]          ; <[6 x [4 x [4 x i32]]]*> [#uses=1]
-%A = external global [4 x [4 x i32]]           ; <[4 x [4 x i32]]*> [#uses=1]
+@quant_coef = external global [6 x [4 x [4 x i32]]]            ; <[6 x [4 x [4 x i32]]]*> [#uses=1]
+@dequant_coef = external global [6 x [4 x [4 x i32]]]          ; <[6 x [4 x [4 x i32]]]*> [#uses=1]
+@A = external global [4 x [4 x i32]]           ; <[4 x [4 x i32]]*> [#uses=1]
 
-define fastcc i32 %dct_luma_sp(i32 %block_x, i32 %block_y, i32* %coeff_cost) {
+define fastcc i32 @dct_luma_sp(i32 %block_x, i32 %block_y, i32* %coeff_cost) {
 entry:
        %predicted_block = alloca [4 x [4 x i32]], align 4              ; <[4 x [4 x i32]]*> [#uses=1]
        br label %cond_next489
@@ -17,7 +17,7 @@ cond_next489:         ; preds = %cond_false, %bb471
        %tmp495 = getelementptr [4 x [4 x i32]]* %predicted_block, i32 0, i32 %i.8, i32 %j.7            ; <i32*> [#uses=2]
        %tmp496 = load i32* %tmp495             ; <i32> [#uses=2]
        %tmp502 = load i32* null                ; <i32> [#uses=1]
-       %tmp542 = getelementptr [6 x [4 x [4 x i32]]]* %quant_coef, i32 0, i32 0, i32 %i.8, i32 %j.7            ; <i32*> [#uses=1]
+       %tmp542 = getelementptr [6 x [4 x [4 x i32]]]* @quant_coef, i32 0, i32 0, i32 %i.8, i32 %j.7            ; <i32*> [#uses=1]
        %tmp543 = load i32* %tmp542             ; <i32> [#uses=1]
        %tmp548 = ashr i32 0, i8 0              ; <i32> [#uses=3]
        %tmp561 = sub i32 0, %tmp496            ; <i32> [#uses=3]
@@ -30,14 +30,14 @@ cond_next489:               ; preds = %cond_false, %bb471
        br i1 %tmp579, label %bb712, label %cond_next589
 
 cond_next589:          ; preds = %cond_next489
-       %tmp605 = getelementptr [6 x [4 x [4 x i32]]]* %dequant_coef, i32 0, i32 0, i32 %i.8, i32 %j.7          ; <i32*> [#uses=1]
+       %tmp605 = getelementptr [6 x [4 x [4 x i32]]]* @dequant_coef, i32 0, i32 0, i32 %i.8, i32 %j.7          ; <i32*> [#uses=1]
        %tmp606 = load i32* %tmp605             ; <i32> [#uses=1]
        %tmp612 = load i32* null                ; <i32> [#uses=1]
        %tmp629 = load i32* null                ; <i32> [#uses=1]
        %tmp629 = sitofp i32 %tmp629 to double          ; <double> [#uses=1]
        %tmp631 = mul double %tmp629, 0.000000e+00              ; <double> [#uses=1]
        %tmp632 = add double 0.000000e+00, %tmp631              ; <double> [#uses=1]
-       %tmp642 = call fastcc i32 %sign( i32 %tmp576, i32 %tmp561 )             ; <i32> [#uses=1]
+       %tmp642 = call fastcc i32 @sign( i32 %tmp576, i32 %tmp561 )             ; <i32> [#uses=1]
        %tmp650 = mul i32 %tmp606, %tmp642              ; <i32> [#uses=1]
        %tmp656 = mul i32 %tmp650, %tmp612              ; <i32> [#uses=1]
        %tmp658 = shl i32 %tmp656, i8 0         ; <i32> [#uses=1]
@@ -45,7 +45,7 @@ cond_next589:         ; preds = %cond_next489
        %tmp660 = sub i32 0, %tmp659            ; <i32> [#uses=1]
        %tmp666 = sub i32 %tmp660, %tmp496              ; <i32> [#uses=1]
        %tmp666 = sitofp i32 %tmp666 to double          ; <double> [#uses=2]
-       call void %levrun_linfo_inter( i32 %tmp576, i32 0, i32* null, i32* null )
+       call void @levrun_linfo_inter( i32 %tmp576, i32 0, i32* null, i32* null )
        %tmp671 = mul double %tmp666, %tmp666           ; <double> [#uses=1]
        %tmp675 = add double %tmp671, 0.000000e+00              ; <double> [#uses=1]
        %tmp678 = fcmp oeq double %tmp632, %tmp675              ; <i1> [#uses=1]
@@ -79,9 +79,9 @@ bb737:                ; preds = %cond_false689
        br i1 %tmp739, label %cond_next791, label %cond_true740
 
 cond_true740:          ; preds = %bb737
-       %tmp761 = call fastcc i32 %sign( i32 %tmp576, i32 0 )           ; <i32> [#uses=1]
+       %tmp761 = call fastcc i32 @sign( i32 %tmp576, i32 0 )           ; <i32> [#uses=1]
        %tmp780 = load i32* null                ; <i32> [#uses=1]
-       %tmp785 = getelementptr [4 x [4 x i32]]* %A, i32 0, i32 %i.8, i32 %j.7          ; <i32*> [#uses=1]
+       %tmp785 = getelementptr [4 x [4 x i32]]* @A, i32 0, i32 %i.8, i32 %j.7          ; <i32*> [#uses=1]
        %tmp786 = load i32* %tmp785             ; <i32> [#uses=1]
        %tmp781 = mul i32 %tmp780, %tmp761              ; <i32> [#uses=1]
        %tmp787 = mul i32 %tmp781, %tmp786              ; <i32> [#uses=1]
@@ -94,10 +94,10 @@ cond_next791:               ; preds = %cond_true740, %bb737
        %tmp796 = load i32* %tmp495             ; <i32> [#uses=1]
        %tmp798 = add i32 %tmp796, %ilev.1              ; <i32> [#uses=1]
        %tmp812 = mul i32 0, %tmp502            ; <i32> [#uses=0]
-       %tmp818 = call fastcc i32 %sign( i32 0, i32 %tmp798 )           ; <i32> [#uses=0]
+       %tmp818 = call fastcc i32 @sign( i32 0, i32 %tmp798 )           ; <i32> [#uses=0]
        unreachable
 }
 
-declare i32 %sign(i32, i32)
+declare i32 @sign(i32, i32)
 
-declare void %levrun_linfo_inter(i32, i32, i32*, i32*)
+declare void @levrun_linfo_inter(i32, i32, i32*, i32*)
index ddc0faeea60083109066d369b1cec3f6d3b36524..73c6670bfc491df96eea088a47426cb5bcc3c254 100644 (file)
@@ -3,17 +3,17 @@
 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 &&
 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | grep fneg | wc -l | grep 2
 
-define float %test1(float %x, double %y) {
+define float @test1(float %x, double %y) {
        %tmp = fpext float %x to double
-       %tmp2 = tail call double %copysign( double %tmp, double %y )
+       %tmp2 = tail call double @copysign( double %tmp, double %y )
        %tmp2 = fptrunc double %tmp2 to float
        ret float %tmp2
 }
 
-define double %test2(double %x, float %y) {
+define double @test2(double %x, float %y) {
        %tmp = fpext float %y to double
-       %tmp2 = tail call double %copysign( double %x, double %tmp )
+       %tmp2 = tail call double @copysign( double %x, double %tmp )
        ret double %tmp2
 }
 
-declare double %copysign(double, double)
+declare double @copysign(double, double)
index 186c9f31fbf941b3b461f1ce3588ae5de1e36844..3ff824a097d2a608359fd3064a409fe95ea2df1b 100644 (file)
@@ -2,7 +2,7 @@
 ; RUN: llvm-as < %s | llc -march=arm | grep moveq &&
 ; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 | grep movvs
 
-define i32 %f7(float %a, float %b) {
+define i32 @f7(float %a, float %b) {
 entry:
     %tmp = fcmp ueq float %a,%b
     %retval = select i1 %tmp, i32 666, i32 42
index 2516522d042a12233d6506bc9b87faee5d136d70..4402659e13bab96da90694d049bcfcb6c31ac144 100644 (file)
@@ -1,12 +1,12 @@
 ; RUN: llvm-as < %s | llc -march=arm &&
 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb
 
-define void %test1() {
+define void @test1() {
     %tmp = alloca [ 64 x i32 ] , align 4
     ret void
 }
 
-define void %test2() {
+define void @test2() {
     %tmp = alloca [ 4168 x i8 ] , align 4
     ret void
 }
index 739447c570591fd001a6487f7b43583f5d89db36..3eabda312e24f2f0a1deb72cb5c42e534fb42390 100644 (file)
@@ -8,25 +8,25 @@
 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep "ldrsb" | wc -l | grep 1 &&
 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep "ldrsh" | wc -l | grep 1
 
-define i32 %test1(i8* %v.pntr.s0.u1) {
+define i32 @test1(i8* %v.pntr.s0.u1) {
     %tmp.u = load i8* %v.pntr.s0.u1
     %tmp1.s = zext i8 %tmp.u to i32
     ret i32 %tmp1.s
 }
 
-define i32 %test2(i16* %v.pntr.s0.u1) {
+define i32 @test2(i16* %v.pntr.s0.u1) {
     %tmp.u = load i16* %v.pntr.s0.u1
     %tmp1.s = zext i16 %tmp.u to i32
     ret i32 %tmp1.s
 }
 
-define i32 %test3(i8* %v.pntr.s1.u0) {
+define i32 @test3(i8* %v.pntr.s1.u0) {
     %tmp.s = load i8* %v.pntr.s1.u0
     %tmp1.s = sext i8 %tmp.s to i32
     ret i32 %tmp1.s
 }
 
-define i32 %test4() {
+define i32 @test4() {
     %tmp.s = load i16* null
     %tmp1.s = sext i16 %tmp.s to i32
     ret i32 %tmp1.s
index 23407c0746658d8df3acc9e7378ce7b98ae29595..3db9d791f1894c477bc303f9ee24aeeab15b77f5 100644 (file)
@@ -3,14 +3,14 @@
 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb &&
 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep cpy | wc -l | grep 2
 
-define i32 %f1() {
+define i32 @f1() {
        %buf = alloca [32 x i32], align 4
        %tmp = getelementptr [32 x i32]* %buf, i32 0, i32 0
        %tmp1 = load i32* %tmp
        ret i32 %tmp1
 }
 
-define i32 %f2() {
+define i32 @f2() {
        %buf = alloca [32 x i8], align 4
        %tmp = getelementptr [32 x i8]* %buf, i32 0, i32 0
        %tmp1 = load i8* %tmp
@@ -18,14 +18,14 @@ define i32 %f2() {
        ret i32 %tmp2
 }
 
-define i32 %f3() {
+define i32 @f3() {
        %buf = alloca [32 x i32], align 4
        %tmp = getelementptr [32 x i32]* %buf, i32 0, i32 32
        %tmp1 = load i32* %tmp
        ret i32 %tmp1
 }
 
-define i32 %f4() {
+define i32 @f4() {
        %buf = alloca [32 x i8], align 4
        %tmp = getelementptr [32 x i8]* %buf, i32 0, i32 2
        %tmp1 = load i8* %tmp
index 435e59f6c4b3a04c31d1e226d9c8e06833a58159..f1a0a5a5c27d592b322e7e7dd025b3870b73d795 100644 (file)
@@ -4,22 +4,22 @@
 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep mul | wc -l | grep 3 &&
 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep lsl | wc -l | grep 1
 
-define i32 %f1(i32 %u) {
+define i32 @f1(i32 %u) {
     %tmp = mul i32 %u, %u
     ret i32 %tmp
 }
 
-define i32 %f2(i32 %u, i32 %v) {
+define i32 @f2(i32 %u, i32 %v) {
     %tmp = mul i32 %u, %v
     ret i32 %tmp
 }
 
-define i32 %f3(i32 %u) {
+define i32 @f3(i32 %u) {
        %tmp = mul i32 %u, 5
         ret i32 %tmp
 }
 
-define i32 %f4(i32 %u) {
+define i32 @f4(i32 %u) {
        %tmp = mul i32 %u, 4
         ret i32 %tmp
 }
index aca7b7d24c18b7435f9fd200eb005566fb07e1c5..82f1ac8afa9c8ad9bf13a107ed3452b92149cee4 100644 (file)
 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep bhi | wc -l | grep 1 &&
 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep __ltdf2
 
-define i32 %f1(i32 %a.s) {
+define i32 @f1(i32 %a.s) {
 entry:
     %tmp = icmp eq i32 %a.s, 4
     %tmp1.s = select i1 %tmp, i32 2, i32 3
     ret i32 %tmp1.s
 }
 
-define i32 %f2(i32 %a.s) {
+define i32 @f2(i32 %a.s) {
 entry:
     %tmp = icmp sgt i32 %a.s, 4
     %tmp1.s = select i1 %tmp, i32 2, i32 3
     ret i32 %tmp1.s
 }
 
-define i32 %f3(i32 %a.s, i32 %b.s) {
+define i32 @f3(i32 %a.s, i32 %b.s) {
 entry:
     %tmp = icmp slt i32 %a.s, %b.s
     %tmp1.s = select i1 %tmp, i32 2, i32 3
     ret i32 %tmp1.s
 }
 
-define i32 %f4(i32 %a.s, i32 %b.s) {
+define i32 @f4(i32 %a.s, i32 %b.s) {
 entry:
     %tmp = icmp sle i32 %a.s, %b.s
     %tmp1.s = select i1 %tmp, i32 2, i32 3
     ret i32 %tmp1.s
 }
 
-define i32 %f5(i32 %a.u, i32 %b.u) {
+define i32 @f5(i32 %a.u, i32 %b.u) {
 entry:
     %tmp = icmp ule i32 %a.u, %b.u
     %tmp1.s = select i1 %tmp, i32 2, i32 3
     ret i32 %tmp1.s
 }
 
-define i32 %f6(i32 %a.u, i32 %b.u) {
+define i32 @f6(i32 %a.u, i32 %b.u) {
 entry:
     %tmp = icmp ugt i32 %a.u, %b.u
     %tmp1.s = select i1 %tmp, i32 2, i32 3
     ret i32 %tmp1.s
 }
 
-define double %f7(double %a, double %b) {
+define double @f7(double %a, double %b) {
     %tmp = fcmp olt double %a, 1.234e+00
     %tmp1 = select i1 %tmp, double -1.000e+00, double %b
     ret double %tmp1
index 1019b94369f4d177e76cb1c852d2d6669eb4a7dc..3f1483b433a21ea6a34e2e90c5062f18f5fa2828 100644 (file)
@@ -3,7 +3,7 @@
 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep "sxtb"  | wc -l | grep 1 &&
 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep "sxtab" | wc -l | grep 1
 
-define i8 %test1(i32 %A) sext {
+define i8 @test1(i32 %A) sext {
        %B = lshr i32 %A, i8 8
        %C = shl i32 %A, i8 24
        %D = or i32 %B, %C
@@ -11,7 +11,7 @@ define i8 %test1(i32 %A) sext {
        ret i8 %E
 }
 
-define i32 %test2(i32 %A, i32 %X) sext {
+define i32 @test2(i32 %A, i32 %X) sext {
        %B = lshr i32 %A, i8 8
        %C = shl i32 %A, i8 24
        %D = or i32 %B, %C
index 1e50a896ff21d04e11bf0b016f051dfcc6fb92fa..4bd0b167a0e4e519dc73cdfb646276e52ebb266a 100644 (file)
@@ -2,10 +2,10 @@
 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | not grep CPI
 
 
-define i32 %test1() {
+define i32 @test1() {
   ret i32 1000
 }
 
-define i32 %test2() {
+define i32 @test2() {
   ret i32 -256
 }
index 47f907e4fb44830256ebfe9355ce586a9c4136bd..0c7516ff716111dbfaf9ad22b62f048f2daceff9 100644 (file)
@@ -4,19 +4,19 @@
 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep "uxtab" | wc -l | grep 1 &&
 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep "uxth"  | wc -l | grep 1
 
-define i8 %test1(i32 %A.u) zext {
+define i8 @test1(i32 %A.u) zext {
     %B.u = trunc i32 %A.u to i8
     ret i8 %B.u
 }
 
-define i32 %test2(i32 %A.u, i32 %B.u) zext {
+define i32 @test2(i32 %A.u, i32 %B.u) zext {
     %C.u = trunc i32 %B.u to i8
     %D.u = zext i8 %C.u to i32
     %E.u = add i32 %A.u, %D.u
     ret i32 %E.u
 }
 
-define i32 %test3(i32 %A.u) zext {
+define i32 @test3(i32 %A.u) zext {
     %B.u = lshr i32 %A.u, i8 8
     %C.u = shl i32 %A.u, i8 24
     %D.u = or i32 %B.u, %C.u
index e385dee21969a353df669892204d8c83cb9092ec..7d1bd0c3a4824148ab07fe3dc98624eabbd94853 100644 (file)
 
 implementation   ; Functions:
 
-define i32 %al(i32 sext %x.s, i32 sext %y.s) sext {
+define i32 @al(i32 sext %x.s, i32 sext %y.s) sext {
 entry:
        %tmp.3.s = add i32 %y.s, %x.s           ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i32 %ali(i32 sext %x.s) sext {
+define i32 @ali(i32 sext %x.s) sext {
 entry:
        %tmp.3.s = add i32 100, %x.s            ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i64 %aq(i64 sext %x.s, i64 sext %y.s) sext {
+define i64 @aq(i64 sext %x.s, i64 sext %y.s) sext {
 entry:
        %tmp.3.s = add i64 %y.s, %x.s           ; <i64> [#uses=1]
        ret i64 %tmp.3.s
 }
 
-define i64 %aqi(i64 %x.s) {
+define i64 @aqi(i64 %x.s) {
 entry:
        %tmp.3.s = add i64 100, %x.s            ; <i64> [#uses=1]
        ret i64 %tmp.3.s
 }
 
-define i32 %sl(i32 sext %x.s, i32 sext %y.s) sext {
+define i32 @sl(i32 sext %x.s, i32 sext %y.s) sext {
 entry:
        %tmp.3.s = sub i32 %y.s, %x.s           ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i32 %sli(i32 sext %x.s) sext {
+define i32 @sli(i32 sext %x.s) sext {
 entry:
        %tmp.3.s = sub i32 %x.s, 100            ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i64 %sq(i64 %x.s, i64 %y.s) {
+define i64 @sq(i64 %x.s, i64 %y.s) {
 entry:
        %tmp.3.s = sub i64 %y.s, %x.s           ; <i64> [#uses=1]
        ret i64 %tmp.3.s
 }
 
-define i64 %sqi(i64 %x.s) {
+define i64 @sqi(i64 %x.s) {
 entry:
        %tmp.3.s = sub i64 %x.s, 100            ; <i64> [#uses=1]
        ret i64 %tmp.3.s
 }
 
-define i32 %a4l(i32 sext %x.s, i32 sext %y.s) sext {
+define i32 @a4l(i32 sext %x.s, i32 sext %y.s) sext {
 entry:
        %tmp.1.s = shl i32 %y.s, i8 2           ; <i32> [#uses=1]
        %tmp.3.s = add i32 %tmp.1.s, %x.s               ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i32 %a8l(i32 sext %x.s, i32 sext %y.s) sext {
+define i32 @a8l(i32 sext %x.s, i32 sext %y.s) sext {
 entry:
        %tmp.1.s = shl i32 %y.s, i8 3           ; <i32> [#uses=1]
        %tmp.3.s = add i32 %tmp.1.s, %x.s               ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i64 %a4q(i64 %x.s, i64 %y.s) {
+define i64 @a4q(i64 %x.s, i64 %y.s) {
 entry:
        %tmp.1.s = shl i64 %y.s, i8 2           ; <i64> [#uses=1]
        %tmp.3.s = add i64 %tmp.1.s, %x.s               ; <i64> [#uses=1]
        ret i64 %tmp.3.s
 }
 
-define i64 %a8q(i64 %x.s, i64 %y.s) {
+define i64 @a8q(i64 %x.s, i64 %y.s) {
 entry:
        %tmp.1.s = shl i64 %y.s, i8 3           ; <i64> [#uses=1]
        %tmp.3.s = add i64 %tmp.1.s, %x.s               ; <i64> [#uses=1]
        ret i64 %tmp.3.s
 }
 
-define i32 %a4li(i32 sext %y.s) sext {
+define i32 @a4li(i32 sext %y.s) sext {
 entry:
        %tmp.1.s = shl i32 %y.s, i8 2           ; <i32> [#uses=1]
        %tmp.3.s = add i32 100, %tmp.1.s                ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i32 %a8li(i32 sext %y.s) sext {
+define i32 @a8li(i32 sext %y.s) sext {
 entry:
        %tmp.1.s = shl i32 %y.s, i8 3           ; <i32> [#uses=1]
        %tmp.3.s = add i32 100, %tmp.1.s                ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i64 %a4qi(i64 %y.s) {
+define i64 @a4qi(i64 %y.s) {
 entry:
        %tmp.1.s = shl i64 %y.s, i8 2           ; <i64> [#uses=1]
        %tmp.3.s = add i64 100, %tmp.1.s                ; <i64> [#uses=1]
        ret i64 %tmp.3.s
 }
 
-define i64 %a8qi(i64 %y.s) {
+define i64 @a8qi(i64 %y.s) {
 entry:
        %tmp.1.s = shl i64 %y.s, i8 3           ; <i64> [#uses=1]
        %tmp.3.s = add i64 100, %tmp.1.s                ; <i64> [#uses=1]
        ret i64 %tmp.3.s
 }
 
-define i32 %s4l(i32 sext %x.s, i32 sext %y.s) sext {
+define i32 @s4l(i32 sext %x.s, i32 sext %y.s) sext {
 entry:
        %tmp.1.s = shl i32 %y.s, i8 2           ; <i32> [#uses=1]
        %tmp.3.s = sub i32 %tmp.1.s, %x.s               ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i32 %s8l(i32 sext %x.s, i32 sext %y.s) sext {
+define i32 @s8l(i32 sext %x.s, i32 sext %y.s) sext {
 entry:
        %tmp.1.s = shl i32 %y.s, i8 3           ; <i32> [#uses=1]
        %tmp.3.s = sub i32 %tmp.1.s, %x.s               ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i64 %s4q(i64 %x.s, i64 %y.s) {
+define i64 @s4q(i64 %x.s, i64 %y.s) {
 entry:
        %tmp.1.s = shl i64 %y.s, i8 2           ; <i64> [#uses=1]
        %tmp.3.s = sub i64 %tmp.1.s, %x.s               ; <i64> [#uses=1]
        ret i64 %tmp.3.s
 }
 
-define i64 %s8q(i64 %x.s, i64 %y.s) {
+define i64 @s8q(i64 %x.s, i64 %y.s) {
 entry:
        %tmp.1.s = shl i64 %y.s, i8 3           ; <i64> [#uses=1]
        %tmp.3.s = sub i64 %tmp.1.s, %x.s               ; <i64> [#uses=1]
        ret i64 %tmp.3.s
 }
 
-define i32 %s4li(i32 sext %y.s) sext {
+define i32 @s4li(i32 sext %y.s) sext {
 entry:
        %tmp.1.s = shl i32 %y.s, i8 2           ; <i32> [#uses=1]
        %tmp.3.s = sub i32 %tmp.1.s, 100                ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i32 %s8li(i32 sext %y.s) sext {
+define i32 @s8li(i32 sext %y.s) sext {
 entry:
        %tmp.1.s = shl i32 %y.s, i8 3           ; <i32> [#uses=1]
        %tmp.3.s = sub i32 %tmp.1.s, 100                ; <i32> [#uses=1]
        ret i32 %tmp.3.s
 }
 
-define i64 %s4qi(i64 %y.s) {
+define i64 @s4qi(i64 %y.s) {
 entry:
        %tmp.1.s = shl i64 %y.s, i8 2           ; <i64> [#uses=1]
        %tmp.3.s = sub i64 %tmp.1.s, 100                ; <i64> [#uses=1]
        ret i64 %tmp.3.s
 }
 
-define i64 %s8qi(i64 %y.s) {
+define i64 @s8qi(i64 %y.s) {
 entry:
        %tmp.1.s = shl i64 %y.s, i8 3           ; <i64> [#uses=1]
        %tmp.3.s = sub i64 %tmp.1.s, 100                ; <i64> [#uses=1]
index 9d8cb0973489d8c31dc372f2497db2e3bd67edae..91ce648c2ad3bf2243c03df2d67bb1df0e30a6fb 100644 (file)
@@ -3,7 +3,7 @@
 
 implementation   ; Functions:
 
-define i32 %foo(i32 sext %x) sext {
+define i32 @foo(i32 sext %x) sext {
 entry:
        %tmp.1 = add i32 %x, -1         ; <int> [#uses=1]
        ret i32 %tmp.1
index 8d1fa111be3fe26a272a80a1be7e74178b1346b2..09c31a4c224c0942ffb0a908f113b6b04d0ee716 100644 (file)
@@ -3,7 +3,7 @@
 
 implementation   ; Functions:
 
-define i16 %foo(i64 %y) zext {
+define i16 @foo(i64 %y) zext {
 entry:
         %tmp.1 = trunc i64 %y to i16         ; <ushort> [#uses=1]
         ret i16 %tmp.1
index e6760e30d1f080f2989965de1bb33788d56b176f..ca04f9b8aaaa04fc612f731c85c215a252daf468 100644 (file)
@@ -4,14 +4,12 @@
 ; XFAIL: *
 
 target datalayout = "e-p:32:32"
-target endian = little
-target pointersize = 32
 target triple = "i686-apple-darwin8"
         %struct.Connector = type { i16, i16, i8, i8, %struct.Connector*, i8* }
 
 implementation   ; Functions:
 
-define bool %prune_match_entry_2E_ce(%struct.Connector* %a, i16 %b.0.0.val) {
+define bool @prune_match_entry_2E_ce(%struct.Connector* %a, i16 %b.0.0.val) {
 newFuncRoot:
         br label %entry.ce
 
index 5694d2a7148a4fc0b05b0bf124e6bab9a8de7b3a..8fe06b77d78718b61b1a19dcf8912924449ed9b6 100644 (file)
@@ -2,11 +2,11 @@
 ; RUN: llvm-as < %s | llc -march=c | grep __builtin_stack_restore
 ; PR1028
 
-declare i8* %llvm.stacksave()
-declare void %llvm.stackrestore(i8*)
+declare i8* @llvm.stacksave()
+declare void @llvm.stackrestore(i8*)
 
-define i8* %test() {
-    %s = call i8* %llvm.stacksave()
-    call void %llvm.stackrestore(i8* %s)
+define i8* @test() {
+    %s = call i8* @llvm.stacksave()
+    call void @llvm.stackrestore(i8* %s)
     ret i8* %s
 }
index 6eb22cc9f214142117da117eb9bd70b6b640a1a1..49203d95d4a06e181bec2771ea46ddbe31412314 100644 (file)
@@ -1,12 +1,12 @@
 ; RUN: llvm-as < %s | llc
 ; PR1114
 
-declare i1 %foo()
+declare i1 @foo()
 
-define i32 %test(i32* %A, i32* %B) {
+define i32 @test(i32* %A, i32* %B) {
        %a = load i32* %A
        %b = load i32* %B
-       %cond = call i1 %foo()
+       %cond = call i1 @foo()
        %c = select i1 %cond, i32 %a, i32 %b
        ret i32 %c
 }
index 06875f3ec92c78551d54760e47a7cf4c16c41ada..a1dfc12b53efcfccbf7e982595ff3c969157fe50 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-as < %s | llc -march=ppc32 | grep extsb &&
 ; RUN: llvm-as < %s | llc -march=ppc32 | grep extsh
 
-define i32 %p1(i8 %c, i16 %s) {
+define i32 @p1(i8 %c, i16 %s) {
 entry:
         %tmp = sext i8 %c to i32                ; <i32> [#uses=1]
         %tmp1 = sext i16 %s to i32              ; <i32> [#uses=1]
index eecbb8176c4653ce2440c094ba731243dc9d0d90..cfbac7d3bc51779bf981349e1283756ea6df820f 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llvm-as < %s | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep cntlzw
 
-define i32 %foo() {
+define i32 @foo() {
 entry:
        %retval = alloca i32, align 4           ; <i32*> [#uses=2]
        %tmp = alloca i32, align 4              ; <i32*> [#uses=2]
index 8f423d8be1ea33ffdbe2d6e5352179a91e02cc4e..b7fe9d2fb26910b4411eb7afdb84b205879c1e68 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-as < %s | llc -march=ppc32 &&
 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwin
 
-define void %test(i8* %P) {
+define void @test(i8* %P) {
        %W = load i8* %P
        %X = shl i8 %W, i8 1
        %Y = add i8 %X, 2
@@ -10,7 +10,7 @@ define void %test(i8* %P) {
        ret void
 }
 
-define i16 %test2(i16 zext %crc) zext { 
+define i16 @test2(i16 zext %crc) zext { 
         ; No and's should be needed for the i16s here.
         %tmp.1 = lshr i16 %crc, i8 1
         %tmp.7 = xor i16 %tmp.1, 40961
index f025e21e5d71fa86b1f0fa97c068f78f5a4d20ee..7f4c5f0c066f5b88bf7cbb3e8cc8927c8d4c6aa1 100644 (file)
@@ -3,14 +3,14 @@
 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsh  &&
 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsb
 
-define i32 %test1(i32 %mode.0.i.0) {
+define i32 @test1(i32 %mode.0.i.0) {
         %tmp.79 = trunc i32 %mode.0.i.0 to i16
         %tmp.80 = sext i16 %tmp.79 to i32
         %tmp.81 = and i32 %tmp.80, 24
         ret i32 %tmp.81
 }
 
-define i16 %test2(i16 sext %X, i16 sext %x) sext {
+define i16 @test2(i16 sext %X, i16 sext %x) sext {
         %tmp = sext i16 %X to i32
         %tmp1 = sext i16 %x to i32
         %tmp2 = add i32 %tmp, %tmp1
@@ -21,7 +21,7 @@ define i16 %test2(i16 sext %X, i16 sext %x) sext {
         ret i16 %retval
 }
 
-define i16 %test3(i32 zext %X) sext {
+define i16 @test3(i32 zext %X) sext {
         %tmp1 = lshr i32 %X, i8 16
         %tmp1 = trunc i32 %tmp1 to i16
         ret i16 %tmp1
index 0068427772b6e545e7d880fab9f6062f1bbbc70f..3ab92d1187b1751408df26375a6673d8ce256b96 100644 (file)
@@ -1,39 +1,39 @@
 ; RUN: llvm-as < %s | llc -march=ppc32 &&
 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'extsh\|rlwinm'
 
-declare i16 %foo() sext 
+declare i16 @foo() sext 
 
-define i32 %test1(i16 sext %X) {
+define i32 @test1(i16 sext %X) {
        %Y = sext i16 %X to i32  ;; dead
        ret i32 %Y
 }
 
-define i32 %test2(i16 zext %X) {
+define i32 @test2(i16 zext %X) {
        %Y = sext i16 %X to i32
        %Z = and i32 %Y, 65535      ;; dead
        ret i32 %Z
 }
 
-define void %test3() {
-       %tmp.0 = call i16 %foo() sext            ;; no extsh!
+define void @test3() {
+       %tmp.0 = call i16 @foo() sext            ;; no extsh!
        %tmp.1 = icmp slt i16 %tmp.0, 1234
        br i1 %tmp.1, label %then, label %UnifiedReturnBlock
 
 then:  
-       call i32 %test1(i16 0 sext)
+       call i32 @test1(i16 0 sext)
        ret void
 UnifiedReturnBlock:
        ret void
 }
 
-define i32 %test4(i16* %P) {
+define i32 @test4(i16* %P) {
         %tmp.1 = load i16* %P
         %tmp.2 = zext i16 %tmp.1 to i32
         %tmp.3 = and i32 %tmp.2, 255
         ret i32 %tmp.3
 }
 
-define i32 %test5(i16* %P) {
+define i32 @test5(i16* %P) {
         %tmp.1 = load i16* %P
         %tmp.2 = bitcast i16 %tmp.1 to i16
         %tmp.3 = zext i16 %tmp.2 to i32
@@ -41,13 +41,13 @@ define i32 %test5(i16* %P) {
         ret i32 %tmp.4
 }
 
-define i32 %test6(i32* %P) {
+define i32 @test6(i32* %P) {
         %tmp.1 = load i32* %P
         %tmp.2 = and i32 %tmp.1, 255
         ret i32 %tmp.2
 }
 
-define i16 %test7(float %a) zext {
+define i16 @test7(float %a) zext {
         %tmp.1 = fptoui float %a to i16
         ret i16 %tmp.1
 }
index 29a45985bb0a72ce66d0040d81ca35f833720065..583c54219286a6335da4b99b86eaa31d277d68c2 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-as < %s | llc -march=ppc32 | grep fmul | wc -l | grep 2 &&
 ; RUN: llvm-as < %s | llc -march=ppc32 -enable-unsafe-fp-math | grep fmul | wc -l | grep 1
 
-define double %foo(double %X) {
+define double @foo(double %X) {
         %tmp1 = mul double %X, 1.23
         %tmp2 = mul double %tmp1, 4.124
         ret double %tmp2
index 40dd61a2d12149adc108057b80db69d6358621e9..e924142004766027cf7b37033e7101515acb994e 100644 (file)
@@ -1,5 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -stats 2>&1 | grep 'asm-printer' | grep 39
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -stats 2>&1 |\
+; RUN:     grep 'asm-printer' | grep 39
 
+target datalayout = "e-p:32:32"
 void %foo(int* %mc, int* %bp, int* %ms, int* %xmb, int* %mpp, int* %tpmm, int* %ip, int* %tpim, int* %dpp, int* %tpdm, int* %bpi, int %M) {
 entry:
        %tmp9 = setlt int %M, 5         ; <bool> [#uses=1]
index 800eec2a431a8c958d53135b0c43984906b3fa1c..daf283e61d4e9b5359dd0587fa695468c5896ac8 100644 (file)
@@ -2,7 +2,7 @@
 ; RUN:   %prcontext 'mulss LCPI1_3' 1 | grep mulss | wc -l | grep 1
 ; PR1075
 
-define float %foo(float %x) {
+define float @foo(float %x) {
     %tmp1 = mul float %x, 3.000000e+00
     %tmp3 = mul float %x, 5.000000e+00
     %tmp5 = mul float %x, 7.000000e+00
index 9a73130a65343d2dddee0151cdbfc3c0f23508ba..9e218b53b2ce871f9b04c72256abb4e404b79928 100644 (file)
@@ -3,13 +3,11 @@
 ; PR1103
 
 target datalayout = "e-p:64:64"
-target endian = little
-target pointersize = 64
-%i6000 = global [128 x i64] zeroinitializer, align 16
+@i6000 = global [128 x i64] zeroinitializer, align 16
 
 implementation
 
-define void %foo(i32* %a0, i32* %a1, i32* %a2, i32* %a3, i32* %a4, i32* %a5) {
+define void @foo(i32* %a0, i32* %a1, i32* %a2, i32* %a3, i32* %a4, i32* %a5) {
 b:
        %r = load i32* %a0
        %r2 = load i32* %a1
@@ -135,14 +133,14 @@ b341:
        %d753 = bitcast i64 %w1874 to i64
        %r343 = add i64 %s661, 0
        %r346 = add i64 %r343, 0
-       %r347 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r346
+       %r347 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r346
        %r348 = load float* %r347
        %r352 = add i64 %r343, 0
-       %r353 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r352
+       %r353 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r352
        %r354 = load float* %r353
-       %r362 = load float* bitcast ([128 x i64]* %i6000 to float*)
+       %r362 = load float* bitcast ([128 x i64]* @i6000 to float*)
        %r363 = add float 0.000000e+00, %r362
-       %r370 = load float* bitcast ([128 x i64]* %i6000 to float*)
+       %r370 = load float* bitcast ([128 x i64]* @i6000 to float*)
        %r376 = icmp slt i64 %r16, 0
        br i1 %r376, label %b377, label %a35b
 b377:
@@ -186,9 +184,9 @@ b535:
        %s923 = phi i64 [ 0, %b514 ], [ %r799, %b712 ]
        %s933 = phi i64 [ %r533, %b514 ], [ %r795, %b712 ]
        %r538 = add i64 %w1855, 0
-       %r539 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r538
+       %r539 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r538
        %r540 = load float* %r539
-       %r551 = load float* bitcast ([128 x i64]* %i6000 to float*)
+       %r551 = load float* bitcast ([128 x i64]* @i6000 to float*)
        %r562 = sub i64 %s933, 0
        %r564 = icmp slt i64 %r512, 0
        br i1 %r564, label %b565, label %a45b
@@ -215,22 +213,22 @@ b712:
 a45b714:
        %r717 = add i64 %e944, 0
        %r720 = add i64 %r717, 0
-       %r721 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r720
+       %r721 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r720
        %r722 = load float* %r721
        %r726 = add i64 %r717, 0
-       %r727 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r726
+       %r727 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r726
        %r728 = load float* %r727
        %r732 = add i64 %r717, 0
-       %r733 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r732
+       %r733 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r732
        %r734 = load float* %r733
        %r738 = add i64 %r717, 0
-       %r739 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r738
+       %r739 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r738
        %r740 = load float* %r739
        %r744 = add i64 %r717, 0
-       %r745 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r744
+       %r745 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r744
        %r746 = load float* %r745
        %r750 = add i64 %r717, 0
-       %r751 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r750
+       %r751 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r750
        %r752 = load float* %r751
        %r753 = add float %r752, %r746
        %r754 = add float %r728, %r722
@@ -239,10 +237,10 @@ a45b714:
        %r757 = add float %r753, %r756
        %r759 = add float %r757, %r540
        %r770 = add i64 %r717, 0
-       %r771 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r770
+       %r771 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r770
        %r772 = load float* %r771
        %r776 = add i64 %r717, 0
-       %r777 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r776
+       %r777 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r776
        %r778 = load float* %r777
        %r781 = add float %r363, %r772
        %r782 = add float %r781, %r778
@@ -256,7 +254,7 @@ b820:
        %r844 = add i64 %r16, 0
        %r846 = sext i32 %r60 to i64
        %r847 = add i64 %r846, 0
-       %r851 = load float* bitcast ([128 x i64]* %i6000 to float*)
+       %r851 = load float* bitcast ([128 x i64]* @i6000 to float*)
        %r856 = sub i64 %r, 0
        br label %b858
 b858:
@@ -268,10 +266,10 @@ b858:
        %s1173 = add i64 %b1902, 0
        %r859 = add i64 %r856, 0
        %r862 = add i64 %w1891, 0
-       %r863 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r862
+       %r863 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r862
        %r864 = load float* %r863
        %r868 = add i64 %w1891, 0
-       %r869 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r868
+       %r869 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r868
        %r870 = load float* %r869
        %r873 = sub i64 %r859, 0
        %r876 = sub i64 %s1173, 0
@@ -338,7 +336,7 @@ b1117:
        %d1353 = bitcast i64 %w1915 to i64
        %r1120 = add i64 %s661, 0
        %r1121 = add i64 %r1120, 0
-       %r1122 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r1121
+       %r1122 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r1121
        %r1123 = load float* %r1122
        %r1132 = bitcast i8* %c22012 to float*
        %r1134 = getelementptr float* %r1132, i64 %w1915
@@ -412,7 +410,7 @@ b1342:
        %r1352 = add i64 %s1523, 0
        %r1355 = sub i64 %r1352, 0
        %r1370 = add i64 %d1533, 0
-       %r1371 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r1370
+       %r1371 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r1370
        %r1372 = load float* %r1371
        br label %a74b
 a74b:
@@ -446,10 +444,10 @@ a97b:
        %r1756 = getelementptr float* %r1754, i64 %w1970
        %r1757 = load float* %r1756
        %r1761 = add i64 %r1622, 0
-       %r1762 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r1761
+       %r1762 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r1761
        %r1763 = load float* %r1762
        %r1767 = add i64 %r1622, 0
-       %r1768 = getelementptr float* bitcast ([128 x i64]* %i6000 to float*), i64 %r1767
+       %r1768 = getelementptr float* bitcast ([128 x i64]* @i6000 to float*), i64 %r1767
        %r1772 = add float %r1763, 0.000000e+00
        %r1773 = add float %r1772, 0.000000e+00
        %r1809 = add float %r1757, 0.000000e+00
index 50f6b9a1cccf4e30dbb6d0d054a601c63959fe81..37d864349beb108f572c5e9d87a70212d253d135 100644 (file)
@@ -1,17 +1,17 @@
 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 &&
 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not getp test
 
-define float %test1(float %a, float %b) {
-       %tmp = tail call float %copysignf( float %b, float %a )
+define float @test1(float %a, float %b) {
+       %tmp = tail call float @copysignf( float %b, float %a )
        ret float %tmp
 }
 
-define double %test2(double %a, float %b, float %c) {
+define double @test2(double %a, float %b, float %c) {
        %tmp1 = add float %b, %c
        %tmp2 = fpext float %tmp1 to double
-       %tmp = tail call double %copysign( double %a, double %tmp2 )
+       %tmp = tail call double @copysign( double %a, double %tmp2 )
        ret double %tmp
 }
 
-declare float %copysignf(float, float)
-declare double %copysign(double, double)
+declare float @copysignf(float, float)
+declare double @copysign(double, double)
index 915c3e89a271241ebb5bb3415744c411e026903d..27f890fb1b884dcb27902ef3b870d756da4b7b3e 100644 (file)
@@ -3,18 +3,18 @@
 ; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin8.8.0 | grep ".private_extern" | wc -l | grep 2 
 
 %struct.Person = type { i32 }
-%a = hidden global i32 0
-%b = external global i32
+@a = hidden global i32 0
+@b = external global i32
 
 implementation   ; Functions:
 
-define weak hidden void %_ZN6Person13privateMethodEv(%struct.Person* %this) {
+define weak hidden void @_ZN6Person13privateMethodEv(%struct.Person* %this) {
   ret void
 }
 
-declare void %function(i32)
+declare void @function(i32)
 
-define weak void %_ZN6PersonC1Ei(%struct.Person* %this, i32 %_c) {
+define weak void @_ZN6PersonC1Ei(%struct.Person* %this, i32 %_c) {
   ret void
 }
 
index a12e742db9f81e6ad2ca37eefa3eb77b08119472..81e283f8117f2119143aadbfc0d599f4fdadbdf4 100644 (file)
@@ -4,15 +4,15 @@
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOT | wc -l | grep 3 &&
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOTOFF | wc -l | grep 0
 
-%ptr = external global i32* 
-%dst = external global i32 
-%src = external global i32 
+@ptr = external global i32* 
+@dst = external global i32 
+@src = external global i32 
 
-define void %foo() {
+define void @foo() {
 entry:
-    store i32* %dst, i32** %ptr
-    %tmp.s = load i32* %src
-    store i32 %tmp.s, i32* %dst
+    store i32* @dst, i32** @ptr
+    %tmp.s = load i32* @src
+    store i32 %tmp.s, i32* @dst
     ret void
 }
 
index 04fdbda4153f5d97d4820a9bd0f3cf8f8444aed6..792c6d237ae10c7c2be726a0e3acf06efa3c489b 100644 (file)
@@ -3,15 +3,15 @@
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 &&
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOTOFF | wc -l | grep 4
 
-%ptr = internal global i32* null
-%dst = internal global i32 0
-%src = internal global i32 0
+@ptr = internal global i32* null
+@dst = internal global i32 0
+@src = internal global i32 0
 
-define void %foo() {
+define void @foo() {
 entry:
-    store i32* %dst, i32** %ptr
-    %tmp.s = load i32* %src
-    store i32 %tmp.s, i32* %dst
+    store i32* @dst, i32** @ptr
+    %tmp.s = load i32* @src
+    store i32 %tmp.s, i32* @dst
     ret void
 }
 
index 726a53b2cd392a8524730873fb4b65cc33c38532..79dce93cc5e57b8d3a672efd27511e3e99912216 100644 (file)
@@ -3,12 +3,12 @@
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 &&
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep PLT | wc -l | grep 1
 
-define void %bar() {
+define void @bar() {
 entry:
-    call void(...)* %foo()
+    call void(...)* @foo()
     br label %return
 return:
     ret void
 }
 
-declare void %foo(...)
+declare void @foo(...)
index 13abb2e13598f4088cc1fb78e0e9c3ef675b9dcf..8a12bcfc9e52e46d7282294c58511b8bfd79cca9 100644 (file)
@@ -5,17 +5,17 @@
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep "GOT" | wc -l | grep 1 &&
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep "GOTOFF" | wc -l | grep 0
 
-%pfoo = external global void(...)* 
+@pfoo = external global void(...)* 
 
-define void %bar() {
+define void @bar() {
 entry:
-    %tmp = call void(...)*(...)* %afoo()
-    store void(...)* %tmp, void(...)** %pfoo
-    %tmp1 = load void(...)** %pfoo
+    %tmp = call void(...)*(...)* @afoo()
+    store void(...)* %tmp, void(...)** @pfoo
+    %tmp1 = load void(...)** @pfoo
     call void(...)* %tmp1()
     br label %return
 return:
     ret void
 }
 
-declare void(...)* %afoo(...)
+declare void(...)* @afoo(...)
index 4517e0955a326038910a6b4658d3e4de3c0fc3bd..202ac9a0c2b2d13ffa55023f80603f8fa10a685e 100644 (file)
@@ -3,9 +3,9 @@
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 &&
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep PLT | wc -l | grep 1
 
-%ptr = external global i32* 
+@ptr = external global i32* 
 
-define void %foo() {
+define void @foo() {
 entry:
     %ptr = malloc i32, i32 10
     ret void
index 9f295319d1ca9998217883c6be951a1b296b001f..fa3190fc0878d78152fab598ae4167b8c8ac160c 100644 (file)
@@ -3,15 +3,15 @@
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 &&
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOT | wc -l | grep 3
 
-%ptr = global i32* null
-%dst = global i32 0
-%src = global i32 0
+@ptr = global i32* null
+@dst = global i32 0
+@src = global i32 0
 
-define void %foo() {
+define void @foo() {
 entry:
-    store i32* %dst, i32** %ptr
-    %tmp.s = load i32* %src
-    store i32 %tmp.s, i32* %dst
+    store i32* @dst, i32** @ptr
+    %tmp.s = load i32* @src
+    store i32 %tmp.s, i32* @dst
     ret void
 }
 
index 3911c698dce36d68e8dbcf72bdf4d44d42ef1196..f52c5cadd35704eade671ae02db1f32dc2f49519 100644 (file)
@@ -4,7 +4,7 @@
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOTOFF | wc -l | grep 2 &&
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep CPI | wc -l | grep 4
 
-define double %foo(i32 %a.u) {
+define double @foo(i32 %a.u) {
 entry:
     %tmp = icmp eq i32 %a.u,0
     %retval = select i1 %tmp, double 4.561230e+02, double 1.234560e+02
index ff3c4d68b35ca4508d8b6fc24b90a63e0ffa792c..b58e6de30f5e795121df4120948f23b3975a9f55 100644 (file)
@@ -5,53 +5,53 @@
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOTOFF | wc -l | grep 1 &&
 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep JTI | wc -l | grep 15
 
-define void %bar(i32 %n.u) {
+define void @bar(i32 %n.u) {
 entry:
     switch i32 %n.u, label %bb12 [i32 1, label %bb i32 2, label %bb6 i32 4, label %bb7 i32 5, label %bb8 i32 6, label %bb10 i32 7, label %bb1 i32 8, label %bb3 i32 9, label %bb4 i32 10, label %bb9 i32 11, label %bb2 i32 12, label %bb5 i32 13, label %bb11 ]
 bb:
-    tail call void(...)* %foo1()
+    tail call void(...)* @foo1()
     ret void
 bb1:
-    tail call void(...)* %foo2()
+    tail call void(...)* @foo2()
     ret void
 bb2:
-    tail call void(...)* %foo6()
+    tail call void(...)* @foo6()
     ret void
 bb3:
-    tail call void(...)* %foo3()
+    tail call void(...)* @foo3()
     ret void
 bb4:
-    tail call void(...)* %foo4()
+    tail call void(...)* @foo4()
     ret void
 bb5:
-    tail call void(...)* %foo5()
+    tail call void(...)* @foo5()
     ret void
 bb6:
-    tail call void(...)* %foo1()
+    tail call void(...)* @foo1()
     ret void
 bb7:
-    tail call void(...)* %foo2()
+    tail call void(...)* @foo2()
     ret void
 bb8:
-    tail call void(...)* %foo6()
+    tail call void(...)* @foo6()
     ret void
 bb9:
-    tail call void(...)* %foo3()
+    tail call void(...)* @foo3()
     ret void
 bb10:
-    tail call void(...)* %foo4()
+    tail call void(...)* @foo4()
     ret void
 bb11:
-    tail call void(...)* %foo5()
+    tail call void(...)* @foo5()
     ret void
 bb12:
-    tail call void(...)* %foo6()
+    tail call void(...)* @foo6()
     ret void
 }
 
-declare void %foo1(...)
-declare void %foo2(...)
-declare void %foo6(...)
-declare void %foo3(...)
-declare void %foo4(...)
-declare void %foo5(...)
+declare void @foo1(...)
+declare void @foo2(...)
+declare void @foo6(...)
+declare void @foo3(...)
+declare void @foo4(...)
+declare void @foo5(...)
index a9ac6c1b297c4fc18d664f0470bf07b2b0054aab..f2871f7d713ca34bdae4780800151ea5019a3d00 100644 (file)
@@ -5,12 +5,12 @@
 ; RUN: llvm-as < %s | llc -march=x86 | grep '\(and\)\|\(test.*\$1\)' | \
 ; RUN:   wc -l | grep 6
 
-define i1 %test1(i32 %X) zext {
+define i1 @test1(i32 %X) zext {
     %Y = trunc i32 %X to i1
     ret i1 %Y
 }
 
-define i1 %test2(i32 %val, i32 %mask) {
+define i1 @test2(i32 %val, i32 %mask) {
 entry:
     %mask = trunc i32 %mask to i8
     %shifted = ashr i32 %val, i8 %mask
@@ -23,7 +23,7 @@ ret_false:
     ret i1 false
 }
 
-define i32 %test3(i8* %ptr) {
+define i32 @test3(i8* %ptr) {
     %val = load i8* %ptr
     %tmp = trunc i8 %val to i1
     br i1 %tmp, label %cond_true, label %cond_false
@@ -33,7 +33,7 @@ cond_false:
     ret i32 42
 }
 
-define i32 %test4(i8* %ptr) {
+define i32 @test4(i8* %ptr) {
     %tmp = ptrtoint i8* %ptr to i1
     br i1 %tmp, label %cond_true, label %cond_false
 cond_true:
@@ -42,7 +42,7 @@ cond_false:
     ret i32 42
 }
 
-define i32 %test5(float %f) {
+define i32 @test5(float %f) {
     %tmp = fptoui float %f to i1
     br i1 %tmp, label %cond_true, label %cond_false
 cond_true:
@@ -51,7 +51,7 @@ cond_false:
     ret i32 42
 }
 
-define i32 %test6(double %d) {
+define i32 @test6(double %d) {
     %tmp = fptosi double %d to i1
     br i1 %tmp, label %cond_true, label %cond_false
 cond_true:
index 4e14b005334966d4b1b5f02accd16420785ca172..d99a80d85ad33d2125effe543981c1575c62c6b9 100644 (file)
@@ -1,6 +1,6 @@
 ; Test that redefinitions of globals produces an error in llvm-upgrade
 ; RUN: llvm-upgrade < %s -o /dev/null -f 2>&1 | \
-; RUN:   grep "Global variable '%B' was renamed to '"
+; RUN:   grep "Renaming global variable 'B' to.*linkage errors"
 
 %B = global int 7
 %B = global int 7
index 7ed4a509d431b133e405725f0469fc5e03a15ed9..8e81d219e2434615811f9da50c8462891d74cc29 100644 (file)
@@ -4,5 +4,5 @@
 
 ; Test forward references and redefinitions of globals
 
-%B = global i32 7
-%B = global i32 7
+@B = global i32 7
+@B = global i32 7
index 148e2eee9f1a9f43e40467d3aa680f3ac3dd23fe..d2371573b7d7f68ba6a094007f976007c302fcd8 100644 (file)
@@ -1,28 +1,28 @@
-; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
+; RUN: llvm-as < %s | llvm-dis > %t1.ll
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 
-void "NewCasts" (short %x) {
-  %a = zext short %x to int
-  %b = sext short %x to uint
-  %c = trunc short %x to ubyte
-  %d = uitofp short %x to float
-  %e = sitofp short %x to double
-  %f = fptoui float %d to short
-  %g = fptosi double %e to short
+define void @"NewCasts" (i16 %x) {
+  %a = zext i16 %x to i32
+  %b = sext i16 %x to i32
+  %c = trunc i16 %x to i8
+  %d = uitofp i16 %x to float
+  %e = sitofp i16 %x to double
+  %f = fptoui float %d to i16
+  %g = fptosi double %e to i16
   %i = fpext float %d to double
   %j = fptrunc double %i to float
-  %k = bitcast int %a to float
-  %l = inttoptr short %x to int*
-  %m = ptrtoint int* %l to long
+  %k = bitcast i32 %a to float
+  %l = inttoptr i16 %x to i32*
+  %m = ptrtoint i32* %l to i64
   ret void
 }
 
 
-ushort "ZExtConst" () {
-  ret ushort trunc ( uint zext ( short 42 to uint) to ushort )
+define i16 @"ZExtConst" () {
+  ret i16 trunc ( i32 zext ( i16 42 to i32) to i16 )
 }
 
-short "SExtConst" () {
-  ret short trunc (int sext (ushort 42 to int) to short )
+define i16 @"SExtConst" () {
+  ret i16 trunc (i32 sext (i16 42 to i32) to i16 )
 }
index 12ea7663ce0840d626dc49a5536bb173d997815c..861d0bba7020d70619be4ce100de0d9725b54204 100755 (executable)
@@ -5,29 +5,29 @@
 ; RUN: grep "<{" %t2.ll
 
 %struct.anon = type <{ i8, i32, i32, i32 }>
-%foos = external global %struct.anon 
-%bara = external global [2 x <{ i32, i8 }>]
+@foos = external global %struct.anon 
+@bara = external global [2 x <{ i32, i8 }>]
 
 ;initializers should work for packed and non-packed the same way
-%E1 = global <{i8, i32, i32}> <{i8 1, i32 2, i32 3}>
-%E2 = global {i8, i32, i32} {i8 4, i32 5, i32 6}
+@E1 = global <{i8, i32, i32}> <{i8 1, i32 2, i32 3}>
+@E2 = global {i8, i32, i32} {i8 4, i32 5, i32 6}
 
 implementation   ; Functions:
 
-define i32 %main() 
+define i32 @main() 
 {
-        %tmp = load i32*  getelementptr (%struct.anon* %foos, i32 0, i32 1)            ; <i32> [#uses=1]
-        %tmp3 = load i32* getelementptr (%struct.anon* %foos, i32 0, i32 2)            ; <i32> [#uses=1]
-        %tmp6 = load i32* getelementptr (%struct.anon* %foos, i32 0, i32 3)            ; <i32> [#uses=1]
+        %tmp = load i32*  getelementptr (%struct.anon* @foos, i32 0, i32 1)            ; <i32> [#uses=1]
+        %tmp3 = load i32* getelementptr (%struct.anon* @foos, i32 0, i32 2)            ; <i32> [#uses=1]
+        %tmp6 = load i32* getelementptr (%struct.anon* @foos, i32 0, i32 3)            ; <i32> [#uses=1]
         %tmp4 = add i32 %tmp3, %tmp             ; <i32> [#uses=1]
         %tmp7 = add i32 %tmp4, %tmp6            ; <i32> [#uses=1]
         ret i32 %tmp7
 }
 
-define i32 %bar() {
+define i32 @bar() {
 entry:
-        %tmp = load i32* getelementptr([2 x <{ i32, i8 }>]* %bara, i32 0, i32 0, i32 0 )            ; <i32> [#uses=1]
-        %tmp4 = load i32* getelementptr ([2 x <{ i32, i8 }>]* %bara, i32 0, i32 1, i32 0)           ; <i32> [#uses=1]
+        %tmp = load i32* getelementptr([2 x <{ i32, i8 }>]* @bara, i32 0, i32 0, i32 0 )            ; <i32> [#uses=1]
+        %tmp4 = load i32* getelementptr ([2 x <{ i32, i8 }>]* @bara, i32 0, i32 1, i32 0)           ; <i32> [#uses=1]
         %tmp5 = add i32 %tmp4, %tmp             ; <i32> [#uses=1]
         ret i32 %tmp5
 }
index 6c2e8b175c77f6a66aaf071f111bfd97ee6bb5cc..329b875d8a4e0b0c798617449c093eec59a1d46b 100644 (file)
@@ -5,16 +5,16 @@
 %ZFunTy = type i32(i8 zext)
 %SFunTy = type i32(i8 sext)
 
-declare i16 "test"(i16 sext %arg) sext 
-declare i8 "test2" (i16 zext %a2) zext 
+declare i16 @"test"(i16 sext %arg) sext 
+declare i8 @"test2" (i16 zext %a2) zext 
 
 implementation
 
-define i32 %main(i32 %argc, i8 **%argv) {
+define i32 @main(i32 %argc, i8 **%argv) {
     %val = trunc i32 %argc to i16
-    %res = call i16 (i16 sext) sext *%test(i16 %val)
+    %res = call i16 (i16 sext) sext *@test(i16 %val)
     %two = add i16 %res, %res
-    %res = call i8 %test2(i16 %two zext) zext 
+    %res = call i8 @test2(i16 %two zext) zext 
     %retVal = sext i16 %two to i32
     ret i32 %retVal
 }
index 7b89033cc2c0a05933e7e63a4487e9f9c2c0f6a4..1df2fc70a0b634c022280a7bd1d7f6ea6b674d3f 100644 (file)
@@ -3,27 +3,27 @@
 ; RUN: diff %t1.ll %t2.ll
 ; RUN: llvm-as < %s | lli --force-interpreter=true | grep -- '-255'
 
-%ARRAY   = global [ 20 x i17 ] zeroinitializer
-%FORMAT  = constant [ 4 x i8 ] c"%d\0A\00"
+@ARRAY   = global [ 20 x i17 ] zeroinitializer
+@FORMAT  = constant [ 4 x i8 ] c"%d\0A\00"
 
-declare i32 %printf(i8* %format, ...)
+declare i32 @printf(i8* %format, ...)
 
-define void %multiply(i32 %index, i32 %X, i32 %Y) {
+define void @multiply(i32 %index, i32 %X, i32 %Y) {
   %Z = mul i32 %X, %Y
-  %P = getelementptr [20 x i17]* %ARRAY, i32 0, i32 %index
+  %P = getelementptr [20 x i17]* @ARRAY, i32 0, i32 %index
   %Result = trunc i32 %Z to i17
   store i17 %Result, i17* %P
   ret void
 }
 
-define i32 %main(i32 %argc, i8** %argc) {
+define i32 @main(i32 %argc, i8** %argc) {
   %i = bitcast i32 0 to i32
-  call void %multiply(i32 %i, i32 -1, i32 255) 
-  %P = getelementptr [20 x i17]* %ARRAY, i32 0, i32 0
+  call void @multiply(i32 %i, i32 -1, i32 255) 
+  %P = getelementptr [20 x i17]* @ARRAY, i32 0, i32 0
   %X = load i17* %P
   %result = sext i17 %X to i32
-  %fmt = getelementptr [4 x i8]* %FORMAT, i32 0, i32 0
-  call i32 (i8*,...)* %printf(i8* %fmt, i32 %result)
+  %fmt = getelementptr [4 x i8]* @FORMAT, i32 0, i32 0
+  call i32 (i8*,...)* @printf(i8* %fmt, i32 %result)
   ret i32 %result
 }
 
index cf5e7e6a01e3b6e7a28b57e9b211c076de10c5f5..e9c2cde30c21f10d8ff2f1fb5efe9a3f6115c7c0 100644 (file)
@@ -3,12 +3,12 @@
 ; RUN: diff %t1.ll %t2.ll
 
 
-declare void "foo"(i31 %i, i63 %j, i10 %k)
+declare void @"foo"(i31 %i, i63 %j, i10 %k)
 
 implementation
 
 ; foo test basic arith operations
-define void "foo"(i31 %i, i63 %j, i10 %k)
+define void @"foo"(i31 %i, i63 %j, i10 %k)
 begin
        %t1 = trunc i63 %j to i31 
         %t2 = add i31 %t1, %i
index 02969bc9312c1e9c5d232f5057426d4fb865ca83..2b01c447d9e01e1124abd2d7794af9a6643bcb84 100644 (file)
@@ -2,14 +2,12 @@
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 
-
-
-declare void "foo"(i31 %i, i17 %j)
+declare void @"foo"(i31 %i, i17 %j)
 
 implementation
 
 ; foo test basic bitwise operations
-define void "foo"(i31 %i, i33 %j)
+define void @"foo"(i31 %i, i33 %j)
 begin
        %t1 = trunc i33 %j to i31 
         %t2 = and i31 %t1, %i
index b1849bbab102165a91b17be9e95c01ec661c22ab..53f66f66305d6ac364aba437399d7f70ce6ab693 100644 (file)
@@ -2,13 +2,12 @@
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 
-
-declare void "foo"(i31 %i, i1280 %j, i1 %k, float %f)
+declare void @"foo"(i31 %i, i1280 %j, i1 %k, float %f)
 
 implementation
 
 ; foo test basic arith operations
-define void "foo"(i31 %i, i1280 %j, i1 %k, float %f)
+define void @"foo"(i31 %i, i1280 %j, i1 %k, float %f)
 begin
        %t1 = trunc i1280 %j to i31
         %t2 = trunc i31 %t1 to i1
index d4475bf76b2115faf820c3ff9e9072f94f161337..6c2a79bd7c3a7ca7cc15c71b070e655d19247983 100644 (file)
@@ -2,11 +2,9 @@
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 
-
-
 implementation
 
-define i55 "simpleIcmp"(i55 %i0, i55 %j0)
+define i55 @"simpleIcmp"(i55 %i0, i55 %j0)
 begin
        %t1 = icmp eq i55 %i0, %j0
        %t2 = icmp ne i55 %i0, %j0
@@ -24,7 +22,7 @@ begin
        ret i55 %i0
 end
 
-define i31 "phitest"(i12 %i)
+define i31 @"phitest"(i12 %i)
 begin
 
 HasArg:
@@ -37,7 +35,7 @@ Continue:
         br label %Continue
 end
 
-define i18 "select"(i18 %i)
+define i18 @"select"(i18 %i)
 begin
         %t = icmp sgt i18 %i, 100
         %k = select i1 %t, i18 %i, i18 999
index 4d55a9256678cf296823fa6f50dc45e899f912e2..5e46fb54651d2cc67308176cca9ffcab74ece63b 100644 (file)
@@ -2,20 +2,16 @@
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 
-
-declare void "foo"()
-
+declare void @"foo"()
 
 implementation
 
 ; foo test basic arith operations
-define void "foo"()
-begin
+define void @"foo"() {
        %t1 = malloc i31, i32 4
         %t2 = malloc i31, i32 7, align 1024
         %t3 = malloc [4 x i15]
 
-
         %idx = getelementptr [4 x i15]* %t3, i64 0, i64 2
         store i15 -123, i15* %idx
 
@@ -31,4 +27,4 @@ begin
 
         free i31* %t5
        ret void
-end
+}
index 1aaf62444d02459ff10bfbca32a6d265d90d840d..3bdbee5bb94add647141b098ab6f29a9b33d8122 100644 (file)
@@ -3,23 +3,23 @@
 ; RUN: diff %t1.ll %t2.ll
 
 
-%MyVar     = external global i19
-%MyIntList = external global { i39 *, i19 }
+@MyVar     = external global i19
+@MyIntList = external global { i39 *, i19 }
              external global i19      ; i19*:0
 
-%AConst    = constant i19 -123
+@AConst    = constant i19 -123
 
-%AString   = constant [4 x i8] c"test"
+@AString   = constant [4 x i8] c"test"
 
-%ZeroInit  = global { [100 x i19 ], [40 x float ] } { [100 x i19] zeroinitializer,
+@ZeroInit  = global { [100 x i19 ], [40 x float ] } { [100 x i19] zeroinitializer,
                                                       [40  x float] zeroinitializer }
 
 implementation
 
-define i19 "foo"(i19 %blah)
+define i19 @"foo"(i19 %blah)
 begin
-       store i19 5, i19 *%MyVar
-       %idx = getelementptr { i39 *, i19 } * %MyIntList, i64 0, i32 1
+       store i19 5, i19* @MyVar
+       %idx = getelementptr { i39 *, i19 } * @MyIntList, i64 0, i32 1
        store i19 12, i19* %idx
        ret i19 %blah
 end
index 267c3fdb41d716b2d238b16562f33e7096d4e907..26c9ee95c7cc31dce40ca203e8a13559fbbcf5c4 100644 (file)
@@ -2,22 +2,21 @@
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 
-
-%foo1 = external global <4 x float>;
-%foo2 = external global <2 x i10>;
+@foo1 = external global <4 x float>;
+@foo2 = external global <2 x i10>;
 
 implementation   ; Functions:
 
-define void %main() 
+define void @main() 
 {
-        store <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4 x float>* %foo1
-        store <2 x i10> <i10 4, i10 4>, <2 x i10>* %foo2
-       %l1 = load <4 x float>* %foo1
-        %l2 = load <2 x i10>* %foo2
+        store <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4 x float>* @foo1
+        store <2 x i10> <i10 4, i10 4>, <2 x i10>* @foo2
+       %l1 = load <4 x float>* @foo1
+        %l2 = load <2 x i10>* @foo2
         %r1 = extractelement <2 x i10> %l2, i32 1    
         %r2 = extractelement <2 x i10> %l2, i32 0
         %t = mul i10 %r1, %r2
         %r3 = insertelement <2 x i10> %l2, i10 %t, i32 0    
-        store <2 x i10> %r3, <2 x i10>* %foo2
+        store <2 x i10> %r3, <2 x i10>* @foo2
         ret void
 }
index 1df494445d27207e6c09edfbcd015b5d2d120060..1e7934402e683b4e77289f3039bece18f76ecec3 100644 (file)
@@ -3,22 +3,22 @@
 
 ; test 1 bit
 ;
-%b = constant i1 add(i1 1 , i1 1)
-%c = constant i1 add(i1 -1, i1 1)
-%d = constant i1 add(i1 -1, i1 -1)
-%e = constant i1 sub(i1 -1, i1 1)
-%f = constant i1 sub(i1 1 , i1 -1)
-%g = constant i1 sub(i1 1 , i1 1)
+@b = constant i1 add(i1 1 , i1 1)
+@c = constant i1 add(i1 -1, i1 1)
+@d = constant i1 add(i1 -1, i1 -1)
+@e = constant i1 sub(i1 -1, i1 1)
+@f = constant i1 sub(i1 1 , i1 -1)
+@g = constant i1 sub(i1 1 , i1 1)
 
-%h = constant i1 shl(i1 1 , i8 1)
-%i = constant i1 shl(i1 1 , i8 0)
-%j = constant i1 lshr(i1 1, i8 1)
-%m = constant i1 ashr(i1 1, i8 1)
+@h = constant i1 shl(i1 1 , i8 1)
+@i = constant i1 shl(i1 1 , i8 0)
+@j = constant i1 lshr(i1 1, i8 1)
+@m = constant i1 ashr(i1 1, i8 1)
 
-%n = constant i1 mul(i1 -1, i1 1)
-%o = constant i1 sdiv(i1 -1, i1 1)
-%p = constant i1 sdiv(i1 1 , i1 -1)
-%q = constant i1 udiv(i1 -1, i1 1)
-%r = constant i1 udiv(i1 1, i1 -1)
-%s = constant i1 srem(i1 -1, i1 1)
-%t = constant i1 urem(i1 -1, i1 1)
+@n = constant i1 mul(i1 -1, i1 1)
+@o = constant i1 sdiv(i1 -1, i1 1)
+@p = constant i1 sdiv(i1 1 , i1 -1)
+@q = constant i1 udiv(i1 -1, i1 1)
+@r = constant i1 udiv(i1 1, i1 -1)
+@s = constant i1 srem(i1 -1, i1 1)
+@t = constant i1 urem(i1 -1, i1 1)
index 762dcd8e371aa900400275ac984f5404166b2c18..d4ef5e07ee6bd841d29c6034a7d5f9b0825a7bbf 100644 (file)
@@ -1,20 +1,20 @@
 ; ModuleID = '<stdin>'
-%b = constant i1 false         ; <i1*> [#uses=0]
-%c = constant i1 false         ; <i1*> [#uses=0]
-%d = constant i1 false         ; <i1*> [#uses=0]
-%e = constant i1 false         ; <i1*> [#uses=0]
-%f = constant i1 false         ; <i1*> [#uses=0]
-%g = constant i1 false         ; <i1*> [#uses=0]
-%h = constant i1 false         ; <i1*> [#uses=0]
-%i = constant i1 true          ; <i1*> [#uses=0]
-%j = constant i1 false         ; <i1*> [#uses=0]
-%m = constant i1 true          ; <i1*> [#uses=0]
-%n = constant i1 true          ; <i1*> [#uses=0]
-%o = constant i1 true          ; <i1*> [#uses=0]
-%p = constant i1 true          ; <i1*> [#uses=0]
-%q = constant i1 true          ; <i1*> [#uses=0]
-%r = constant i1 true          ; <i1*> [#uses=0]
-%s = constant i1 false         ; <i1*> [#uses=0]
-%t = constant i1 false         ; <i1*> [#uses=0]
+@b = constant i1 false         ; <i1*> [#uses=0]
+@c = constant i1 false         ; <i1*> [#uses=0]
+@d = constant i1 false         ; <i1*> [#uses=0]
+@e = constant i1 false         ; <i1*> [#uses=0]
+@f = constant i1 false         ; <i1*> [#uses=0]
+@g = constant i1 false         ; <i1*> [#uses=0]
+@h = constant i1 false         ; <i1*> [#uses=0]
+@i = constant i1 true          ; <i1*> [#uses=0]
+@j = constant i1 false         ; <i1*> [#uses=0]
+@m = constant i1 true          ; <i1*> [#uses=0]
+@n = constant i1 true          ; <i1*> [#uses=0]
+@o = constant i1 true          ; <i1*> [#uses=0]
+@p = constant i1 true          ; <i1*> [#uses=0]
+@q = constant i1 true          ; <i1*> [#uses=0]
+@r = constant i1 true          ; <i1*> [#uses=0]
+@s = constant i1 false         ; <i1*> [#uses=0]
+@t = constant i1 false         ; <i1*> [#uses=0]
 
 implementation   ; Functions:
index fc4688b692a4f2fe55f1b36817cc12030cd108c2..d3cc319b427f4dc7a6f68c46fc5a21801ebc8cfa 100644 (file)
@@ -3,26 +3,26 @@
 
 ; test 15 bits
 ;
-%b = constant i15 add(i15 32767, i15 1)
-%c = constant i15 add(i15 32767, i15 32767)
-%d = constant i15 add(i15 32760, i15 8)
-%e = constant i15 sub(i15 0 , i15 1)
-%f = constant i15 sub(i15 0 , i15 32767)
-%g = constant i15 sub(i15 2 , i15 32767)
+@b = constant i15 add(i15 32767, i15 1)
+@c = constant i15 add(i15 32767, i15 32767)
+@d = constant i15 add(i15 32760, i15 8)
+@e = constant i15 sub(i15 0 , i15 1)
+@f = constant i15 sub(i15 0 , i15 32767)
+@g = constant i15 sub(i15 2 , i15 32767)
 
-%h = constant i15 shl(i15 1 , i8 15)
-%i = constant i15 shl(i15 1 , i8 14)
-%j = constant i15 lshr(i15 32767 , i8 14)
-%k = constant i15 lshr(i15 32767 , i8 15)
-%l = constant i15 ashr(i15 32767 , i8 14)
-%m = constant i15 ashr(i15 32767 , i8 15)
+@h = constant i15 shl(i15 1 , i8 15)
+@i = constant i15 shl(i15 1 , i8 14)
+@j = constant i15 lshr(i15 32767 , i8 14)
+@k = constant i15 lshr(i15 32767 , i8 15)
+@l = constant i15 ashr(i15 32767 , i8 14)
+@m = constant i15 ashr(i15 32767 , i8 15)
 
-%n = constant i15 mul(i15 32767, i15 2)
-%q = constant i15 mul(i15 -16383,i15 -3)
-%r = constant i15 sdiv(i15 -1,   i15 16383)
-%s = constant i15 udiv(i15 -1,   i15 16383)
-%t = constant i15 srem(i15 1,    i15 32766)
-%u = constant i15 urem(i15 32767,i15 -1)
-%o = constant i15 trunc( i16 32768  to i15 )
-%p = constant i15 trunc( i16 32767  to i15 )
+@n = constant i15 mul(i15 32767, i15 2)
+@q = constant i15 mul(i15 -16383,i15 -3)
+@r = constant i15 sdiv(i15 -1,   i15 16383)
+@s = constant i15 udiv(i15 -1,   i15 16383)
+@t = constant i15 srem(i15 1,    i15 32766)
+@u = constant i15 urem(i15 32767,i15 -1)
+@o = constant i15 trunc( i16 32768  to i15 )
+@p = constant i15 trunc( i16 32767  to i15 )
  
index c180a49f793c59facf2a8ddc7f56696384689d90..1ebc4e310fb749066ba95fc5c7fb6a676ab6f3c5 100644 (file)
@@ -1,23 +1,23 @@
 ; ModuleID = '<stdin>'
-%b = constant i15 0            ; <i15*> [#uses=0]
-%c = constant i15 -2           ; <i15*> [#uses=0]
-%d = constant i15 0            ; <i15*> [#uses=0]
-%e = constant i15 -1           ; <i15*> [#uses=0]
-%f = constant i15 1            ; <i15*> [#uses=0]
-%g = constant i15 3            ; <i15*> [#uses=0]
-%h = constant i15 0            ; <i15*> [#uses=0]
-%i = constant i15 -16384               ; <i15*> [#uses=0]
-%j = constant i15 1            ; <i15*> [#uses=0]
-%k = constant i15 0            ; <i15*> [#uses=0]
-%l = constant i15 -1           ; <i15*> [#uses=0]
-%m = constant i15 -1           ; <i15*> [#uses=0]
-%n = constant i15 -2           ; <i15*> [#uses=0]
-%q = constant i15 16381                ; <i15*> [#uses=0]
-%r = constant i15 0            ; <i15*> [#uses=0]
-%s = constant i15 2            ; <i15*> [#uses=0]
-%t = constant i15 1            ; <i15*> [#uses=0]
-%u = constant i15 0            ; <i15*> [#uses=0]
-%o = constant i15 0            ; <i15*> [#uses=0]
-%p = constant i15 -1           ; <i15*> [#uses=0]
+@b = constant i15 0            ; <i15*> [#uses=0]
+@c = constant i15 -2           ; <i15*> [#uses=0]
+@d = constant i15 0            ; <i15*> [#uses=0]
+@e = constant i15 -1           ; <i15*> [#uses=0]
+@f = constant i15 1            ; <i15*> [#uses=0]
+@g = constant i15 3            ; <i15*> [#uses=0]
+@h = constant i15 0            ; <i15*> [#uses=0]
+@i = constant i15 -16384               ; <i15*> [#uses=0]
+@j = constant i15 1            ; <i15*> [#uses=0]
+@k = constant i15 0            ; <i15*> [#uses=0]
+@l = constant i15 -1           ; <i15*> [#uses=0]
+@m = constant i15 -1           ; <i15*> [#uses=0]
+@n = constant i15 -2           ; <i15*> [#uses=0]
+@q = constant i15 16381                ; <i15*> [#uses=0]
+@r = constant i15 0            ; <i15*> [#uses=0]
+@s = constant i15 2            ; <i15*> [#uses=0]
+@t = constant i15 1            ; <i15*> [#uses=0]
+@u = constant i15 0            ; <i15*> [#uses=0]
+@o = constant i15 0            ; <i15*> [#uses=0]
+@p = constant i15 -1           ; <i15*> [#uses=0]
 
 implementation   ; Functions:
index 5770c7c0cffa2e4c3a41549a6fe428b5e3ebb2a0..82760786cd2994cbaedb11dff2da824399578a6e 100644 (file)
@@ -3,24 +3,24 @@
 
 ; test 17 bits
 ;
-%b = constant i17 add(i17 131071, i17 1)
-%c = constant i17 add(i17 131071, i17 131071)
-%d = constant i17 add(i17 131064, i17 8)
-%e = constant i17 sub(i17 0 , i17 1)
-%f = constant i17 sub(i17 0 , i17 131071)
-%g = constant i17 sub(i17 2 , i17 131071)
+@b = constant i17 add(i17 131071, i17 1)
+@c = constant i17 add(i17 131071, i17 131071)
+@d = constant i17 add(i17 131064, i17 8)
+@e = constant i17 sub(i17 0 , i17 1)
+@f = constant i17 sub(i17 0 , i17 131071)
+@g = constant i17 sub(i17 2 , i17 131071)
 
-%h = constant i17 shl(i17 1 , i8 17)
-%i = constant i17 shl(i17 1 , i8 16)
-%j = constant i17 lshr(i17 131071 , i8 16)
-%k = constant i17 lshr(i17 131071 , i8 17)
-%l = constant i17 ashr(i17 131071 , i8 16)
-%m = constant i17 ashr(i17 131071 , i8 17)
+@h = constant i17 shl(i17 1 , i8 17)
+@i = constant i17 shl(i17 1 , i8 16)
+@j = constant i17 lshr(i17 131071 , i8 16)
+@k = constant i17 lshr(i17 131071 , i8 17)
+@l = constant i17 ashr(i17 131071 , i8 16)
+@m = constant i17 ashr(i17 131071 , i8 17)
 
-%n = constant i17 mul(i17 131071, i17 2) 
-%q = constant i17 sdiv(i17 -1,    i17 65535)
-%r = constant i17 udiv(i17 -1,    i17 65535)
-%s = constant i17 srem(i17  1,    i17 131070)
-%t = constant i17 urem(i17 131071,i17 -1)
-%o = constant i17 trunc( i18 131072  to i17 )
-%p = constant i17 trunc( i18 131071  to i17 )
+@n = constant i17 mul(i17 131071, i17 2) 
+@q = constant i17 sdiv(i17 -1,    i17 65535)
+@r = constant i17 udiv(i17 -1,    i17 65535)
+@s = constant i17 srem(i17  1,    i17 131070)
+@t = constant i17 urem(i17 131071,i17 -1)
+@o = constant i17 trunc( i18 131072  to i17 )
+@p = constant i17 trunc( i18 131071  to i17 )
index f0cb13a4fe555f33a0cdd8f5d82437cd74880d02..c00ce519328c0e60365d359d0da356c77c83a681 100644 (file)
@@ -1,22 +1,22 @@
 ; ModuleID = '<stdin>'
-%b = constant i17 0            ; <i17*> [#uses=0]
-%c = constant i17 -2           ; <i17*> [#uses=0]
-%d = constant i17 0            ; <i17*> [#uses=0]
-%e = constant i17 -1           ; <i17*> [#uses=0]
-%f = constant i17 1            ; <i17*> [#uses=0]
-%g = constant i17 3            ; <i17*> [#uses=0]
-%h = constant i17 0            ; <i17*> [#uses=0]
-%i = constant i17 -65536               ; <i17*> [#uses=0]
-%j = constant i17 1            ; <i17*> [#uses=0]
-%k = constant i17 0            ; <i17*> [#uses=0]
-%l = constant i17 -1           ; <i17*> [#uses=0]
-%m = constant i17 -1           ; <i17*> [#uses=0]
-%n = constant i17 -2           ; <i17*> [#uses=0]
-%q = constant i17 0            ; <i17*> [#uses=0]
-%r = constant i17 2            ; <i17*> [#uses=0]
-%s = constant i17 1            ; <i17*> [#uses=0]
-%t = constant i17 0            ; <i17*> [#uses=0]
-%o = constant i17 0            ; <i17*> [#uses=0]
-%p = constant i17 -1           ; <i17*> [#uses=0]
+@b = constant i17 0            ; <i17*> [#uses=0]
+@c = constant i17 -2           ; <i17*> [#uses=0]
+@d = constant i17 0            ; <i17*> [#uses=0]
+@e = constant i17 -1           ; <i17*> [#uses=0]
+@f = constant i17 1            ; <i17*> [#uses=0]
+@g = constant i17 3            ; <i17*> [#uses=0]
+@h = constant i17 0            ; <i17*> [#uses=0]
+@i = constant i17 -65536               ; <i17*> [#uses=0]
+@j = constant i17 1            ; <i17*> [#uses=0]
+@k = constant i17 0            ; <i17*> [#uses=0]
+@l = constant i17 -1           ; <i17*> [#uses=0]
+@m = constant i17 -1           ; <i17*> [#uses=0]
+@n = constant i17 -2           ; <i17*> [#uses=0]
+@q = constant i17 0            ; <i17*> [#uses=0]
+@r = constant i17 2            ; <i17*> [#uses=0]
+@s = constant i17 1            ; <i17*> [#uses=0]
+@t = constant i17 0            ; <i17*> [#uses=0]
+@o = constant i17 0            ; <i17*> [#uses=0]
+@p = constant i17 -1           ; <i17*> [#uses=0]
 
 implementation   ; Functions:
index 50e229dee58a56903e3b584b89c6cb49d8f57efb..fa3774b4fb8f752bc867d379efefd44014d2c5b7 100644 (file)
@@ -3,24 +3,24 @@
 
 ; test 31 bits
 ;
-%b = constant i31 add(i31 2147483647, i31 1)
-%c = constant i31 add(i31 2147483647, i31 2147483647)
-%d = constant i31 add(i31 2147483640, i31 8)
-%e = constant i31 sub(i31 0 , i31 1)
-%f = constant i31 sub(i31 0 , i31 2147483647)
-%g = constant i31 sub(i31 2 , i31 2147483647)
+@b = constant i31 add(i31 2147483647, i31 1)
+@c = constant i31 add(i31 2147483647, i31 2147483647)
+@d = constant i31 add(i31 2147483640, i31 8)
+@e = constant i31 sub(i31 0 , i31 1)
+@f = constant i31 sub(i31 0 , i31 2147483647)
+@g = constant i31 sub(i31 2 , i31 2147483647)
 
-%h = constant i31 shl(i31 1 , i8 31)
-%i = constant i31 shl(i31 1 , i8 30)
-%j = constant i31 lshr(i31 2147483647 , i8 30)
-%k = constant i31 lshr(i31 2147483647 , i8 31)
-%l = constant i31 ashr(i31 2147483647 , i8 30)
-%m = constant i31 ashr(i31 2147483647 , i8 31)
+@h = constant i31 shl(i31 1 , i8 31)
+@i = constant i31 shl(i31 1 , i8 30)
+@j = constant i31 lshr(i31 2147483647 , i8 30)
+@k = constant i31 lshr(i31 2147483647 , i8 31)
+@l = constant i31 ashr(i31 2147483647 , i8 30)
+@m = constant i31 ashr(i31 2147483647 , i8 31)
 
-%n = constant i31 mul(i31 2147483647, i31 2)
-%q = constant i31 sdiv(i31 -1,        i31 1073741823)
-%r = constant i31 udiv(i31 -1,        i31 1073741823)
-%s = constant i31 srem(i31  3,        i31 2147483646)
-%t = constant i31 urem(i31 2147483647,i31 -1)
-%o = constant i31 trunc( i32 2147483648  to i31 )
-%p = constant i31 trunc( i32 2147483647  to i31 ) 
+@n = constant i31 mul(i31 2147483647, i31 2)
+@q = constant i31 sdiv(i31 -1,        i31 1073741823)
+@r = constant i31 udiv(i31 -1,        i31 1073741823)
+@s = constant i31 srem(i31  3,        i31 2147483646)
+@t = constant i31 urem(i31 2147483647,i31 -1)
+@o = constant i31 trunc( i32 2147483648  to i31 )
+@p = constant i31 trunc( i32 2147483647  to i31 ) 
index b86d64558c77ee9d572533b19263ee448fee98f5..d8765748ee675cebbf743200f8eb6f99e008c676 100644 (file)
@@ -1,22 +1,22 @@
 ; ModuleID = '<stdin>'
-%b = constant i31 0            ; <i31*> [#uses=0]
-%c = constant i31 -2           ; <i31*> [#uses=0]
-%d = constant i31 0            ; <i31*> [#uses=0]
-%e = constant i31 -1           ; <i31*> [#uses=0]
-%f = constant i31 1            ; <i31*> [#uses=0]
-%g = constant i31 3            ; <i31*> [#uses=0]
-%h = constant i31 0            ; <i31*> [#uses=0]
-%i = constant i31 -1073741824          ; <i31*> [#uses=0]
-%j = constant i31 1            ; <i31*> [#uses=0]
-%k = constant i31 0            ; <i31*> [#uses=0]
-%l = constant i31 -1           ; <i31*> [#uses=0]
-%m = constant i31 -1           ; <i31*> [#uses=0]
-%n = constant i31 -2           ; <i31*> [#uses=0]
-%q = constant i31 0            ; <i31*> [#uses=0]
-%r = constant i31 2            ; <i31*> [#uses=0]
-%s = constant i31 1            ; <i31*> [#uses=0]
-%t = constant i31 0            ; <i31*> [#uses=0]
-%o = constant i31 0            ; <i31*> [#uses=0]
-%p = constant i31 -1           ; <i31*> [#uses=0]
+@b = constant i31 0            ; <i31*> [#uses=0]
+@c = constant i31 -2           ; <i31*> [#uses=0]
+@d = constant i31 0            ; <i31*> [#uses=0]
+@e = constant i31 -1           ; <i31*> [#uses=0]
+@f = constant i31 1            ; <i31*> [#uses=0]
+@g = constant i31 3            ; <i31*> [#uses=0]
+@h = constant i31 0            ; <i31*> [#uses=0]
+@i = constant i31 -1073741824          ; <i31*> [#uses=0]
+@j = constant i31 1            ; <i31*> [#uses=0]
+@k = constant i31 0            ; <i31*> [#uses=0]
+@l = constant i31 -1           ; <i31*> [#uses=0]
+@m = constant i31 -1           ; <i31*> [#uses=0]
+@n = constant i31 -2           ; <i31*> [#uses=0]
+@q = constant i31 0            ; <i31*> [#uses=0]
+@r = constant i31 2            ; <i31*> [#uses=0]
+@s = constant i31 1            ; <i31*> [#uses=0]
+@t = constant i31 0            ; <i31*> [#uses=0]
+@o = constant i31 0            ; <i31*> [#uses=0]
+@p = constant i31 -1           ; <i31*> [#uses=0]
 
 implementation   ; Functions:
index 17c6f952fafb0c093f2c4f22d3e6eb8ddc150b5a..cf14274acf4b370834a0a1c163e50eb1b187c7d4 100644 (file)
@@ -3,25 +3,25 @@
 
 ; test 33 bits
 ;
-%b = constant i33 add(i33 8589934591, i33 1)
-%c = constant i33 add(i33 8589934591, i33 8589934591)
-%d = constant i33 add(i33 8589934584, i33 8)
-%e = constant i33 sub(i33 0 , i33 1)
-%f = constant i33 sub(i33 0 , i33 8589934591)
-%g = constant i33 sub(i33 2 , i33 8589934591)
+@b = constant i33 add(i33 8589934591, i33 1)
+@c = constant i33 add(i33 8589934591, i33 8589934591)
+@d = constant i33 add(i33 8589934584, i33 8)
+@e = constant i33 sub(i33 0 , i33 1)
+@f = constant i33 sub(i33 0 , i33 8589934591)
+@g = constant i33 sub(i33 2 , i33 8589934591)
 
-%h = constant i33 shl(i33 1 , i8 33)
-%i = constant i33 shl(i33 1 , i8 32)
-%j = constant i33 lshr(i33 8589934591 , i8 32)
-%k = constant i33 lshr(i33 8589934591 , i8 33)
-%l = constant i33 ashr(i33 8589934591 , i8 32)
-%m = constant i33 ashr(i33 8589934591 , i8 33)
+@h = constant i33 shl(i33 1 , i8 33)
+@i = constant i33 shl(i33 1 , i8 32)
+@j = constant i33 lshr(i33 8589934591 , i8 32)
+@k = constant i33 lshr(i33 8589934591 , i8 33)
+@l = constant i33 ashr(i33 8589934591 , i8 32)
+@m = constant i33 ashr(i33 8589934591 , i8 33)
 
-%n = constant i33 mul(i33 8589934591, i33 2)
-%q = constant i33 sdiv(i33 -1,        i33 4294967295)
-%r = constant i33 udiv(i33 -1,        i33 4294967295)
-%s = constant i33 srem(i33  3,        i33 8589934590)
-%t = constant i33 urem(i33 8589934591,i33 -1)
-%o = constant i33 trunc( i34 8589934592 to i33 )
-%p = constant i33 trunc( i34 8589934591  to i33 )
+@n = constant i33 mul(i33 8589934591, i33 2)
+@q = constant i33 sdiv(i33 -1,        i33 4294967295)
+@r = constant i33 udiv(i33 -1,        i33 4294967295)
+@s = constant i33 srem(i33  3,        i33 8589934590)
+@t = constant i33 urem(i33 8589934591,i33 -1)
+@o = constant i33 trunc( i34 8589934592 to i33 )
+@p = constant i33 trunc( i34 8589934591  to i33 )
  
index 11dc54d3703b989db1659c436b3fbf25a34f1f1f..b63dae6ef6cdeccb9de9845ad2d430a72dd6af88 100644 (file)
@@ -1,22 +1,22 @@
 ; ModuleID = '<stdin>'
-%b = constant i33 0            ; <i33*> [#uses=0]
-%c = constant i33 -2           ; <i33*> [#uses=0]
-%d = constant i33 0            ; <i33*> [#uses=0]
-%e = constant i33 -1           ; <i33*> [#uses=0]
-%f = constant i33 1            ; <i33*> [#uses=0]
-%g = constant i33 3            ; <i33*> [#uses=0]
-%h = constant i33 0            ; <i33*> [#uses=0]
-%i = constant i33 -4294967296          ; <i33*> [#uses=0]
-%j = constant i33 1            ; <i33*> [#uses=0]
-%k = constant i33 0            ; <i33*> [#uses=0]
-%l = constant i33 -1           ; <i33*> [#uses=0]
-%m = constant i33 -1           ; <i33*> [#uses=0]
-%n = constant i33 -2           ; <i33*> [#uses=0]
-%q = constant i33 0            ; <i33*> [#uses=0]
-%r = constant i33 2            ; <i33*> [#uses=0]
-%s = constant i33 1            ; <i33*> [#uses=0]
-%t = constant i33 0            ; <i33*> [#uses=0]
-%o = constant i33 0            ; <i33*> [#uses=0]
-%p = constant i33 -1           ; <i33*> [#uses=0]
+@b = constant i33 0            ; <i33*> [#uses=0]
+@c = constant i33 -2           ; <i33*> [#uses=0]
+@d = constant i33 0            ; <i33*> [#uses=0]
+@e = constant i33 -1           ; <i33*> [#uses=0]
+@f = constant i33 1            ; <i33*> [#uses=0]
+@g = constant i33 3            ; <i33*> [#uses=0]
+@h = constant i33 0            ; <i33*> [#uses=0]
+@i = constant i33 -4294967296          ; <i33*> [#uses=0]
+@j = constant i33 1            ; <i33*> [#uses=0]
+@k = constant i33 0            ; <i33*> [#uses=0]
+@l = constant i33 -1           ; <i33*> [#uses=0]
+@m = constant i33 -1           ; <i33*> [#uses=0]
+@n = constant i33 -2           ; <i33*> [#uses=0]
+@q = constant i33 0            ; <i33*> [#uses=0]
+@r = constant i33 2            ; <i33*> [#uses=0]
+@s = constant i33 1            ; <i33*> [#uses=0]
+@t = constant i33 0            ; <i33*> [#uses=0]
+@o = constant i33 0            ; <i33*> [#uses=0]
+@p = constant i33 -1           ; <i33*> [#uses=0]
 
 implementation   ; Functions:
index 29730018c045698ebb7a238cfb615a8c08357991..ec348ff204b9697ddc61f0c22dc654754ac7371c 100644 (file)
@@ -3,25 +3,25 @@
 
 ; test 63 bits
 ;
-%b = constant i63 add(i63 9223372036854775807, i63 1)
-%c = constant i63 add(i63 9223372036854775807, i63 9223372036854775807)
-%d = constant i63 add(i63 9223372036854775800, i63 8)
-%e = constant i63 sub(i63 0 , i63 1)
-%f = constant i63 sub(i63 0 , i63 9223372036854775807)
-%g = constant i63 sub(i63 2 , i63 9223372036854775807)
+@b = constant i63 add(i63 9223372036854775807, i63 1)
+@c = constant i63 add(i63 9223372036854775807, i63 9223372036854775807)
+@d = constant i63 add(i63 9223372036854775800, i63 8)
+@e = constant i63 sub(i63 0 , i63 1)
+@f = constant i63 sub(i63 0 , i63 9223372036854775807)
+@g = constant i63 sub(i63 2 , i63 9223372036854775807)
 
-%h = constant i63 shl(i63 1 , i8 63)
-%i = constant i63 shl(i63 1 , i8 62)
-%j = constant i63 lshr(i63 9223372036854775807 , i8 62)
-%k = constant i63 lshr(i63 9223372036854775807 , i8 63)
-%l = constant i63 ashr(i63 9223372036854775807 , i8 62)
-%m = constant i63 ashr(i63 9223372036854775807 , i8 63)
+@h = constant i63 shl(i63 1 , i8 63)
+@i = constant i63 shl(i63 1 , i8 62)
+@j = constant i63 lshr(i63 9223372036854775807 , i8 62)
+@k = constant i63 lshr(i63 9223372036854775807 , i8 63)
+@l = constant i63 ashr(i63 9223372036854775807 , i8 62)
+@m = constant i63 ashr(i63 9223372036854775807 , i8 63)
 
-%n = constant i63 mul(i63 9223372036854775807, i63 2) 
-%q = constant i63 sdiv(i63 -1,                 i63 4611686018427387903)
-%u = constant i63 sdiv(i63 -1,                 i63 1)
-%r = constant i63 udiv(i63 -1,                 i63 4611686018427387903)
-%s = constant i63 srem(i63  3,                 i63 9223372036854775806)
-%t = constant i63 urem(i63 9223372036854775807,i63 -1)
-%o = constant i63 trunc( i64 9223372036854775808 to i63 )
-%p = constant i63 trunc( i64 9223372036854775807  to i63 )
+@n = constant i63 mul(i63 9223372036854775807, i63 2) 
+@q = constant i63 sdiv(i63 -1,                 i63 4611686018427387903)
+@u = constant i63 sdiv(i63 -1,                 i63 1)
+@r = constant i63 udiv(i63 -1,                 i63 4611686018427387903)
+@s = constant i63 srem(i63  3,                 i63 9223372036854775806)
+@t = constant i63 urem(i63 9223372036854775807,i63 -1)
+@o = constant i63 trunc( i64 9223372036854775808 to i63 )
+@p = constant i63 trunc( i64 9223372036854775807  to i63 )
index 03bba1c5e548eea86edaf812553c2c0da4d2fcf2..3a82d74267d378cb09b00e507b49f4f3a8bf7ec4 100644 (file)
@@ -1,23 +1,23 @@
 ; ModuleID = '<stdin>'
-%b = constant i63 0            ; <i63*> [#uses=0]
-%c = constant i63 -2           ; <i63*> [#uses=0]
-%d = constant i63 0            ; <i63*> [#uses=0]
-%e = constant i63 -1           ; <i63*> [#uses=0]
-%f = constant i63 1            ; <i63*> [#uses=0]
-%g = constant i63 3            ; <i63*> [#uses=0]
-%h = constant i63 0            ; <i63*> [#uses=0]
-%i = constant i63 -4611686018427387904         ; <i63*> [#uses=0]
-%j = constant i63 1            ; <i63*> [#uses=0]
-%k = constant i63 0            ; <i63*> [#uses=0]
-%l = constant i63 -1           ; <i63*> [#uses=0]
-%m = constant i63 -1           ; <i63*> [#uses=0]
-%n = constant i63 -2           ; <i63*> [#uses=0]
-%q = constant i63 0            ; <i63*> [#uses=0]
-%u = constant i63 -1           ; <i63*> [#uses=0]
-%r = constant i63 2            ; <i63*> [#uses=0]
-%s = constant i63 1            ; <i63*> [#uses=0]
-%t = constant i63 0            ; <i63*> [#uses=0]
-%o = constant i63 0            ; <i63*> [#uses=0]
-%p = constant i63 -1           ; <i63*> [#uses=0]
+@b = constant i63 0            ; <i63*> [#uses=0]
+@c = constant i63 -2           ; <i63*> [#uses=0]
+@d = constant i63 0            ; <i63*> [#uses=0]
+@e = constant i63 -1           ; <i63*> [#uses=0]
+@f = constant i63 1            ; <i63*> [#uses=0]
+@g = constant i63 3            ; <i63*> [#uses=0]
+@h = constant i63 0            ; <i63*> [#uses=0]
+@i = constant i63 -4611686018427387904         ; <i63*> [#uses=0]
+@j = constant i63 1            ; <i63*> [#uses=0]
+@k = constant i63 0            ; <i63*> [#uses=0]
+@l = constant i63 -1           ; <i63*> [#uses=0]
+@m = constant i63 -1           ; <i63*> [#uses=0]
+@n = constant i63 -2           ; <i63*> [#uses=0]
+@q = constant i63 0            ; <i63*> [#uses=0]
+@u = constant i63 -1           ; <i63*> [#uses=0]
+@r = constant i63 2            ; <i63*> [#uses=0]
+@s = constant i63 1            ; <i63*> [#uses=0]
+@t = constant i63 0            ; <i63*> [#uses=0]
+@o = constant i63 0            ; <i63*> [#uses=0]
+@p = constant i63 -1           ; <i63*> [#uses=0]
 
 implementation   ; Functions:
index b0acefae8dbfe7f269dba30eb10cef056f6b183d..91904cc3ec2afff3437e50fa89f10d947412a343 100644 (file)
@@ -3,31 +3,31 @@
 
 ; test 7 bits
 ;
-%b = constant i7 add(i7 127, i7 1)
-%q = constant i7 add(i7 -64, i7 -1)
-%c = constant i7 add(i7 127, i7 127)
-%d = constant i7 add(i7 120, i7 8)
-%e = constant i7 sub(i7 0 , i7 1)
-%f = constant i7 sub(i7 0 , i7 127)
-%g = constant i7 sub(i7 2 , i7 127)
-%r = constant i7 sub(i7 -3, i7 120)
-%s = constant i7 sub(i7 -3, i7 -8)
+@b = constant i7 add(i7 127, i7 1)
+@q = constant i7 add(i7 -64, i7 -1)
+@c = constant i7 add(i7 127, i7 127)
+@d = constant i7 add(i7 120, i7 8)
+@e = constant i7 sub(i7 0 , i7 1)
+@f = constant i7 sub(i7 0 , i7 127)
+@g = constant i7 sub(i7 2 , i7 127)
+@r = constant i7 sub(i7 -3, i7 120)
+@s = constant i7 sub(i7 -3, i7 -8)
 
-%h = constant i7 shl(i7 1 , i8 7)
-%i = constant i7 shl(i7 1 , i8 6)
-%j = constant i7 lshr(i7 127 , i8 6)
-%k = constant i7 lshr(i7 127 , i8 7)
-%l = constant i7 ashr(i7 127 , i8 6)
-%m = constant i7 ashr(i7 127 , i8 7)
-%m2= constant i7 ashr(i7 -1  , i8 3)
+@h = constant i7 shl(i7 1 , i8 7)
+@i = constant i7 shl(i7 1 , i8 6)
+@j = constant i7 lshr(i7 127 , i8 6)
+@k = constant i7 lshr(i7 127 , i8 7)
+@l = constant i7 ashr(i7 127 , i8 6)
+@m = constant i7 ashr(i7 127 , i8 7)
+@m2= constant i7 ashr(i7 -1  , i8 3)
 
-%n = constant i7 mul(i7 127, i7 2)
-%t = constant i7 mul(i7 -63, i7 -2)
-%u = constant i7 mul(i7 -32, i7 2)
-%v = constant i7 sdiv(i7 -1, i7 63)
-%w = constant i7 udiv(i7 -1, i7 63)
-%x = constant i7 srem(i7 1 , i7 126)
-%y = constant i7 urem(i7 127, i7 -1)
-%o = constant i7 trunc( i8 128  to i7 )
-%p = constant i7 trunc( i8 255  to i7 )
+@n = constant i7 mul(i7 127, i7 2)
+@t = constant i7 mul(i7 -63, i7 -2)
+@u = constant i7 mul(i7 -32, i7 2)
+@v = constant i7 sdiv(i7 -1, i7 63)
+@w = constant i7 udiv(i7 -1, i7 63)
+@x = constant i7 srem(i7 1 , i7 126)
+@y = constant i7 urem(i7 127, i7 -1)
+@o = constant i7 trunc( i8 128  to i7 )
+@p = constant i7 trunc( i8 255  to i7 )
  
index 327a3315f5d4b5cee18e7ab101d0192c3ce947dc..bbfc8da1a66825bfade58ada31760413ccb0b3be 100644 (file)
@@ -1,28 +1,28 @@
 ; ModuleID = '<stdin>'
-%b = constant i7 0             ; <i7*> [#uses=0]
-%q = constant i7 63            ; <i7*> [#uses=0]
-%c = constant i7 -2            ; <i7*> [#uses=0]
-%d = constant i7 0             ; <i7*> [#uses=0]
-%e = constant i7 -1            ; <i7*> [#uses=0]
-%f = constant i7 1             ; <i7*> [#uses=0]
-%g = constant i7 3             ; <i7*> [#uses=0]
-%r = constant i7 5             ; <i7*> [#uses=0]
-%s = constant i7 5             ; <i7*> [#uses=0]
-%h = constant i7 0             ; <i7*> [#uses=0]
-%i = constant i7 -64           ; <i7*> [#uses=0]
-%j = constant i7 1             ; <i7*> [#uses=0]
-%k = constant i7 0             ; <i7*> [#uses=0]
-%l = constant i7 -1            ; <i7*> [#uses=0]
-%m = constant i7 -1            ; <i7*> [#uses=0]
-%m2 = constant i7 -1           ; <i7*> [#uses=0]
-%n = constant i7 -2            ; <i7*> [#uses=0]
-%t = constant i7 -2            ; <i7*> [#uses=0]
-%u = constant i7 -64           ; <i7*> [#uses=0]
-%v = constant i7 0             ; <i7*> [#uses=0]
-%w = constant i7 2             ; <i7*> [#uses=0]
-%x = constant i7 1             ; <i7*> [#uses=0]
-%y = constant i7 0             ; <i7*> [#uses=0]
-%o = constant i7 0             ; <i7*> [#uses=0]
-%p = constant i7 -1            ; <i7*> [#uses=0]
+@b = constant i7 0             ; <i7*> [#uses=0]
+@q = constant i7 63            ; <i7*> [#uses=0]
+@c = constant i7 -2            ; <i7*> [#uses=0]
+@d = constant i7 0             ; <i7*> [#uses=0]
+@e = constant i7 -1            ; <i7*> [#uses=0]
+@f = constant i7 1             ; <i7*> [#uses=0]
+@g = constant i7 3             ; <i7*> [#uses=0]
+@r = constant i7 5             ; <i7*> [#uses=0]
+@s = constant i7 5             ; <i7*> [#uses=0]
+@h = constant i7 0             ; <i7*> [#uses=0]
+@i = constant i7 -64           ; <i7*> [#uses=0]
+@j = constant i7 1             ; <i7*> [#uses=0]
+@k = constant i7 0             ; <i7*> [#uses=0]
+@l = constant i7 -1            ; <i7*> [#uses=0]
+@m = constant i7 -1            ; <i7*> [#uses=0]
+@m2 = constant i7 -1           ; <i7*> [#uses=0]
+@n = constant i7 -2            ; <i7*> [#uses=0]
+@t = constant i7 -2            ; <i7*> [#uses=0]
+@u = constant i7 -64           ; <i7*> [#uses=0]
+@v = constant i7 0             ; <i7*> [#uses=0]
+@w = constant i7 2             ; <i7*> [#uses=0]
+@x = constant i7 1             ; <i7*> [#uses=0]
+@y = constant i7 0             ; <i7*> [#uses=0]
+@o = constant i7 0             ; <i7*> [#uses=0]
+@p = constant i7 -1            ; <i7*> [#uses=0]
 
 implementation   ; Functions:
index cb10350cc1302a4b56cfb325dd27d558053fd1bd..8e4cd9a8db3ae55a159069d620832e686c6fff7c 100644 (file)
@@ -3,25 +3,25 @@
 
 ; test 9 bits
 ;
-%b = constant i9 add(i9 511, i9 1)
-%c = constant i9 add(i9 511, i9 511)
-%d = constant i9 add(i9 504, i9 8)
-%e = constant i9 sub(i9 0 , i9 1)
-%f = constant i9 sub(i9 0 , i9 511)
-%g = constant i9 sub(i9 2 , i9 511)
+@b = constant i9 add(i9 511, i9 1)
+@c = constant i9 add(i9 511, i9 511)
+@d = constant i9 add(i9 504, i9 8)
+@e = constant i9 sub(i9 0 , i9 1)
+@f = constant i9 sub(i9 0 , i9 511)
+@g = constant i9 sub(i9 2 , i9 511)
 
-%h = constant i9 shl(i9 1 , i8 9)
-%i = constant i9 shl(i9 1 , i8 8)
-%j = constant i9 lshr(i9 511 , i8 8)
-%k = constant i9 lshr(i9 511 , i8 9)
-%l = constant i9 ashr(i9 511 , i8 8)
-%m = constant i9 ashr(i9 511 , i8 9)
+@h = constant i9 shl(i9 1 , i8 9)
+@i = constant i9 shl(i9 1 , i8 8)
+@j = constant i9 lshr(i9 511 , i8 8)
+@k = constant i9 lshr(i9 511 , i8 9)
+@l = constant i9 ashr(i9 511 , i8 8)
+@m = constant i9 ashr(i9 511 , i8 9)
 
-%n = constant i9 mul(i9 511, i9 2)
-%q = constant i9 sdiv(i9 511, i9 2)
-%r = constant i9 udiv(i9 511, i9 2)
-%s = constant i9 urem(i9 511, i9 -1)
-%t = constant i9 srem(i9 1, i9 510)
-%o = constant i9 trunc( i10 512  to i9 )
-%p = constant i9 trunc( i10 511  to i9 )
+@n = constant i9 mul(i9 511, i9 2)
+@q = constant i9 sdiv(i9 511, i9 2)
+@r = constant i9 udiv(i9 511, i9 2)
+@s = constant i9 urem(i9 511, i9 -1)
+@t = constant i9 srem(i9 1, i9 510)
+@o = constant i9 trunc( i10 512  to i9 )
+@p = constant i9 trunc( i10 511  to i9 )
 
index 31f1ef3b48bef0feb6c7afeeb7071d71ef901a75..28c7cfc955a435655da250aba1c36b55cdac5eb9 100644 (file)
@@ -1,22 +1,22 @@
 ; ModuleID = '<stdin>'
-%b = constant i9 0             ; <i9*> [#uses=0]
-%c = constant i9 -2            ; <i9*> [#uses=0]
-%d = constant i9 0             ; <i9*> [#uses=0]
-%e = constant i9 -1            ; <i9*> [#uses=0]
-%f = constant i9 1             ; <i9*> [#uses=0]
-%g = constant i9 3             ; <i9*> [#uses=0]
-%h = constant i9 0             ; <i9*> [#uses=0]
-%i = constant i9 -256          ; <i9*> [#uses=0]
-%j = constant i9 1             ; <i9*> [#uses=0]
-%k = constant i9 0             ; <i9*> [#uses=0]
-%l = constant i9 -1            ; <i9*> [#uses=0]
-%m = constant i9 -1            ; <i9*> [#uses=0]
-%n = constant i9 -2            ; <i9*> [#uses=0]
-%q = constant i9 0             ; <i9*> [#uses=0]
-%r = constant i9 255           ; <i9*> [#uses=0]
-%s = constant i9 0             ; <i9*> [#uses=0]
-%t = constant i9 1             ; <i9*> [#uses=0]
-%o = constant i9 0             ; <i9*> [#uses=0]
-%p = constant i9 -1            ; <i9*> [#uses=0]
+@b = constant i9 0             ; <i9*> [#uses=0]
+@c = constant i9 -2            ; <i9*> [#uses=0]
+@d = constant i9 0             ; <i9*> [#uses=0]
+@e = constant i9 -1            ; <i9*> [#uses=0]
+@f = constant i9 1             ; <i9*> [#uses=0]
+@g = constant i9 3             ; <i9*> [#uses=0]
+@h = constant i9 0             ; <i9*> [#uses=0]
+@i = constant i9 -256          ; <i9*> [#uses=0]
+@j = constant i9 1             ; <i9*> [#uses=0]
+@k = constant i9 0             ; <i9*> [#uses=0]
+@l = constant i9 -1            ; <i9*> [#uses=0]
+@m = constant i9 -1            ; <i9*> [#uses=0]
+@n = constant i9 -2            ; <i9*> [#uses=0]
+@q = constant i9 0             ; <i9*> [#uses=0]
+@r = constant i9 255           ; <i9*> [#uses=0]
+@s = constant i9 0             ; <i9*> [#uses=0]
+@t = constant i9 1             ; <i9*> [#uses=0]
+@o = constant i9 0             ; <i9*> [#uses=0]
+@p = constant i9 -1            ; <i9*> [#uses=0]
 
 implementation   ; Functions:
index d74d9291742f9093b61b8f7fd3d79a517479da45..635cb1f6b37f1822102c996ff72b5d7cccbe1dc0 100644 (file)
@@ -2,16 +2,16 @@
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 
-%X = global i19 4, align 16
+@X = global i19 4, align 16
 
-define i19 *%test() align 32 {
+define i19 *@test() align 32 {
        %X = alloca i19, align 4
        %Y = alloca i51, i32 42, align 16
        %Z = alloca i32, align 0
        ret i19 *%X
 }
 
-define i19 *%test2() {
+define i19 *@test2() {
        %X = malloc i19, align 4
        %Y = malloc i51, i32 42, align 16
        %Z = malloc i32, align 0
index 8140197e045b3c0f02720332d45c2f6c9fceb6e2..38d9ac98167594e03694b23df29937cf26d60d0e 100644 (file)
@@ -7,7 +7,7 @@ implementation
 ; Test "stripped" format where nothing is symbolic... this is how the bytecode
 ; format looks anyways (except for negative vs positive offsets)...
 ;
-define void "void"(i39, i39)   ; Def %0, %1
+define void @"void"(i39, i39)   ; Def %0, %1
 begin
        add i39 0, 0      ; Def 2
        sub i39 0, 4      ; Def 3
@@ -27,7 +27,7 @@ begin
 end
 
 ; This function always returns zero
-define i39 "zarro"()
+define i39 @"zarro"()
 begin
 Startup:
        ret i39 0
index d313a99d591c02dc44bdd1f852628a9b30121787..c4a7f63fe4ccc634f0145a795402c5c0db73e587 100644 (file)
@@ -4,32 +4,31 @@
 
 %FunTy = type i28(i28)
 
-declare i28 "test"(...)   ; Test differences of prototype
-declare i28 "test"()      ; Differ only by vararg
+declare i28 @"test"(...)   ; Test differences of prototype
+declare i28 @"test"()      ; Differ only by vararg
 
 implementation
 
-define void "invoke"(%FunTy *%x) {
+define void @"invoke"(%FunTy *%x) {
        %foo = call %FunTy* %x(i28 123)
        %foo2 = tail call %FunTy* %x(i28 123)
        ret void
 }
 
-define i28 "main"(i28 %argc)   ; TODO: , sbyte **argv, sbyte **envp)
+define i28 @"main"(i28 %argc)   ; TODO: , sbyte **argv, sbyte **envp)
 begin
-        %retval = call i28 (i28) *%test(i28 %argc)
+        %retval = call i28 (i28) *@test(i28 %argc)
         %two    = add i28 %retval, %retval
-       %retval2 = invoke i28 %test(i28 %argc)
+       %retval2 = invoke i28 @test(i28 %argc)
                   to label %Next unwind label %Error
 Next:
        %two2 = add i28 %two, %retval2
-       call void %invoke (%FunTy* %test)
+       call void @invoke (%FunTy* @test)
         ret i28 %two2
 Error:
        ret i28 -1
 end
 
-define i28 "test"(i28 %i0)
-begin
+define i28 @"test"(i28 %i0) {
     ret i28 %i0
-end
+}
index d8381b44f6d139ba543453709bee8450dc1894ff..1dbceb65fc030f17e0bcef73370b7aa421cd5fef 100644 (file)
@@ -7,7 +7,7 @@ implementation
 ;; This is an irreducible flow graph
 
 
-define void "irreducible"(i1 %cond)
+define void @"irreducible"(i1 %cond)
 begin
        br i1 %cond, label %X, label %Y
 
@@ -19,7 +19,7 @@ end
 
 ;; This is a pair of loops that share the same header
 
-define void "sharedheader"(i1 %cond)
+define void @"sharedheader"(i1 %cond)
 begin
        br label %A
 A:
@@ -32,7 +32,7 @@ Y:
 end
 
 ;; This is a simple nested loop
-define void "nested"(i1 %cond1, i1 %cond2, i1 %cond3)
+define void @"nested"(i1 %cond1, i1 %cond2, i1 %cond3)
 begin
        br label %Loop1
 
index 45529889a955a64cf1137d0b6eb23f8838809fc3..2a8391acf46f4b48c2a5c52c97366df72c194dbf 100644 (file)
 global i63 u0x00001     ; hexadecimal unsigned integer constants
 global i63  s0x012312   ; hexadecimal signed integer constants
 
-%t2 = global i33* %t1                             ;; Forward reference without cast
-%t3 = global i33* bitcast (i33* %t1 to i33*)       ;; Forward reference with cast
-%t1 = global i33 4                                ;; i32* %0
-%t4 = global i33** bitcast (i33** %t3 to i33**)     ;; Cast of a previous cast
-%t5 = global i33** %t3                           ;; Reference to a previous cast
-%t6 = global i33*** %t4
-%t7 = global float* inttoptr (i32 12345678 to float*) ;; Cast ordinary value to ptr
-%t9 = global i33 fptosi (float sitofp (i33 8 to float) to i33) ;; Nested cast expression
-
-
-global i32* bitcast (float* %0 to i32*)   ;; Forward numeric reference
-global float* %0                       ;; Duplicate forward numeric reference
+@t2 = global i33* @t1                             ;; Forward reference without cast
+@t3 = global i33* bitcast (i33* @t1 to i33*)       ;; Forward reference with cast
+@t1 = global i33 4                                ;; i32* @0
+@t4 = global i33** bitcast (i33** @t3 to i33**)     ;; Cast of a previous cast
+@t5 = global i33** @t3                           ;; Reference to a previous cast
+@t6 = global i33*** @t4
+@t7 = global float* inttoptr (i32 12345678 to float*) ;; Cast ordinary value to ptr
+@t9 = global i33 fptosi (float sitofp (i33 8 to float) to i33) ;; Nested cast expression
+
+
+global i32* bitcast (float* @0 to i32*)   ;; Forward numeric reference
+global float* @0                       ;; Duplicate forward numeric reference
 global float 0.0
 
 
@@ -33,18 +33,18 @@ global float 0.0
 ;; Test constant getelementpr expressions for arrays
 ;;---------------------------------------------------
 
-%array  = constant [2 x i33] [ i33 12, i33 52 ]
-%arrayPtr = global i33* getelementptr ([2 x i33]* %array, i64 0, i64 0)    ;; i33* &%array[0][0]
-%arrayPtr5 = global i33** getelementptr (i33** %arrayPtr, i64 5)    ;; i33* &%arrayPtr[5]
+@array  = constant [2 x i33] [ i33 12, i33 52 ]
+@arrayPtr = global i33* getelementptr ([2 x i33]* @array, i64 0, i64 0)    ;; i33* &@array[0][0]
+@arrayPtr5 = global i33** getelementptr (i33** @arrayPtr, i64 5)    ;; i33* &@arrayPtr[5]
 
-%somestr = constant [11x i8] c"hello world"
-%char5  = global i8* getelementptr([11x i8]* %somestr, i64 0, i64 5)
+@somestr = constant [11x i8] c"hello world"
+@char5  = global i8* getelementptr([11x i8]* @somestr, i64 0, i64 5)
 
 ;; cast of getelementptr
-%char8a = global i33* bitcast (i8* getelementptr([11x i8]* %somestr, i64 0, i64 8) to i33*)
+@char8a = global i33* bitcast (i8* getelementptr([11x i8]* @somestr, i64 0, i64 8) to i33*)
 
 ;; getelementptr containing casts
-%char8b = global i8* getelementptr([11x i8]* %somestr, i64 sext (i8 0 to i64), i64 sext (i8 8 to i64))
+@char8b = global i8* getelementptr([11x i8]* @somestr, i64 sext (i8 0 to i64), i64 sext (i8 8 to i64))
 
 ;;-------------------------------------------------------
 ;; TODO: Test constant getelementpr expressions for structures
@@ -53,27 +53,27 @@ global float 0.0
 %SType  = type { i33 , {float, {i8} }, i64 } ;; struct containing struct
 %SAType = type { i33 , {[2x float], i64} } ;; struct containing array
 
-%S1 = global %SType* null                      ;; Global initialized to NULL
-%S2c = constant %SType { i33 1, {float,{i8}} {float 2.0, {i8} {i8 3}}, i64 4}
+@S1 = global %SType* null                      ;; Global initialized to NULL
+@S2c = constant %SType { i33 1, {float,{i8}} {float 2.0, {i8} {i8 3}}, i64 4}
 
-%S3c = constant %SAType { i33 1, {[2x float], i64} {[2x float] [float 2.0, float 3.0], i64 4} }
+@S3c = constant %SAType { i33 1, {[2x float], i64} {[2x float] [float 2.0, float 3.0], i64 4} }
 
-%S1ptr = global %SType** %S1               ;; Ref. to global S1
-%S2  = global %SType* %S2c                 ;; Ref. to constant S2
-%S3  = global %SAType* %S3c                ;; Ref. to constant S3
+@S1ptr = global %SType** @S1               ;; Ref. to global S1
+@S2  = global %SType* @S2c                 ;; Ref. to constant S2
+@S3  = global %SAType* @S3c                ;; Ref. to constant S3
 
-                                           ;; Pointer to float (**%S1).1.0
-%S1fld1a = global float* getelementptr (%SType* %S2c, i64 0, i32 1, i32 0)
+                                           ;; Pointer to float (**@S1).1.0
+@S1fld1a = global float* getelementptr (%SType* @S2c, i64 0, i32 1, i32 0)
                                            ;; Another ptr to the same!
-%S1fld1b = global float* getelementptr (%SType* %S2c, i64 0, i32 1, i32 0)
+@S1fld1b = global float* getelementptr (%SType* @S2c, i64 0, i32 1, i32 0)
 
-%S1fld1bptr = global float** %S1fld1b      ;; Ref. to previous pointer
+@S1fld1bptr = global float** @S1fld1b      ;; Ref. to previous pointer
 
-                                           ;; Pointer to i8 (**%S2).1.1.0
-%S2fld3 = global i8* getelementptr (%SType* %S2c, i64 0, i32 1, i32 1, i32 0) 
+                                           ;; Pointer to i8 (**@S2).1.1.0
+@S2fld3 = global i8* getelementptr (%SType* @S2c, i64 0, i32 1, i32 1, i32 0) 
 
-                                           ;; Pointer to float (**%S2).1.0[0]
-;%S3fld3 = global float* getelementptr (%SAType** %S3, i64 0, i64 0, i32 1, i32 0, i64 0) 
+                                           ;; Pointer to float (**@S2).1.0[0]
+;@S3fld3 = global float* getelementptr (%SAType** @S3, i64 0, i64 0, i32 1, i32 0, i64 0) 
 
 ;;---------------------------------------------------------
 ;; TODO: Test constant expressions for unary and binary operators
index cbae92b6dcab1604ceab028a6617dc98a43d4518..be8fdfdcc7d3d09afc28dfd4fc35f944e52d68e7 100644 (file)
 ;
 
 
-%t3 = global i40 * %t1           ;; Forward reference
-%t1 = global i40 4
-%t4 = global i40 ** %t3                 ;; reference to reference
+@t3 = global i40 * @t1           ;; Forward reference
+@t1 = global i40 4
+@t4 = global i40 ** @t3                 ;; reference to reference
 
-%t2 = global i40 * %t1
+@t2 = global i40 * @t1
 
-global float * %0                ;; Forward numeric reference
-global float * %0                ;; Duplicate forward numeric reference
+global float * @0                ;; Forward numeric reference
+global float * @0                ;; Duplicate forward numeric reference
 global float 0.0
-global float * %0                ;; Numeric reference
+global float * @0                ;; Numeric reference
 
 
-%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
 
-%sptr1   = global [11x i8]* %somestr           ;; Forward ref to a constant
-%somestr = constant [11x i8] c"hello world"
-%sptr2   = global [11x i8]* %somestr
+@sptr1   = global [11x i8]* @somestr           ;; Forward ref to a constant
+@somestr = constant [11x i8] c"hello world"
+@sptr2   = global [11x i8]* @somestr
 
 implementation
 
index d6011b0a22953ecf649e5fb2656029b1cdbd8356..6e2936d84e69274e9ecc719c6f99d57c0829b151 100644 (file)
   %thisfuncty = type i55 (i55) *
 implementation
 
-declare void %F(%thisfuncty, %thisfuncty, %thisfuncty)
+declare void @F(%thisfuncty, %thisfuncty, %thisfuncty)
 
 ; This function always returns zero
-define i55 %zarro(i55 %Func)
+define i55 @zarro(i55 %Func)
 begin
 Startup:
     add i55 0, 10
     ret i55 0 
 end
 
-define i55 %test(i55) 
+define i55 @test(i55) 
 begin
-    call void %F(%thisfuncty %zarro, %thisfuncty %test, %thisfuncty %foozball)
+    call void @F(%thisfuncty @zarro, %thisfuncty @test, %thisfuncty @foozball)
     ret i55 0
 end
 
-define i55 %foozball(i55)
+define i55 @foozball(i55)
 begin
     ret i55 0
 end
index 56b1ab1a45f980d300392129e9f24faf35e6076d..b369b2a5d800cde913054679e60e2cc539e2d42d 100644 (file)
@@ -4,15 +4,15 @@
 
 ; Test forward references and redefinitions of globals
 
-%A = global i17* %B
-%B = global i17 7
+@A = global i17* @B
+@B = global i17 7
 
-declare void %X()
+declare void @X()
 
-declare void %X()
+declare void @X()
 
-define void %X() {
+define void @X() {
   ret void
 }
 
-declare void %X()
+declare void @X()
index b8df1b81e1ea9aae32bf845471f2035a8f7c9383..702f57edcb54caa7eb93f63d1c5bb1463c705c6f 100644 (file)
@@ -4,23 +4,23 @@
 
 
 
-%MyVar     = external global i27
-%MyIntList = external global { \2 *, i27 }
+@MyVar     = external global i27
+@MyIntList = external global { \2 *, i27 }
              external global i27      ; i27*:0
 
-%AConst    = constant i27 123
+@AConst    = constant i27 123
 
-%AString   = constant [4 x i8] c"test"
+@AString   = constant [4 x i8] c"test"
 
-%ZeroInit  = global { [100 x i27 ], [40 x float ] } { [100 x i27] zeroinitializer,
+@ZeroInit  = global { [100 x i27 ], [40 x float ] } { [100 x i27] zeroinitializer,
                                                       [40  x float] zeroinitializer }
 
 implementation
 
-define i27 "foo"(i27 %blah)
+define i27 @"foo"(i27 %blah)
 begin
-       store i27 5, i27 *%MyVar
-        %idx = getelementptr { \2 *, i27 } * %MyIntList, i64 0, i32 1
+       store i27 5, i27 *@MyVar
+        %idx = getelementptr { \2 *, i27 } * @MyIntList, i64 0, i32 1
        store i27 12, i27* %idx
        ret i27 %blah
 end
index 1fd48a0d394d6532676a14c0d509b170ffad9f86..1652f1691c00e373d300dd74c6c7b6644a56a239 100644 (file)
@@ -4,18 +4,18 @@
 
 implementation
 
-define i63 "test"(i63 %X)
+define i63 @"test"(i63 %X)
 begin
        ret i63 %X
 end
 
-define i63 "fib"(i63 %n)
+define i63 @"fib"(i63 %n)
 begin
   %T = icmp ult i63 %n, 2       ; {i1}:0
   br i1 %T, label %BaseCase, label %RecurseCase
 
 RecurseCase:
-  %result = call i63 %test(i63 %n)
+  %result = call i63 @test(i63 %n)
   br label %BaseCase
 
 BaseCase:
index 8a6f77384d7322e795bc004c3533c7887c37683e..274dfc5a28e20a9b81eb335620679e048903b37b 100644 (file)
@@ -4,9 +4,9 @@
 
 implementation
 
-declare i32 "atoi"(i8 *)
+declare i32 @"atoi"(i8 *)
 
-define i63 "fib"(i63 %n)
+define i63 @"fib"(i63 %n)
 begin
   icmp ult i63 %n, 2       ; {i1}:0
   br i1 %0, label %BaseCase, label %RecurseCase
@@ -17,13 +17,13 @@ BaseCase:
 RecurseCase:
   %n2 = sub i63 %n, 2
   %n1 = sub i63 %n, 1
-  %f2 = call i63(i63) * %fib(i63 %n2)
-  %f1 = call i63(i63) * %fib(i63 %n1)
+  %f2 = call i63(i63) * @fib(i63 %n2)
+  %f1 = call i63(i63) * @fib(i63 %n1)
   %result = add i63 %f2, %f1
   ret i63 %result
 end
 
-define i63 "realmain"(i32 %argc, i8 ** %argv)
+define i63 @"realmain"(i32 %argc, i8 ** %argv)
 begin
   icmp eq i32 %argc, 2      ; {i1}:0
   br i1 %0, label %HasArg, label %Continue
@@ -35,20 +35,19 @@ HasArg:
 Continue:
   %n = phi i32 [%n1, %HasArg], [1, %0]
   %N = sext i32 %n to i63
-  %F = call i63(i63) *%fib(i63 %N)
+  %F = call i63(i63) *@fib(i63 %N)
   ret i63 %F
 end
 
-define i63 "trampoline"(i63 %n, i63(i63)* %fibfunc)
+define i63 @"trampoline"(i63 %n, i63(i63)* %fibfunc)
 begin
   %F = call i63(i63) *%fibfunc(i63 %n)
   ret i63 %F
 end
 
-define i32 "main"()
+define i32 @"main"()
 begin
-  %Result = call i63 %trampoline(i63 10, i63(i63) *%fib)
+  %Result = call i63 @trampoline(i63 10, i63(i63) *@fib)
   %Result = trunc i63 %Result to i32
   ret i32 %Result
 end
-
index e10fe9e3dd0a2cf7f892c0980d29516315cefafb..7ca58903527926f85acc4566b001e485905255e5 100644 (file)
@@ -3,23 +3,23 @@
 ; RUN: diff %t1.ll %t2.ll
 
 
-define i39 %test_extractelement(<4 x i39> %V) {
+define i39 @test_extractelement(<4 x i39> %V) {
         %R = extractelement <4 x i39> %V, i32 1
         ret i39 %R
 }
 
-define <4 x i39> %test_insertelement(<4 x i39> %V) {
+define <4 x i39> @test_insertelement(<4 x i39> %V) {
         %R = insertelement <4 x i39> %V, i39 0, i32 0
         ret <4 x i39> %R
 }
 
-define <4 x i39> %test_shufflevector_u(<4 x i39> %V) {
+define <4 x i39> @test_shufflevector_u(<4 x i39> %V) {
         %R = shufflevector <4 x i39> %V, <4 x i39> %V, 
                   <4 x i32> < i32 1, i32 undef, i32 7, i32 2>
         ret <4 x i39> %R
 }
 
-define <4 x float> %test_shufflevector_f(<4 x float> %V) {
+define <4 x float> @test_shufflevector_f(<4 x float> %V) {
         %R = shufflevector <4 x float> %V, <4 x float> undef, 
                   <4 x i32> < i32 1, i32 undef, i32 7, i32 2>
         ret <4 x float> %R
index 446a00731545987981be34dbdc3d3c913650c0b3..e2eee4f7f12e511194104979798dc562639c9835 100644 (file)
@@ -2,7 +2,7 @@
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 
-define void "NewCasts" (i17 %x) {
+define void @"NewCasts" (i17 %x) {
   %a = zext i17 %x to i32
   %b = sext i17 %x to i32
   %c = trunc i17 %x to i8
@@ -19,10 +19,10 @@ define void "NewCasts" (i17 %x) {
 }
 
 
-define i17 "ZExtConst" () {
+define i17 @"ZExtConst" () {
   ret i17 trunc ( i32 zext ( i17 42 to i32) to i17 )
 }
 
-define i17 "SExtConst" () {
+define i17 @"SExtConst" () {
   ret i17 trunc (i32 sext (i17 42 to i32) to i17 )
 }
index 059e17f5bad6fc7c981a6edec732c13eae850a33..a2fa12775988ae6e1398c1f10764c55f146e8208 100644 (file)
@@ -2,16 +2,16 @@
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 
-%foo1 = external global <4 x float>;
-%foo2 = external global <2 x i10>;
+@foo1 = external global <4 x float>;
+@foo2 = external global <2 x i10>;
 
 implementation   ; Functions:
 
-define void %main() 
+define void @main() 
 {
-        store <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4 x float>* %foo1
-        store <2 x i10> <i10 4, i10 4>, <2 x i10>* %foo2
-       %l1 = load <4 x float>* %foo1
-        %l2 = load <2 x i10>* %foo2
+        store <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4 x float>* @foo1
+        store <2 x i10> <i10 4, i10 4>, <2 x i10>* @foo2
+       %l1 = load <4 x float>* @foo1
+        %l2 = load <2 x i10>* @foo2
         ret void
 }
index c72bc4c9426c9b2e2b48244e66fe58b634b8838f..abd303527fd2173e7e0ab537b2fd03c86318de79 100644 (file)
@@ -5,29 +5,29 @@
 ; RUN: grep "<{" %t2.ll
 
 %struct.anon = type <{ i8, i35, i35, i35 }>
-%foos = external global %struct.anon 
-%bara = external global [2 x <{ i35, i8 }>]
+@foos = external global %struct.anon 
+@bara = external global [2 x <{ i35, i8 }>]
 
 ;initializers should work for packed and non-packed the same way
-%E1 = global <{i8, i35, i35}> <{i8 1, i35 2, i35 3}>
-%E2 = global {i8, i35, i35} {i8 4, i35 5, i35 6}
+@E1 = global <{i8, i35, i35}> <{i8 1, i35 2, i35 3}>
+@E2 = global {i8, i35, i35} {i8 4, i35 5, i35 6}
 
 implementation   ; Functions:
 
-define i35 %main() 
+define i35 @main() 
 {
-        %tmp = load i35*  getelementptr (%struct.anon* %foos, i32 0, i32 1)            ; <i35> [#uses=1]
-        %tmp3 = load i35* getelementptr (%struct.anon* %foos, i32 0, i32 2)            ; <i35> [#uses=1]
-        %tmp6 = load i35* getelementptr (%struct.anon* %foos, i32 0, i32 3)            ; <i35> [#uses=1]
+        %tmp = load i35*  getelementptr (%struct.anon* @foos, i32 0, i32 1)            ; <i35> [#uses=1]
+        %tmp3 = load i35* getelementptr (%struct.anon* @foos, i32 0, i32 2)            ; <i35> [#uses=1]
+        %tmp6 = load i35* getelementptr (%struct.anon* @foos, i32 0, i32 3)            ; <i35> [#uses=1]
         %tmp4 = add i35 %tmp3, %tmp             ; <i35> [#uses=1]
         %tmp7 = add i35 %tmp4, %tmp6            ; <i35> [#uses=1]
         ret i35 %tmp7
 }
 
-define i35 %bar() {
+define i35 @bar() {
 entry:
-        %tmp = load i35* getelementptr([2 x <{ i35, i8 }>]* %bara, i32 0, i32 0, i32 0 )            ; <i35> [#uses=1]
-        %tmp4 = load i35* getelementptr ([2 x <{ i35, i8 }>]* %bara, i32 0, i32 1, i32 0)           ; <i35> [#uses=1]
+        %tmp = load i35* getelementptr([2 x <{ i35, i8 }>]* @bara, i32 0, i32 0, i32 0 )            ; <i35> [#uses=1]
+        %tmp4 = load i35* getelementptr ([2 x <{ i35, i8 }>]* @bara, i32 0, i32 1, i32 0)           ; <i35> [#uses=1]
         %tmp5 = add i35 %tmp4, %tmp             ; <i35> [#uses=1]
         ret i35 %tmp5
 }
index 87116ed20605ef72e2e08b15863bf2bee3707482..abf6abdca840903cfe22e431a756036e6271725e 100644 (file)
@@ -5,16 +5,16 @@
 %ZFunTy = type i33(i8 zext)
 %SFunTy = type i33(i8 sext)
 
-declare i16 "test"(i16 sext %arg) sext 
-declare i8 "test2" (i16 zext %a2) zext 
+declare i16 @"test"(i16 sext %arg) sext 
+declare i8  @"test2" (i16 zext %a2) zext 
 
 implementation
 
-define i33 %main(i33 %argc, i8 **%argv) {
+define i33 @main(i33 %argc, i8 **%argv) {
     %val = trunc i33 %argc to i16
-    %res = call i16 (i16 sext) sext *%test(i16 %val)
+    %res = call i16 (i16 sext) sext *@test(i16 %val)
     %two = add i16 %res, %res
-    %res = call i8 %test2(i16 %two zext) zext 
+    %res = call i8 @test2(i16 %two zext) zext 
     %retVal = sext i16 %two to i33
     ret i33 %retVal
 }
index fc88f239dc24be8b5719ca13796fda9f9c2d2826..f24ddc2e80ef21405159cfdbe93574a19585d11e 100644 (file)
@@ -3,8 +3,7 @@
 ; RUN: diff %t1.ll %t2.ll
 
 
-target endian = little
-target pointersize = 32
+target datalayout = "e-p:32:32"
 target triple = "proc-vend-sys"
 deplibs = [ "m", "c" ]
 
index c3dc6b23207ac79b594fc7cadfa3b1b07df077d1..f1be2aaaa7f1fa03f7eaf38c7a33ff49a3482740 100644 (file)
@@ -4,11 +4,11 @@
 
 implementation
 
-declare i31 "bar"(i31 %in) 
+declare i31 @"bar"(i31 %in) 
 
-define i31 "foo"(i31 %blah)
+define i31 @"foo"(i31 %blah)
 begin
-  %xx = call i31 %bar(i31 %blah)
+  %xx = call i31 @bar(i31 %blah)
   ret i31 %xx
 end
 
index 988869096445163a651fa28e0635f9c38ec184fe..5a0d1c7671e3ff3de69383090eb3363f85fabed2 100644 (file)
 
 %list = type { %list*, i36 }
 
-declare i8 *"malloc"(i32)
+declare i8 *@"malloc"(i32)
 
 ;;**********************
 implementation
 ;;**********************
 
-define void "InsertIntoListTail"(%list** %L, i36 %Data)
+define void @"InsertIntoListTail"(%list** %L, i36 %Data)
 begin
 bb1:
         %reg116 = load %list** %L                               ;;<%list*>
@@ -66,7 +66,7 @@ bb2:
 bb3:
         %reg119 = phi %list** [ %reg118, %bb2 ], [ %L, %bb1 ]   ;;<%list**>
         %cast1006 = bitcast %list** %reg119 to i8**             ;;<i8**>
-        %reg111 = call i8* %malloc(i32 16)                  ;;<i8*>
+        %reg111 = call i8* @malloc(i32 16)                  ;;<i8*>
         store i8* %reg111, i8** %cast1006                 ;;<void>
        %reg111 = ptrtoint i8* %reg111 to i64
        %reg1002 = add i64 %reg111, 8
@@ -79,7 +79,7 @@ bb3:
         ret void
 end
 
-define %list* "FindData"(%list* %L, i36 %Data)
+define %list* @"FindData"(%list* %L, i36 %Data)
 begin
 bb1:
         br label %bb2
index bb39ab1000684c070b01070f93f2d8a2b90cea9b..e7c675af4ad0a744d3bce30fa4cee06628790266 100644 (file)
@@ -6,24 +6,24 @@
 
 implementation
 
-define void "invoke"(%FunTy *%x)
+define void @"invoke"(%FunTy *%x)
 begin
        %foo = call %FunTy* %x(i31 123)
        ret void
 end
 
-define i31 "main"(i31 %argc, i8 **%argv, i8 **%envp)
+define i31 @"main"(i31 %argc, i8 **%argv, i8 **%envp)
 begin
-        %retval = call i31 (i31) *%test(i31 %argc)
+        %retval = call i31 (i31) *@test(i31 %argc)
         %two    = add i31 %retval, %retval
-       %retval2 = call i31 %test(i31 %argc)
+       %retval2 = call i31 @test(i31 %argc)
 
        %two2 = add i31 %two, %retval2
-       call void %invoke (%FunTy* %test)
+       call void @invoke (%FunTy* @test)
         ret i31 %two2
 end
 
-define i31 "test"(i31 %i0)
+define i31 @"test"(i31 %i0)
 begin
     ret i31 %i0
 end
index c020eae848d73142130ed2ea7c59171c6c8df53e..f82c8c95c81e02757aac83b1be3e8fd4c31d17e9 100644 (file)
@@ -6,7 +6,7 @@
 
 implementation
 
-define i19 "foo"(i19 %in) 
+define i19 @"foo"(i19 %in) 
 begin
 label: 
   ret i19 2
index a0d632ae5f18b52279c15cde0cb65a6d75084790..267c061959f402df4284dc238e29425f934c86ad 100644 (file)
@@ -8,7 +8,7 @@
 
 implementation
 
-define i33 %testfunction(i33 %i0, i33 %j0)
+define i33 @testfunction(i33 %i0, i33 %j0)
 begin
     alloca i8, i32 5
     %ptr = alloca i33                       ; yields {i33*}:ptr
index d4b643d340e483487673ab3fddcc9ae2a3abc560..2e0ec1898228f974c295560d5460f94f634d2b0a 100644 (file)
@@ -4,7 +4,7 @@
 
 implementation
 
-define i31 "simpleArith"(i31 %i0, i31 %j0)
+define i31 @"simpleArith"(i31 %i0, i31 %j0)
 begin
        %t1 = add i31 %i0, %j0
        %t2 = sub i31 %i0, %j0
index 1f4683cf54e02a359c855687a54ea88239f69a20..71cbf1310a2f46f613d70b517408fcd8ffc5b17a 100644 (file)
@@ -2,32 +2,32 @@
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 
-%somestr = constant [11x i8] c"hello world"
-%array   = constant [2 x i55] [ i55 12, i55 52 ]
+@somestr = constant [11x i8] c"hello world"
+@array   = constant [2 x i55] [ i55 12, i55 52 ]
            constant { i55, i55 } { i55 4, i55 3 }
 
 implementation
  
-define [2 x i55]* %testfunction(i55 %i0, i55 %j0)
+define [2 x i55]* @testfunction(i55 %i0, i55 %j0)
 begin
-       ret [2x i55]* %array
+       ret [2x i55]* @array
 end
 
-define  i8* %otherfunc(i55, double)
+define  i8* @otherfunc(i55, double)
 begin
-       %somestr = getelementptr [11x i8]* %somestr, i64 0, i64 0
+       %somestr = getelementptr [11x i8]* @somestr, i64 0, i64 0
        ret i8* %somestr
 end
 
-define i8* %yetanotherfunc(i55, double)
+define i8* @yetanotherfunc(i55, double)
 begin
        ret i8* null            ; Test null
 end
 
-define i55 %negativeUnsigned() {
+define i55 @negativeUnsigned() {
         ret i55 -1
 }
 
-define i55 %largeSigned() {
+define i55 @largeSigned() {
        ret i55 3900000000
 }
index 15ff49e7fc48f032fafbdfc736aaad8633afb506..4dc6d98306d0a13101c45d9fb83dc265687b7205 100644 (file)
@@ -4,7 +4,7 @@
 
 implementation
 
-define i31 "simpleIcmp"(i31 %i0, i31 %j0)
+define i31 @"simpleIcmp"(i31 %i0, i31 %j0)
 begin
        %t1 = icmp eq i31 %i0, %j0
        %t2 = icmp ne i31 %i0, %j0
index 62f6bf6505b1df64ecd05cf6bac50ef46502b754..cd8a9499a6c541d32f24c43f3adf8125b3820bcb 100644 (file)
@@ -4,7 +4,7 @@
 
 implementation
 
-define i31 "simpleAdd"(i31 %i0, i31 %j0)
+define i31 @"simpleAdd"(i31 %i0, i31 %j0)
 begin
        %t1 = xor i31 %i0, %j0
        %t2 = or i31 %i0, %j0
index 72675dea1d25cc0ffd4fbdc49e496572b176470b..41f5d0cac32f85a72f33d49d8af06efcbb940cd9 100644 (file)
@@ -4,7 +4,7 @@
 
 implementation
 
-define i31 "simpleAdd"(i31 %i0, i31 %j0)
+define i31 @"simpleAdd"(i31 %i0, i31 %j0)
 begin
        %t1 = xor i31 %i0, %j0
        %t2 = or i31 %i0, %j0
index 4ed16827131492dc26456aec3c017e17f43d2ef5..fe0465c659cbffdcb311fa715b690734ac78f64f 100644 (file)
@@ -8,13 +8,13 @@
 
 implementation
 
-define i31 "main"()
+define i31 @"main"()
 begin
-  call i31 %testfunction(i64 0, i64 1)
+  call i31 @testfunction(i64 0, i64 1)
   ret i31 0
 end
 
-define i31 "testfunction"(i64 %i0, i64 %j0)
+define i31 @"testfunction"(i64 %i0, i64 %j0)
 begin
     %array0 = malloc [4 x i9]            ; yields {[4 x i9]*}:array0
     %size   = add i32 2, 2                 ; yields {i31}:size = i31 %4
index f9c79d6b5dda16da8f6a64f4345fa26d95de69d7..0ea2ac97b31884c9686a21d2d7a70143b28b90e2 100644 (file)
@@ -6,7 +6,7 @@
 
 implementation
 
-define i35 "squared"(%i35 %i0)
+define i35 @"squared"(%i35 %i0)
 begin
        switch i35 %i0, label %Default [ 
                i35 1, label %Case1
index bd2b72b3dc45c4e3ce5116f5334c983278665ed4..d62e270dcafc251ec81b452a09f5d9b2fc6e70cd 100644 (file)
@@ -4,11 +4,11 @@
 
 implementation
 
-declare i31 "printf"(i8*, ...)   ;; Prototype for: i32 __builtin_printf(const char*, ...)
+declare i31 @"printf"(i8*, ...)   ;; Prototype for: i32 __builtin_printf(const char*, ...)
 
-define i31 "testvarar"()
+define i31 @"testvarar"()
 begin
-       call i31(i8*, ...) *%printf(i8 * null, i31 12, i8 42);
+       call i31(i8*, ...) *@printf(i8 * null, i31 12, i8 42);
        ret i31 %0
 end
 
index 94f51905cda11041418cc79ce1f9654d3342db47..a1fb61aca65204f3a9660e17323595424c0d6f12 100644 (file)
@@ -3,17 +3,17 @@
 ; RUN: diff %t1.ll %t2.ll
 
 
-%X = global i31 undef
+@X = global i31 undef
 
 implementation
 
-declare i32 "atoi"(i8 *)
+declare i32 @"atoi"(i8 *)
 
-define i63 %test() {
+define i63 @test() {
        ret i63 undef
 }
 
-define i31 %test2() {
+define i31 @test2() {
        %X = add i31 undef, 1
        ret i31 %X
 }
index 1ab4e8e47adbce713d5e3eda4a5751bd94a21595..60b7bf8eb92c734c8fc4f5057019b4f439c85de2 100644 (file)
@@ -5,13 +5,13 @@
 
 implementation
 
-declare void %bar()
+declare void @bar()
 
-define i9 %foo() {  ;; Calling this function has undefined behavior
+define i9 @foo() {  ;; Calling this function has undefined behavior
        unreachable
 }
 
-define double %xyz() {
-       call void %bar()
+define double @xyz() {
+       call void @bar()
        unreachable          ;; Bar must not return.
 }
index 0cc4d43606568a784b2a1d730cea5b4cf49ab2f3..36f96a3494f5a9a9933271d5774a94c821ea7f0f 100644 (file)
@@ -6,19 +6,19 @@
 ; the va_arg instruction.
 
 implementation
-declare void %llvm.va_start(i8** %ap)
-declare void %llvm.va_copy(i8** %aq, i8** %ap)
-declare void %llvm.va_end(i8** %ap)
+declare void @llvm.va_start(i8** %ap)
+declare void @llvm.va_copy(i8** %aq, i8** %ap)
+declare void @llvm.va_end(i8** %ap)
 
-define i33 %test(i33 %X, ...) {
+define i33 @test(i33 %X, ...) {
         %ap = alloca i8*
-       call void %llvm.va_start(i8** %ap)
+       call void @llvm.va_start(i8** %ap)
        %tmp = va_arg i8** %ap, i33 
 
         %aq = alloca i8*
-       call void %llvm.va_copy(i8** %aq, i8** %ap)
-       call void %llvm.va_end(i8** %aq)
+       call void @llvm.va_copy(i8** %aq, i8** %ap)
+       call void @llvm.va_end(i8** %aq)
        
-       call void %llvm.va_end(i8** %ap)
+       call void @llvm.va_end(i8** %ap)
        ret i33 %tmp
 }
index f420ec13cdcebdb717963a31f2b64223cbdb3b6a..baa055ede9a1c7c203ca7487ec76722afc5eb0ca 100644 (file)
@@ -6,28 +6,28 @@
 ; the va_arg instruction.
 
 implementation   ; Functions:
-declare void %llvm.va_start(i8**)
-declare void %llvm.va_copy(i8**, i8*)
-declare void %llvm.va_end(i8**)
+declare void @llvm.va_start(i8**)
+declare void @llvm.va_copy(i8**, i8*)
+declare void @llvm.va_end(i8**)
 
-define i31 %test(i31 %X, ...) {
+define i31 @test(i31 %X, ...) {
         ; Allocate two va_list items.  On this target, va_list is of type i8*
         %ap = alloca i8*             ; <i8**> [#uses=4]
         %aq = alloca i8*             ; <i8**> [#uses=2]
 
         ; Initialize variable argument processing
-        call void %llvm.va_start(i8** %ap)
+        call void @llvm.va_start(i8** %ap)
 
         ; Read a single integer argument
         %tmp = va_arg i8** %ap, i31           ; <i31> [#uses=1]
 
         ; Demonstrate usage of llvm.va_copy and llvm_va_end
         %apv = load i8** %ap         ; <i8*> [#uses=1]
-        call void %llvm.va_copy(i8** %aq, i8* %apv)
-        call void %llvm.va_end(i8** %aq)
+        call void @llvm.va_copy(i8** %aq, i8* %apv)
+        call void @llvm.va_end(i8** %aq)
 
         ; Stop processing of arguments.
-        call void %llvm.va_end(i8** %ap)
+        call void @llvm.va_end(i8** %ap)
         ret i31 %tmp
 
 }
index 724a2a88b0c5d9933d69be9604a0a1358c6d6d6c..3e4c50c03d213f05b097615cbadb9dc72e57a130 100644 (file)
@@ -4,7 +4,7 @@
 ; RUN: echo "implementation internal int %foo() { ret int 7 }" | llvm-upgrade |\
 ; RUN:    llvm-as > %t.1.bc
 ; RUN: llvm-upgrade < %s | llvm-as -o %t.2.bc -f
-; RUN: llvm-link %t.[12].bc | llvm-dis | grep '%foo()' | grep -v internal
+; RUN: llvm-link %t.[12].bc | llvm-dis | grep '@foo()' | grep -v internal
 
 implementation
 int %foo() { ret int 0 }
index 79d9fa426f6d83bf28e8e75003dee3e07b394b63..07af9697c77bea6c51e35da1536f6e05c31e4b76 100644 (file)
@@ -5,7 +5,7 @@
 ; own.
 
 ; RUN: llvm-upgrade %s | llvm-as > %t.out2.bc
-; RUN: echo "%T1 = type opaque  %GVar = external global %T1*" | llvm-as > %t.out1.bc
+; RUN: echo "%T1 = type opaque  @GVar = external global %T1*" | llvm-as > %t.out1.bc
 ; RUN: llvm-link %t.out[12].bc
 
        %T1 = type opaque
index 7aeffdf22b59b53324604c61e9845dcf413c288b..4c94f54101715f7d18e41c171b13d3a2b9eb8346 100644 (file)
@@ -1,9 +1,9 @@
-; RUN: echo "%G = appending global [0 x int] zeroinitializer" | llvm-upgrade |\
+; RUN: echo "@G = appending global [0 x i32] zeroinitializer" | \
 ; RUN:   llvm-as > %t.out2.bc
 ; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc
-; RUN: llvm-link %t.out[12].bc | llvm-dis | grep '%G ='
+; RUN: llvm-link %t.out[12].bc | llvm-dis | grep '@G ='
 
 ; When linked, the globals should be merged, and the result should still 
-; be named '%G'.
+; be named '@G'.
 
 %G = appending global [1 x int] zeroinitializer
index e17e9d740f77292b6fac77db17945992cb018ad8..427227aeb3e584c70edce206a732643a6767215c 100644 (file)
@@ -1,17 +1,17 @@
 ; Test that: extern int X[]  and int X[] = { 1, 2, 3, 4 } are resolved 
 ; correctly.
 ;
-; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | not grep external
+; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep external
 
-%X = external global [0 x int]
-%X = global [4 x int] [ int 1, int 2, int 3, int 4 ]
+@X = external global [0 x int]
+@X = global [4 x int] [ int 1, int 2, int 3, int 4 ]
 
 implementation   ; Functions:
 
-int %foo(int %x) {
+int @foo(int %x) {
 bb1:                                    ;[#uses=0]
-       store int 5, int* getelementptr ([0 x int]* %X, long 0, long 2)
-       %F = getelementptr [0 x int]* %X, long 0, long 2
+       store int 5, int* getelementptr ([0 x int]* @X, long 0, long 2)
+       %F = getelementptr [0 x int]* @X, long 0, long 2
        %val = load int* %F
         ret int %val
 }
index e9c1d8ce7adf963efeff2139e61994b3f8811f77..188fc95b12d15cb92fe7402484990a2faa586ce1 100644 (file)
@@ -1,19 +1,19 @@
 ; Test that: extern int X[]  and int X[] = { 1, 2, 3, 4 } are resolved 
 ; correctly.  This doesn't have constantexprs
 ;
-; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | not grep external
+; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep external
 ;
 
-%X = external global [0 x int]
-%X = global [4 x int] [ int 1, int 2, int 3, int 4 ]
+@X = external global [0 x int]
+@X = global [4 x int] [ int 1, int 2, int 3, int 4 ]
 
 implementation   ; Functions:
 
 int %foo(int %x) {
 bb1:                                    ;[#uses=0]
-       %G = getelementptr [0 x int]* %X, long 0, long 1
+       %G = getelementptr [0 x int]* @X, long 0, long 1
        store int 5, int* %G
-       %F = getelementptr [0 x int]* %X, long 0, long 2
+       %F = getelementptr [0 x int]* @X, long 0, long 2
        %val = load int* %F
         ret int %val
 }
index 0865f0d923029a6925b85cbc2cefcd1d7a8cc048..df5340f46a2f1df09fb92fbc56c5f05701cf2b29 100644 (file)
@@ -1,14 +1,12 @@
 ; This tests a hack put into place specifically for the C++ libstdc++ library.
 ; It uses an ugly hack which is cleaned up by the funcresolve pass.
+;
+; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | grep @X | grep '{'
 
-; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | grep %X | grep '{'
+@X = external global { i32 }
+@X = global [ 4 x i8 ] zeroinitializer
 
-%X = external global { int }
-%X = global [ 4 x sbyte ] zeroinitializer
-
-implementation
-
-int* %test() {
-  %P = getelementptr {int}* %X, long 0, uint 0
-  ret int* %P
+define i32* @test() {
+  %P = getelementptr {i32}* @X, i64 0, i32 0
+  ret i32* %P
 }
index 4c45e7208cd3d036c22bb1d14c3ddbdd398f5467..ff41163ce7aeb7f25c7f16acab88a3d8e62e3192 100644 (file)
@@ -1,6 +1,6 @@
 ; Weak variables should be preserved by global DCE!
 
-; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | grep %A
+; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | grep @A
 
 
 %A = weak global int 54
index 5340feed387ed79d54ba796828b3d057602252ba..688cf1a49adb6abb1bbd4d0cbe298815361bc8ac 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | grep 'call void %Actual'
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | grep 'call void @Actual'
 
 ; Check that a comparison does not prevent an indirect call from being made 
 ; direct.  The global will still remain, but indirect call elim is still good.
index 727572278306cd487f9bd16aacafaacb7bf5d845..7f79091321deb5dac04b12838f30bd07585df992 100644 (file)
@@ -3,15 +3,13 @@
 ; PR1015
 
 target datalayout = "e-p:32:32"
-target endian = little
-target pointersize = 32
 target triple = "i686-apple-darwin8"
-%foo = internal constant [5 x i8] c"\00abc\00"         ; <[5 x i8]*> [#uses=1]
-%str = internal constant [4 x i8] c"%d\0A\00"          ; <[4 x i8]*> [#uses=1]
+@foo = internal constant [5 x i8] c"\00abc\00"         ; <[5 x i8]*> [#uses=1]
+@str = internal constant [4 x i8] c"%d\0A\00"          ; <[4 x i8]*> [#uses=1]
 
 implementation   ; Functions:
 
-define i32 %test(i32 %J) {
+define i32 @test(i32 %J) {
 entry:
        br label %bb2
 
@@ -28,7 +26,7 @@ cond_true:            ; preds = %bb2
        br label %bb
 
 cond_next:             ; preds = %bb2
-       %tmp = getelementptr [5 x i8]* %foo, i32 0, i32 %i.0            ; <i8*> [#uses=1]
+       %tmp = getelementptr [5 x i8]* @foo, i32 0, i32 %i.0            ; <i8*> [#uses=1]
        %tmp = load i8* %tmp            ; <i8> [#uses=1]
        %tmp5 = icmp eq i8 %tmp, 0              ; <i1> [#uses=1]
        br i1 %tmp5, label %bb6, label %bb
index 028e81f61cbd5fd696ae9322e755a6207b747d85..a80d6d9d5e341f7e65106cdeebbd1ed400b15689 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-as < %s | llc -march=x86-64 | grep '(%rdi,%rax,8)' &&
 ; RUN: llvm-as < %s | llc -march=x86-64 | not grep 'addq.*8'
 
-define void %foo(double* %y) {
+define void @foo(double* %y) {
 entry:
         br label %bb
 
index 0add14bf24d0a11d2e7d9d0e70029830d26b9b7b..a5ee87b9efbbdb9a067c021a1d09abd9b465fe95 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep zext
 ; PR1107
 
-define i1 %test(i8 %A, i8 %B) {
+define i1 @test(i8 %A, i8 %B) {
        %a = zext i8 %A to i32
        %b = zext i8 %B to i32
        %c = icmp sgt i32 %a, %b
index 3b34a7db9dc32eef16e790049e013da339e44aca..6d27d4544d3a692c6e206799d4fc43e5915cc5c7 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'fcmp uno.*0.0'
 ; PR1111
-define i1 %test(double %X) {
-%tmp = fcmp une double %X, %X
+define i1 @test(double %X) {
+  %tmp = fcmp une double %X, %X
   ret i1 %tmp
 }
index 0aa2022829955a59134ecd378291ddc769c1045f..83d05d9d94f764adf6d882b0c1a85e861a4b9108 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llvm-as < %s | opt -instcombine -disable-output
 
-define <4 x i32> %test(<4 x i32> %A) {
+define <4 x i32> @test(<4 x i32> %A) {
     %B = xor <4 x i32> %A, < i32 -1, i32 -1, i32 -1, i32 -1 > 
     %C = and <4 x i32> %B, < i32 -1, i32 -1, i32 -1, i32 -1 >
     ret <4 x i32> %C
index 9f509b6fbc0ac763e1c960adf1390130f5997521..7ff71c86b7db783ff57a36be6652f9171ec0e501 100644 (file)
@@ -1,4 +1,5 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast
+target endian = little
 target pointersize = 32
 
 int *%test(int *%P) {
index ec3aea3c877fecdd7f41595bb7de00f8c8269435..033743c64f3aff07a64151ab422910bae18c0f69 100644 (file)
@@ -241,9 +241,9 @@ ubyte %test34(ubyte %A) {
         ret ubyte %C
 }
 
-i32 %test34(i32 %a) {  ;; -> -1
-        %tmpnot = xor i32 %a, -1
-        %tmp2 = add i32 %tmpnot, %a
-        ret i32 %tmp2
+int %test34(int %a) {  ;; -> -1
+        %tmpnot = xor int %a, -1
+        %tmp2 = add int %tmpnot, %a
+        ret int %tmp2
 }
 
index 2458bf3ea4423a07fd6acfc1b87cebdf03ba4aa2..e863197a98e167030c91dd09917152a51cc42ce7 100644 (file)
@@ -1,6 +1,11 @@
 ; test that casted mallocs get converted to malloc of the right type
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep bitcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN:    not grep bitcast
 
+; The target datalayout is important for this test case. We have to tell 
+; instcombine that the ABI alignment for a long is 4-bytes, not 8, otherwise
+; it won't do the transform.
+target datalayout = "e-l:32:64"
 int* %test(uint %size) {
        %X = malloc long, uint %size
         %ret = bitcast long* %X to int*
index be38da97e1da467c7fdc55d310678715b5025d76..5d9cab929af82b098ff905d584617eff404cd90d 100644 (file)
@@ -2,7 +2,7 @@
 ;
 
 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
-; RUN:   grep -v 'sub i32 %Cok.s, %Bok.s' | not grep sub
+; RUN:   grep -v 'sub i32 %Cok, %Bok' | not grep sub
 
 implementation
 
index e90d3bef6197fb020ab641bac1e8a3ef1f92cb50..a8c83afe73c491a342f02a21895898a1475f6e8e 100644 (file)
@@ -5,36 +5,36 @@
 
 implementation
 
-define %T %test1(%T %v1) {
+define %T @test1(%T %v1) {
   %v2 = shufflevector %T %v1, %T undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
   ret %T %v2
 }
 
-define %T %test2(%T %v1) {
+define %T @test2(%T %v1) {
   %v2 = shufflevector %T %v1, %T %v1, <4 x i32> <i32 0, i32 5, i32 2, i32 7>
   ret %T %v2
 }
 
-define float %test3(%T %A, %T %B, float %f) {
+define float @test3(%T %A, %T %B, float %f) {
         %C = insertelement %T %A, float %f, i32 0
         %D = shufflevector %T %C, %T %B, <4 x i32> <i32 5, i32 0, i32 2, i32 7>
         %E = extractelement %T %D, i32 1
         ret float %E
 }
 
-define i32 %test4(<4 x i32> %X) {
+define i32 @test4(<4 x i32> %X) {
         %tmp152.i53899.i = shufflevector <4 x i32> %X, <4 x i32> undef, <4 x i32> zeroinitializer
         %tmp34 = extractelement <4 x i32> %tmp152.i53899.i, i32 0
         ret i32 %tmp34
 }
 
-define i32 %test5(<4 x i32> %X) {
+define i32 @test5(<4 x i32> %X) {
         %tmp152.i53899.i = shufflevector <4 x i32> %X, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 undef, i32 undef>
         %tmp34 = extractelement <4 x i32> %tmp152.i53899.i, i32 0
         ret i32 %tmp34
 }
 
-define float %test6(<4 x float> %X) {
+define float @test6(<4 x float> %X) {
         %X = bitcast <4 x float> %X to <4 x i32>
         %tmp152.i53899.i = shufflevector <4 x i32> %X, <4 x i32> undef, <4 x i32> zeroinitializer
         %tmp152.i53900.i = bitcast <4 x i32> %tmp152.i53899.i to <4 x float>
@@ -42,7 +42,7 @@ define float %test6(<4 x float> %X) {
         ret float %tmp34
 }
 
-define <4 x float> %test7(<4 x float> %tmp45.i) {
+define <4 x float> @test7(<4 x float> %tmp45.i) {
         %tmp1642.i = shufflevector <4 x float> %tmp45.i, <4 x float> undef, <4 x i32> < i32 0, i32 1, i32 6, i32 7 >
         ret <4 x float> %tmp1642.i
 }
index f87e53a92271ed7d96d0ad5c829f1bbeff877647..b6c923d5b46be222b9e5d97766f2880d60e8f2b0 100644 (file)
@@ -182,11 +182,11 @@ int %test26(int %a, int %b) {
 }
 
 
-i32 %test27(i32 %b, i32 %c, i32 %d) {
-        %tmp2 = xor i32 %d, %b
-        %tmp5 = xor i32 %d, %c
-        %tmp = icmp eq i32 %tmp2, %tmp5
-        %tmp6 = zext bool %tmp to i32
-        ret i32 %tmp6
+int %test27(int %b, int %c, int %d) {
+        %tmp2 = xor int %d, %b
+        %tmp5 = xor int %d, %c
+        %tmp = icmp eq int %tmp2, %tmp5
+        %tmp6 = zext bool %tmp to int
+        ret int %tmp6
 }
 
index e171f3aacb08fc79e51541c97b01fdb4e902650b..a863d55d4c5068421255965c92e805e6781bee8e 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
-; RUN:   grep 'and i32 %Y.s, 8'
+; RUN:   grep 'and i32 %Y, 8'
 
 int %test1(ubyte %X) {
         %Y = cast ubyte %X to int
index 21ca2b1693975b6bbef5424eead66a9a41b8daee..ffbe6fb4254e8b68eed175fa0e232538e60f84aa 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \
-; RUN:   grep "%SJE.0.0.pntr.s1.u1.lcssa = phi .struct.SetJmpMapEntry" &&
+; RUN:   grep "%SJE.0.0.lcssa = phi .struct.SetJmpMapEntry" &&
 ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \
-; RUN:   grep "%SJE.0.0.pntr.s1.u1.lcssa1 = phi .struct.SetJmpMapEntry"
+; RUN:   grep "%SJE.0.0.lcssa1 = phi .struct.SetJmpMapEntry"
 
 %struct.SetJmpMapEntry = type { sbyte*, uint, %struct.SetJmpMapEntry* }
 
index e88660a1fb9d158889a90beeb7ba40fda0981cc0..3647008e3a5d8eb294e0db827b9de4cd882dced8 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \
-; RUN:    grep "%X.1.s.lcssa" &&
+; RUN:    grep "%X.1.lcssa" &&
 ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \
-; RUN:    not grep "%X.1.s.lcssa1"
+; RUN:    not grep "%X.1.lcssa1"
 
 declare bool %c1()
 declare bool %c2()
index 92f754a157cfc9afec34e24db452def86838f46b..1dc69a6b11a3cac6c9b2aa26a0166818486f438f 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \
-; RUN:   grep "X3.s.lcssa = phi i32" &&
+; RUN:   grep "X3.lcssa = phi i32" &&
 ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \
-; RUN:   grep "%X4.s = add i32 3, %X3.s.lcssa"
+; RUN:   grep "X4 = add i32 3, %X3.lcssa"
 
 void %lcssa(bool %S2) {
 entry:
index d26b0570d3c0a496fea6bd595885b0af8d0c1d73..182575f2cf13b448b56c838212867f19321f4b6e 100644 (file)
@@ -2,6 +2,8 @@
 ; LevelRaise should eliminate all cast instructions from this testcase.
 ;
 ; XFAIL: *
+; RUN: llvm-upgrade < %s &&
+; RUN: llvm-upgrade < %s | llvm-as > /dev/null &&
 ; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | notcast
 
        %Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
index 20aa7a8dca3112e80a533c5d73a50123d1335522..d50b7c573f58fec27c5f1120a44feb65d36895cc 100644 (file)
@@ -1,5 +1,8 @@
 ; Test that the StrCatOptimizer works correctly
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strlen'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
+; RUN:    not grep 'call.*strlen'
+
+target datalayout = "e-p:32:32"
 
 declare uint %strlen(sbyte*)
 %hello      = constant [6 x sbyte] c"hello\00"
index 6ddb1b708481ff042dd9eb130dd4063904e178c5..2a4cdcef76075801c109bc2c2ebb5935f90ccdba 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | grep 'call i32 %foo'
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | \
+; RUN:    grep 'call i32 @foo'
 
 declare void %bar(int*)
 int %foo(uint %N) {
index 8125960ec244ff60aabadc5b5156f9f5eb547d7d..d8bd855dfe44f6585dc4d630d3d3df8fe9a10373 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | %prcontext alloca 1 | grep 'i32 %foo'
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | \
+; RUN:    %prcontext alloca 1 | grep 'i32 @foo'
 
 declare void %bar(int*)
 int %foo() {
index 6fb574e561813b22d1db0542324014656a39132a..01e762ef516231fed68db52eed4a8351e3396357 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | grep 'tail call void %foo'
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | grep 'tail call void @foo'
 
 declare void %foo()
 
index 40bd2e83b0ba9fca04b2e9f91e7f919d105fe952..fb9acf19e07bcc386e85ad28a945cb039f13e2bd 100644 (file)
@@ -1,9 +1,10 @@
-; RUN: llvm-upgrade %s | not llvm-as -o /dev/null -f &&
-; RUN: llvm-upgrade %s | llvm-as -o /dev/null -f 2>&1 | grep 'Cannot form'
+; RUN: not llvm-as 2>&1 < %s > /dev/null &&
+; RUN: llvm-as 2>&1 < %s > /dev/null | \
+; RUN:    grep 'Cannot form a pointer to a basic block'
 
-int %main() {
-         %foo  = call sbyte* %llvm.stacksave()
-         %foop = cast sbyte* %foo to label*
+define i32 @main() {
+         %foo  = call i8* %llvm.stacksave()
+         %foop = bitcast i8* %foo to label*
          %nret = load label* %foop
          br label %nret;
 }