aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNowar Gu <nowar100@gmail.com>2011-06-23 11:08:11 +0800
committerNowar Gu <nowar100@gmail.com>2011-06-23 11:09:52 +0800
commitbb5c18c80e7ae4ce49eb9067b664f0559ec50965 (patch)
tree4f610e4e03d1c14658e597ce789cb0244fd9f4f8 /test
parent71fea9a88608e9c8fe8a8a523367878e279c3e90 (diff)
parent2fa82bc3da45d272f12a96a61074b637faa62e0b (diff)
downloadexternal_llvm-bb5c18c80e7ae4ce49eb9067b664f0559ec50965.zip
external_llvm-bb5c18c80e7ae4ce49eb9067b664f0559ec50965.tar.gz
external_llvm-bb5c18c80e7ae4ce49eb9067b664f0559ec50965.tar.bz2
Merge upstream to r133679 at Thu. 23th Jun 2011.
Diffstat (limited to 'test')
-rw-r--r--test/Analysis/BasicAA/2004-12-08-BasicAACrash.ll22
-rw-r--r--test/Analysis/BasicAA/2004-12-08-BasicAACrash2.ll20
-rw-r--r--test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll6
-rw-r--r--test/Analysis/BasicAA/modref.ll24
-rw-r--r--test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll2
-rw-r--r--test/Analysis/ScalarEvolution/avoid-infinite-recursion-1.ll52
-rw-r--r--test/Analysis/ScalarEvolution/avoid-smax-1.ll13
-rw-r--r--test/Analysis/ScalarEvolution/pr3909.ll4
-rw-r--r--test/Analysis/ScalarEvolution/trip-count.ll1
-rw-r--r--test/Analysis/ScalarEvolution/trip-count2.ll1
-rw-r--r--test/Analysis/ScalarEvolution/trip-count3.ll86
-rw-r--r--test/Assembler/2002-04-04-PureVirtMethCall.ll6
-rw-r--r--test/Assembler/2002-04-04-PureVirtMethCall2.ll5
-rw-r--r--test/Assembler/2002-07-14-InternalLossage.ll9
-rw-r--r--test/Assembler/2002-10-15-NameClash.ll7
-rw-r--r--test/Assembler/2008-02-20-MultipleReturnValue.ll22
-rw-r--r--test/Assembler/2009-02-28-CastOpc.ll3
-rw-r--r--test/Assembler/AutoUpgradeIntrinsics.ll85
-rw-r--r--test/Assembler/AutoUpgradeMMXIntrinsics.ll223
-rw-r--r--test/Assembler/private.ll9
-rw-r--r--test/Bitcode/AutoUpgradeIntrinsics.ll8
-rw-r--r--test/Bitcode/AutoUpgradeIntrinsics.ll.bcbin800 -> 0 bytes
-rw-r--r--test/Bitcode/memcpy.ll23
-rw-r--r--test/Bitcode/metadata-2.ll6
-rw-r--r--test/Bitcode/neon-intrinsics.ll206
-rw-r--r--test/Bitcode/neon-intrinsics.ll.bcbin5764 -> 0 bytes
-rw-r--r--test/Bitcode/sse2_loadl_pd.ll3
-rw-r--r--test/Bitcode/sse2_loadl_pd.ll.bcbin532 -> 0 bytes
-rw-r--r--test/Bitcode/sse2_movl_dq.ll3
-rw-r--r--test/Bitcode/sse2_movl_dq.ll.bcbin480 -> 0 bytes
-rw-r--r--test/Bitcode/sse2_movs_d.ll3
-rw-r--r--test/Bitcode/sse2_movs_d.ll.bcbin476 -> 0 bytes
-rw-r--r--test/Bitcode/sse2_punpck_qdq.ll4
-rw-r--r--test/Bitcode/sse2_punpck_qdq.ll.bcbin576 -> 0 bytes
-rw-r--r--test/Bitcode/sse2_shuf_pd.ll3
-rw-r--r--test/Bitcode/sse2_shuf_pd.ll.bcbin584 -> 0 bytes
-rw-r--r--test/Bitcode/sse2_unpck_pd.ll4
-rw-r--r--test/Bitcode/sse2_unpck_pd.ll.bcbin572 -> 0 bytes
-rw-r--r--test/Bitcode/sse41_pmulld.ll3
-rw-r--r--test/Bitcode/sse41_pmulld.ll.bcbin560 -> 0 bytes
-rw-r--r--test/CMakeLists.txt9
-rw-r--r--test/CodeGen/ARM/2007-05-07-jumptoentry.ll58
-rw-r--r--test/CodeGen/ARM/2007-05-07-tailmerge-1.ll1
-rw-r--r--test/CodeGen/ARM/2007-05-09-tailmerge-2.ll1
-rw-r--r--test/CodeGen/ARM/2007-05-22-tailmerge-3.ll1
-rw-r--r--test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll237
-rw-r--r--test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll5
-rw-r--r--test/CodeGen/ARM/2009-03-07-SpillerBug.ll121
-rw-r--r--test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll77
-rw-r--r--test/CodeGen/ARM/2009-08-31-LSDA-Name.ll74
-rw-r--r--test/CodeGen/ARM/constants.ll15
-rw-r--r--test/CodeGen/ARM/debug-info-blocks.ll245
-rw-r--r--test/CodeGen/ARM/dyn-stackalloc.ll72
-rw-r--r--test/CodeGen/ARM/memcpy-inline.ll7
-rw-r--r--test/CodeGen/ARM/memfunc.ll15
-rw-r--r--test/CodeGen/ARM/private.ll2
-rw-r--r--test/CodeGen/ARM/rev.ll57
-rw-r--r--test/CodeGen/ARM/vargs_align.ll1
-rw-r--r--test/CodeGen/ARM/vqdmul.ll1
-rw-r--r--test/CodeGen/Alpha/private.ll2
-rw-r--r--test/CodeGen/Blackfin/add-overflow.ll2
-rw-r--r--test/CodeGen/Blackfin/many-args.ll2
-rw-r--r--test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll19
-rw-r--r--test/CodeGen/CBackend/2011-06-08-addWithOverflow.ll35
-rw-r--r--test/CodeGen/CBackend/X86/2008-06-04-IndirectMem.ll (renamed from test/CodeGen/CBackend/2008-06-04-IndirectMem.ll)0
-rw-r--r--test/CodeGen/CBackend/X86/dg.exp5
-rw-r--r--test/CodeGen/CellSPU/private.ll3
-rw-r--r--test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll11
-rw-r--r--test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll12
-rw-r--r--test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll157
-rw-r--r--test/CodeGen/Generic/getresult-undef.ll6
-rw-r--r--test/CodeGen/Generic/invalid-memcpy.ll14
-rw-r--r--test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll4
-rw-r--r--test/CodeGen/Mips/alloca.ll81
-rw-r--r--test/CodeGen/Mips/inlineasmmemop.ll23
-rw-r--r--test/CodeGen/Mips/private.ll2
-rw-r--r--test/CodeGen/PTX/add.ll8
-rw-r--r--test/CodeGen/PTX/cvt.ll100
-rw-r--r--test/CodeGen/PTX/fdiv-sm10.ll2
-rw-r--r--test/CodeGen/PTX/fdiv-sm13.ll2
-rw-r--r--test/CodeGen/PTX/mul.ll8
-rw-r--r--test/CodeGen/PTX/options.ll2
-rw-r--r--test/CodeGen/PTX/setp.ll102
-rw-r--r--test/CodeGen/PTX/sub.ll8
-rw-r--r--test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll1
-rw-r--r--test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll1
-rw-r--r--test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll14
-rw-r--r--test/CodeGen/PowerPC/2009-11-15-ReMatBug.ll155
-rw-r--r--test/CodeGen/PowerPC/atomic-1.ll26
-rw-r--r--test/CodeGen/PowerPC/atomic-2.ll26
-rw-r--r--test/CodeGen/PowerPC/invalid-memcpy.ll20
-rw-r--r--test/CodeGen/PowerPC/multiple-return-values.ll17
-rw-r--r--test/CodeGen/PowerPC/ppc64-32bit-addic.ll29
-rw-r--r--test/CodeGen/PowerPC/ppc64-crash.ll14
-rw-r--r--test/CodeGen/SPARC/private.ll2
-rw-r--r--test/CodeGen/Thumb/dyn-stackalloc.ll4
-rw-r--r--test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll10
-rw-r--r--test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll10
-rw-r--r--test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll12
-rw-r--r--test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll5
-rw-r--r--test/CodeGen/Thumb2/ldr-str-imm12.ll2
-rw-r--r--test/CodeGen/X86/2004-02-12-Memcpy.ll25
-rw-r--r--test/CodeGen/X86/2006-11-28-Memcpy.ll34
-rw-r--r--test/CodeGen/X86/2007-03-16-InlineAsm.ll1
-rw-r--r--test/CodeGen/X86/2007-05-05-Personality.ll40
-rw-r--r--test/CodeGen/X86/2007-06-05-LSR-Dominator.ll129
-rw-r--r--test/CodeGen/X86/2007-10-15-CoalescerCrash.ll2
-rw-r--r--test/CodeGen/X86/2008-06-04-MemCpyLoweringBug.ll19
-rw-r--r--test/CodeGen/X86/2008-10-27-StackRealignment.ll8
-rw-r--r--test/CodeGen/X86/2009-01-25-NoSSE.ll16
-rw-r--r--test/CodeGen/X86/2009-04-09-InlineAsmCrash.ll165
-rw-r--r--test/CodeGen/X86/2009-04-12-FastIselOverflowCrash.ll2
-rw-r--r--test/CodeGen/X86/2009-04-13-2AddrAssert-2.ll2
-rw-r--r--test/CodeGen/X86/2009-04-27-LiveIntervalsBug.ll165
-rw-r--r--test/CodeGen/X86/2009-04-29-LinearScanBug.ll54
-rw-r--r--test/CodeGen/X86/2009-04-29-RegAllocAssert.ll6
-rw-r--r--test/CodeGen/X86/2009-06-04-VirtualLiveIn.ll8
-rw-r--r--test/CodeGen/X86/2009-08-06-branchfolder-crash.ll2
-rw-r--r--test/CodeGen/X86/2009-08-14-Win64MemoryIndirectArg.ll4
-rw-r--r--test/CodeGen/X86/2009-09-19-earlyclobber.ll2
-rw-r--r--test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll4
-rw-r--r--test/CodeGen/X86/2011-06-14-PreschedRegalias.ll2
-rw-r--r--test/CodeGen/X86/bswap.ll38
-rw-r--r--test/CodeGen/X86/coalescer-cross.ll4
-rw-r--r--test/CodeGen/X86/darwin-bzero.ll4
-rw-r--r--test/CodeGen/X86/fast-isel-bail.ll2
-rw-r--r--test/CodeGen/X86/fold-sext-trunc.ll2
-rw-r--r--test/CodeGen/X86/fp-stack-2results.ll22
-rw-r--r--test/CodeGen/X86/inline-asm-mrv.ll10
-rw-r--r--test/CodeGen/X86/inline-asm-q-regs.ll2
-rw-r--r--test/CodeGen/X86/mem-promote-integers.ll391
-rw-r--r--test/CodeGen/X86/memcpy-2.ll10
-rw-r--r--test/CodeGen/X86/memmove-4.ll12
-rw-r--r--test/CodeGen/X86/memset-2.ll4
-rw-r--r--test/CodeGen/X86/memset-3.ll4
-rw-r--r--test/CodeGen/X86/memset.ll4
-rw-r--r--test/CodeGen/X86/memset64-on-x86-32.ll7
-rw-r--r--test/CodeGen/X86/mmx-shuffle.ll8
-rw-r--r--test/CodeGen/X86/muloti.ll81
-rw-r--r--test/CodeGen/X86/multiple-return-values-cross-block.ll4
-rw-r--r--test/CodeGen/X86/multiple-return-values.ll16
-rw-r--r--test/CodeGen/X86/optimize-max-0.ll888
-rw-r--r--test/CodeGen/X86/personality.ll41
-rw-r--r--test/CodeGen/X86/pre-split2.ll26
-rw-r--r--test/CodeGen/X86/pre-split3.ll26
-rw-r--r--test/CodeGen/X86/private.ll2
-rw-r--r--test/CodeGen/X86/promote-trunc.ll11
-rw-r--r--test/CodeGen/X86/sibcall.ll2
-rw-r--r--test/CodeGen/X86/tail-dup-addr.ll28
-rw-r--r--test/CodeGen/X86/unaligned-load.ll19
-rw-r--r--test/CodeGen/X86/variable-sized-darwin-bzero.ll6
-rw-r--r--test/CodeGen/XCore/private.ll2
-rw-r--r--test/DebugInfo/X86/earlydup-crash.ll85
-rw-r--r--test/Feature/calltest.ll2
-rw-r--r--test/Feature/forwardreftest.ll6
-rw-r--r--test/Feature/globalredefinition.ll18
-rw-r--r--test/Feature/opaquetypes.ll7
-rw-r--r--test/Feature/paramattrs.ll6
-rw-r--r--test/Feature/testtype.ll4
-rw-r--r--test/Feature/weak_constant.ll2
-rw-r--r--test/FrontendC/2008-07-29-EHLabel.ll282
-rw-r--r--test/Integer/BitArith.ll25
-rw-r--r--test/Integer/BitBit.ll24
-rw-r--r--test/Integer/BitCast.ll26
-rw-r--r--test/Integer/BitIcmp.ll43
-rw-r--r--test/Integer/BitMisc.ll24
-rw-r--r--test/Integer/cfgstructures_bt.ll56
-rw-r--r--test/Integer/forwardreftest_bt.ll33
-rw-r--r--test/Integer/globalredefinition_bt.ll18
-rw-r--r--test/Integer/globalvars_bt.ll26
-rw-r--r--test/Integer/indirectcall2_bt.ll24
-rw-r--r--test/Integer/indirectcall_bt.ll52
-rw-r--r--test/Integer/opaquetypes_bt.ll58
-rw-r--r--test/Integer/paramattrs_bt.ll19
-rw-r--r--test/Integer/prototype_bt.ll13
-rw-r--r--test/Integer/recursivetype_bt.ll108
-rw-r--r--test/Integer/simplecalltest_bt.ll28
-rw-r--r--test/Integer/small_bt.ll13
-rw-r--r--test/Integer/testalloca_bt.ll28
-rw-r--r--test/Integer/testarith_bt.ll21
-rw-r--r--test/Integer/testconstants_bt.ll32
-rw-r--r--test/Integer/testicmp_bt.ll23
-rw-r--r--test/Integer/testlogical_bt.ll13
-rw-r--r--test/Integer/testlogical_new_bt.ll15
-rw-r--r--test/Integer/testswitch_bt.ll24
-rw-r--r--test/Integer/testvarargs_bt.ll14
-rw-r--r--test/MC/AsmParser/directive_comm.s2
-rw-r--r--test/MC/X86/x86-64.s8
-rw-r--r--test/Makefile8
-rw-r--r--test/Transforms/ADCE/2002-01-31-UseStuckAround.ll6
-rw-r--r--test/Transforms/DeadStoreElimination/crash.ll4
-rw-r--r--test/Transforms/DeadStoreElimination/lifetime.ll4
-rw-r--r--test/Transforms/DeadStoreElimination/memintrinsics.ll12
-rw-r--r--test/Transforms/DeadStoreElimination/simple.ll22
-rw-r--r--test/Transforms/FunctionAttrs/2008-10-04-LocalMemory.ll64
-rw-r--r--test/Transforms/GVN/2008-02-24-NonDominatedMemcpy.ll25
-rw-r--r--test/Transforms/GVN/2008-02-26-MemCpySize.ll46
-rw-r--r--test/Transforms/GVN/2011-04-27-phioperands.ll106
-rw-r--r--test/Transforms/GVN/nonescaping-malloc.ll98
-rw-r--r--test/Transforms/GVN/rle.ll21
-rw-r--r--test/Transforms/GlobalOpt/memcpy.ll12
-rw-r--r--test/Transforms/GlobalOpt/memset.ll19
-rw-r--r--test/Transforms/IPConstantProp/return-constants.ll57
-rw-r--r--test/Transforms/IndVarSimplify/iv-zext.ll1
-rw-r--r--test/Transforms/Inline/2008-03-04-StructRet.ll28
-rw-r--r--test/Transforms/Inline/2008-03-07-Inline-2.ll53
-rw-r--r--test/Transforms/Inline/2008-03-07-Inline.ll57
-rw-r--r--test/Transforms/Inline/inline-invoke-tail.ll10
-rw-r--r--test/Transforms/InstCombine/2006-11-03-Memmove64.ll16
-rw-r--r--test/Transforms/InstCombine/2007-05-04-Crash.ll30
-rw-r--r--test/Transforms/InstCombine/2007-05-18-CastFoldBug.ll2
-rw-r--r--test/Transforms/InstCombine/2007-09-11-Trampoline.ll2
-rw-r--r--test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll19
-rw-r--r--test/Transforms/InstCombine/2007-11-25-CompatibleAttributes.ll2
-rw-r--r--test/Transforms/InstCombine/2009-02-20-InstCombine-SROA.ll489
-rw-r--r--test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll11
-rw-r--r--test/Transforms/InstCombine/bswap-fold.ll4
-rw-r--r--test/Transforms/InstCombine/call2.ll2
-rw-r--r--test/Transforms/InstCombine/intrinsics.ll1
-rw-r--r--test/Transforms/InstCombine/memcpy-to-load.ll11
-rw-r--r--test/Transforms/InstCombine/memmove.ll21
-rw-r--r--test/Transforms/InstCombine/memset.ll19
-rw-r--r--test/Transforms/InstCombine/objsize.ll2
-rw-r--r--test/Transforms/InstCombine/stack-overalign.ll14
-rw-r--r--test/Transforms/JumpThreading/crash.ll2
-rw-r--r--test/Transforms/LoopDeletion/2011-06-21-phioperands.ll182
-rw-r--r--test/Transforms/LoopRotate/PhiRename-1.ll1
-rw-r--r--test/Transforms/LoopRotate/crash.ll2
-rw-r--r--test/Transforms/Mem2Reg/ignore-lifetime.ll26
-rw-r--r--test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll44
-rw-r--r--test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll26
-rw-r--r--test/Transforms/MemCpyOpt/memcpy.ll55
-rw-r--r--test/Transforms/MemCpyOpt/memmove.ll14
-rw-r--r--test/Transforms/MemCpyOpt/sret.ll40
-rw-r--r--test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll2
-rw-r--r--test/Transforms/ScalarRepl/2007-05-24-LargeAggregate.ll27
-rw-r--r--test/Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll27
-rw-r--r--test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll16
-rw-r--r--test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll23
-rw-r--r--test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll4
-rw-r--r--test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll5
-rw-r--r--test/Transforms/ScalarRepl/2009-03-05-Aggre2Scalar-dbg.ll10
-rw-r--r--test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll95
-rw-r--r--test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll6
-rw-r--r--test/Transforms/ScalarRepl/2011-06-08-VectorExtractValue.ll6
-rw-r--r--test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll37
-rw-r--r--test/Transforms/ScalarRepl/badarray.ll4
-rw-r--r--test/Transforms/ScalarRepl/crash.ll10
-rw-r--r--test/Transforms/ScalarRepl/memset-aggregate.ll13
-rw-r--r--test/Transforms/SimplifyCFG/2008-04-23-MergeMultipleResultRet.ll43
-rw-r--r--test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll30
-rw-r--r--test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll36
-rw-r--r--test/Transforms/SimplifyCFG/switch_switch_fold_dbginfo.ll2
-rw-r--r--test/Transforms/SimplifyLibCalls/MemCpy.ll21
-rw-r--r--test/Transforms/TailCallElim/inf-recursion.ll1
-rw-r--r--test/Unit/lit.cfg16
-rw-r--r--test/Verifier/2002-04-13-RetTypes.ll5
-rw-r--r--test/lit.cfg3
-rw-r--r--test/lit.site.cfg.in2
259 files changed, 3271 insertions, 5234 deletions
diff --git a/test/Analysis/BasicAA/2004-12-08-BasicAACrash.ll b/test/Analysis/BasicAA/2004-12-08-BasicAACrash.ll
deleted file mode 100644
index 50fb222..0000000
--- a/test/Analysis/BasicAA/2004-12-08-BasicAACrash.ll
+++ /dev/null
@@ -1,22 +0,0 @@
-; RUN: opt < %s -basicaa -licm
-
-%"java/lang/Object" = type { %struct.llvm_java_object_base }
-%"java/lang/StringBuffer" = type { "java/lang/Object", i32, { "java/lang/Object", i32, [0 x i8] }*, i1 }
-%struct.llvm_java_object_base = type opaque
-
-define void @"java/lang/StringBuffer/setLength(I)V"(%struct.llvm_java_object_base*) {
-bc0:
- br i1 false, label %bc40, label %bc65
-
-bc65: ; preds = %bc0, %bc40
- ret void
-
-bc40: ; preds = %bc0, %bc40
- %tmp75 = bitcast %struct.llvm_java_object_base* %0 to %"java/lang/StringBuffer"* ; <"java/lang/StringBuffer"*> [#uses=1]
- %tmp76 = getelementptr %"java/lang/StringBuffer"* %tmp75, i32 0, i32 1 ; <i32*> [#uses=1]
- store i32 0, i32* %tmp76
- %tmp381 = bitcast %struct.llvm_java_object_base* %0 to %"java/lang/StringBuffer"* ; <"java/lang/StringBuffer"*> [#uses=1]
- %tmp392 = getelementptr %"java/lang/StringBuffer"* %tmp381, i32 0, i32 1 ; <i32*> [#uses=1]
- %tmp403 = load i32* %tmp392 ; <i32> [#uses=0]
- br i1 false, label %bc40, label %bc65
-}
diff --git a/test/Analysis/BasicAA/2004-12-08-BasicAACrash2.ll b/test/Analysis/BasicAA/2004-12-08-BasicAACrash2.ll
deleted file mode 100644
index cc84314..0000000
--- a/test/Analysis/BasicAA/2004-12-08-BasicAACrash2.ll
+++ /dev/null
@@ -1,20 +0,0 @@
-; RUN: opt < %s -basicaa -dse
-
-%"java/lang/Object" = type { %struct.llvm_java_object_base }
-%"java/lang/StringBuffer" = type { "java/lang/Object", i32, { "java/lang/Object", i32, [0 x i8] }*, i1 }
-%struct.llvm_java_object_base = type opaque
-
-define void @"java/lang/StringBuffer/ensureCapacity_unsynchronized(I)V"() {
-bc0:
- %tmp = getelementptr %"java/lang/StringBuffer"* null, i32 0, i32 3 ; <i1*> [#uses=1]
- br i1 false, label %bc16, label %bc7
-
-bc16: ; preds = %bc0
- %tmp91 = getelementptr %"java/lang/StringBuffer"* null, i32 0, i32 2 ; <{ "java/lang/Object", i32, [0 x i8] }**> [#uses=1]
- store { %"java/lang/Object", i32, [0 x i8] }* null, { %"java/lang/Object", i32, [0 x i8] }** %tmp91
- store i1 false, i1* %tmp
- ret void
-
-bc7: ; preds = %bc0
- ret void
-}
diff --git a/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll b/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll
index 062ea59..ebd349a 100644
--- a/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll
+++ b/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll
@@ -15,12 +15,12 @@ define void @test0() {
; CHECK: NoModRef: call void @llvm.memset.p0i8.i64(i8* @A, i8 0, i64 1, i32 1, i1 false) <-> call void @llvm.memset.p0i8.i64(i8* @B, i8 0, i64 1, i32 1, i1 false)
; CHECK: NoModRef: call void @llvm.memset.p0i8.i64(i8* @B, i8 0, i64 1, i32 1, i1 false) <-> call void @llvm.memset.p0i8.i64(i8* @A, i8 0, i64 1, i32 1, i1 false)
-declare void @llvm.memset.i64(i8*, i8, i64, i32)
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
@A = external global i8
@B = external global i8
define void @test1() {
- call void @llvm.memset.i64(i8* @A, i8 0, i64 1, i32 1)
- call void @llvm.memset.i64(i8* @B, i8 0, i64 1, i32 1)
+ call void @llvm.memset.p0i8.i64(i8* @A, i8 0, i64 1, i32 1, i1 false)
+ call void @llvm.memset.p0i8.i64(i8* @B, i8 0, i64 1, i32 1, i1 false)
ret void
}
diff --git a/test/Analysis/BasicAA/modref.ll b/test/Analysis/BasicAA/modref.ll
index 7a71e3e..233396b 100644
--- a/test/Analysis/BasicAA/modref.ll
+++ b/test/Analysis/BasicAA/modref.ll
@@ -1,10 +1,6 @@
; RUN: opt < %s -basicaa -gvn -dse -S | FileCheck %s
target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
-declare void @llvm.memset.i32(i8*, i8, i32, i32)
-declare void @llvm.memset.i8(i8*, i8, i8, i32)
-declare void @llvm.memcpy.i8(i8*, i8*, i8, i32)
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
declare void @llvm.lifetime.end(i64, i8* nocapture)
declare void @external(i32*)
@@ -15,7 +11,7 @@ define i32 @test0(i8* %P) {
store i32 0, i32* %A
- call void @llvm.memset.i32(i8* %P, i8 0, i32 42, i32 1)
+ call void @llvm.memset.p0i8.i32(i8* %P, i8 0, i32 42, i32 1, i1 false)
%B = load i32* %A
ret i32 %B
@@ -24,8 +20,6 @@ define i32 @test0(i8* %P) {
; CHECK: ret i32 0
}
-declare void @llvm.memcpy.i8(i8*, i8*, i8, i32)
-
define i8 @test1() {
; CHECK: @test1
%A = alloca i8
@@ -33,7 +27,7 @@ define i8 @test1() {
store i8 2, i8* %B ;; Not written to by memcpy
- call void @llvm.memcpy.i8(i8* %A, i8* %B, i8 -1, i32 0)
+ call void @llvm.memcpy.p0i8.p0i8.i8(i8* %A, i8* %B, i8 -1, i32 0, i1 false)
%C = load i8* %B
ret i8 %C
@@ -44,7 +38,7 @@ define i8 @test2(i8* %P) {
; CHECK: @test2
%P2 = getelementptr i8* %P, i32 127
store i8 1, i8* %P2 ;; Not dead across memset
- call void @llvm.memset.i8(i8* %P, i8 2, i8 127, i32 0)
+ call void @llvm.memset.p0i8.i8(i8* %P, i8 2, i8 127, i32 0, i1 false)
%A = load i8* %P2
ret i8 %A
; CHECK: ret i8 1
@@ -57,7 +51,7 @@ define i8 @test2a(i8* %P) {
;; FIXME: DSE isn't zapping this dead store.
store i8 1, i8* %P2 ;; Dead, clobbered by memset.
- call void @llvm.memset.i8(i8* %P, i8 2, i8 127, i32 0)
+ call void @llvm.memset.p0i8.i8(i8* %P, i8 2, i8 127, i32 0, i1 false)
%A = load i8* %P2
ret i8 %A
; CHECK-NOT: load
@@ -97,7 +91,7 @@ define void @test3a(i8* %P, i8 %X) {
define i32 @test4(i8* %P) {
%tmp = load i32* @G1
- call void @llvm.memset.i32(i8* bitcast ([4000 x i32]* @G2 to i8*), i8 0, i32 4000, i32 1)
+ call void @llvm.memset.p0i8.i32(i8* bitcast ([4000 x i32]* @G2 to i8*), i8 0, i32 4000, i32 1, i1 false)
%tmp2 = load i32* @G1
%sub = sub i32 %tmp2, %tmp
ret i32 %sub
@@ -112,7 +106,7 @@ define i32 @test4(i8* %P) {
; write to G1.
define i32 @test5(i8* %P, i32 %Len) {
%tmp = load i32* @G1
- call void @llvm.memcpy.i32(i8* bitcast ([4000 x i32]* @G2 to i8*), i8* bitcast (i32* @G1 to i8*), i32 %Len, i32 1)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([4000 x i32]* @G2 to i8*), i8* bitcast (i32* @G1 to i8*), i32 %Len, i32 1, i1 false)
%tmp2 = load i32* @G1
%sub = sub i32 %tmp2, %tmp
ret i32 %sub
@@ -134,3 +128,9 @@ define i8 @test6(i8* %p, i8* noalias %a) {
; CHECK-NOT: load
; CHECK: ret
}
+
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i8(i8* nocapture, i8, i8, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i8(i8* nocapture, i8* nocapture, i8, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+
diff --git a/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll b/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll
index 9573aed..ec95141 100644
--- a/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll
+++ b/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll
@@ -7,7 +7,7 @@
define void @test(i32 %N) {
entry:
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
+ %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
br label %bb3
bb: ; preds = %bb3
diff --git a/test/Analysis/ScalarEvolution/avoid-infinite-recursion-1.ll b/test/Analysis/ScalarEvolution/avoid-infinite-recursion-1.ll
index 31b95e1..f61b667 100644
--- a/test/Analysis/ScalarEvolution/avoid-infinite-recursion-1.ll
+++ b/test/Analysis/ScalarEvolution/avoid-infinite-recursion-1.ll
@@ -7,32 +7,32 @@ target triple = "x86_64-unknown-freebsd8.0"
module asm ".ident\09\22$FreeBSD: head/sys/kern/vfs_subr.c 195285 2009-07-02 14:19:33Z jamie $\22"
module asm ".section set_pcpu, \22aw\22, @progbits"
module asm ".previous"
- type <{ [40 x i8] }> ; type %0
- type <{ %struct.vm_object*, %struct.vm_object** }> ; type %1
- type <{ %struct.vm_object* }> ; type %2
- type <{ %struct.vm_page*, %struct.vm_page** }> ; type %3
- type <{ %struct.pv_entry*, %struct.pv_entry** }> ; type %4
- type <{ %struct.vm_reserv* }> ; type %5
- type <{ %struct.bufobj*, %struct.bufobj** }> ; type %6
- type <{ %struct.proc*, %struct.proc** }> ; type %7
- type <{ %struct.thread*, %struct.thread** }> ; type %8
- type <{ %struct.prison*, %struct.prison** }> ; type %9
- type <{ %struct.prison* }> ; type %10
- type <{ %struct.task* }> ; type %11
- type <{ %struct.osd*, %struct.osd** }> ; type %12
- type <{ %struct.proc* }> ; type %13
- type <{ %struct.ksiginfo*, %struct.ksiginfo** }> ; type %14
- type <{ %struct.pv_chunk*, %struct.pv_chunk** }> ; type %15
- type <{ %struct.pgrp*, %struct.pgrp** }> ; type %16
- type <{ %struct.knote*, %struct.knote** }> ; type %17
- type <{ %struct.ktr_request*, %struct.ktr_request** }> ; type %18
- type <{ %struct.mqueue_notifier* }> ; type %19
- type <{ %struct.turnstile* }> ; type %20
- type <{ %struct.namecache* }> ; type %21
- type <{ %struct.namecache*, %struct.namecache** }> ; type %22
- type <{ %struct.lockf*, %struct.lockf** }> ; type %23
- type <{ %struct.lockf_entry*, %struct.lockf_entry** }> ; type %24
- type <{ %struct.lockf_edge*, %struct.lockf_edge** }> ; type %25
+ %0 = type <{ [40 x i8] }> ; type %0
+ %1 = type <{ %struct.vm_object*, %struct.vm_object** }> ; type %1
+ %2 = type <{ %struct.vm_object* }> ; type %2
+ %3 = type <{ %struct.vm_page*, %struct.vm_page** }> ; type %3
+ %4 = type <{ %struct.pv_entry*, %struct.pv_entry** }> ; type %4
+ %5 = type <{ %struct.vm_reserv* }> ; type %5
+ %6 = type <{ %struct.bufobj*, %struct.bufobj** }> ; type %6
+ %7 = type <{ %struct.proc*, %struct.proc** }> ; type %7
+ %8 = type <{ %struct.thread*, %struct.thread** }> ; type %8
+ %9 = type <{ %struct.prison*, %struct.prison** }> ; type %9
+ %10 = type <{ %struct.prison* }> ; type %10
+ %11 = type <{ %struct.task* }> ; type %11
+ %12 = type <{ %struct.osd*, %struct.osd** }> ; type %12
+ %13 = type <{ %struct.proc* }> ; type %13
+ %14 = type <{ %struct.ksiginfo*, %struct.ksiginfo** }> ; type %14
+ %15 = type <{ %struct.pv_chunk*, %struct.pv_chunk** }> ; type %15
+ %16 = type <{ %struct.pgrp*, %struct.pgrp** }> ; type %16
+ %17 = type <{ %struct.knote*, %struct.knote** }> ; type %17
+ %18 = type <{ %struct.ktr_request*, %struct.ktr_request** }> ; type %18
+ %19 = type <{ %struct.mqueue_notifier* }> ; type %19
+ %20 = type <{ %struct.turnstile* }> ; type %20
+ %21 = type <{ %struct.namecache* }> ; type %21
+ %22 = type <{ %struct.namecache*, %struct.namecache** }> ; type %22
+ %23 = type <{ %struct.lockf*, %struct.lockf** }> ; type %23
+ %24 = type <{ %struct.lockf_entry*, %struct.lockf_entry** }> ; type %24
+ %25 = type <{ %struct.lockf_edge*, %struct.lockf_edge** }> ; type %25
%struct.__siginfo = type <{ i32, i32, i32, i32, i32, i32, i8*, %union.sigval, %0 }>
%struct.__sigset = type <{ [4 x i32] }>
%struct.acl = type <{ i32, i32, [4 x i32], [254 x %struct.acl_entry] }>
diff --git a/test/Analysis/ScalarEvolution/avoid-smax-1.ll b/test/Analysis/ScalarEvolution/avoid-smax-1.ll
index 89e8b98..474d564 100644
--- a/test/Analysis/ScalarEvolution/avoid-smax-1.ll
+++ b/test/Analysis/ScalarEvolution/avoid-smax-1.ll
@@ -173,7 +173,7 @@ bb23: ; preds = %bb24, %bb.nph
%55 = mul i32 %y.21, %w ; <i32> [#uses=1]
%.sum5 = add i32 %55, %.sum3 ; <i32> [#uses=1]
%56 = getelementptr i8* %j, i32 %.sum5 ; <i8*> [#uses=1]
- tail call void @llvm.memcpy.i32(i8* %56, i8* %54, i32 %w, i32 1)
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %56, i8* %54, i32 %w, i32 1, i1 false)
%57 = add i32 %y.21, 1 ; <i32> [#uses=2]
br label %bb24
@@ -190,7 +190,7 @@ bb26: ; preds = %bb24.bb26_crit_edge, %bb22
%60 = getelementptr i8* %j, i32 %.sum4 ; <i8*> [#uses=1]
%61 = mul i32 %x, %w ; <i32> [#uses=1]
%62 = sdiv i32 %61, 2 ; <i32> [#uses=1]
- tail call void @llvm.memset.i32(i8* %60, i8 -128, i32 %62, i32 1)
+ tail call void @llvm.memset.p0i8.i32(i8* %60, i8 -128, i32 %62, i32 1, i1 false)
ret void
bb29: ; preds = %bb20, %entry
@@ -208,7 +208,7 @@ bb30: ; preds = %bb31, %bb.nph11
%67 = getelementptr i8* %r, i32 %66 ; <i8*> [#uses=1]
%68 = mul i32 %y.310, %w ; <i32> [#uses=1]
%69 = getelementptr i8* %j, i32 %68 ; <i8*> [#uses=1]
- tail call void @llvm.memcpy.i32(i8* %69, i8* %67, i32 %w, i32 1)
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %69, i8* %67, i32 %w, i32 1, i1 false)
%70 = add i32 %y.310, 1 ; <i32> [#uses=2]
br label %bb31
@@ -224,13 +224,12 @@ bb33: ; preds = %bb31.bb33_crit_edge, %bb29
%73 = getelementptr i8* %j, i32 %72 ; <i8*> [#uses=1]
%74 = mul i32 %x, %w ; <i32> [#uses=1]
%75 = sdiv i32 %74, 2 ; <i32> [#uses=1]
- tail call void @llvm.memset.i32(i8* %73, i8 -128, i32 %75, i32 1)
+ tail call void @llvm.memset.p0i8.i32(i8* %73, i8 -128, i32 %75, i32 1, i1 false)
ret void
return: ; preds = %bb20
ret void
}
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
-
-declare void @llvm.memset.i32(i8*, i8, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
diff --git a/test/Analysis/ScalarEvolution/pr3909.ll b/test/Analysis/ScalarEvolution/pr3909.ll
index 10e328d..cf7531d 100644
--- a/test/Analysis/ScalarEvolution/pr3909.ll
+++ b/test/Analysis/ScalarEvolution/pr3909.ll
@@ -2,8 +2,8 @@
; PR 3909
- type { i32, %1* } ; type %0
- type { i32, i8* } ; type %1
+ %0 = type { i32, %1* } ; type %0
+ %1 = type { i32, i8* } ; type %1
define x86_stdcallcc i32 @_Dmain(%0 %unnamed) {
entry:
diff --git a/test/Analysis/ScalarEvolution/trip-count.ll b/test/Analysis/ScalarEvolution/trip-count.ll
index d750d4a..cb4e267 100644
--- a/test/Analysis/ScalarEvolution/trip-count.ll
+++ b/test/Analysis/ScalarEvolution/trip-count.ll
@@ -7,7 +7,6 @@
define void @test(i32 %N) {
entry:
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
br label %bb3
bb: ; preds = %bb3
diff --git a/test/Analysis/ScalarEvolution/trip-count2.ll b/test/Analysis/ScalarEvolution/trip-count2.ll
index 79f3161..e26cbea 100644
--- a/test/Analysis/ScalarEvolution/trip-count2.ll
+++ b/test/Analysis/ScalarEvolution/trip-count2.ll
@@ -7,7 +7,6 @@
define void @test(i32 %N) {
entry:
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
br label %bb3
bb: ; preds = %bb3
diff --git a/test/Analysis/ScalarEvolution/trip-count3.ll b/test/Analysis/ScalarEvolution/trip-count3.ll
index 10b798b..1bf86ae 100644
--- a/test/Analysis/ScalarEvolution/trip-count3.ll
+++ b/test/Analysis/ScalarEvolution/trip-count3.ll
@@ -5,15 +5,14 @@
; dividing by the stride will have a remainder. This could theoretically
; be teaching it how to use a more elaborate trip count computation.
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
-target triple = "x86_64-unknown-linux-gnu"
- %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] }
- %struct.SHA_INFO = type { [5 x i32], i32, i32, [16 x i32] }
- %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 }
-@_2E_str = external constant [26 x i8] ; <[26 x i8]*> [#uses=0]
-@stdin = external global %struct.FILE* ; <%struct.FILE**> [#uses=0]
-@_2E_str1 = external constant [3 x i8] ; <[3 x i8]*> [#uses=0]
-@_2E_str12 = external constant [30 x i8] ; <[30 x i8]*> [#uses=0]
+%struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] }
+%struct.SHA_INFO = type { [5 x i32], i32, i32, [16 x i32] }
+%struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 }
+
+@_2E_str = external constant [26 x i8]
+@stdin = external global %struct.FILE*
+@_2E_str1 = external constant [3 x i8]
+@_2E_str12 = external constant [30 x i8]
declare void @sha_init(%struct.SHA_INFO* nocapture) nounwind
@@ -25,12 +24,8 @@ declare i32 @printf(i8* nocapture, ...) nounwind
declare void @sha_final(%struct.SHA_INFO* nocapture) nounwind
-declare void @llvm.memset.i64(i8* nocapture, i8, i64, i32) nounwind
-
declare void @sha_update(%struct.SHA_INFO* nocapture, i8* nocapture, i32) nounwind
-declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
-
declare i64 @fread(i8* noalias nocapture, i64, i64, %struct.FILE* noalias nocapture) nounwind
declare i32 @main(i32, i8** nocapture) nounwind
@@ -43,36 +38,41 @@ declare void @sha_stream(%struct.SHA_INFO* nocapture, %struct.FILE* nocapture) n
define void @sha_stream_bb3_2E_i(%struct.SHA_INFO* %sha_info, i8* %data1, i32, i8** %buffer_addr.0.i.out, i32* %count_addr.0.i.out) nounwind {
newFuncRoot:
- br label %bb3.i
-
-sha_update.exit.exitStub: ; preds = %bb3.i
- store i8* %buffer_addr.0.i, i8** %buffer_addr.0.i.out
- store i32 %count_addr.0.i, i32* %count_addr.0.i.out
- ret void
-
-bb2.i: ; preds = %bb3.i
- %1 = getelementptr %struct.SHA_INFO* %sha_info, i64 0, i32 3 ; <[16 x i32]*> [#uses=1]
- %2 = bitcast [16 x i32]* %1 to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i64(i8* %2, i8* %buffer_addr.0.i, i64 64, i32 1) nounwind
- %3 = getelementptr %struct.SHA_INFO* %sha_info, i64 0, i32 3, i64 0 ; <i32*> [#uses=1]
- %4 = bitcast i32* %3 to i8* ; <i8*> [#uses=1]
- br label %codeRepl
-
-codeRepl: ; preds = %bb2.i
- call void @sha_stream_bb3_2E_i_bb1_2E_i_2E_i(i8* %4)
- br label %byte_reverse.exit.i
-
-byte_reverse.exit.i: ; preds = %codeRepl
- call fastcc void @sha_transform(%struct.SHA_INFO* %sha_info) nounwind
- %5 = getelementptr i8* %buffer_addr.0.i, i64 64 ; <i8*> [#uses=1]
- %6 = add i32 %count_addr.0.i, -64 ; <i32> [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %byte_reverse.exit.i, %newFuncRoot
- %buffer_addr.0.i = phi i8* [ %data1, %newFuncRoot ], [ %5, %byte_reverse.exit.i ] ; <i8*> [#uses=3]
- %count_addr.0.i = phi i32 [ %0, %newFuncRoot ], [ %6, %byte_reverse.exit.i ] ; <i32> [#uses=3]
- %7 = icmp sgt i32 %count_addr.0.i, 63 ; <i1> [#uses=1]
- br i1 %7, label %bb2.i, label %sha_update.exit.exitStub
+ br label %bb3.i
+
+sha_update.exit.exitStub: ; preds = %bb3.i
+ store i8* %buffer_addr.0.i, i8** %buffer_addr.0.i.out
+ store i32 %count_addr.0.i, i32* %count_addr.0.i.out
+ ret void
+
+bb2.i: ; preds = %bb3.i
+ %1 = getelementptr %struct.SHA_INFO* %sha_info, i64 0, i32 3
+ %2 = bitcast [16 x i32]* %1 to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %2, i8* %buffer_addr.0.i, i64 64, i32 1, i1 false)
+ %3 = getelementptr %struct.SHA_INFO* %sha_info, i64 0, i32 3, i64 0
+ %4 = bitcast i32* %3 to i8*
+ br label %codeRepl
+
+codeRepl: ; preds = %bb2.i
+ call void @sha_stream_bb3_2E_i_bb1_2E_i_2E_i(i8* %4)
+ br label %byte_reverse.exit.i
+
+byte_reverse.exit.i: ; preds = %codeRepl
+ call fastcc void @sha_transform(%struct.SHA_INFO* %sha_info) nounwind
+ %5 = getelementptr i8* %buffer_addr.0.i, i64 64
+ %6 = add i32 %count_addr.0.i, -64
+ br label %bb3.i
+
+bb3.i: ; preds = %byte_reverse.exit.i, %newFuncRoot
+ %buffer_addr.0.i = phi i8* [ %data1, %newFuncRoot ], [ %5, %byte_reverse.exit.i ]
+ %count_addr.0.i = phi i32 [ %0, %newFuncRoot ], [ %6, %byte_reverse.exit.i ]
+ %7 = icmp sgt i32 %count_addr.0.i, 63
+ br i1 %7, label %bb2.i, label %sha_update.exit.exitStub
}
declare void @sha_stream_bb3_2E_i_bb1_2E_i_2E_i(i8*) nounwind
+
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
+
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
+
diff --git a/test/Assembler/2002-04-04-PureVirtMethCall.ll b/test/Assembler/2002-04-04-PureVirtMethCall.ll
deleted file mode 100644
index 29aed55..0000000
--- a/test/Assembler/2002-04-04-PureVirtMethCall.ll
+++ /dev/null
@@ -1,6 +0,0 @@
-; RUN: llvm-as %s -o /dev/null
-
- type { { \2 *, \4 ** },
- { \2 *, \4 ** }
- }
-
diff --git a/test/Assembler/2002-04-04-PureVirtMethCall2.ll b/test/Assembler/2002-04-04-PureVirtMethCall2.ll
deleted file mode 100644
index a096899..0000000
--- a/test/Assembler/2002-04-04-PureVirtMethCall2.ll
+++ /dev/null
@@ -1,5 +0,0 @@
-; RUN: llvm-as %s -o /dev/null
-
-%t = type { { \2*, \2 },
- { \2*, \2 }
- }
diff --git a/test/Assembler/2002-07-14-InternalLossage.ll b/test/Assembler/2002-07-14-InternalLossage.ll
deleted file mode 100644
index f93f1c4..0000000
--- a/test/Assembler/2002-07-14-InternalLossage.ll
+++ /dev/null
@@ -1,9 +0,0 @@
-; Test to make sure that the 'internal' tag is not lost!
-;
-; RUN: llvm-as < %s | llvm-dis | grep internal
-
-declare void @foo()
-
-define internal void @foo() {
- ret void
-}
diff --git a/test/Assembler/2002-10-15-NameClash.ll b/test/Assembler/2002-10-15-NameClash.ll
deleted file mode 100644
index 89346cb..0000000
--- a/test/Assembler/2002-10-15-NameClash.ll
+++ /dev/null
@@ -1,7 +0,0 @@
-; RUN: llvm-as %s -o /dev/null
-
-declare i32 @"ArrayRef"([100 x i32] * %Array)
-
-define i32 @"ArrayRef"([100 x i32] * %Array) {
- ret i32 0
-}
diff --git a/test/Assembler/2008-02-20-MultipleReturnValue.ll b/test/Assembler/2008-02-20-MultipleReturnValue.ll
deleted file mode 100644
index 32c893a..0000000
--- a/test/Assembler/2008-02-20-MultipleReturnValue.ll
+++ /dev/null
@@ -1,22 +0,0 @@
-; RUN: opt < %s -verify -S | llvm-as -disable-output
-
-define {i32, i8} @foo(i32 %p) {
- ret i32 1, i8 2
-}
-
-define i8 @f2(i32 %p) {
- %c = call {i32, i8} @foo(i32 %p)
- %d = getresult {i32, i8} %c, 1
- %e = add i8 %d, 1
- ret i8 %e
-}
-
-define i32 @f3(i32 %p) {
- %c = invoke {i32, i8} @foo(i32 %p)
- to label %L unwind label %L2
- L:
- %d = getresult {i32, i8} %c, 0
- ret i32 %d
- L2:
- ret i32 0
-}
diff --git a/test/Assembler/2009-02-28-CastOpc.ll b/test/Assembler/2009-02-28-CastOpc.ll
index ee98d41..6035643 100644
--- a/test/Assembler/2009-02-28-CastOpc.ll
+++ b/test/Assembler/2009-02-28-CastOpc.ll
@@ -1,8 +1,7 @@
; RUN: llvm-as < %s | llvm-dis
-type i32
define void @foo() {
- bitcast %0* null to i32*
+ bitcast i32* null to i32*
ret void
}
diff --git a/test/Assembler/AutoUpgradeIntrinsics.ll b/test/Assembler/AutoUpgradeIntrinsics.ll
index 20beb49..eb4ac76 100644
--- a/test/Assembler/AutoUpgradeIntrinsics.ll
+++ b/test/Assembler/AutoUpgradeIntrinsics.ll
@@ -1,87 +1,6 @@
; Tests to make sure intrinsics are automatically upgraded.
-; RUN: llvm-as < %s | llvm-dis | not grep {i32 @llvm\\.ct}
-; RUN: llvm-as < %s | llvm-dis | \
-; RUN: not grep {llvm\\.part\\.set\\.i\[0-9\]*\\.i\[0-9\]*\\.i\[0-9\]*}
-; RUN: llvm-as < %s | llvm-dis | \
-; RUN: not grep {llvm\\.part\\.select\\.i\[0-9\]*\\.i\[0-9\]*}
-; RUN: llvm-as < %s | llvm-dis | \
-; RUN: not grep {llvm\\.bswap\\.i\[0-9\]*\\.i\[0-9\]*}
-; RUN: llvm-as < %s | llvm-dis | \
-; RUN: not grep {llvm\\.x86\\.sse2\\.loadu}
-; RUN: llvm-as < %s | llvm-dis | \
-; RUN: grep {llvm\\.x86\\.mmx\\.ps} | grep {x86_mmx} | count 16
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
-declare i32 @llvm.ctpop.i28(i28 %val)
-declare i32 @llvm.cttz.i29(i29 %val)
-declare i32 @llvm.ctlz.i30(i30 %val)
-
-define i32 @test_ct(i32 %A) {
- %c1 = call i32 @llvm.ctpop.i28(i28 1234)
- %c2 = call i32 @llvm.cttz.i29(i29 2345)
- %c3 = call i32 @llvm.ctlz.i30(i30 3456)
- %r1 = add i32 %c1, %c2
- %r2 = add i32 %r1, %c3
- ret i32 %r2
-}
-
-declare i32 @llvm.part.set.i32.i32.i32(i32 %x, i32 %rep, i32 %hi, i32 %lo)
-declare i16 @llvm.part.set.i16.i16.i16(i16 %x, i16 %rep, i32 %hi, i32 %lo)
-define i32 @test_part_set(i32 %A, i16 %B) {
- %a = call i32 @llvm.part.set.i32.i32.i32(i32 %A, i32 27, i32 8, i32 0)
- %b = call i16 @llvm.part.set.i16.i16.i16(i16 %B, i16 27, i32 8, i32 0)
- %c = zext i16 %b to i32
- %d = add i32 %a, %c
- ret i32 %d
-}
-
-declare i32 @llvm.part.select.i32.i32(i32 %x, i32 %hi, i32 %lo)
-declare i16 @llvm.part.select.i16.i16(i16 %x, i32 %hi, i32 %lo)
-define i32 @test_part_select(i32 %A, i16 %B) {
- %a = call i32 @llvm.part.select.i32.i32(i32 %A, i32 8, i32 0)
- %b = call i16 @llvm.part.select.i16.i16(i16 %B, i32 8, i32 0)
- %c = zext i16 %b to i32
- %d = add i32 %a, %c
- ret i32 %d
-}
-
-declare i32 @llvm.bswap.i32.i32(i32 %x)
-declare i16 @llvm.bswap.i16.i16(i16 %x)
-define i32 @test_bswap(i32 %A, i16 %B) {
- %a = call i32 @llvm.bswap.i32.i32(i32 %A)
- %b = call i16 @llvm.bswap.i16.i16(i16 %B)
- %c = zext i16 %b to i32
- %d = add i32 %a, %c
- ret i32 %d
-}
-
-declare <4 x i16> @llvm.x86.mmx.psra.w(<4 x i16>, <2 x i32>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.psll.w(<4 x i16>, <2 x i32>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.psrl.w(<4 x i16>, <2 x i32>) nounwind readnone
-define void @sh16(<4 x i16> %A, <2 x i32> %B) {
- %r1 = call <4 x i16> @llvm.x86.mmx.psra.w( <4 x i16> %A, <2 x i32> %B ) ; <<4 x i16>> [#uses=0]
- %r2 = call <4 x i16> @llvm.x86.mmx.psll.w( <4 x i16> %A, <2 x i32> %B ) ; <<4 x i16>> [#uses=0]
- %r3 = call <4 x i16> @llvm.x86.mmx.psrl.w( <4 x i16> %A, <2 x i32> %B ) ; <<4 x i16>> [#uses=0]
- ret void
-}
-
-declare <2 x i32> @llvm.x86.mmx.psra.d(<2 x i32>, <2 x i32>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.psll.d(<2 x i32>, <2 x i32>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.psrl.d(<2 x i32>, <2 x i32>) nounwind readnone
-define void @sh32(<2 x i32> %A, <2 x i32> %B) {
- %r1 = call <2 x i32> @llvm.x86.mmx.psra.d( <2 x i32> %A, <2 x i32> %B ) ; <<2 x i32>> [#uses=0]
- %r2 = call <2 x i32> @llvm.x86.mmx.psll.d( <2 x i32> %A, <2 x i32> %B ) ; <<2 x i32>> [#uses=0]
- %r3 = call <2 x i32> @llvm.x86.mmx.psrl.d( <2 x i32> %A, <2 x i32> %B ) ; <<2 x i32>> [#uses=0]
- ret void
-}
-
-declare <1 x i64> @llvm.x86.mmx.psll.q(<1 x i64>, <2 x i32>) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.psrl.q(<1 x i64>, <2 x i32>) nounwind readnone
-define void @sh64(<1 x i64> %A, <2 x i32> %B) {
- %r1 = call <1 x i64> @llvm.x86.mmx.psll.q( <1 x i64> %A, <2 x i32> %B ) ; <<1 x i64>> [#uses=0]
- %r2 = call <1 x i64> @llvm.x86.mmx.psrl.q( <1 x i64> %A, <2 x i32> %B ) ; <<1 x i64>> [#uses=0]
- ret void
-}
declare <4 x float> @llvm.x86.sse.loadu.ps(i8*) nounwind readnone
declare <16 x i8> @llvm.x86.sse2.loadu.dq(i8*) nounwind readnone
@@ -90,6 +9,10 @@ define void @test_loadu(i8* %a, double* %b) {
%v0 = call <4 x float> @llvm.x86.sse.loadu.ps(i8* %a)
%v1 = call <16 x i8> @llvm.x86.sse2.loadu.dq(i8* %a)
%v2 = call <2 x double> @llvm.x86.sse2.loadu.pd(double* %b)
+
+; CHECK: load i128* {{.*}}, align 1
+; CHECK: load i128* {{.*}}, align 1
+; CHECK: load i128* {{.*}}, align 1
ret void
}
diff --git a/test/Assembler/AutoUpgradeMMXIntrinsics.ll b/test/Assembler/AutoUpgradeMMXIntrinsics.ll
deleted file mode 100644
index 54120ff..0000000
--- a/test/Assembler/AutoUpgradeMMXIntrinsics.ll
+++ /dev/null
@@ -1,223 +0,0 @@
-; Tests to make sure MMX intrinsics are automatically upgraded.
-; RUN: llvm-as < %s | llvm-dis -o %t
-; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<1 x i64\\\>}
-; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<2 x i32\\\>}
-; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<4 x i16\\\>}
-; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<8 x i8\\\>}
-; RUN: grep {llvm\\.x86\\.sse\\.pshuf\\.w} %t | not grep i32
-
-; Addition
-declare <8 x i8> @llvm.x86.mmx.padd.b(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.padd.w(<4 x i16>, <4 x i16>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.padd.d(<2 x i32>, <2 x i32>) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.padd.q(<1 x i64>, <1 x i64>) nounwind readnone
-declare <8 x i8> @llvm.x86.mmx.padds.b(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.padds.w(<4 x i16>, <4 x i16>) nounwind readnone
-declare <8 x i8> @llvm.x86.mmx.paddus.b(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.paddus.w(<4 x i16>, <4 x i16>) nounwind readnone
-define void @add(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D,
- <2 x i32> %E, <2 x i32> %F, <1 x i64> %G, <1 x i64> %H) {
- %r1 = call <8 x i8> @llvm.x86.mmx.padd.b(<8 x i8> %A, <8 x i8> %B)
- %r2 = call <4 x i16> @llvm.x86.mmx.padd.w(<4 x i16> %C, <4 x i16> %D)
- %r3 = call <2 x i32> @llvm.x86.mmx.padd.d(<2 x i32> %E, <2 x i32> %F)
- %r4 = call <1 x i64> @llvm.x86.mmx.padd.q(<1 x i64> %G, <1 x i64> %H)
- %r5 = call <8 x i8> @llvm.x86.mmx.padds.b(<8 x i8> %A, <8 x i8> %B)
- %r6 = call <4 x i16> @llvm.x86.mmx.padds.w(<4 x i16> %C, <4 x i16> %D)
- %r7 = call <8 x i8> @llvm.x86.mmx.paddus.b(<8 x i8> %A, <8 x i8> %B)
- %r8 = call <4 x i16> @llvm.x86.mmx.paddus.w(<4 x i16> %C, <4 x i16> %D)
- ret void
-}
-
-; Subtraction
-declare <8 x i8> @llvm.x86.mmx.psub.b(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.psub.w(<4 x i16>, <4 x i16>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.psub.d(<2 x i32>, <2 x i32>) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.psub.q(<1 x i64>, <1 x i64>) nounwind readnone
-declare <8 x i8> @llvm.x86.mmx.psubs.b(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.psubs.w(<4 x i16>, <4 x i16>) nounwind readnone
-declare <8 x i8> @llvm.x86.mmx.psubus.b(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.psubus.w(<4 x i16>, <4 x i16>) nounwind readnone
-define void @sub(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D,
- <2 x i32> %E, <2 x i32> %F, <1 x i64> %G, <1 x i64> %H) {
- %r1 = call <8 x i8> @llvm.x86.mmx.psub.b(<8 x i8> %A, <8 x i8> %B)
- %r2 = call <4 x i16> @llvm.x86.mmx.psub.w(<4 x i16> %C, <4 x i16> %D)
- %r3 = call <2 x i32> @llvm.x86.mmx.psub.d(<2 x i32> %E, <2 x i32> %F)
- %r4 = call <1 x i64> @llvm.x86.mmx.psub.q(<1 x i64> %G, <1 x i64> %H)
- %r5 = call <8 x i8> @llvm.x86.mmx.psubs.b(<8 x i8> %A, <8 x i8> %B)
- %r6 = call <4 x i16> @llvm.x86.mmx.psubs.w(<4 x i16> %C, <4 x i16> %D)
- %r7 = call <8 x i8> @llvm.x86.mmx.psubus.b(<8 x i8> %A, <8 x i8> %B)
- %r8 = call <4 x i16> @llvm.x86.mmx.psubus.w(<4 x i16> %C, <4 x i16> %D)
- ret void
-}
-
-; Multiplication
-declare <4 x i16> @llvm.x86.mmx.pmulh.w(<4 x i16>, <4 x i16>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.pmull.w(<4 x i16>, <4 x i16>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.pmulhu.w(<4 x i16>, <4 x i16>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.pmulu.dq(<4 x i16>, <4 x i16>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.pmadd.wd(<4 x i16>, <4 x i16>) nounwind readnone
-define void @mul(<4 x i16> %A, <4 x i16> %B) {
- %r1 = call <4 x i16> @llvm.x86.mmx.pmulh.w(<4 x i16> %A, <4 x i16> %B)
- %r2 = call <4 x i16> @llvm.x86.mmx.pmull.w(<4 x i16> %A, <4 x i16> %B)
- %r3 = call <4 x i16> @llvm.x86.mmx.pmulhu.w(<4 x i16> %A, <4 x i16> %B)
- %r4 = call <4 x i16> @llvm.x86.mmx.pmulu.dq(<4 x i16> %A, <4 x i16> %B)
- %r5 = call <2 x i32> @llvm.x86.mmx.pmadd.wd(<4 x i16> %A, <4 x i16> %B)
- ret void
-}
-
-; Bitwise operations
-declare <1 x i64> @llvm.x86.mmx.pand(<1 x i64>, <1 x i64>) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.pandn(<1 x i64>, <1 x i64>) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.por(<1 x i64>, <1 x i64>) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.pxor(<1 x i64>, <1 x i64>) nounwind readnone
-define void @bit(<1 x i64> %A, <1 x i64> %B) {
- %r1 = call <1 x i64> @llvm.x86.mmx.pand(<1 x i64> %A, <1 x i64> %B)
- %r2 = call <1 x i64> @llvm.x86.mmx.pandn(<1 x i64> %A, <1 x i64> %B)
- %r3 = call <1 x i64> @llvm.x86.mmx.por(<1 x i64> %A, <1 x i64> %B)
- %r4 = call <1 x i64> @llvm.x86.mmx.pxor(<1 x i64> %A, <1 x i64> %B)
- ret void
-}
-
-; Averages
-declare <8 x i8> @llvm.x86.mmx.pavg.b(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.pavg.w(<4 x i16>, <4 x i16>) nounwind readnone
-define void @avg(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D) {
- %r1 = call <8 x i8> @llvm.x86.mmx.pavg.b(<8 x i8> %A, <8 x i8> %B)
- %r2 = call <4 x i16> @llvm.x86.mmx.pavg.w(<4 x i16> %C, <4 x i16> %D)
- ret void
-}
-
-; Maximum
-declare <8 x i8> @llvm.x86.mmx.pmaxu.b(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.pmaxs.w(<4 x i16>, <4 x i16>) nounwind readnone
-define void @max(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D) {
- %r1 = call <8 x i8> @llvm.x86.mmx.pmaxu.b(<8 x i8> %A, <8 x i8> %B)
- %r2 = call <4 x i16> @llvm.x86.mmx.pmaxs.w(<4 x i16> %C, <4 x i16> %D)
- ret void
-}
-
-; Minimum
-declare <8 x i8> @llvm.x86.mmx.pminu.b(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.pmins.w(<4 x i16>, <4 x i16>) nounwind readnone
-define void @min(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D) {
- %r1 = call <8 x i8> @llvm.x86.mmx.pminu.b(<8 x i8> %A, <8 x i8> %B)
- %r2 = call <4 x i16> @llvm.x86.mmx.pmins.w(<4 x i16> %C, <4 x i16> %D)
- ret void
-}
-
-; Packed sum of absolute differences
-declare <4 x i16> @llvm.x86.mmx.psad.bw(<8 x i8>, <8 x i8>) nounwind readnone
-define void @psad(<8 x i8> %A, <8 x i8> %B) {
- %r1 = call <4 x i16> @llvm.x86.mmx.psad.bw(<8 x i8> %A, <8 x i8> %B)
- ret void
-}
-
-; Shift left
-declare <4 x i16> @llvm.x86.mmx.psll.w(<4 x i16>, <1 x i64>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.psll.d(<2 x i32>, <1 x i64>) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.psll.q(<1 x i64>, <1 x i64>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.pslli.w(<4 x i16>, i32) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.pslli.d(<2 x i32>, i32) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.pslli.q(<1 x i64>, i32) nounwind readnone
-define void @shl(<4 x i16> %A, <2 x i32> %B, <1 x i64> %C, i32 %D) {
- %r1 = call <4 x i16> @llvm.x86.mmx.psll.w(<4 x i16> %A, <1 x i64> %C)
- %r2 = call <2 x i32> @llvm.x86.mmx.psll.d(<2 x i32> %B, <1 x i64> %C)
- %r3 = call <1 x i64> @llvm.x86.mmx.psll.q(<1 x i64> %C, <1 x i64> %C)
- %r4 = call <4 x i16> @llvm.x86.mmx.pslli.w(<4 x i16> %A, i32 %D)
- %r5 = call <2 x i32> @llvm.x86.mmx.pslli.d(<2 x i32> %B, i32 %D)
- %r6 = call <1 x i64> @llvm.x86.mmx.pslli.q(<1 x i64> %C, i32 %D)
- ret void
-}
-
-; Shift right logical
-declare <4 x i16> @llvm.x86.mmx.psrl.w(<4 x i16>, <1 x i64>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.psrl.d(<2 x i32>, <1 x i64>) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.psrl.q(<1 x i64>, <1 x i64>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.psrli.w(<4 x i16>, i32) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.psrli.d(<2 x i32>, i32) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.psrli.q(<1 x i64>, i32) nounwind readnone
-define void @shr(<4 x i16> %A, <2 x i32> %B, <1 x i64> %C, i32 %D) {
- %r1 = call <4 x i16> @llvm.x86.mmx.psrl.w(<4 x i16> %A, <1 x i64> %C)
- %r2 = call <2 x i32> @llvm.x86.mmx.psrl.d(<2 x i32> %B, <1 x i64> %C)
- %r3 = call <1 x i64> @llvm.x86.mmx.psrl.q(<1 x i64> %C, <1 x i64> %C)
- %r4 = call <4 x i16> @llvm.x86.mmx.psrli.w(<4 x i16> %A, i32 %D)
- %r5 = call <2 x i32> @llvm.x86.mmx.psrli.d(<2 x i32> %B, i32 %D)
- %r6 = call <1 x i64> @llvm.x86.mmx.psrli.q(<1 x i64> %C, i32 %D)
- ret void
-}
-
-; Shift right arithmetic
-declare <4 x i16> @llvm.x86.mmx.psra.w(<4 x i16>, <1 x i64>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.psra.d(<2 x i32>, <1 x i64>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.psrai.w(<4 x i16>, i32) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.psrai.d(<2 x i32>, i32) nounwind readnone
-define void @sra(<4 x i16> %A, <2 x i32> %B, <1 x i64> %C, i32 %D) {
- %r1 = call <4 x i16> @llvm.x86.mmx.psra.w(<4 x i16> %A, <1 x i64> %C)
- %r2 = call <2 x i32> @llvm.x86.mmx.psra.d(<2 x i32> %B, <1 x i64> %C)
- %r3 = call <4 x i16> @llvm.x86.mmx.psrai.w(<4 x i16> %A, i32 %D)
- %r4 = call <2 x i32> @llvm.x86.mmx.psrai.d(<2 x i32> %B, i32 %D)
- ret void
-}
-
-; Pack/Unpack ops
-declare <8 x i8> @llvm.x86.mmx.packsswb(<4 x i16>, <4 x i16>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.packssdw(<2 x i32>, <2 x i32>) nounwind readnone
-declare <8 x i8> @llvm.x86.mmx.packuswb(<4 x i16>, <4 x i16>) nounwind readnone
-declare <8 x i8> @llvm.x86.mmx.punpckhbw(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.punpckhwd(<4 x i16>, <4 x i16>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.punpckhdq(<2 x i32>, <2 x i32>) nounwind readnone
-declare <8 x i8> @llvm.x86.mmx.punpcklbw(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.punpcklwd(<4 x i16>, <4 x i16>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.punpckldq(<2 x i32>, <2 x i32>) nounwind readnone
-define void @pack_unpack(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D,
- <2 x i32> %E, <2 x i32> %F) {
- %r1 = call <8 x i8> @llvm.x86.mmx.packsswb(<4 x i16> %C, <4 x i16> %D)
- %r2 = call <4 x i16> @llvm.x86.mmx.packssdw(<2 x i32> %E, <2 x i32> %F)
- %r3 = call <8 x i8> @llvm.x86.mmx.packuswb(<4 x i16> %C, <4 x i16> %D)
- %r4 = call <8 x i8> @llvm.x86.mmx.punpckhbw(<8 x i8> %A, <8 x i8> %B)
- %r5 = call <4 x i16> @llvm.x86.mmx.punpckhwd(<4 x i16> %C, <4 x i16> %D)
- %r6 = call <2 x i32> @llvm.x86.mmx.punpckhdq(<2 x i32> %E, <2 x i32> %F)
- %r7 = call <8 x i8> @llvm.x86.mmx.punpcklbw(<8 x i8> %A, <8 x i8> %B)
- %r8 = call <4 x i16> @llvm.x86.mmx.punpcklwd(<4 x i16> %C, <4 x i16> %D)
- %r9 = call <2 x i32> @llvm.x86.mmx.punpckldq(<2 x i32> %E, <2 x i32> %F)
- ret void
-}
-
-; Integer comparison ops
-declare <8 x i8> @llvm.x86.mmx.pcmpeq.b(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.pcmpeq.w(<4 x i16>, <4 x i16>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.pcmpeq.d(<2 x i32>, <2 x i32>) nounwind readnone
-declare <8 x i8> @llvm.x86.mmx.pcmpgt.b(<8 x i8>, <8 x i8>) nounwind readnone
-declare <4 x i16> @llvm.x86.mmx.pcmpgt.w(<4 x i16>, <4 x i16>) nounwind readnone
-declare <2 x i32> @llvm.x86.mmx.pcmpgt.d(<2 x i32>, <2 x i32>) nounwind readnone
-define void @cmp(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D,
- <2 x i32> %E, <2 x i32> %F) {
- %r1 = call <8 x i8> @llvm.x86.mmx.pcmpeq.b(<8 x i8> %A, <8 x i8> %B)
- %r2 = call <4 x i16> @llvm.x86.mmx.pcmpeq.w(<4 x i16> %C, <4 x i16> %D)
- %r3 = call <2 x i32> @llvm.x86.mmx.pcmpeq.d(<2 x i32> %E, <2 x i32> %F)
- %r4 = call <8 x i8> @llvm.x86.mmx.pcmpgt.b(<8 x i8> %A, <8 x i8> %B)
- %r5 = call <4 x i16> @llvm.x86.mmx.pcmpgt.w(<4 x i16> %C, <4 x i16> %D)
- %r6 = call <2 x i32> @llvm.x86.mmx.pcmpgt.d(<2 x i32> %E, <2 x i32> %F)
- ret void
-}
-
-; Miscellaneous
-declare void @llvm.x86.mmx.maskmovq(<8 x i8>, <8 x i8>, i32*) nounwind readnone
-declare i32 @llvm.x86.mmx.pmovmskb(<8 x i8>) nounwind readnone
-declare void @llvm.x86.mmx.movnt.dq(i32*, <1 x i64>) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.palignr.b(<1 x i64>, <1 x i64>, i8) nounwind readnone
-declare i32 @llvm.x86.mmx.pextr.w(<1 x i64>, i32) nounwind readnone
-declare <1 x i64> @llvm.x86.mmx.pinsr.w(<1 x i64>, i32, i32) nounwind readnone
-declare <4 x i16> @llvm.x86.ssse3.pshuf.w(<4 x i16>, i32) nounwind readnone
-define void @misc(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D,
- <2 x i32> %E, <2 x i32> %F, <1 x i64> %G, <1 x i64> %H,
- i32* %I, i8 %J, i16 %K, i32 %L) {
- call void @llvm.x86.mmx.maskmovq(<8 x i8> %A, <8 x i8> %B, i32* %I)
- %r1 = call i32 @llvm.x86.mmx.pmovmskb(<8 x i8> %A)
- call void @llvm.x86.mmx.movnt.dq(i32* %I, <1 x i64> %G)
- %r2 = call <1 x i64> @llvm.x86.mmx.palignr.b(<1 x i64> %G, <1 x i64> %H, i8 %J)
- %r3 = call i32 @llvm.x86.mmx.pextr.w(<1 x i64> %G, i32 37)
- %r4 = call <1 x i64> @llvm.x86.mmx.pinsr.w(<1 x i64> %G, i32 37, i32 927)
- %r5 = call <4 x i16> @llvm.x86.ssse3.pshuf.w(<4 x i16> %C, i32 37)
- ret void
-}
diff --git a/test/Assembler/private.ll b/test/Assembler/private.ll
deleted file mode 100644
index 3714572..0000000
--- a/test/Assembler/private.ll
+++ /dev/null
@@ -1,9 +0,0 @@
-; Test to make sure that the 'private' tag is not lost!
-;
-; RUN: llvm-as < %s | llvm-dis | grep private
-
-declare void @foo()
-
-define private void @foo() {
- ret void
-}
diff --git a/test/Bitcode/AutoUpgradeIntrinsics.ll b/test/Bitcode/AutoUpgradeIntrinsics.ll
deleted file mode 100644
index c3e2e9e..0000000
--- a/test/Bitcode/AutoUpgradeIntrinsics.ll
+++ /dev/null
@@ -1,8 +0,0 @@
-; This isn't really an assembly file. It just runs test on bitcode to ensure
-; it is auto-upgraded.
-; RUN: llvm-dis < %s.bc | FileCheck %s
-; CHECK-NOT: {i32 @llvm\\.ct}
-; CHECK-NOT: {llvm\\.part\\.set\\.i\[0-9\]*\\.i\[0-9\]*\\.i\[0-9\]*}
-; CHECK-NOT: {llvm\\.part\\.select\\.i\[0-9\]*\\.i\[0-9\]*}
-; CHECK-NOT: {llvm\\.bswap\\.i\[0-9\]*\\.i\[0-9\]*}
-
diff --git a/test/Bitcode/AutoUpgradeIntrinsics.ll.bc b/test/Bitcode/AutoUpgradeIntrinsics.ll.bc
deleted file mode 100644
index 9de756b..0000000
--- a/test/Bitcode/AutoUpgradeIntrinsics.ll.bc
+++ /dev/null
Binary files differ
diff --git a/test/Bitcode/memcpy.ll b/test/Bitcode/memcpy.ll
deleted file mode 100644
index 299eb1e..0000000
--- a/test/Bitcode/memcpy.ll
+++ /dev/null
@@ -1,23 +0,0 @@
-; RUN: llvm-as %s -o /dev/null
-
-define void @test(i32* %P, i32* %Q) {
-entry:
- %tmp.1 = bitcast i32* %P to i8* ; <i8*> [#uses=3]
- %tmp.3 = bitcast i32* %Q to i8* ; <i8*> [#uses=4]
- tail call void @llvm.memcpy.i32( i8* %tmp.1, i8* %tmp.3, i32 100000, i32 1 )
- tail call void @llvm.memcpy.i64( i8* %tmp.1, i8* %tmp.3, i64 100000, i32 1 )
- tail call void @llvm.memset.i32( i8* %tmp.3, i8 14, i32 10000, i32 0 )
- tail call void @llvm.memmove.i32( i8* %tmp.1, i8* %tmp.3, i32 123124, i32 1 )
- tail call void @llvm.memmove.i64( i8* %tmp.1, i8* %tmp.3, i64 123124, i32 1 )
- ret void
-}
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
-declare void @llvm.memcpy.i64(i8*, i8*, i64, i32)
-
-declare void @llvm.memset.i32(i8*, i8, i32, i32)
-
-declare void @llvm.memmove.i32(i8*, i8*, i32, i32)
-
-declare void @llvm.memmove.i64(i8*, i8*, i64, i32)
diff --git a/test/Bitcode/metadata-2.ll b/test/Bitcode/metadata-2.ll
index 1a59ce6..dbf46b0 100644
--- a/test/Bitcode/metadata-2.ll
+++ b/test/Bitcode/metadata-2.ll
@@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llvm-dis -o /dev/null
- type { %object.ModuleInfo.__vtbl*, i8*, %"byte[]", %1, %"ClassInfo[]", i32, void ()*, void ()*, void ()*, i8*, void ()* } ; type %0
- type { i64, %object.ModuleInfo* } ; type %1
- type { i32, void ()* } ; type %2
+ %0 = type { %object.ModuleInfo.__vtbl*, i8*, %"byte[]", %1, %"ClassInfo[]", i32, void ()*, void ()*, void ()*, i8*, void ()* } ; type %0
+ %1 = type { i64, %object.ModuleInfo* } ; type %1
+ %2 = type { i32, void ()* } ; type %2
%"ClassInfo[]" = type { i64, %object.ClassInfo** }
%"Interface[]" = type { i64, %object.Interface* }
%"ModuleInfo[]" = type { i64, %object.ModuleInfo** }
diff --git a/test/Bitcode/neon-intrinsics.ll b/test/Bitcode/neon-intrinsics.ll
deleted file mode 100644
index feb2d74..0000000
--- a/test/Bitcode/neon-intrinsics.ll
+++ /dev/null
@@ -1,206 +0,0 @@
-; RUN: llvm-dis < %s.bc | FileCheck %s
-
-; vmovls should be auto-upgraded to sext
-
-; CHECK: vmovls8
-; CHECK-NOT: arm.neon.vmovls.v8i16
-; CHECK: sext <8 x i8>
-
-; CHECK: vmovls16
-; CHECK-NOT: arm.neon.vmovls.v4i32
-; CHECK: sext <4 x i16>
-
-; CHECK: vmovls32
-; CHECK-NOT: arm.neon.vmovls.v2i64
-; CHECK: sext <2 x i32>
-
-; vmovlu should be auto-upgraded to zext
-
-; CHECK: vmovlu8
-; CHECK-NOT: arm.neon.vmovlu.v8i16
-; CHECK: zext <8 x i8>
-
-; CHECK: vmovlu16
-; CHECK-NOT: arm.neon.vmovlu.v4i32
-; CHECK: zext <4 x i16>
-
-; CHECK: vmovlu32
-; CHECK-NOT: arm.neon.vmovlu.v2i64
-; CHECK: zext <2 x i32>
-
-; vaddl/vaddw should be auto-upgraded to add with sext/zext
-
-; CHECK: vaddls16
-; CHECK-NOT: arm.neon.vaddls.v4i32
-; CHECK: sext <4 x i16>
-; CHECK-NEXT: sext <4 x i16>
-; CHECK-NEXT: add <4 x i32>
-
-; CHECK: vaddlu32
-; CHECK-NOT: arm.neon.vaddlu.v2i64
-; CHECK: zext <2 x i32>
-; CHECK-NEXT: zext <2 x i32>
-; CHECK-NEXT: add <2 x i64>
-
-; CHECK: vaddws8
-; CHECK-NOT: arm.neon.vaddws.v8i16
-; CHECK: sext <8 x i8>
-; CHECK-NEXT: add <8 x i16>
-
-; CHECK: vaddwu16
-; CHECK-NOT: arm.neon.vaddwu.v4i32
-; CHECK: zext <4 x i16>
-; CHECK-NEXT: add <4 x i32>
-
-; vsubl/vsubw should be auto-upgraded to subtract with sext/zext
-
-; CHECK: vsubls16
-; CHECK-NOT: arm.neon.vsubls.v4i32
-; CHECK: sext <4 x i16>
-; CHECK-NEXT: sext <4 x i16>
-; CHECK-NEXT: sub <4 x i32>
-
-; CHECK: vsublu32
-; CHECK-NOT: arm.neon.vsublu.v2i64
-; CHECK: zext <2 x i32>
-; CHECK-NEXT: zext <2 x i32>
-; CHECK-NEXT: sub <2 x i64>
-
-; CHECK: vsubws8
-; CHECK-NOT: arm.neon.vsubws.v8i16
-; CHECK: sext <8 x i8>
-; CHECK-NEXT: sub <8 x i16>
-
-; CHECK: vsubwu16
-; CHECK-NOT: arm.neon.vsubwu.v4i32
-; CHECK: zext <4 x i16>
-; CHECK-NEXT: sub <4 x i32>
-
-; vmull* intrinsics will remain intrinsics
-
-; CHECK: vmulls8
-; CHECK: arm.neon.vmulls.v8i16
-
-; CHECK: vmullu16
-; CHECK: arm.neon.vmullu.v4i32
-
-; CHECK: vmullp8
-; CHECK: arm.neon.vmullp.v8i16
-
-; vmlal should be auto-upgraded to multiply/add with sext/zext
-
-; CHECK: vmlals32
-; CHECK-NOT: arm.neon.vmlals.v2i64
-; CHECK: sext <2 x i32>
-; CHECK-NEXT: sext <2 x i32>
-; CHECK-NEXT: mul <2 x i64>
-; CHECK-NEXT: add <2 x i64>
-
-; CHECK: vmlalu8
-; CHECK-NOT: arm.neon.vmlalu.v8i16
-; CHECK: zext <8 x i8>
-; CHECK-NEXT: zext <8 x i8>
-; CHECK-NEXT: mul <8 x i16>
-; CHECK-NEXT: add <8 x i16>
-
-; vmlsl should be auto-upgraded to multiply/sub with sext/zext
-
-; CHECK: vmlsls16
-; CHECK-NOT: arm.neon.vmlsls.v4i32
-; CHECK: sext <4 x i16>
-; CHECK-NEXT: sext <4 x i16>
-; CHECK-NEXT: mul <4 x i32>
-; CHECK-NEXT: sub <4 x i32>
-
-; CHECK: vmlslu32
-; CHECK-NOT: arm.neon.vmlslu.v2i64
-; CHECK: zext <2 x i32>
-; CHECK-NEXT: zext <2 x i32>
-; CHECK-NEXT: mul <2 x i64>
-; CHECK-NEXT: sub <2 x i64>
-
-; vaba should be auto-upgraded to vabd + add
-
-; CHECK: vabas32
-; CHECK-NOT: arm.neon.vabas.v2i32
-; CHECK: arm.neon.vabds.v2i32
-; CHECK-NEXT: add <2 x i32>
-
-; CHECK: vabaQu8
-; CHECK-NOT: arm.neon.vabau.v16i8
-; CHECK: arm.neon.vabdu.v16i8
-; CHECK-NEXT: add <16 x i8>
-
-; vabal should be auto-upgraded to vabd with zext + add
-
-; CHECK: vabals16
-; CHECK-NOT: arm.neon.vabals.v4i32
-; CHECK: arm.neon.vabds.v4i16
-; CHECK-NEXT: zext <4 x i16>
-; CHECK-NEXT: add <4 x i32>
-
-; CHECK: vabalu32
-; CHECK-NOT: arm.neon.vabalu.v2i64
-; CHECK: arm.neon.vabdu.v2i32
-; CHECK-NEXT: zext <2 x i32>
-; CHECK-NEXT: add <2 x i64>
-
-; vabdl should be auto-upgraded to vabd with zext
-
-; CHECK: vabdls8
-; CHECK-NOT: arm.neon.vabdls.v8i16
-; CHECK: arm.neon.vabds.v8i8
-; CHECK-NEXT: zext <8 x i8>
-
-; CHECK: vabdlu16
-; CHECK-NOT: arm.neon.vabdlu.v4i32
-; CHECK: arm.neon.vabdu.v4i16
-; CHECK-NEXT: zext <4 x i16>
-
-; vmovn should be auto-upgraded to trunc
-
-; CHECK: vmovni16
-; CHECK-NOT: arm.neon.vmovn.v8i8
-; CHECK: trunc <8 x i16>
-
-; CHECK: vmovni32
-; CHECK-NOT: arm.neon.vmovn.v4i16
-; CHECK: trunc <4 x i32>
-
-; CHECK: vmovni64
-; CHECK-NOT: arm.neon.vmovn.v2i32
-; CHECK: trunc <2 x i64>
-
-; vld* and vst* intrinsic calls need an alignment argument (defaulted to 1)
-
-; CHECK: vld1i8
-; CHECK: i32 1
-; CHECK: vld2Qi16
-; CHECK: i32 1
-; CHECK: vld3i32
-; CHECK: i32 1
-; CHECK: vld4Qf
-; CHECK: i32 1
-
-; CHECK: vst1i8
-; CHECK: i32 1
-; CHECK: vst2Qi16
-; CHECK: i32 1
-; CHECK: vst3i32
-; CHECK: i32 1
-; CHECK: vst4Qf
-; CHECK: i32 1
-
-; CHECK: vld2laneQi16
-; CHECK: i32 1
-; CHECK: vld3lanei32
-; CHECK: i32 1
-; CHECK: vld4laneQf
-; CHECK: i32 1
-
-; CHECK: vst2laneQi16
-; CHECK: i32 1
-; CHECK: vst3lanei32
-; CHECK: i32 1
-; CHECK: vst4laneQf
-; CHECK: i32 1
diff --git a/test/Bitcode/neon-intrinsics.ll.bc b/test/Bitcode/neon-intrinsics.ll.bc
deleted file mode 100644
index cabc3c9..0000000
--- a/test/Bitcode/neon-intrinsics.ll.bc
+++ /dev/null
Binary files differ
diff --git a/test/Bitcode/sse2_loadl_pd.ll b/test/Bitcode/sse2_loadl_pd.ll
deleted file mode 100644
index 6cb0da5..0000000
--- a/test/Bitcode/sse2_loadl_pd.ll
+++ /dev/null
@@ -1,3 +0,0 @@
-; RUN: llvm-dis < %s.bc | FileCheck %s
-; CHECK-NOT: {i32 @llvm\\.loadl.pd}
-; CHECK: shufflevector
diff --git a/test/Bitcode/sse2_loadl_pd.ll.bc b/test/Bitcode/sse2_loadl_pd.ll.bc
deleted file mode 100644
index 402cbe1..0000000
--- a/test/Bitcode/sse2_loadl_pd.ll.bc
+++ /dev/null
Binary files differ
diff --git a/test/Bitcode/sse2_movl_dq.ll b/test/Bitcode/sse2_movl_dq.ll
deleted file mode 100644
index 2fc0149..0000000
--- a/test/Bitcode/sse2_movl_dq.ll
+++ /dev/null
@@ -1,3 +0,0 @@
-; RUN: llvm-dis < %s.bc | FileCheck %s
-; CHECK-NOT: {i32 @llvm\\.movl.dq}
-; CHECK: shufflevector
diff --git a/test/Bitcode/sse2_movl_dq.ll.bc b/test/Bitcode/sse2_movl_dq.ll.bc
deleted file mode 100644
index 74d1826..0000000
--- a/test/Bitcode/sse2_movl_dq.ll.bc
+++ /dev/null
Binary files differ
diff --git a/test/Bitcode/sse2_movs_d.ll b/test/Bitcode/sse2_movs_d.ll
deleted file mode 100644
index ab82c43..0000000
--- a/test/Bitcode/sse2_movs_d.ll
+++ /dev/null
@@ -1,3 +0,0 @@
-; RUN: llvm-dis < %s.bc | FileCheck %s
-; CHECK-NOT: {i32 @llvm\\.movs.d}
-; CHECK: shufflevector
diff --git a/test/Bitcode/sse2_movs_d.ll.bc b/test/Bitcode/sse2_movs_d.ll.bc
deleted file mode 100644
index 719d529..0000000
--- a/test/Bitcode/sse2_movs_d.ll.bc
+++ /dev/null
Binary files differ
diff --git a/test/Bitcode/sse2_punpck_qdq.ll b/test/Bitcode/sse2_punpck_qdq.ll
deleted file mode 100644
index 4c68af5..0000000
--- a/test/Bitcode/sse2_punpck_qdq.ll
+++ /dev/null
@@ -1,4 +0,0 @@
-; RUN: llvm-dis < %s.bc | FileCheck %s
-; CHECK-NOT: {i32 @llvm\\.punpckh.qdq}
-; CHECK-NOT: {i32 @llvm\\.punpckl.qdq}
-; CHECK: shufflevector
diff --git a/test/Bitcode/sse2_punpck_qdq.ll.bc b/test/Bitcode/sse2_punpck_qdq.ll.bc
deleted file mode 100644
index 7c1b7ed..0000000
--- a/test/Bitcode/sse2_punpck_qdq.ll.bc
+++ /dev/null
Binary files differ
diff --git a/test/Bitcode/sse2_shuf_pd.ll b/test/Bitcode/sse2_shuf_pd.ll
deleted file mode 100644
index 1ba6a1d..0000000
--- a/test/Bitcode/sse2_shuf_pd.ll
+++ /dev/null
@@ -1,3 +0,0 @@
-; RUN: llvm-dis < %s.bc | FileCheck %s
-; CHECK-NOT: {i32 @llvm\\.shuf.pd}
-; CHECK: shufflevector
diff --git a/test/Bitcode/sse2_shuf_pd.ll.bc b/test/Bitcode/sse2_shuf_pd.ll.bc
deleted file mode 100644
index 832c39e..0000000
--- a/test/Bitcode/sse2_shuf_pd.ll.bc
+++ /dev/null
Binary files differ
diff --git a/test/Bitcode/sse2_unpck_pd.ll b/test/Bitcode/sse2_unpck_pd.ll
deleted file mode 100644
index 99b61b6..0000000
--- a/test/Bitcode/sse2_unpck_pd.ll
+++ /dev/null
@@ -1,4 +0,0 @@
-; RUN: llvm-dis < %s.bc | FileCheck %s
-; CHECK-NOT: {i32 @llvm\\.unpckh.pd}
-; CHECK-NOT: {i32 @llvm\\.unpckl.pd}
-; CHECK: shufflevector
diff --git a/test/Bitcode/sse2_unpck_pd.ll.bc b/test/Bitcode/sse2_unpck_pd.ll.bc
deleted file mode 100644
index 4fb829c..0000000
--- a/test/Bitcode/sse2_unpck_pd.ll.bc
+++ /dev/null
Binary files differ
diff --git a/test/Bitcode/sse41_pmulld.ll b/test/Bitcode/sse41_pmulld.ll
deleted file mode 100644
index 752786d..0000000
--- a/test/Bitcode/sse41_pmulld.ll
+++ /dev/null
@@ -1,3 +0,0 @@
-; RUN: llvm-dis < %s.bc | FileCheck %s
-; CHECK-NOT: {i32 @llvm\\.pmulld}
-; CHECK: mul
diff --git a/test/Bitcode/sse41_pmulld.ll.bc b/test/Bitcode/sse41_pmulld.ll.bc
deleted file mode 100644
index bd66f0a..0000000
--- a/test/Bitcode/sse41_pmulld.ll.bc
+++ /dev/null
Binary files differ
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 82eac60..2db58b9 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -71,8 +71,6 @@ if(PYTHONINTERP_FOUND)
MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/Unit)
# Configuration-time: See Unit/lit.site.cfg.in
- set(LLVM_BUILD_MODE "${LLVM_BUILD_MODE}")
-
set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR})
set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR})
set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s")
@@ -81,10 +79,17 @@ if(PYTHONINTERP_FOUND)
set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED})
set(SHLIBPATH_VAR ${SHLIBPATH_VAR})
+ # lit.site.cfg uses the config-time build mode
+ set(LLVM_BUILD_MODE "${LLVM_BUILD_MODE}")
+
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
@ONLY)
+
+ # Unit/lit.site.cfg substitutes the runtime build_mode
+ set(LLVM_BUILD_MODE "%(build_mode)s")
+
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
diff --git a/test/CodeGen/ARM/2007-05-07-jumptoentry.ll b/test/CodeGen/ARM/2007-05-07-jumptoentry.ll
deleted file mode 100644
index 26864f1..0000000
--- a/test/CodeGen/ARM/2007-05-07-jumptoentry.ll
+++ /dev/null
@@ -1,58 +0,0 @@
-; RUN: llc < %s | not grep 1_0
-; This used to create an extra branch to 'entry', LBB1_0.
-
-; ModuleID = 'bug.bc'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:64"
-target triple = "arm-apple-darwin8"
- %struct.HexxagonMove = type { i8, i8, i32 }
- %struct.HexxagonMoveList = type { i32, %struct.HexxagonMove* }
-
-define void @_ZN16HexxagonMoveList8sortListEv(%struct.HexxagonMoveList* %this) {
-entry:
- %tmp51 = getelementptr %struct.HexxagonMoveList* %this, i32 0, i32 0 ; <i32*> [#uses=1]
- %tmp2 = getelementptr %struct.HexxagonMoveList* %this, i32 0, i32 1 ; <%struct.HexxagonMove**> [#uses=2]
- br label %bb49
-
-bb1: ; preds = %bb49
- %tmp3 = load %struct.HexxagonMove** %tmp2 ; <%struct.HexxagonMove*> [#uses=5]
- %tmp6 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 2 ; <i32*> [#uses=1]
- %tmp7 = load i32* %tmp6 ; <i32> [#uses=2]
- %tmp12 = add i32 %i.1, 1 ; <i32> [#uses=7]
- %tmp14 = getelementptr %struct.HexxagonMove* %tmp3, i32 %tmp12, i32 2 ; <i32*> [#uses=1]
- %tmp15 = load i32* %tmp14 ; <i32> [#uses=1]
- %tmp16 = icmp slt i32 %tmp7, %tmp15 ; <i1> [#uses=1]
- br i1 %tmp16, label %cond_true, label %bb49
-
-cond_true: ; preds = %bb1
- %tmp23.0 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 0 ; <i8*> [#uses=2]
- %tmp67 = load i8* %tmp23.0 ; <i8> [#uses=1]
- %tmp23.1 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 1 ; <i8*> [#uses=1]
- %tmp68 = load i8* %tmp23.1 ; <i8> [#uses=1]
- %tmp3638 = getelementptr %struct.HexxagonMove* %tmp3, i32 %tmp12, i32 0 ; <i8*> [#uses=1]
- tail call void @llvm.memcpy.i32( i8* %tmp23.0, i8* %tmp3638, i32 8, i32 4 )
- %tmp41 = load %struct.HexxagonMove** %tmp2 ; <%struct.HexxagonMove*> [#uses=3]
- %tmp44.0 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 0 ; <i8*> [#uses=1]
- store i8 %tmp67, i8* %tmp44.0
- %tmp44.1 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 1 ; <i8*> [#uses=1]
- store i8 %tmp68, i8* %tmp44.1
- %tmp44.2 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 2 ; <i32*> [#uses=1]
- store i32 %tmp7, i32* %tmp44.2
- br label %bb49
-
-bb49: ; preds = %bb59, %cond_true, %bb1, %entry
- %i.1 = phi i32 [ 0, %entry ], [ %tmp12, %bb1 ], [ %tmp12, %cond_true ], [ 0, %bb59 ] ; <i32> [#uses=5]
- %move.2 = phi i32 [ 0, %entry ], [ 1, %cond_true ], [ %move.2, %bb1 ], [ 0, %bb59 ] ; <i32> [#uses=2]
- %tmp52 = load i32* %tmp51 ; <i32> [#uses=1]
- %tmp53 = add i32 %tmp52, -1 ; <i32> [#uses=1]
- %tmp55 = icmp sgt i32 %tmp53, %i.1 ; <i1> [#uses=1]
- br i1 %tmp55, label %bb1, label %bb59
-
-bb59: ; preds = %bb49
- %tmp61 = icmp eq i32 %move.2, 0 ; <i1> [#uses=1]
- br i1 %tmp61, label %return, label %bb49
-
-return: ; preds = %bb59
- ret void
-}
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
diff --git a/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll b/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll
index 52937c1..55cea3a 100644
--- a/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll
+++ b/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll
@@ -12,7 +12,6 @@ entry:
%i_addr = alloca i32 ; <i32*> [#uses=2]
%q_addr = alloca i32 ; <i32*> [#uses=2]
%retval = alloca i32, align 4 ; <i32*> [#uses=1]
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 %i, i32* %i_addr
store i32 %q, i32* %q_addr
%tmp = load i32* %i_addr ; <i32> [#uses=1]
diff --git a/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll b/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll
index c925fa8..4894116 100644
--- a/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll
+++ b/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll
@@ -12,7 +12,6 @@ entry:
%i_addr = alloca i32 ; <i32*> [#uses=2]
%q_addr = alloca i32 ; <i32*> [#uses=2]
%retval = alloca i32, align 4 ; <i32*> [#uses=1]
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 %i, i32* %i_addr
store i32 %q, i32* %q_addr
%tmp = load i32* %i_addr ; <i32> [#uses=1]
diff --git a/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll b/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll
index 9df5af5..acbab8a 100644
--- a/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll
+++ b/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll
@@ -14,7 +14,6 @@ entry:
%i_addr = alloca i32 ; <i32*> [#uses=2]
%q_addr = alloca i32 ; <i32*> [#uses=2]
%retval = alloca i32, align 4 ; <i32*> [#uses=1]
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 %i, i32* %i_addr
store i32 %q, i32* %q_addr
%tmp = load i32* %i_addr ; <i32> [#uses=1]
diff --git a/test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll b/test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll
deleted file mode 100644
index 7ba2a19..0000000
--- a/test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll
+++ /dev/null
@@ -1,237 +0,0 @@
-; RUN: llc < %s
-; PR1424
-
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "arm-unknown-linux-gnueabi"
- %struct.AVClass = type { i8*, i8* (i8*)*, %struct.AVOption* }
- %struct.AVCodec = type { i8*, i32, i32, i32, i32 (%struct.AVCodecContext*)*, i32 (%struct.AVCodecContext*, i8*, i32, i8*)*, i32 (%struct.AVCodecContext*)*, i32 (%struct.AVCodecContext*, i8*, i32*, i8*, i32)*, i32, %struct.AVCodec*, void (%struct.AVCodecContext*)*, %struct.AVRational*, i32* }
- %struct.AVCodecContext = type { %struct.AVClass*, i32, i32, i32, i32, i32, i8*, i32, %struct.AVRational, i32, i32, i32, i32, i32, void (%struct.AVCodecContext*, %struct.AVFrame*, i32*, i32, i32, i32)*, i32, i32, i32, i32, i32, i32, i32, float, float, i32, i32, i32, i32, float, i32, i32, i32, %struct.AVCodec*, i8*, i32, i32, void (%struct.AVCodecContext*, i8*, i32, i32)*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, [32 x i8], i32, i32, i32, i32, i32, i32, i32, float, i32, i32 (%struct.AVCodecContext*, %struct.AVFrame*)*, void (%struct.AVCodecContext*, %struct.AVFrame*)*, i32, i32, i32, i32, i8*, i8*, float, float, i32, %struct.RcOverride*, i32, i8*, i32, i32, i32, float, float, float, float, i32, float, float, float, float, float, i32, i32, i32, i32*, i32, i32, i32, i32, %struct.AVRational, %struct.AVFrame*, i32, i32, [4 x i64], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 (%struct.AVCodecContext*, i32*)*, i32, i32, i32, i32, i32, i32, i8*, i32, i32, i32, i32, i32, i32, i16*, i16*, i32, i32, i32, i32, %struct.AVPaletteControl*, i32, i32 (%struct.AVCodecContext*, %struct.AVFrame*)*, i32, i32, i32, i32, i32, i32, i32, i32 (%struct.AVCodecContext*, i32 (%struct.AVCodecContext*, i8*)*, i8**, i32*, i32)*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }
- %struct.AVEvalExpr = type opaque
- %struct.AVFrame = type { [4 x i8*], [4 x i32], [4 x i8*], i32, i32, i64, i32, i32, i32, i32, i32, i8*, i32, i8*, [2 x [2 x i16]*], i32*, i8, i8*, [4 x i64], i32, i32, i32, i32, i32, %struct.AVPanScan*, i32, i32, i16*, [2 x i8*] }
- %struct.AVOption = type opaque
- %struct.AVPaletteControl = type { i32, [256 x i32] }
- %struct.AVPanScan = type { i32, i32, i32, [3 x [2 x i16]] }
- %struct.AVRational = type { i32, i32 }
- %struct.BlockNode = type { i16, i16, i8, [3 x i8], i8, i8 }
- %struct.DSPContext = type { void (i16*, i8*, i32)*, void (i16*, i8*, i8*, i32)*, void (i16*, i8*, i32)*, void (i16*, i8*, i32)*, void (i16*, i8*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, i32 (i16*)*, void (i8*, i8*, i32, i32, i32, i32, i32)*, void (i8*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)*, void (i16*)*, i32 (i8*, i32)*, i32 (i8*, i32)*, [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], i32 (i8*, i16*, i32)*, [4 x [4 x void (i8*, i8*, i32, i32)*]], [4 x [4 x void (i8*, i8*, i32, i32)*]], [4 x [4 x void (i8*, i8*, i32, i32)*]], [4 x [4 x void (i8*, i8*, i32, i32)*]], [2 x void (i8*, i8*, i8*, i32, i32)*], [11 x void (i8*, i8*, i32, i32, i32)*], [11 x void (i8*, i8*, i32, i32, i32)*], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], [8 x void (i8*, i8*, i32)*], [3 x void (i8*, i8*, i32, i32, i32, i32)*], [3 x void (i8*, i8*, i32, i32, i32, i32)*], [3 x void (i8*, i8*, i32, i32, i32, i32)*], [4 x [16 x void (i8*, i8*, i32)*]], [4 x [16 x void (i8*, i8*, i32)*]], [4 x [16 x void (i8*, i8*, i32)*]], [4 x [16 x void (i8*, i8*, i32)*]], [10 x void (i8*, i32, i32, i32, i32)*], [10 x void (i8*, i8*, i32, i32, i32, i32, i32)*], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i16*, i32)*, [2 x [4 x i32 (i8*, i8*, i8*, i32, i32)*]], void (i8*, i8*, i32)*, void (i8*, i8*, i8*, i32)*, void (i8*, i8*, i8*, i32, i32*, i32*)*, void (i32*, i32*, i32)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32)*, void (i8*, i32, i32, i32)*, void ([4 x [4 x i16]]*, i8*, [40 x i8]*, [40 x [2 x i16]]*, i32, i32, i32, i32, i32)*, void (i8*, i32, i32)*, void (i8*, i32, i32)*, void (i8*, i32)*, void (float*, float*, i32)*, void (float*, float*, i32)*, void (float*, float*, float*, i32)*, void (float*, float*, float*, float*, i32, i32, i32)*, void (i16*, float*, i32)*, void (i16*)*, void (i16*)*, void (i16*)*, void (i8*, i32, i16*)*, void (i8*, i32, i16*)*, [64 x i8], i32, i32 (i16*, i16*, i16*, i32)*, void (i16*, i16*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, void ([4 x i16]*)*, void (i32*, i32*, i32*, i32*, i32*, i32*, i32)*, void (i32*, i32)*, void (i8*, i32, i8**, i32, i32, i32, i32, i32, %struct.slice_buffer*, i32, i8*)*, void (i8*, i32, i32)*, [4 x void (i8*, i32, i8*, i32, i32, i32)*], void (i16*)*, void (i16*, i32)*, void (i16*, i32)*, void (i16*, i32)*, void (i8*, i32)*, void (i8*, i32)*, [16 x void (i8*, i8*, i32, i32)*] }
- %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i32, i32, [40 x i8] }
- %struct.GetBitContext = type { i8*, i8*, i32*, i32, i32, i32, i32 }
- %struct.MJpegContext = type opaque
- %struct.MotionEstContext = type { %struct.AVCodecContext*, i32, [4 x [2 x i32]], [4 x [2 x i32]], i8*, i8*, [2 x i8*], i8*, i32, i32*, i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x [4 x i8*]], [4 x [4 x i8*]], i32, i32, i32, i32, i32, [4 x void (i8*, i8*, i32, i32)*]*, [4 x void (i8*, i8*, i32, i32)*]*, [16 x void (i8*, i8*, i32)*]*, [16 x void (i8*, i8*, i32)*]*, [4097 x i8]*, i8*, i32 (%struct.MpegEncContext*, i32*, i32*, i32, i32, i32, i32, i32)* }
- %struct.MpegEncContext = type { %struct.AVCodecContext*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.PutBitContext, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.Picture*, %struct.Picture**, %struct.Picture**, i32, i32, [8 x %struct.MpegEncContext*], %struct.Picture, %struct.Picture, %struct.Picture, %struct.Picture, %struct.Picture*, %struct.Picture*, %struct.Picture*, [3 x i8*], [3 x i32], i16*, [3 x i16*], [20 x i16], i32, i32, i8*, i8*, i8*, i8*, i8*, [16 x i16]*, [3 x [16 x i16]*], i32, i8*, i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i32, i32, i32, i32, i32*, i32, i32, i32, i32, i32, i32, i32, [5 x i32], i32, i32, i32, i32, %struct.DSPContext, i32, i32, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x [2 x [2 x i16]*]], [2 x [2 x [2 x [2 x i16]*]]], [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x [2 x [2 x i16]*]], [2 x [2 x [2 x [2 x i16]*]]], [2 x i8*], [2 x [2 x i8*]], i32, i32, i32, [2 x [4 x [2 x i32]]], [2 x [2 x i32]], [2 x [2 x [2 x i32]]], i8*, [2 x [64 x i16]], %struct.MotionEstContext, i32, i32, i32, i32, i32, i32, i16*, [6 x i32], [6 x i32], [3 x i8*], i32*, [64 x i16], [64 x i16], [64 x i16], [64 x i16], i32, i32, i32, i32, i32, i8*, i8*, i8*, i8*, i8*, i8*, [8 x i32], [64 x i32]*, [64 x i32]*, [2 x [64 x i16]]*, [2 x [64 x i16]]*, [12 x i32], %struct.ScanTable, %struct.ScanTable, %struct.ScanTable, %struct.ScanTable, [64 x i32]*, [2 x i32], [64 x i16]*, i8*, i64, i64, i32, i32, %struct.RateControlContext, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i32, i32, %struct.GetBitContext, i32, i32, i32, %struct.ParseContext, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i16, i16, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x [2 x i32]], [2 x [2 x i32]], [2 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.PutBitContext, %struct.PutBitContext, i32, i32, i32, i32, i32, i32, i8*, i32, i32, i32, i32, i32, [3 x i32], %struct.MJpegContext*, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x [65 x [65 x [2 x i32]]]]*, i32, i32, %struct.GetBitContext, i32, i32, i32, i8*, i32, [2 x [2 x i32]], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x i32], i32, i32, i32, i32, i8*, i32, [12 x i16*], [64 x i16]*, [8 x [64 x i16]]*, i32 (%struct.MpegEncContext*, [64 x i16]*)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, i32 (%struct.MpegEncContext*, i16*, i32, i32, i32*)*, i32 (%struct.MpegEncContext*, i16*, i32, i32, i32*)*, void (%struct.MpegEncContext*, i16*)* }
- %struct.ParseContext = type { i8*, i32, i32, i32, i32, i32, i32, i32 }
- %struct.Picture = type { [4 x i8*], [4 x i32], [4 x i8*], i32, i32, i64, i32, i32, i32, i32, i32, i8*, i32, i8*, [2 x [2 x i16]*], i32*, i8, i8*, [4 x i64], i32, i32, i32, i32, i32, %struct.AVPanScan*, i32, i32, i16*, [2 x i8*], [3 x i8*], [2 x [2 x i16]*], i32*, [2 x i32], i32, i32, i32, i32, [2 x [16 x i32]], [2 x i32], i32, i32, i16*, i16*, i8*, i32*, i32 }
- %struct.Plane = type { i32, i32, [8 x [4 x %struct.SubBand]] }
- %struct.Predictor = type { double, double, double }
- %struct.PutBitContext = type { i32, i32, i8*, i8*, i8* }
- %struct.RangeCoder = type { i32, i32, i32, i32, [256 x i8], [256 x i8], i8*, i8*, i8* }
- %struct.RateControlContext = type { %struct.FILE*, i32, %struct.RateControlEntry*, double, [5 x %struct.Predictor], double, double, double, double, double, [5 x double], i32, i32, [5 x i64], [5 x i64], [5 x i64], [5 x i64], [5 x i32], i32, i8*, float, i32, %struct.AVEvalExpr* }
- %struct.RateControlEntry = type { i32, float, i32, i32, i32, i32, i32, i64, i32, float, i32, i32, i32, i32, i32, i32 }
- %struct.RcOverride = type { i32, i32, i32, float }
- %struct.ScanTable = type { i8*, [64 x i8], [64 x i8] }
- %struct.SnowContext = type { %struct.AVCodecContext*, %struct.RangeCoder, %struct.DSPContext, %struct.AVFrame, %struct.AVFrame, %struct.AVFrame, [8 x %struct.AVFrame], %struct.AVFrame, [32 x i8], [4224 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [8 x [2 x i16]*], [8 x i32*], i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x %struct.Plane], %struct.BlockNode*, [1024 x i32], i32, %struct.slice_buffer, %struct.MpegEncContext }
- %struct.SubBand = type { i32, i32, i32, i32, i32, i32*, i32, i32, i32, %struct.x_and_coeff*, %struct.SubBand*, [519 x [32 x i8]] }
- %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 }
- %struct.slice_buffer = type { i32**, i32**, i32, i32, i32, i32, i32* }
- %struct.x_and_coeff = type { i16, i16 }
-
-define fastcc void @iterative_me(%struct.SnowContext* %s) {
-entry:
- %state = alloca [4224 x i8], align 8 ; <[4224 x i8]*> [#uses=0]
- %best_rd4233 = alloca i32, align 4 ; <i32*> [#uses=0]
- %tmp21 = getelementptr %struct.SnowContext* %s, i32 0, i32 36 ; <i32*> [#uses=2]
- br label %bb4198
-
-bb79: ; preds = %bb4189.preheader
- br i1 false, label %cond_next239, label %cond_true
-
-cond_true: ; preds = %bb79
- ret void
-
-cond_next239: ; preds = %bb79
- %tmp286 = alloca i8, i32 0 ; <i8*> [#uses=0]
- ret void
-
-bb4198: ; preds = %bb4189.preheader, %entry
- br i1 false, label %bb4189.preheader, label %bb4204
-
-bb4189.preheader: ; preds = %bb4198
- br i1 false, label %bb79, label %bb4198
-
-bb4204: ; preds = %bb4198
- br i1 false, label %bb4221, label %cond_next4213
-
-cond_next4213: ; preds = %bb4204
- ret void
-
-bb4221: ; preds = %bb4204
- br i1 false, label %bb5242.preheader, label %UnifiedReturnBlock
-
-bb5242.preheader: ; preds = %bb4221
- br label %bb5242
-
-bb4231: ; preds = %bb5233
- %tmp4254.sum = add i32 0, 1 ; <i32> [#uses=2]
- br i1 false, label %bb4559, label %cond_next4622
-
-bb4559: ; preds = %bb4231
- ret void
-
-cond_next4622: ; preds = %bb4231
- %tmp4637 = load i16* null ; <i16> [#uses=1]
- %tmp46374638 = sext i16 %tmp4637 to i32 ; <i32> [#uses=1]
- %tmp4642 = load i16* null ; <i16> [#uses=1]
- %tmp46424643 = sext i16 %tmp4642 to i32 ; <i32> [#uses=1]
- %tmp4648 = load i16* null ; <i16> [#uses=1]
- %tmp46484649 = sext i16 %tmp4648 to i32 ; <i32> [#uses=1]
- %tmp4653 = getelementptr %struct.BlockNode* null, i32 %tmp4254.sum, i32 0 ; <i16*> [#uses=1]
- %tmp4654 = load i16* %tmp4653 ; <i16> [#uses=1]
- %tmp46544655 = sext i16 %tmp4654 to i32 ; <i32> [#uses=1]
- %tmp4644 = add i32 %tmp46374638, 2 ; <i32> [#uses=1]
- %tmp4650 = add i32 %tmp4644, %tmp46424643 ; <i32> [#uses=1]
- %tmp4656 = add i32 %tmp4650, %tmp46484649 ; <i32> [#uses=1]
- %tmp4657 = add i32 %tmp4656, %tmp46544655 ; <i32> [#uses=2]
- %tmp4658 = ashr i32 %tmp4657, 2 ; <i32> [#uses=1]
- %tmp4662 = load i16* null ; <i16> [#uses=1]
- %tmp46624663 = sext i16 %tmp4662 to i32 ; <i32> [#uses=1]
- %tmp4672 = getelementptr %struct.BlockNode* null, i32 0, i32 1 ; <i16*> [#uses=1]
- %tmp4673 = load i16* %tmp4672 ; <i16> [#uses=1]
- %tmp46734674 = sext i16 %tmp4673 to i32 ; <i32> [#uses=1]
- %tmp4678 = getelementptr %struct.BlockNode* null, i32 %tmp4254.sum, i32 1 ; <i16*> [#uses=1]
- %tmp4679 = load i16* %tmp4678 ; <i16> [#uses=1]
- %tmp46794680 = sext i16 %tmp4679 to i32 ; <i32> [#uses=1]
- %tmp4669 = add i32 %tmp46624663, 2 ; <i32> [#uses=1]
- %tmp4675 = add i32 %tmp4669, 0 ; <i32> [#uses=1]
- %tmp4681 = add i32 %tmp4675, %tmp46734674 ; <i32> [#uses=1]
- %tmp4682 = add i32 %tmp4681, %tmp46794680 ; <i32> [#uses=2]
- %tmp4683 = ashr i32 %tmp4682, 2 ; <i32> [#uses=1]
- %tmp4703 = load i32* %tmp21 ; <i32> [#uses=1]
- %tmp4707 = shl i32 %tmp4703, 0 ; <i32> [#uses=4]
- %tmp4710 = load %struct.BlockNode** null ; <%struct.BlockNode*> [#uses=6]
- %tmp4713 = mul i32 %tmp4707, %mb_y.4 ; <i32> [#uses=1]
- %tmp4715 = add i32 %tmp4713, %mb_x.7 ; <i32> [#uses=7]
- store i8 0, i8* null
- store i8 0, i8* null
- %tmp47594761 = bitcast %struct.BlockNode* null to i8* ; <i8*> [#uses=2]
- call void @llvm.memcpy.i32( i8* null, i8* %tmp47594761, i32 10, i32 0 )
- %tmp4716.sum5775 = add i32 %tmp4715, 1 ; <i32> [#uses=1]
- %tmp4764 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4716.sum5775 ; <%struct.BlockNode*> [#uses=1]
- %tmp47644766 = bitcast %struct.BlockNode* %tmp4764 to i8* ; <i8*> [#uses=1]
- %tmp4716.sum5774 = add i32 %tmp4715, %tmp4707 ; <i32> [#uses=0]
- %tmp47704772 = bitcast %struct.BlockNode* null to i8* ; <i8*> [#uses=1]
- %tmp4774 = add i32 %tmp4707, 1 ; <i32> [#uses=1]
- %tmp4716.sum5773 = add i32 %tmp4774, %tmp4715 ; <i32> [#uses=1]
- %tmp4777 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4716.sum5773 ; <%struct.BlockNode*> [#uses=1]
- %tmp47774779 = bitcast %struct.BlockNode* %tmp4777 to i8* ; <i8*> [#uses=1]
- %tmp4781 = icmp slt i32 %mb_x.7, 0 ; <i1> [#uses=1]
- %tmp4788 = or i1 %tmp4781, %tmp4784 ; <i1> [#uses=2]
- br i1 %tmp4788, label %cond_true4791, label %cond_next4794
-
-cond_true4791: ; preds = %cond_next4622
- unreachable
-
-cond_next4794: ; preds = %cond_next4622
- %tmp4797 = icmp slt i32 %mb_x.7, %tmp4707 ; <i1> [#uses=1]
- br i1 %tmp4797, label %cond_next4803, label %cond_true4800
-
-cond_true4800: ; preds = %cond_next4794
- unreachable
-
-cond_next4803: ; preds = %cond_next4794
- %tmp4825 = ashr i32 %tmp4657, 12 ; <i32> [#uses=1]
- shl i32 %tmp4682, 4 ; <i32>:0 [#uses=1]
- %tmp4828 = and i32 %0, -64 ; <i32> [#uses=1]
- %tmp4831 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 2 ; <i8*> [#uses=0]
- %tmp4826 = add i32 %tmp4828, %tmp4825 ; <i32> [#uses=1]
- %tmp4829 = add i32 %tmp4826, 0 ; <i32> [#uses=1]
- %tmp4835 = add i32 %tmp4829, 0 ; <i32> [#uses=1]
- store i32 %tmp4835, i32* null
- %tmp48534854 = trunc i32 %tmp4658 to i16 ; <i16> [#uses=1]
- %tmp4856 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 0 ; <i16*> [#uses=1]
- store i16 %tmp48534854, i16* %tmp4856
- %tmp48574858 = trunc i32 %tmp4683 to i16 ; <i16> [#uses=1]
- %tmp4860 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 1 ; <i16*> [#uses=1]
- store i16 %tmp48574858, i16* %tmp4860
- %tmp4866 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 4 ; <i8*> [#uses=0]
- br i1 false, label %bb4933, label %cond_false4906
-
-cond_false4906: ; preds = %cond_next4803
- call void @llvm.memcpy.i32( i8* %tmp47594761, i8* null, i32 10, i32 0 )
- call void @llvm.memcpy.i32( i8* %tmp47644766, i8* null, i32 10, i32 0 )
- call void @llvm.memcpy.i32( i8* %tmp47704772, i8* null, i32 10, i32 0 )
- call void @llvm.memcpy.i32( i8* %tmp47774779, i8* null, i32 10, i32 0 )
- br label %bb5215
-
-bb4933: ; preds = %bb5215, %cond_next4803
- br i1 false, label %cond_true4944, label %bb5215
-
-cond_true4944: ; preds = %bb4933
- %tmp4982 = load i32* %tmp21 ; <i32> [#uses=1]
- %tmp4986 = shl i32 %tmp4982, 0 ; <i32> [#uses=2]
- %tmp4992 = mul i32 %tmp4986, %mb_y.4 ; <i32> [#uses=1]
- %tmp4994 = add i32 %tmp4992, %mb_x.7 ; <i32> [#uses=5]
- %tmp4995.sum5765 = add i32 %tmp4994, 1 ; <i32> [#uses=1]
- %tmp5043 = getelementptr %struct.BlockNode* null, i32 %tmp4995.sum5765 ; <%struct.BlockNode*> [#uses=1]
- %tmp50435045 = bitcast %struct.BlockNode* %tmp5043 to i8* ; <i8*> [#uses=2]
- call void @llvm.memcpy.i32( i8* null, i8* %tmp50435045, i32 10, i32 0 )
- %tmp4995.sum5764 = add i32 %tmp4994, %tmp4986 ; <i32> [#uses=1]
- %tmp5049 = getelementptr %struct.BlockNode* null, i32 %tmp4995.sum5764 ; <%struct.BlockNode*> [#uses=1]
- %tmp50495051 = bitcast %struct.BlockNode* %tmp5049 to i8* ; <i8*> [#uses=2]
- call void @llvm.memcpy.i32( i8* null, i8* %tmp50495051, i32 10, i32 0 )
- %tmp4995.sum5763 = add i32 0, %tmp4994 ; <i32> [#uses=1]
- %tmp5056 = getelementptr %struct.BlockNode* null, i32 %tmp4995.sum5763 ; <%struct.BlockNode*> [#uses=1]
- %tmp50565058 = bitcast %struct.BlockNode* %tmp5056 to i8* ; <i8*> [#uses=1]
- br i1 %tmp4788, label %cond_true5070, label %cond_next5073
-
-cond_true5070: ; preds = %cond_true4944
- unreachable
-
-cond_next5073: ; preds = %cond_true4944
- %tmp5139 = getelementptr %struct.BlockNode* null, i32 %tmp4994, i32 1 ; <i16*> [#uses=0]
- %tmp5145 = getelementptr %struct.BlockNode* null, i32 %tmp4994, i32 4 ; <i8*> [#uses=0]
- call void @llvm.memcpy.i32( i8* %tmp50435045, i8* null, i32 10, i32 0 )
- call void @llvm.memcpy.i32( i8* %tmp50495051, i8* null, i32 10, i32 0 )
- call void @llvm.memcpy.i32( i8* %tmp50565058, i8* null, i32 10, i32 0 )
- br label %bb5215
-
-bb5215: ; preds = %cond_next5073, %bb4933, %cond_false4906
- %i4232.3 = phi i32 [ 0, %cond_false4906 ], [ 0, %cond_next5073 ], [ 0, %bb4933 ] ; <i32> [#uses=1]
- %tmp5217 = icmp slt i32 %i4232.3, 4 ; <i1> [#uses=1]
- br i1 %tmp5217, label %bb4933, label %bb5220
-
-bb5220: ; preds = %bb5215
- br i1 false, label %bb5230, label %cond_true5226
-
-cond_true5226: ; preds = %bb5220
- ret void
-
-bb5230: ; preds = %bb5220
- %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1]
- br label %bb5233
-
-bb5233: ; preds = %bb5233.preheader, %bb5230
- %indvar = phi i32 [ 0, %bb5233.preheader ], [ %indvar.next, %bb5230 ] ; <i32> [#uses=2]
- %mb_x.7 = shl i32 %indvar, 1 ; <i32> [#uses=4]
- br i1 false, label %bb4231, label %bb5239
-
-bb5239: ; preds = %bb5233
- %indvar.next37882 = add i32 %indvar37881, 1 ; <i32> [#uses=1]
- br label %bb5242
-
-bb5242: ; preds = %bb5239, %bb5242.preheader
- %indvar37881 = phi i32 [ 0, %bb5242.preheader ], [ %indvar.next37882, %bb5239 ] ; <i32> [#uses=2]
- %mb_y.4 = shl i32 %indvar37881, 1 ; <i32> [#uses=3]
- br i1 false, label %bb5233.preheader, label %bb5248
-
-bb5233.preheader: ; preds = %bb5242
- %tmp4784 = icmp slt i32 %mb_y.4, 0 ; <i1> [#uses=1]
- br label %bb5233
-
-bb5248: ; preds = %bb5242
- ret void
-
-UnifiedReturnBlock: ; preds = %bb4221
- ret void
-}
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
diff --git a/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll b/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll
index 77418be..c9a8a67 100644
--- a/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll
+++ b/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll
@@ -188,11 +188,6 @@ bb231: ; preds = %bb226
ret void
}
- %struct.III_psy_xmin = type { [22 x double], [13 x [3 x double]] }
- %struct.III_scalefac_t = type { [22 x i32], [13 x [3 x i32]] }
- %struct.gr_info = type { i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32*, [4 x i32] }
- %struct.lame_global_flags = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i8*, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32 }
-
define fastcc void @outer_loop2(%struct.lame_global_flags* %gfp, double* %xr, i32 %targ_bits, double* %best_noise, %struct.III_psy_xmin* %l3_xmin, i32* %l3_enc, %struct.III_scalefac_t* %scalefac, %struct.gr_info* %cod_info, i32 %ch) {
entry:
%cod_info.20128.1 = getelementptr %struct.gr_info* %cod_info, i32 0, i32 20, i32 1 ; <i32*> [#uses=1]
diff --git a/test/CodeGen/ARM/2009-03-07-SpillerBug.ll b/test/CodeGen/ARM/2009-03-07-SpillerBug.ll
index 0ec17ae..377bbd2 100644
--- a/test/CodeGen/ARM/2009-03-07-SpillerBug.ll
+++ b/test/CodeGen/ARM/2009-03-07-SpillerBug.ll
@@ -1,16 +1,15 @@
; RUN: llc < %s -mtriple=armv6-apple-darwin9 -mattr=+vfp2
; rdar://6653182
- %struct.ggBRDF = type { i32 (...)** }
- %struct.ggPoint2 = type { [2 x double] }
- %struct.ggPoint3 = type { [3 x double] }
- %struct.ggSpectrum = type { [8 x float] }
- %struct.ggSphere = type { %struct.ggPoint3, double }
- %struct.mrDiffuseAreaSphereLuminaire = type { %struct.mrSphere, %struct.ggSpectrum }
- %struct.mrDiffuseCosineSphereLuminaire = type { %struct.mrDiffuseAreaSphereLuminaire }
- %struct.mrSphere = type { %struct.ggBRDF, %struct.ggSphere }
-declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind
+%struct.ggBRDF = type { i32 (...)** }
+%struct.ggPoint2 = type { [2 x double] }
+%struct.ggPoint3 = type { [3 x double] }
+%struct.ggSpectrum = type { [8 x float] }
+%struct.ggSphere = type { %struct.ggPoint3, double }
+%struct.mrDiffuseAreaSphereLuminaire = type { %struct.mrSphere, %struct.ggSpectrum }
+%struct.mrDiffuseCosineSphereLuminaire = type { %struct.mrDiffuseAreaSphereLuminaire }
+%struct.mrSphere = type { %struct.ggBRDF, %struct.ggSphere }
declare double @llvm.sqrt.f64(double) nounwind readonly
@@ -20,59 +19,61 @@ declare double @acos(double) nounwind readonly
define i32 @_ZNK34mrDiffuseSolidAngleSphereLuminaire18selectVisiblePointERK8ggPoint3RK9ggVector3RK8ggPoint2dRS0_Rd(%struct.mrDiffuseCosineSphereLuminaire* nocapture %this, %struct.ggPoint3* nocapture %x, %struct.ggPoint3* nocapture %unnamed_arg, %struct.ggPoint2* nocapture %uv, double %unnamed_arg2, %struct.ggPoint3* nocapture %on_light, double* nocapture %invProb) nounwind {
entry:
- %0 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind ; <double> [#uses=4]
- %1 = fcmp ult double 0.000000e+00, %0 ; <i1> [#uses=1]
- br i1 %1, label %bb3, label %bb7
+ %0 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind
+ %1 = fcmp ult double 0.000000e+00, %0
+ br i1 %1, label %bb3, label %bb7
-bb3: ; preds = %entry
- %2 = fdiv double 1.000000e+00, 0.000000e+00 ; <double> [#uses=1]
- %3 = fmul double 0.000000e+00, %2 ; <double> [#uses=2]
- %4 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind ; <double> [#uses=1]
- %5 = fdiv double 1.000000e+00, %4 ; <double> [#uses=2]
- %6 = fmul double %3, %5 ; <double> [#uses=2]
- %7 = fmul double 0.000000e+00, %5 ; <double> [#uses=2]
- %8 = fmul double %3, %7 ; <double> [#uses=1]
- %9 = fsub double %8, 0.000000e+00 ; <double> [#uses=1]
- %10 = fmul double 0.000000e+00, %6 ; <double> [#uses=1]
- %11 = fsub double 0.000000e+00, %10 ; <double> [#uses=1]
- %12 = fsub double -0.000000e+00, %11 ; <double> [#uses=1]
- %13 = fmul double %0, %0 ; <double> [#uses=2]
- %14 = fsub double %13, 0.000000e+00 ; <double> [#uses=1]
- %15 = call double @llvm.sqrt.f64(double %14) ; <double> [#uses=1]
- %16 = fmul double 0.000000e+00, %15 ; <double> [#uses=1]
- %17 = fdiv double %16, %0 ; <double> [#uses=1]
- %18 = fadd double 0.000000e+00, %17 ; <double> [#uses=1]
- %19 = call double @acos(double %18) nounwind readonly ; <double> [#uses=1]
- %20 = load double* null, align 4 ; <double> [#uses=1]
- %21 = fmul double %20, 0x401921FB54442D18 ; <double> [#uses=1]
- %22 = call double @sin(double %19) nounwind readonly ; <double> [#uses=2]
- %23 = fmul double %22, 0.000000e+00 ; <double> [#uses=2]
- %24 = fmul double %6, %23 ; <double> [#uses=1]
- %25 = fmul double %7, %23 ; <double> [#uses=1]
- %26 = call double @sin(double %21) nounwind readonly ; <double> [#uses=1]
- %27 = fmul double %22, %26 ; <double> [#uses=2]
- %28 = fmul double %9, %27 ; <double> [#uses=1]
- %29 = fmul double %27, %12 ; <double> [#uses=1]
- %30 = fadd double %24, %28 ; <double> [#uses=1]
- %31 = fadd double 0.000000e+00, %29 ; <double> [#uses=1]
- %32 = fadd double %25, 0.000000e+00 ; <double> [#uses=1]
- %33 = fadd double %30, 0.000000e+00 ; <double> [#uses=1]
- %34 = fadd double %31, 0.000000e+00 ; <double> [#uses=1]
- %35 = fadd double %32, 0.000000e+00 ; <double> [#uses=1]
- %36 = bitcast %struct.ggPoint3* %x to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32(i8* null, i8* %36, i32 24, i32 4) nounwind
- store double %33, double* null, align 8
- br i1 false, label %_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit, label %bb5.i.i.i
+bb3: ; preds = %entry
+ %2 = fdiv double 1.000000e+00, 0.000000e+00
+ %3 = fmul double 0.000000e+00, %2
+ %4 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind
+ %5 = fdiv double 1.000000e+00, %4
+ %6 = fmul double %3, %5
+ %7 = fmul double 0.000000e+00, %5
+ %8 = fmul double %3, %7
+ %9 = fsub double %8, 0.000000e+00
+ %10 = fmul double 0.000000e+00, %6
+ %11 = fsub double 0.000000e+00, %10
+ %12 = fsub double -0.000000e+00, %11
+ %13 = fmul double %0, %0
+ %14 = fsub double %13, 0.000000e+00
+ %15 = call double @llvm.sqrt.f64(double %14)
+ %16 = fmul double 0.000000e+00, %15
+ %17 = fdiv double %16, %0
+ %18 = fadd double 0.000000e+00, %17
+ %19 = call double @acos(double %18) nounwind readonly
+ %20 = load double* null, align 4
+ %21 = fmul double %20, 0x401921FB54442D18
+ %22 = call double @sin(double %19) nounwind readonly
+ %23 = fmul double %22, 0.000000e+00
+ %24 = fmul double %6, %23
+ %25 = fmul double %7, %23
+ %26 = call double @sin(double %21) nounwind readonly
+ %27 = fmul double %22, %26
+ %28 = fmul double %9, %27
+ %29 = fmul double %27, %12
+ %30 = fadd double %24, %28
+ %31 = fadd double 0.000000e+00, %29
+ %32 = fadd double %25, 0.000000e+00
+ %33 = fadd double %30, 0.000000e+00
+ %34 = fadd double %31, 0.000000e+00
+ %35 = fadd double %32, 0.000000e+00
+ %36 = bitcast %struct.ggPoint3* %x to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* null, i8* %36, i32 24, i32 4, i1 false)
+ store double %33, double* null, align 8
+ br i1 false, label %_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit, label %bb5.i.i.i
-bb5.i.i.i: ; preds = %bb3
- unreachable
+bb5.i.i.i: ; preds = %bb3
+ unreachable
-_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit: ; preds = %bb3
- %37 = fsub double %13, 0.000000e+00 ; <double> [#uses=0]
- %38 = fsub double -0.000000e+00, %34 ; <double> [#uses=0]
- %39 = fsub double -0.000000e+00, %35 ; <double> [#uses=0]
- ret i32 1
+_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit: ; preds = %bb3
+ %37 = fsub double %13, 0.000000e+00
+ %38 = fsub double -0.000000e+00, %34
+ %39 = fsub double -0.000000e+00, %35
+ ret i32 1
-bb7: ; preds = %entry
- ret i32 0
+bb7: ; preds = %entry
+ ret i32 0
}
+
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll b/test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll
deleted file mode 100644
index 27888d7..0000000
--- a/test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll
+++ /dev/null
@@ -1,77 +0,0 @@
-; RUN: llc < %s -mtriple=armv6-apple-darwin
-
- type { i32, i32, %struct.D_Sym**, [3 x %struct.D_Sym*] } ; type %0
- type { i32, %struct.D_Reduction** } ; type %1
- type { i32, %struct.D_RightEpsilonHint* } ; type %2
- type { i32, %struct.D_ErrorRecoveryHint* } ; type %3
- type { i32, i32, %struct.D_Reduction**, [3 x %struct.D_Reduction*] } ; type %4
- %struct.D_ErrorRecoveryHint = type { i16, i16, i8* }
- %struct.D_ParseNode = type { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, i8*, i8* }
- %struct.D_Parser = type { i8*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, %struct.D_Scope*, void (%struct.D_Parser*)*, %struct.D_ParseNode* (%struct.D_Parser*, i32, %struct.D_ParseNode**)*, void (%struct.D_ParseNode*)*, %struct.d_loc_t, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
- %struct.D_ParserTables = type { i32, %struct.D_State*, i16*, i32, i32, %struct.D_Symbol*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, i32, %struct.D_Pass*, i32 }
- %struct.D_Pass = type { i8*, i32, i32, i32 }
- %struct.D_Reduction = type { i16, i16, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)*, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)*, i16, i16, i32, i32, i32, i32, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)** }
- %struct.D_RightEpsilonHint = type { i16, i16, %struct.D_Reduction* }
- %struct.D_Scope = type { i8, %struct.D_Sym*, %struct.D_SymHash*, %struct.D_Sym*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope* }
- %struct.D_Shift = type { i16, i8, i8, i32, i32, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)* }
- %struct.D_State = type { i8*, i32, %1, %2, %3, %struct.D_Shift**, i32 (i8**, i32*, i32*, i16*, i32*, i8*, i32*)*, i8*, i8, i8, i8, i8*, %struct.D_Shift***, i32 }
- %struct.D_Sym = type { i8*, i32, i32, %struct.D_Sym*, %struct.D_Sym*, i32 }
- %struct.D_SymHash = type { i32, i32, %0 }
- %struct.D_Symbol = type { i32, i8*, i32 }
- %struct.PNode = type { i32, i32, i32, i32, %struct.D_Reduction*, %struct.D_Shift*, i32, %struct.VecPNode, i32, i8, i8, %struct.PNode*, %struct.PNode*, %struct.PNode*, %struct.PNode*, i8*, i8*, %struct.D_Scope*, i8*, %struct.D_ParseNode }
- %struct.PNodeHash = type { %struct.PNode**, i32, i32, i32, %struct.PNode* }
- %struct.Parser = type { %struct.D_Parser, i8*, i8*, %struct.D_ParserTables*, i32, i32, i32, i32, i32, i32, i32, %struct.PNodeHash, %struct.SNodeHash, %struct.Reduction*, %struct.Shift*, %struct.D_Scope*, %struct.SNode*, i32, %struct.Reduction*, %struct.Shift*, i32, %struct.PNode*, %struct.SNode*, %struct.ZNode*, %4, %struct.ShiftResult*, %struct.D_Shift, %struct.Parser*, i8* }
- %struct.Reduction = type { %struct.ZNode*, %struct.SNode*, %struct.D_Reduction*, %struct.SNode*, i32, %struct.Reduction* }
- %struct.SNode = type { %struct.D_State*, %struct.D_Scope*, i8*, %struct.d_loc_t, i32, %struct.PNode*, %struct.VecZNode, i32, %struct.SNode*, %struct.SNode* }
- %struct.SNodeHash = type { %struct.SNode**, i32, i32, i32, %struct.SNode*, %struct.SNode* }
- %struct.Shift = type { %struct.SNode*, %struct.Shift* }
- %struct.ShiftResult = type { %struct.D_Shift*, %struct.d_loc_t }
- %struct.VecPNode = type { i32, i32, %struct.PNode**, [3 x %struct.PNode*] }
- %struct.VecSNode = type { i32, i32, %struct.SNode**, [3 x %struct.SNode*] }
- %struct.VecZNode = type { i32, i32, %struct.ZNode**, [3 x %struct.ZNode*] }
- %struct.ZNode = type { %struct.PNode*, %struct.VecSNode }
- %struct.d_loc_t = type { i8*, i8*, i32, i32, i32 }
-
-declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind
-
-define fastcc i32 @exhaustive_parse(%struct.Parser* %p, i32 %state) nounwind {
-entry:
- store i8* undef, i8** undef, align 4
- %0 = getelementptr %struct.Parser* %p, i32 0, i32 0, i32 6 ; <%struct.d_loc_t*> [#uses=1]
- %1 = bitcast %struct.d_loc_t* %0 to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32(i8* undef, i8* %1, i32 20, i32 4)
- br label %bb10
-
-bb10: ; preds = %bb30, %bb29, %bb26, %entry
- br i1 undef, label %bb18, label %bb20
-
-bb18: ; preds = %bb10
- br i1 undef, label %bb20, label %bb19
-
-bb19: ; preds = %bb18
- br label %bb20
-
-bb20: ; preds = %bb19, %bb18, %bb10
- br i1 undef, label %bb21, label %bb22
-
-bb21: ; preds = %bb20
- unreachable
-
-bb22: ; preds = %bb20
- br i1 undef, label %bb24, label %bb26
-
-bb24: ; preds = %bb22
- unreachable
-
-bb26: ; preds = %bb22
- br i1 undef, label %bb10, label %bb29
-
-bb29: ; preds = %bb26
- br i1 undef, label %bb10, label %bb30
-
-bb30: ; preds = %bb29
- br i1 undef, label %bb31, label %bb10
-
-bb31: ; preds = %bb30
- unreachable
-}
diff --git a/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll b/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
index 397eba4..8bde748 100644
--- a/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
+++ b/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
@@ -1,32 +1,35 @@
; RUN: llc < %s -mtriple=arm-apple-darwin9 -march=arm | FileCheck %s
+; CHECK: L_LSDA_0:
+
+
%struct.A = type { i32* }
define void @"\01-[MyFunction Name:]"() {
entry:
- %save_filt.1 = alloca i32 ; <i32*> [#uses=2]
- %save_eptr.0 = alloca i8* ; <i8**> [#uses=2]
- %a = alloca %struct.A ; <%struct.A*> [#uses=3]
- %eh_exception = alloca i8* ; <i8**> [#uses=5]
- %eh_selector = alloca i32 ; <i32*> [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- call void @_ZN1AC1Ev(%struct.A* %a)
- invoke void @_Z3barv()
+ %save_filt.1 = alloca i32
+ %save_eptr.0 = alloca i8*
+ %a = alloca %struct.A
+ %eh_exception = alloca i8*
+ %eh_selector = alloca i32
+ %"alloca point" = bitcast i32 0 to i32
+ call void @_ZN1AC1Ev(%struct.A* %a)
+ invoke void @_Z3barv()
to label %invcont unwind label %lpad
invcont: ; preds = %entry
- call void @_ZN1AD1Ev(%struct.A* %a) nounwind
+ call void @_ZN1AD1Ev(%struct.A* %a) nounwind
br label %return
bb: ; preds = %ppad
- %eh_select = load i32* %eh_selector ; <i32> [#uses=1]
+ %eh_select = load i32* %eh_selector
store i32 %eh_select, i32* %save_filt.1, align 4
- %eh_value = load i8** %eh_exception ; <i8*> [#uses=1]
+ %eh_value = load i8** %eh_exception
store i8* %eh_value, i8** %save_eptr.0, align 4
- call void @_ZN1AD1Ev(%struct.A* %a) nounwind
- %0 = load i8** %save_eptr.0, align 4 ; <i8*> [#uses=1]
+ call void @_ZN1AD1Ev(%struct.A* %a) nounwind
+ %0 = load i8** %save_eptr.0, align 4
store i8* %0, i8** %eh_exception, align 4
- %1 = load i32* %save_filt.1, align 4 ; <i32> [#uses=1]
+ %1 = load i32* %save_filt.1, align 4
store i32 %1, i32* %eh_selector, align 4
br label %Unwind
@@ -34,10 +37,10 @@ return: ; preds = %invcont
ret void
lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; <i8*> [#uses=1]
+ %eh_ptr = call i8* @llvm.eh.exception()
store i8* %eh_ptr, i8** %eh_exception
- %eh_ptr1 = load i8** %eh_exception ; <i8*> [#uses=1]
- %eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0) ; <i32> [#uses=1]
+ %eh_ptr1 = load i8** %eh_exception
+ %eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0)
store i32 %eh_select2, i32* %eh_selector
br label %ppad
@@ -45,20 +48,20 @@ ppad: ; preds = %lpad
br label %bb
Unwind: ; preds = %bb
- %eh_ptr3 = load i8** %eh_exception ; <i8*> [#uses=1]
- call void @_Unwind_SjLj_Resume(i8* %eh_ptr3)
+ %eh_ptr3 = load i8** %eh_exception
+ call void @_Unwind_SjLj_Resume(i8* %eh_ptr3)
unreachable
}
define linkonce_odr void @_ZN1AC1Ev(%struct.A* %this) {
entry:
- %this_addr = alloca %struct.A* ; <%struct.A**> [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
+ %this_addr = alloca %struct.A*
+ %"alloca point" = bitcast i32 0 to i32
store %struct.A* %this, %struct.A** %this_addr
- %0 = call i8* @_Znwm(i32 4) ; <i8*> [#uses=1]
- %1 = bitcast i8* %0 to i32* ; <i32*> [#uses=1]
- %2 = load %struct.A** %this_addr, align 4 ; <%struct.A*> [#uses=1]
- %3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0 ; <i32**> [#uses=1]
+ %0 = call i8* @_Znwm(i32 4)
+ %1 = bitcast i8* %0 to i32*
+ %2 = load %struct.A** %this_addr, align 4
+ %3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0
store i32* %1, i32** %3, align 4
br label %return
@@ -70,14 +73,14 @@ declare i8* @_Znwm(i32)
define linkonce_odr void @_ZN1AD1Ev(%struct.A* %this) nounwind {
entry:
- %this_addr = alloca %struct.A* ; <%struct.A**> [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
+ %this_addr = alloca %struct.A*
+ %"alloca point" = bitcast i32 0 to i32
store %struct.A* %this, %struct.A** %this_addr
- %0 = load %struct.A** %this_addr, align 4 ; <%struct.A*> [#uses=1]
- %1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0 ; <i32**> [#uses=1]
- %2 = load i32** %1, align 4 ; <i32*> [#uses=1]
- %3 = bitcast i32* %2 to i8* ; <i8*> [#uses=1]
- call void @_ZdlPv(i8* %3) nounwind
+ %0 = load %struct.A** %this_addr, align 4
+ %1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0
+ %2 = load i32** %1, align 4
+ %3 = bitcast i32* %2 to i8*
+ call void @_ZdlPv(i8* %3) nounwind
br label %bb
bb: ; preds = %entry
@@ -86,17 +89,16 @@ bb: ; preds = %entry
return: ; preds = %bb
ret void
}
-;CHECK: L_LSDA_0:
declare void @_ZdlPv(i8*) nounwind
declare void @_Z3barv()
-declare i8* @llvm.eh.exception() nounwind
+declare i8* @llvm.eh.exception() nounwind readonly
-declare i32 @llvm.eh.selector.i32(i8*, i8*, ...) nounwind
+declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
-declare i32 @llvm.eh.typeid.for.i32(i8*) nounwind
+declare i32 @llvm.eh.typeid.for(i8*) nounwind
declare i32 @__gxx_personality_sj0(...)
diff --git a/test/CodeGen/ARM/constants.ll b/test/CodeGen/ARM/constants.ll
index 7893df7..7b6c9d4 100644
--- a/test/CodeGen/ARM/constants.ll
+++ b/test/CodeGen/ARM/constants.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=arm -disable-cgp-branch-opts | FileCheck %s
+; RUN: llc < %s -mtriple=armv4t-unknown-linux-gnueabi -disable-cgp-branch-opts | FileCheck %s
define i32 @f1() {
; CHECK: f1
@@ -44,3 +44,16 @@ define void @f7(i32 %a) {
r:
ret void
}
+
+%t1 = type { <3 x float>, <3 x float> }
+
+@const1 = global %t1 { <3 x float> zeroinitializer,
+ <3 x float> <float 1.000000e+00,
+ float 2.000000e+00,
+ float 3.000000e+00> }, align 16
+; CHECK: const1
+; CHECK: .zero 16
+; CHECK: float 1.0
+; CHECK: float 2.0
+; CHECK: float 3.0
+; CHECK: .zero 4
diff --git a/test/CodeGen/ARM/debug-info-blocks.ll b/test/CodeGen/ARM/debug-info-blocks.ll
new file mode 100644
index 0000000..519c40e
--- /dev/null
+++ b/test/CodeGen/ARM/debug-info-blocks.ll
@@ -0,0 +1,245 @@
+; RUN: llc -O0 < %s | FileCheck %s
+; CHECK: @DEBUG_VALUE: mydata <- [sp+#8]+#0
+; Radar 9331779
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
+target triple = "thumbv7-apple-macosx10.7.0"
+
+%0 = type opaque
+%1 = type { [4 x i32] }
+%2 = type <{ i8*, i32, i32, i8*, %struct.Re*, i8*, %3*, %struct.my_struct* }>
+%3 = type opaque
+%struct.CP = type { float, float }
+%struct.CR = type { %struct.CP, %struct.CP }
+%struct.Re = type { i32, i32 }
+%struct.__block_byref_mydata = type { i8*, %struct.__block_byref_mydata*, i32, i32, i8*, i8*, %0* }
+%struct.my_struct = type opaque
+
+@"\01L_OBJC_SELECTOR_REFERENCES_13" = external hidden global i8*, section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
+@"OBJC_IVAR_$_MyWork._bounds" = external hidden global i32, section "__DATA, __objc_const", align 4
+@"OBJC_IVAR_$_MyWork._data" = external hidden global i32, section "__DATA, __objc_const", align 4
+@"\01L_OBJC_SELECTOR_REFERENCES_222" = external hidden global i8*, section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
+
+declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone
+
+declare i8* @objc_msgSend(i8*, i8*, ...)
+
+declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
+
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+
+define hidden void @foobar_func_block_invoke_0(i8* %.block_descriptor, %0* %loadedMydata, [4 x i32] %bounds.coerce0, [4 x i32] %data.coerce0) ssp {
+ %1 = alloca %0*, align 4
+ %bounds = alloca %struct.CR, align 4
+ %data = alloca %struct.CR, align 4
+ call void @llvm.dbg.value(metadata !{i8* %.block_descriptor}, i64 0, metadata !27), !dbg !129
+ store %0* %loadedMydata, %0** %1, align 4
+ call void @llvm.dbg.declare(metadata !{%0** %1}, metadata !130), !dbg !131
+ %2 = bitcast %struct.CR* %bounds to %1*
+ %3 = getelementptr %1* %2, i32 0, i32 0
+ store [4 x i32] %bounds.coerce0, [4 x i32]* %3
+ call void @llvm.dbg.declare(metadata !{%struct.CR* %bounds}, metadata !132), !dbg !133
+ %4 = bitcast %struct.CR* %data to %1*
+ %5 = getelementptr %1* %4, i32 0, i32 0
+ store [4 x i32] %data.coerce0, [4 x i32]* %5
+ call void @llvm.dbg.declare(metadata !{%struct.CR* %data}, metadata !134), !dbg !135
+ %6 = bitcast i8* %.block_descriptor to %2*
+ %7 = getelementptr inbounds %2* %6, i32 0, i32 6
+ call void @llvm.dbg.declare(metadata !{%2* %6}, metadata !136), !dbg !137
+ call void @llvm.dbg.declare(metadata !{%2* %6}, metadata !138), !dbg !137
+ call void @llvm.dbg.declare(metadata !{%2* %6}, metadata !139), !dbg !140
+ %8 = load %0** %1, align 4, !dbg !141
+ %9 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_13", !dbg !141
+ %10 = bitcast %0* %8 to i8*, !dbg !141
+ %11 = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %10, i8* %9), !dbg !141
+ %12 = bitcast i8* %11 to %0*, !dbg !141
+ %13 = getelementptr inbounds %2* %6, i32 0, i32 5, !dbg !141
+ %14 = load i8** %13, !dbg !141
+ %15 = bitcast i8* %14 to %struct.__block_byref_mydata*, !dbg !141
+ %16 = getelementptr inbounds %struct.__block_byref_mydata* %15, i32 0, i32 1, !dbg !141
+ %17 = load %struct.__block_byref_mydata** %16, !dbg !141
+ %18 = getelementptr inbounds %struct.__block_byref_mydata* %17, i32 0, i32 6, !dbg !141
+ store %0* %12, %0** %18, align 4, !dbg !141
+ %19 = getelementptr inbounds %2* %6, i32 0, i32 6, !dbg !143
+ %20 = load %3** %19, align 4, !dbg !143
+ %21 = load i32* @"OBJC_IVAR_$_MyWork._data", !dbg !143
+ %22 = bitcast %3* %20 to i8*, !dbg !143
+ %23 = getelementptr inbounds i8* %22, i32 %21, !dbg !143
+ %24 = bitcast i8* %23 to %struct.CR*, !dbg !143
+ %25 = bitcast %struct.CR* %24 to i8*, !dbg !143
+ %26 = bitcast %struct.CR* %data to i8*, !dbg !143
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %25, i8* %26, i32 16, i32 4, i1 false), !dbg !143
+ %27 = getelementptr inbounds %2* %6, i32 0, i32 6, !dbg !144
+ %28 = load %3** %27, align 4, !dbg !144
+ %29 = load i32* @"OBJC_IVAR_$_MyWork._bounds", !dbg !144
+ %30 = bitcast %3* %28 to i8*, !dbg !144
+ %31 = getelementptr inbounds i8* %30, i32 %29, !dbg !144
+ %32 = bitcast i8* %31 to %struct.CR*, !dbg !144
+ %33 = bitcast %struct.CR* %32 to i8*, !dbg !144
+ %34 = bitcast %struct.CR* %bounds to i8*, !dbg !144
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %33, i8* %34, i32 16, i32 4, i1 false), !dbg !144
+ %35 = getelementptr inbounds %2* %6, i32 0, i32 6, !dbg !145
+ %36 = load %3** %35, align 4, !dbg !145
+ %37 = getelementptr inbounds %2* %6, i32 0, i32 5, !dbg !145
+ %38 = load i8** %37, !dbg !145
+ %39 = bitcast i8* %38 to %struct.__block_byref_mydata*, !dbg !145
+ %40 = getelementptr inbounds %struct.__block_byref_mydata* %39, i32 0, i32 1, !dbg !145
+ %41 = load %struct.__block_byref_mydata** %40, !dbg !145
+ %42 = getelementptr inbounds %struct.__block_byref_mydata* %41, i32 0, i32 6, !dbg !145
+ %43 = load %0** %42, align 4, !dbg !145
+ %44 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_222", !dbg !145
+ %45 = bitcast %3* %36 to i8*, !dbg !145
+ call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %0*)*)(i8* %45, i8* %44, %0* %43), !dbg !145
+ ret void, !dbg !146
+}
+
+!llvm.dbg.cu = !{!0}
+!llvm.dbg.enum = !{!1, !1, !5, !5, !9, !14, !19, !19, !14, !14, !14, !19, !19, !19}
+!llvm.dbg.sp = !{!23}
+
+!0 = metadata !{i32 589841, i32 0, i32 16, metadata !"MyLibrary.i", metadata !"/Volumes/Sandbox/llvm", metadata !"Apple clang version 2.1", i1 true, i1 false, metadata !"", i32 2} ; [ DW_TAG_compile_unit ]
+!1 = metadata !{i32 589828, metadata !0, metadata !"", metadata !2, i32 248, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !3, i32 0, i32 0} ; [ DW_TAG_enumeration_type ]
+!2 = metadata !{i32 589865, metadata !"header.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!3 = metadata !{metadata !4}
+!4 = metadata !{i32 589864, metadata !"Ver1", i64 0} ; [ DW_TAG_enumerator ]
+!5 = metadata !{i32 589828, metadata !0, metadata !"Mode", metadata !6, i32 79, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !7, i32 0, i32 0} ; [ DW_TAG_enumeration_type ]
+!6 = metadata !{i32 589865, metadata !"header2.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!7 = metadata !{metadata !8}
+!8 = metadata !{i32 589864, metadata !"One", i64 0} ; [ DW_TAG_enumerator ]
+!9 = metadata !{i32 589828, metadata !0, metadata !"", metadata !10, i32 15, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !11, i32 0, i32 0} ; [ DW_TAG_enumeration_type ]
+!10 = metadata !{i32 589865, metadata !"header3.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!11 = metadata !{metadata !12, metadata !13}
+!12 = metadata !{i32 589864, metadata !"Unknown", i64 0} ; [ DW_TAG_enumerator ]
+!13 = metadata !{i32 589864, metadata !"Known", i64 1} ; [ DW_TAG_enumerator ]
+!14 = metadata !{i32 589828, metadata !0, metadata !"", metadata !15, i32 20, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !16, i32 0, i32 0} ; [ DW_TAG_enumeration_type ]
+!15 = metadata !{i32 589865, metadata !"Private.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!16 = metadata !{metadata !17, metadata !18}
+!17 = metadata !{i32 589864, metadata !"Single", i64 0} ; [ DW_TAG_enumerator ]
+!18 = metadata !{i32 589864, metadata !"Double", i64 1} ; [ DW_TAG_enumerator ]
+!19 = metadata !{i32 589828, metadata !0, metadata !"", metadata !20, i32 14, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !21, i32 0, i32 0} ; [ DW_TAG_enumeration_type ]
+!20 = metadata !{i32 589865, metadata !"header4.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!21 = metadata !{metadata !22}
+!22 = metadata !{i32 589864, metadata !"Eleven", i64 0} ; [ DW_TAG_enumerator ]
+!23 = metadata !{i32 589870, i32 0, metadata !24, metadata !"foobar_func_block_invoke_0", metadata !"foobar_func_block_invoke_0", metadata !"", metadata !24, i32 609, metadata !25, i1 true, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (i8*, %0*, [4 x i32], [4 x i32])* @foobar_func_block_invoke_0, null, null} ; [ DW_TAG_subprogram ]
+!24 = metadata !{i32 589865, metadata !"MyLibrary.m", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!25 = metadata !{i32 589845, metadata !24, metadata !"", metadata !24, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !26, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
+!26 = metadata !{null}
+!27 = metadata !{i32 590081, metadata !23, metadata !".block_descriptor", metadata !24, i32 16777825, metadata !28, i32 64} ; [ DW_TAG_arg_variable ]
+!28 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 0, i64 0, i32 0, metadata !29} ; [ DW_TAG_pointer_type ]
+!29 = metadata !{i32 589843, metadata !24, metadata !"__block_literal_14", metadata !24, i32 609, i64 256, i64 32, i32 0, i32 0, i32 0, metadata !30, i32 0, i32 0} ; [ DW_TAG_structure_type ]
+!30 = metadata !{metadata !31, metadata !33, metadata !35, metadata !36, metadata !37, metadata !48, metadata !89, metadata !124}
+!31 = metadata !{i32 589837, metadata !24, metadata !"__isa", metadata !24, i32 609, i64 32, i64 32, i64 0, i32 0, metadata !32} ; [ DW_TAG_member ]
+!32 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, null} ; [ DW_TAG_pointer_type ]
+!33 = metadata !{i32 589837, metadata !24, metadata !"__flags", metadata !24, i32 609, i64 32, i64 32, i64 32, i32 0, metadata !34} ; [ DW_TAG_member ]
+!34 = metadata !{i32 589860, metadata !0, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
+!35 = metadata !{i32 589837, metadata !24, metadata !"__reserved", metadata !24, i32 609, i64 32, i64 32, i64 64, i32 0, metadata !34} ; [ DW_TAG_member ]
+!36 = metadata !{i32 589837, metadata !24, metadata !"__FuncPtr", metadata !24, i32 609, i64 32, i64 32, i64 96, i32 0, metadata !32} ; [ DW_TAG_member ]
+!37 = metadata !{i32 589837, metadata !24, metadata !"__descriptor", metadata !24, i32 609, i64 32, i64 32, i64 128, i32 0, metadata !38} ; [ DW_TAG_member ]
+!38 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !39} ; [ DW_TAG_pointer_type ]
+!39 = metadata !{i32 589843, metadata !0, metadata !"__block_descriptor_withcopydispose", metadata !40, i32 307, i64 128, i64 32, i32 0, i32 0, i32 0, metadata !41, i32 0, i32 0} ; [ DW_TAG_structure_type ]
+!40 = metadata !{i32 589865, metadata !"MyLibrary.i", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!41 = metadata !{metadata !42, metadata !44, metadata !45, metadata !47}
+!42 = metadata !{i32 589837, metadata !40, metadata !"reserved", metadata !40, i32 307, i64 32, i64 32, i64 0, i32 0, metadata !43} ; [ DW_TAG_member ]
+!43 = metadata !{i32 589860, metadata !0, metadata !"long unsigned int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ]
+!44 = metadata !{i32 589837, metadata !40, metadata !"Size", metadata !40, i32 307, i64 32, i64 32, i64 32, i32 0, metadata !43} ; [ DW_TAG_member ]
+!45 = metadata !{i32 589837, metadata !40, metadata !"CopyFuncPtr", metadata !40, i32 307, i64 32, i64 32, i64 64, i32 0, metadata !46} ; [ DW_TAG_member ]
+!46 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !32} ; [ DW_TAG_pointer_type ]
+!47 = metadata !{i32 589837, metadata !40, metadata !"DestroyFuncPtr", metadata !40, i32 307, i64 32, i64 32, i64 96, i32 0, metadata !46} ; [ DW_TAG_member ]
+!48 = metadata !{i32 589837, metadata !24, metadata !"mydata", metadata !24, i32 609, i64 32, i64 32, i64 160, i32 0, metadata !49} ; [ DW_TAG_member ]
+!49 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 0, i64 0, i32 0, metadata !50} ; [ DW_TAG_pointer_type ]
+!50 = metadata !{i32 589843, metadata !24, metadata !"", metadata !24, i32 0, i64 224, i64 0, i32 0, i32 16, i32 0, metadata !51, i32 0, i32 0} ; [ DW_TAG_structure_type ]
+!51 = metadata !{metadata !52, metadata !53, metadata !54, metadata !55, metadata !56, metadata !57, metadata !58}
+!52 = metadata !{i32 589837, metadata !24, metadata !"__isa", metadata !24, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !32} ; [ DW_TAG_member ]
+!53 = metadata !{i32 589837, metadata !24, metadata !"__forwarding", metadata !24, i32 0, i64 32, i64 32, i64 32, i32 0, metadata !32} ; [ DW_TAG_member ]
+!54 = metadata !{i32 589837, metadata !24, metadata !"__flags", metadata !24, i32 0, i64 32, i64 32, i64 64, i32 0, metadata !34} ; [ DW_TAG_member ]
+!55 = metadata !{i32 589837, metadata !24, metadata !"__size", metadata !24, i32 0, i64 32, i64 32, i64 96, i32 0, metadata !34} ; [ DW_TAG_member ]
+!56 = metadata !{i32 589837, metadata !24, metadata !"__copy_helper", metadata !24, i32 0, i64 32, i64 32, i64 128, i32 0, metadata !32} ; [ DW_TAG_member ]
+!57 = metadata !{i32 589837, metadata !24, metadata !"__destroy_helper", metadata !24, i32 0, i64 32, i64 32, i64 160, i32 0, metadata !32} ; [ DW_TAG_member ]
+!58 = metadata !{i32 589837, metadata !24, metadata !"mydata", metadata !24, i32 0, i64 32, i64 32, i64 192, i32 0, metadata !59} ; [ DW_TAG_member ]
+!59 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !60} ; [ DW_TAG_pointer_type ]
+!60 = metadata !{i32 589843, metadata !24, metadata !"UIMydata", metadata !61, i32 26, i64 128, i64 32, i32 0, i32 0, i32 0, metadata !62, i32 16, i32 0} ; [ DW_TAG_structure_type ]
+!61 = metadata !{i32 589865, metadata !"header11.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!62 = metadata !{metadata !63, metadata !71, metadata !75, metadata !79}
+!63 = metadata !{i32 589852, metadata !60, null, metadata !61, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !64} ; [ DW_TAG_inheritance ]
+!64 = metadata !{i32 589843, metadata !40, metadata !"NSO", metadata !65, i32 66, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !66, i32 16, i32 0} ; [ DW_TAG_structure_type ]
+!65 = metadata !{i32 589865, metadata !"NSO.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!66 = metadata !{metadata !67}
+!67 = metadata !{i32 589837, metadata !65, metadata !"isa", metadata !65, i32 67, i64 32, i64 32, i64 0, i32 2, metadata !68, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ]
+!68 = metadata !{i32 589846, metadata !0, metadata !"Class", metadata !40, i32 197, i64 0, i64 0, i64 0, i32 0, metadata !69} ; [ DW_TAG_typedef ]
+!69 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !70} ; [ DW_TAG_pointer_type ]
+!70 = metadata !{i32 589843, metadata !0, metadata !"objc_class", metadata !40, i32 0, i64 0, i64 0, i32 0, i32 4, i32 0, null, i32 0, i32 0} ; [ DW_TAG_structure_type ]
+!71 = metadata !{i32 589837, metadata !61, metadata !"_mydataRef", metadata !61, i32 28, i64 32, i64 32, i64 32, i32 0, metadata !72, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ]
+!72 = metadata !{i32 589846, metadata !0, metadata !"CFTypeRef", metadata !24, i32 313, i64 0, i64 0, i64 0, i32 0, metadata !73} ; [ DW_TAG_typedef ]
+!73 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !74} ; [ DW_TAG_pointer_type ]
+!74 = metadata !{i32 589862, metadata !0, metadata !"", null, i32 0, i64 0, i64 0, i64 0, i32 0, null} ; [ DW_TAG_const_type ]
+!75 = metadata !{i32 589837, metadata !61, metadata !"_scale", metadata !61, i32 29, i64 32, i64 32, i64 64, i32 0, metadata !76, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ]
+!76 = metadata !{i32 589846, metadata !0, metadata !"Float", metadata !77, i32 89, i64 0, i64 0, i64 0, i32 0, metadata !78} ; [ DW_TAG_typedef ]
+!77 = metadata !{i32 589865, metadata !"header12.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!78 = metadata !{i32 589860, metadata !0, metadata !"float", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 4} ; [ DW_TAG_base_type ]
+!79 = metadata !{i32 589837, metadata !61, metadata !"_mydataFlags", metadata !61, i32 37, i64 8, i64 8, i64 96, i32 0, metadata !80, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ]
+!80 = metadata !{i32 589843, metadata !0, metadata !"", metadata !61, i32 30, i64 8, i64 8, i32 0, i32 0, i32 0, metadata !81, i32 0, i32 0} ; [ DW_TAG_structure_type ]
+!81 = metadata !{metadata !82, metadata !84, metadata !85, metadata !86, metadata !87, metadata !88}
+!82 = metadata !{i32 589837, metadata !61, metadata !"named", metadata !61, i32 31, i64 1, i64 32, i64 0, i32 0, metadata !83} ; [ DW_TAG_member ]
+!83 = metadata !{i32 589860, metadata !0, metadata !"unsigned int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ]
+!84 = metadata !{i32 589837, metadata !61, metadata !"mydataO", metadata !61, i32 32, i64 3, i64 32, i64 1, i32 0, metadata !83} ; [ DW_TAG_member ]
+!85 = metadata !{i32 589837, metadata !61, metadata !"cached", metadata !61, i32 33, i64 1, i64 32, i64 4, i32 0, metadata !83} ; [ DW_TAG_member ]
+!86 = metadata !{i32 589837, metadata !61, metadata !"hasBeenCached", metadata !61, i32 34, i64 1, i64 32, i64 5, i32 0, metadata !83} ; [ DW_TAG_member ]
+!87 = metadata !{i32 589837, metadata !61, metadata !"hasPattern", metadata !61, i32 35, i64 1, i64 32, i64 6, i32 0, metadata !83} ; [ DW_TAG_member ]
+!88 = metadata !{i32 589837, metadata !61, metadata !"isCIMydata", metadata !61, i32 36, i64 1, i64 32, i64 7, i32 0, metadata !83} ; [ DW_TAG_member ]
+!89 = metadata !{i32 589837, metadata !24, metadata !"self", metadata !24, i32 609, i64 32, i64 32, i64 192, i32 0, metadata !90} ; [ DW_TAG_member ]
+!90 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !91} ; [ DW_TAG_pointer_type ]
+!91 = metadata !{i32 589843, metadata !40, metadata !"MyWork", metadata !24, i32 36, i64 384, i64 32, i32 0, i32 0, i32 0, metadata !92, i32 16, i32 0} ; [ DW_TAG_structure_type ]
+!92 = metadata !{metadata !93, metadata !98, metadata !101, metadata !107, metadata !123}
+!93 = metadata !{i32 589852, metadata !91, null, metadata !24, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !94} ; [ DW_TAG_inheritance ]
+!94 = metadata !{i32 589843, metadata !40, metadata !"twork", metadata !95, i32 43, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !96, i32 16, i32 0} ; [ DW_TAG_structure_type ]
+!95 = metadata !{i32 589865, metadata !"header13.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!96 = metadata !{metadata !97}
+!97 = metadata !{i32 589852, metadata !94, null, metadata !95, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !64} ; [ DW_TAG_inheritance ]
+!98 = metadata !{i32 589837, metadata !24, metadata !"_itemID", metadata !24, i32 38, i64 64, i64 32, i64 32, i32 1, metadata !99, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ]
+!99 = metadata !{i32 589846, metadata !0, metadata !"uint64_t", metadata !40, i32 55, i64 0, i64 0, i64 0, i32 0, metadata !100} ; [ DW_TAG_typedef ]
+!100 = metadata !{i32 589860, metadata !0, metadata !"long long unsigned int", null, i32 0, i64 64, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ]
+!101 = metadata !{i32 589837, metadata !24, metadata !"_library", metadata !24, i32 39, i64 32, i64 32, i64 96, i32 1, metadata !102, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ]
+!102 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !103} ; [ DW_TAG_pointer_type ]
+!103 = metadata !{i32 589843, metadata !40, metadata !"MyLibrary2", metadata !104, i32 22, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !105, i32 16, i32 0} ; [ DW_TAG_structure_type ]
+!104 = metadata !{i32 589865, metadata !"header14.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!105 = metadata !{metadata !106}
+!106 = metadata !{i32 589852, metadata !103, null, metadata !104, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !64} ; [ DW_TAG_inheritance ]
+!107 = metadata !{i32 589837, metadata !24, metadata !"_bounds", metadata !24, i32 40, i64 128, i64 32, i64 128, i32 1, metadata !108, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ]
+!108 = metadata !{i32 589846, metadata !0, metadata !"CR", metadata !40, i32 33, i64 0, i64 0, i64 0, i32 0, metadata !109} ; [ DW_TAG_typedef ]
+!109 = metadata !{i32 589843, metadata !0, metadata !"CR", metadata !77, i32 29, i64 128, i64 32, i32 0, i32 0, i32 0, metadata !110, i32 0, i32 0} ; [ DW_TAG_structure_type ]
+!110 = metadata !{metadata !111, metadata !117}
+!111 = metadata !{i32 589837, metadata !77, metadata !"origin", metadata !77, i32 30, i64 64, i64 32, i64 0, i32 0, metadata !112} ; [ DW_TAG_member ]
+!112 = metadata !{i32 589846, metadata !0, metadata !"CP", metadata !77, i32 17, i64 0, i64 0, i64 0, i32 0, metadata !113} ; [ DW_TAG_typedef ]
+!113 = metadata !{i32 589843, metadata !0, metadata !"CP", metadata !77, i32 13, i64 64, i64 32, i32 0, i32 0, i32 0, metadata !114, i32 0, i32 0} ; [ DW_TAG_structure_type ]
+!114 = metadata !{metadata !115, metadata !116}
+!115 = metadata !{i32 589837, metadata !77, metadata !"x", metadata !77, i32 14, i64 32, i64 32, i64 0, i32 0, metadata !76} ; [ DW_TAG_member ]
+!116 = metadata !{i32 589837, metadata !77, metadata !"y", metadata !77, i32 15, i64 32, i64 32, i64 32, i32 0, metadata !76} ; [ DW_TAG_member ]
+!117 = metadata !{i32 589837, metadata !77, metadata !"size", metadata !77, i32 31, i64 64, i64 32, i64 64, i32 0, metadata !118} ; [ DW_TAG_member ]
+!118 = metadata !{i32 589846, metadata !0, metadata !"Size", metadata !77, i32 25, i64 0, i64 0, i64 0, i32 0, metadata !119} ; [ DW_TAG_typedef ]
+!119 = metadata !{i32 589843, metadata !0, metadata !"Size", metadata !77, i32 21, i64 64, i64 32, i32 0, i32 0, i32 0, metadata !120, i32 0, i32 0} ; [ DW_TAG_structure_type ]
+!120 = metadata !{metadata !121, metadata !122}
+!121 = metadata !{i32 589837, metadata !77, metadata !"width", metadata !77, i32 22, i64 32, i64 32, i64 0, i32 0, metadata !76} ; [ DW_TAG_member ]
+!122 = metadata !{i32 589837, metadata !77, metadata !"height", metadata !77, i32 23, i64 32, i64 32, i64 32, i32 0, metadata !76} ; [ DW_TAG_member ]
+!123 = metadata !{i32 589837, metadata !24, metadata !"_data", metadata !24, i32 40, i64 128, i64 32, i64 256, i32 1, metadata !108, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ]
+!124 = metadata !{i32 589837, metadata !24, metadata !"semi", metadata !24, i32 609, i64 32, i64 32, i64 224, i32 0, metadata !125} ; [ DW_TAG_member ]
+!125 = metadata !{i32 589846, metadata !0, metadata !"d_t", metadata !24, i32 35, i64 0, i64 0, i64 0, i32 0, metadata !126} ; [ DW_TAG_typedef ]
+!126 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !127} ; [ DW_TAG_pointer_type ]
+!127 = metadata !{i32 589843, metadata !0, metadata !"my_struct", metadata !128, i32 49, i64 0, i64 0, i32 0, i32 4, i32 0, null, i32 0, i32 0} ; [ DW_TAG_structure_type ]
+!128 = metadata !{i32 589865, metadata !"header15.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ]
+!129 = metadata !{i32 609, i32 144, metadata !23, null}
+!130 = metadata !{i32 590081, metadata !23, metadata !"loadedMydata", metadata !24, i32 33555041, metadata !59, i32 0} ; [ DW_TAG_arg_variable ]
+!131 = metadata !{i32 609, i32 155, metadata !23, null}
+!132 = metadata !{i32 590081, metadata !23, metadata !"bounds", metadata !24, i32 50332257, metadata !108, i32 0} ; [ DW_TAG_arg_variable ]
+!133 = metadata !{i32 609, i32 175, metadata !23, null}
+!134 = metadata !{i32 590081, metadata !23, metadata !"data", metadata !24, i32 67109473, metadata !108, i32 0} ; [ DW_TAG_arg_variable ]
+!135 = metadata !{i32 609, i32 190, metadata !23, null}
+!136 = metadata !{i32 590080, metadata !23, metadata !"mydata", metadata !24, i32 604, metadata !50, i32 0, i64 1, i64 20, i64 2, i64 1, i64 4, i64 2, i64 1, i64 24} ; [ DW_TAG_auto_variable ]
+!137 = metadata !{i32 604, i32 49, metadata !23, null}
+!138 = metadata !{i32 590080, metadata !23, metadata !"self", metadata !40, i32 604, metadata !90, i32 0, i64 1, i64 24} ; [ DW_TAG_auto_variable ]
+!139 = metadata !{i32 590080, metadata !23, metadata !"semi", metadata !24, i32 607, metadata !125, i32 0, i64 1, i64 28} ; [ DW_TAG_auto_variable ]
+!140 = metadata !{i32 607, i32 30, metadata !23, null}
+!141 = metadata !{i32 610, i32 17, metadata !142, null}
+!142 = metadata !{i32 589835, metadata !23, i32 609, i32 200, metadata !24, i32 94} ; [ DW_TAG_lexical_block ]
+!143 = metadata !{i32 611, i32 17, metadata !142, null}
+!144 = metadata !{i32 612, i32 17, metadata !142, null}
+!145 = metadata !{i32 613, i32 17, metadata !142, null}
+!146 = metadata !{i32 615, i32 13, metadata !142, null}
diff --git a/test/CodeGen/ARM/dyn-stackalloc.ll b/test/CodeGen/ARM/dyn-stackalloc.ll
index 92e2d13..de2820e 100644
--- a/test/CodeGen/ARM/dyn-stackalloc.ll
+++ b/test/CodeGen/ARM/dyn-stackalloc.ll
@@ -1,48 +1,48 @@
; RUN: llc < %s -march=arm
- %struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* }
- %struct.info = type { i32, i32, i32, i32, i32, i32, i32, i8* }
+%struct.comment = type { i8**, i32*, i32, i8* }
+%struct.info = type { i32, i32, i32, i32, i32, i32, i32, i8* }
+%struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* }
+
+@str215 = external global [2 x i8]
define void @t1(%struct.state* %v) {
- %tmp6 = load i32* null
- %tmp8 = alloca float, i32 %tmp6
- store i32 1, i32* null
- br i1 false, label %bb123.preheader, label %return
-
-bb123.preheader:
- br i1 false, label %bb43, label %return
-
-bb43:
- call fastcc void @f1( float* %tmp8, float* null, i32 0 )
- %tmp70 = load i32* null
- %tmp85 = getelementptr float* %tmp8, i32 0
- call fastcc void @f2( float* null, float* null, float* %tmp85, i32 %tmp70 )
- ret void
-
-return:
- ret void
+ %tmp6 = load i32* null
+ %tmp8 = alloca float, i32 %tmp6
+ store i32 1, i32* null
+ br i1 false, label %bb123.preheader, label %return
+
+bb123.preheader: ; preds = %0
+ br i1 false, label %bb43, label %return
+
+bb43: ; preds = %bb123.preheader
+ call fastcc void @f1(float* %tmp8, float* null, i32 0)
+ %tmp70 = load i32* null
+ %tmp85 = getelementptr float* %tmp8, i32 0
+ call fastcc void @f2(float* null, float* null, float* %tmp85, i32 %tmp70)
+ ret void
+
+return: ; preds = %bb123.preheader, %0
+ ret void
}
declare fastcc void @f1(float*, float*, i32)
declare fastcc void @f2(float*, float*, float*, i32)
- %struct.comment = type { i8**, i32*, i32, i8* }
-@str215 = external global [2 x i8]
-
define void @t2(%struct.comment* %vc, i8* %tag, i8* %contents) {
- %tmp1 = call i32 @strlen( i8* %tag )
- %tmp3 = call i32 @strlen( i8* %contents )
- %tmp4 = add i32 %tmp1, 2
- %tmp5 = add i32 %tmp4, %tmp3
- %tmp6 = alloca i8, i32 %tmp5
- %tmp9 = call i8* @strcpy( i8* %tmp6, i8* %tag )
- %tmp6.len = call i32 @strlen( i8* %tmp6 )
- %tmp6.indexed = getelementptr i8* %tmp6, i32 %tmp6.len
- call void @llvm.memcpy.i32( i8* %tmp6.indexed, i8* getelementptr ([2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1 )
- %tmp15 = call i8* @strcat( i8* %tmp6, i8* %contents )
- call fastcc void @comment_add( %struct.comment* %vc, i8* %tmp6 )
- ret void
+ %tmp1 = call i32 @strlen(i8* %tag)
+ %tmp3 = call i32 @strlen(i8* %contents)
+ %tmp4 = add i32 %tmp1, 2
+ %tmp5 = add i32 %tmp4, %tmp3
+ %tmp6 = alloca i8, i32 %tmp5
+ %tmp9 = call i8* @strcpy(i8* %tmp6, i8* %tag)
+ %tmp6.len = call i32 @strlen(i8* %tmp6)
+ %tmp6.indexed = getelementptr i8* %tmp6, i32 %tmp6.len
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp6.indexed, i8* getelementptr inbounds ([2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1, i1 false)
+ %tmp15 = call i8* @strcat(i8* %tmp6, i8* %contents)
+ call fastcc void @comment_add(%struct.comment* %vc, i8* %tmp6)
+ ret void
}
declare i32 @strlen(i8*)
@@ -51,6 +51,6 @@ declare i8* @strcat(i8*, i8*)
declare fastcc void @comment_add(%struct.comment*, i8*)
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
declare i8* @strcpy(i8*, i8*)
+
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/CodeGen/ARM/memcpy-inline.ll b/test/CodeGen/ARM/memcpy-inline.ll
index 5bae037..30b9f59 100644
--- a/test/CodeGen/ARM/memcpy-inline.ll
+++ b/test/CodeGen/ARM/memcpy-inline.ll
@@ -6,13 +6,14 @@
; CHECK: ldrb
%struct.x = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
+
@src = external global %struct.x
@dst = external global %struct.x
define i32 @t() {
entry:
- call void @llvm.memcpy.i32( i8* getelementptr (%struct.x* @dst, i32 0, i32 0), i8* getelementptr (%struct.x* @src, i32 0, i32 0), i32 11, i32 8 )
- ret i32 0
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds (%struct.x* @dst, i32 0, i32 0), i8* getelementptr inbounds (%struct.x* @src, i32 0, i32 0), i32 11, i32 8, i1 false)
+ ret i32 0
}
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/CodeGen/ARM/memfunc.ll b/test/CodeGen/ARM/memfunc.ll
index 757364b..aeda022 100644
--- a/test/CodeGen/ARM/memfunc.ll
+++ b/test/CodeGen/ARM/memfunc.ll
@@ -9,24 +9,21 @@ entry:
; CHECK: memmove
; EABI: __aeabi_memmove
- call void @llvm.memmove.i32( i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0 )
+ call void @llvm.memmove.p0i8.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0, i1 false)
; CHECK: memcpy
; EABI: __aeabi_memcpy
- call void @llvm.memcpy.i32( i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0 )
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0, i1 false)
; EABI memset swaps arguments
; CHECK: mov r1, #0
; CHECK: memset
; EABI: mov r2, #0
; EABI: __aeabi_memset
- call void @llvm.memset.i32( i8* bitcast ([500 x i32]* @from to i8*), i8 0, i32 500, i32 0 )
+ call void @llvm.memset.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8 0, i32 500, i32 0, i1 false)
unreachable
}
-declare void @llvm.memmove.i32(i8*, i8*, i32, i32)
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
-declare void @llvm.memset.i32(i8*, i8, i32, i32)
-
+declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
diff --git a/test/CodeGen/ARM/private.ll b/test/CodeGen/ARM/private.ll
index fba56b4..f93ffe7 100644
--- a/test/CodeGen/ARM/private.ll
+++ b/test/CodeGen/ARM/private.ll
@@ -6,8 +6,6 @@
; RUN: grep .Lbaz: %t
; RUN: grep long.*\.Lbaz %t
-declare void @foo()
-
define private void @foo() {
ret void
}
diff --git a/test/CodeGen/ARM/rev.ll b/test/CodeGen/ARM/rev.ll
index 5739086..ea44c28 100644
--- a/test/CodeGen/ARM/rev.ll
+++ b/test/CodeGen/ARM/rev.ll
@@ -67,3 +67,60 @@ entry:
%or = or i32 %shr, %and
ret i32 %or
}
+
+; rdar://9609108
+define i32 @test6(i32 %x) nounwind readnone {
+entry:
+; CHECK: test6
+; CHECK: rev16 r0, r0
+ %and = shl i32 %x, 8
+ %shl = and i32 %and, 65280
+ %and2 = lshr i32 %x, 8
+ %shr11 = and i32 %and2, 255
+ %shr5 = and i32 %and2, 16711680
+ %shl9 = and i32 %and, -16777216
+ %or = or i32 %shr5, %shl9
+ %or6 = or i32 %or, %shr11
+ %or10 = or i32 %or6, %shl
+ ret i32 %or10
+}
+
+; rdar://9164521
+define i32 @test7(i32 %a) nounwind readnone {
+entry:
+; CHECK: test7
+; CHECK: rev r0, r0
+; CHECK: lsr r0, r0, #16
+ %and = lshr i32 %a, 8
+ %shr3 = and i32 %and, 255
+ %and2 = shl i32 %a, 8
+ %shl = and i32 %and2, 65280
+ %or = or i32 %shr3, %shl
+ ret i32 %or
+}
+
+define i32 @test8(i32 %a) nounwind readnone {
+entry:
+; CHECK: test8
+; CHECK: revsh r0, r0
+ %and = lshr i32 %a, 8
+ %shr4 = and i32 %and, 255
+ %and2 = shl i32 %a, 8
+ %or = or i32 %shr4, %and2
+ %sext = shl i32 %or, 16
+ %conv3 = ashr exact i32 %sext, 16
+ ret i32 %conv3
+}
+
+define zeroext i16 @test9(i16 zeroext %v) nounwind readnone {
+entry:
+; CHECK: test9
+; CHECK: rev r0, r0
+; CHECK: lsr r0, r0, #16
+ %conv = zext i16 %v to i32
+ %shr4 = lshr i32 %conv, 8
+ %shl = shl nuw nsw i32 %conv, 8
+ %or = or i32 %shr4, %shl
+ %conv3 = trunc i32 %or to i16
+ ret i16 %conv3
+}
diff --git a/test/CodeGen/ARM/vargs_align.ll b/test/CodeGen/ARM/vargs_align.ll
index e4ef9e3..e390cf0 100644
--- a/test/CodeGen/ARM/vargs_align.ll
+++ b/test/CodeGen/ARM/vargs_align.ll
@@ -6,7 +6,6 @@ entry:
%a_addr = alloca i32 ; <i32*> [#uses=1]
%retval = alloca i32, align 4 ; <i32*> [#uses=2]
%tmp = alloca i32, align 4 ; <i32*> [#uses=2]
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 %a, i32* %a_addr
store i32 0, i32* %tmp
%tmp1 = load i32* %tmp ; <i32> [#uses=1]
diff --git a/test/CodeGen/ARM/vqdmul.ll b/test/CodeGen/ARM/vqdmul.ll
index 8dcc7f7..08e7d2b 100644
--- a/test/CodeGen/ARM/vqdmul.ll
+++ b/test/CodeGen/ARM/vqdmul.ll
@@ -152,7 +152,6 @@ entry:
ret <2 x i32> %1
}
-declare <2 x i32> @llvm.arm.neon.vqrdmulh.v2i32(<2 x i32>, <2 x i32>) nounwind readnone
declare <4 x i16> @llvm.arm.neon.vqrdmulh.v4i16(<4 x i16>, <4 x i16>) nounwind readnone
declare <2 x i32> @llvm.arm.neon.vqrdmulh.v2i32(<2 x i32>, <2 x i32>) nounwind readnone
diff --git a/test/CodeGen/Alpha/private.ll b/test/CodeGen/Alpha/private.ll
index 26076e0..f8d3094 100644
--- a/test/CodeGen/Alpha/private.ll
+++ b/test/CodeGen/Alpha/private.ll
@@ -6,8 +6,6 @@
; RUN: grep \\\$baz: %t
; RUN: grep ldah.*\\\$baz %t
-declare void @foo()
-
define private void @foo() {
ret void
}
diff --git a/test/CodeGen/Blackfin/add-overflow.ll b/test/CodeGen/Blackfin/add-overflow.ll
index e982e43..8dcf3f8 100644
--- a/test/CodeGen/Blackfin/add-overflow.ll
+++ b/test/CodeGen/Blackfin/add-overflow.ll
@@ -1,6 +1,6 @@
; RUN: llc < %s -march=bfin -verify-machineinstrs > %t
- type { i24, i1 } ; type %0
+ %0 = type { i24, i1 } ; type %0
define i1 @func2(i24 zeroext %v1, i24 zeroext %v2) nounwind {
entry:
diff --git a/test/CodeGen/Blackfin/many-args.ll b/test/CodeGen/Blackfin/many-args.ll
index 8c52874..2df32ca 100644
--- a/test/CodeGen/Blackfin/many-args.ll
+++ b/test/CodeGen/Blackfin/many-args.ll
@@ -1,6 +1,6 @@
; RUN: llc < %s -march=bfin -verify-machineinstrs
- type { i32, float, float, float, float, float, float, float, float, float, float } ; type %0
+ %0 = type { i32, float, float, float, float, float, float, float, float, float, float } ; type %0
%struct..s_segment_inf = type { float, i32, i16, i16, float, float, i32, float, float }
define i32 @main(i32 %argc.1, i8** %argv.1) {
diff --git a/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll b/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll
deleted file mode 100644
index 8db3167..0000000
--- a/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll
+++ /dev/null
@@ -1,19 +0,0 @@
-; RUN: llc < %s -march=c
-
-declare {i32, i32} @foo()
-
-define i32 @test() {
- %A = call {i32, i32} @foo()
- %B = getresult {i32, i32} %A, 0
- %C = getresult {i32, i32} %A, 1
- %D = add i32 %B, %C
- ret i32 %D
-}
-
-define i32 @test2() {
- %A = call {i32, i32} asm sideeffect "...", "={cx},={di},~{dirflag},~{fpsr},~{flags},~{memory}"()
- %B = getresult {i32, i32} %A, 0
- %C = getresult {i32, i32} %A, 1
- %D = add i32 %B, %C
- ret i32 %D
-}
diff --git a/test/CodeGen/CBackend/2011-06-08-addWithOverflow.ll b/test/CodeGen/CBackend/2011-06-08-addWithOverflow.ll
new file mode 100644
index 0000000..0ae480d
--- /dev/null
+++ b/test/CodeGen/CBackend/2011-06-08-addWithOverflow.ll
@@ -0,0 +1,35 @@
+; RUN: llc < %s -march=c
+; Check that uadd and sadd with overflow are handled by C Backend.
+
+%0 = type { i32, i1 } ; type %0
+
+define i1 @func1(i32 zeroext %v1, i32 zeroext %v2) nounwind {
+entry:
+ %t = call %0 @llvm.uadd.with.overflow.i32(i32 %v1, i32 %v2) ; <%0> [#uses=1]
+ %obit = extractvalue %0 %t, 1 ; <i1> [#uses=1]
+ br i1 %obit, label %carry, label %normal
+
+normal: ; preds = %entry
+ ret i1 true
+
+carry: ; preds = %entry
+ ret i1 false
+}
+
+define i1 @func2(i32 signext %v1, i32 signext %v2) nounwind {
+entry:
+ %t = call %0 @llvm.sadd.with.overflow.i32(i32 %v1, i32 %v2) ; <%0> [#uses=1]
+ %obit = extractvalue %0 %t, 1 ; <i1> [#uses=1]
+ br i1 %obit, label %carry, label %normal
+
+normal: ; preds = %entry
+ ret i1 true
+
+carry: ; preds = %entry
+ ret i1 false
+}
+
+declare %0 @llvm.sadd.with.overflow.i32(i32, i32) nounwind
+
+declare %0 @llvm.uadd.with.overflow.i32(i32, i32) nounwind
+
diff --git a/test/CodeGen/CBackend/2008-06-04-IndirectMem.ll b/test/CodeGen/CBackend/X86/2008-06-04-IndirectMem.ll
index 054a3ca..054a3ca 100644
--- a/test/CodeGen/CBackend/2008-06-04-IndirectMem.ll
+++ b/test/CodeGen/CBackend/X86/2008-06-04-IndirectMem.ll
diff --git a/test/CodeGen/CBackend/X86/dg.exp b/test/CodeGen/CBackend/X86/dg.exp
new file mode 100644
index 0000000..833bcc5
--- /dev/null
+++ b/test/CodeGen/CBackend/X86/dg.exp
@@ -0,0 +1,5 @@
+load_lib llvm.exp
+
+if { [llvm_supports_target X86] && [llvm_gcc_supports c] } {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,s}]]
+}
diff --git a/test/CodeGen/CellSPU/private.ll b/test/CodeGen/CellSPU/private.ll
index 56f72e7..1d933ad 100644
--- a/test/CodeGen/CellSPU/private.ll
+++ b/test/CodeGen/CellSPU/private.ll
@@ -6,9 +6,6 @@
; RUN: grep .Lbaz: %t
; RUN: grep ila.*\.Lbaz %t
-
-declare void @foo()
-
define private void @foo() {
ret void
}
diff --git a/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll b/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll
deleted file mode 100644
index 733202c..0000000
--- a/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: llc < %s
-; Test that llvm.memcpy works with a i64 length operand on all targets.
-
-declare void @llvm.memcpy.i64(i8*, i8*, i64, i32)
-
-define void @l12_l94_bc_divide_endif_2E_3_2E_ce() {
-newFuncRoot:
- tail call void @llvm.memcpy.i64( i8* null, i8* null, i64 0, i32 1 )
- unreachable
-}
-
diff --git a/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll b/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
index 568b88f..2a2cf6c 100644
--- a/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
+++ b/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
@@ -1,13 +1,13 @@
; RUN: llc < %s
; PR1228
- "struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" = type { i8* }
- "struct.std::locale" = type { "struct.std::locale::_Impl"* }
- "struct.std::locale::_Impl" = type { i32, "struct.std::locale::facet"**, i32, "struct.std::locale::facet"**, i8** }
- "struct.std::locale::facet" = type { i32 (...)**, i32 }
- "struct.std::string" = type { "struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" }
+ %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" = type { i8* }
+ %"struct.std::locale" = type { %"struct.std::locale::_Impl"* }
+ %"struct.std::locale::_Impl" = type { i32, %"struct.std::locale::facet"**, i32, %"struct.std::locale::facet"**, i8** }
+ %"struct.std::locale::facet" = type { i32 (...)**, i32 }
+ %"struct.std::string" = type { %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" }
-define void @_ZNKSt6locale4nameEv("struct.std::string"* %agg.result) {
+define void @_ZNKSt6locale4nameEv(%"struct.std::string"* %agg.result) {
entry:
%tmp105 = icmp eq i8* null, null ; <i1> [#uses=1]
br i1 %tmp105, label %cond_true, label %cond_true222
diff --git a/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll b/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll
deleted file mode 100644
index 3090857..0000000
--- a/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll
+++ /dev/null
@@ -1,157 +0,0 @@
-; RUN: llc < %s -o -
-
- %struct.RETURN = type { i32, i32 }
- %struct.ada__finalization__controlled = type { %struct.system__finalization_root__root_controlled }
- %struct.ada__streams__root_stream_type = type { %struct.ada__tags__dispatch_table* }
- %struct.ada__strings__unbounded__string_access = type { i8*, %struct.RETURN* }
- %struct.ada__strings__unbounded__unbounded_string = type { %struct.ada__finalization__controlled, %struct.ada__strings__unbounded__string_access, i32 }
- %struct.ada__tags__dispatch_table = type { [1 x i32] }
- %struct.exception = type { i8, i8, i32, i8*, i8*, i32, i8* }
- %struct.system__finalization_root__root_controlled = type { %struct.ada__streams__root_stream_type, %struct.system__finalization_root__root_controlled*, %struct.system__finalization_root__root_controlled* }
- %struct.system__standard_library__exception_data = type { i8, i8, i32, i32, %struct.system__standard_library__exception_data*, i32, void ()* }
-@C.495.7639 = internal constant %struct.RETURN { i32 1, i32 16 } ; <%struct.RETURN*> [#uses=1]
-@ada__strings__index_error = external global %struct.exception ; <%struct.exception*> [#uses=1]
-@.str5 = internal constant [16 x i8] c"a-strunb.adb:690" ; <[16 x i8]*> [#uses=1]
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
-declare void @ada__strings__unbounded__realloc_for_chunk(%struct.ada__strings__unbounded__unbounded_string*, i32)
-
-declare void @__gnat_raise_exception(%struct.system__standard_library__exception_data*, i64)
-
-define void @ada__strings__unbounded__insert__2(%struct.ada__strings__unbounded__unbounded_string* %source, i32 %before, i64 %new_item.0.0) {
-entry:
- %tmp24636 = lshr i64 %new_item.0.0, 32 ; <i64> [#uses=1]
- %tmp24637 = trunc i64 %tmp24636 to i32 ; <i32> [#uses=1]
- %tmp24638 = inttoptr i32 %tmp24637 to %struct.RETURN* ; <%struct.RETURN*> [#uses=2]
- %tmp25 = getelementptr %struct.RETURN* %tmp24638, i32 0, i32 0 ; <i32*> [#uses=1]
- %tmp26 = load i32* %tmp25, align 4 ; <i32> [#uses=1]
- %tmp29 = getelementptr %struct.RETURN* %tmp24638, i32 0, i32 1 ; <i32*> [#uses=1]
- %tmp30 = load i32* %tmp29, align 4 ; <i32> [#uses=1]
- %tmp63 = getelementptr %struct.ada__strings__unbounded__unbounded_string* %source, i32 0, i32 1, i32 1 ; <%struct.RETURN**> [#uses=5]
- %tmp64 = load %struct.RETURN** %tmp63, align 4 ; <%struct.RETURN*> [#uses=1]
- %tmp65 = getelementptr %struct.RETURN* %tmp64, i32 0, i32 0 ; <i32*> [#uses=1]
- %tmp66 = load i32* %tmp65, align 4 ; <i32> [#uses=1]
- %tmp67 = icmp sgt i32 %tmp66, %before ; <i1> [#uses=1]
- br i1 %tmp67, label %bb77, label %bb
-
-bb: ; preds = %entry
- %tmp71 = getelementptr %struct.ada__strings__unbounded__unbounded_string* %source, i32 0, i32 2 ; <i32*> [#uses=4]
- %tmp72 = load i32* %tmp71, align 4 ; <i32> [#uses=1]
- %tmp73 = add i32 %tmp72, 1 ; <i32> [#uses=1]
- %tmp74 = icmp slt i32 %tmp73, %before ; <i1> [#uses=1]
- br i1 %tmp74, label %bb77, label %bb84
-
-bb77: ; preds = %bb, %entry
- tail call void @__gnat_raise_exception( %struct.system__standard_library__exception_data* bitcast (%struct.exception* @ada__strings__index_error to %struct.system__standard_library__exception_data*), i64 or (i64 zext (i32 ptrtoint ([16 x i8]* @.str5 to i32) to i64), i64 shl (i64 zext (i32 ptrtoint (%struct.RETURN* @C.495.7639 to i32) to i64), i64 32)) )
- unreachable
-
-bb84: ; preds = %bb
- %tmp93 = sub i32 %tmp30, %tmp26 ; <i32> [#uses=2]
- %tmp9394 = sext i32 %tmp93 to i36 ; <i36> [#uses=1]
- %tmp95 = shl i36 %tmp9394, 3 ; <i36> [#uses=1]
- %tmp96 = add i36 %tmp95, 8 ; <i36> [#uses=2]
- %tmp97 = icmp sgt i36 %tmp96, -1 ; <i1> [#uses=1]
- %tmp100 = select i1 %tmp97, i36 %tmp96, i36 0 ; <i36> [#uses=2]
- %tmp101 = icmp slt i36 %tmp100, 17179869177 ; <i1> [#uses=1]
- %tmp100.cast = trunc i36 %tmp100 to i32 ; <i32> [#uses=1]
- %min102 = select i1 %tmp101, i32 %tmp100.cast, i32 -8 ; <i32> [#uses=1]
- tail call void @ada__strings__unbounded__realloc_for_chunk( %struct.ada__strings__unbounded__unbounded_string* %source, i32 %min102 )
- %tmp148 = load i32* %tmp71, align 4 ; <i32> [#uses=4]
- %tmp152 = add i32 %tmp93, 1 ; <i32> [#uses=2]
- %tmp153 = icmp sgt i32 %tmp152, -1 ; <i1> [#uses=1]
- %max154 = select i1 %tmp153, i32 %tmp152, i32 0 ; <i32> [#uses=5]
- %tmp155 = add i32 %tmp148, %max154 ; <i32> [#uses=5]
- %tmp315 = getelementptr %struct.ada__strings__unbounded__unbounded_string* %source, i32 0, i32 1, i32 0 ; <i8**> [#uses=4]
- %tmp328 = load %struct.RETURN** %tmp63, align 4 ; <%struct.RETURN*> [#uses=1]
- %tmp329 = getelementptr %struct.RETURN* %tmp328, i32 0, i32 0 ; <i32*> [#uses=1]
- %tmp330 = load i32* %tmp329, align 4 ; <i32> [#uses=4]
- %tmp324 = add i32 %max154, %before ; <i32> [#uses=3]
- %tmp331 = sub i32 %tmp324, %tmp330 ; <i32> [#uses=1]
- %tmp349 = sub i32 %before, %tmp330 ; <i32> [#uses=1]
- %tmp356 = icmp sgt i32 %tmp331, %tmp349 ; <i1> [#uses=1]
- %tmp431 = icmp sgt i32 %tmp324, %tmp155 ; <i1> [#uses=2]
- br i1 %tmp356, label %bb420, label %bb359
-
-bb359: ; preds = %bb84
- br i1 %tmp431, label %bb481, label %bb382
-
-bb382: ; preds = %bb382, %bb359
- %indvar = phi i32 [ 0, %bb359 ], [ %indvar.next, %bb382 ] ; <i32> [#uses=2]
- %max379.pn = phi i32 [ %max154, %bb359 ], [ %L492b.0, %bb382 ] ; <i32> [#uses=1]
- %before.pn = phi i32 [ %before, %bb359 ], [ 1, %bb382 ] ; <i32> [#uses=1]
- %L492b.0 = add i32 %before.pn, %max379.pn ; <i32> [#uses=3]
- %tmp386 = load %struct.RETURN** %tmp63, align 4 ; <%struct.RETURN*> [#uses=1]
- %tmp387 = getelementptr %struct.RETURN* %tmp386, i32 0, i32 0 ; <i32*> [#uses=1]
- %tmp388 = load i32* %tmp387, align 4 ; <i32> [#uses=2]
- %tmp392 = load i8** %tmp315, align 4 ; <i8*> [#uses=2]
- %R493b.0 = add i32 %indvar, %before ; <i32> [#uses=1]
- %tmp405 = sub i32 %R493b.0, %tmp388 ; <i32> [#uses=1]
- %tmp406 = getelementptr i8* %tmp392, i32 %tmp405 ; <i8*> [#uses=1]
- %tmp407 = load i8* %tmp406, align 1 ; <i8> [#uses=1]
- %tmp408 = sub i32 %L492b.0, %tmp388 ; <i32> [#uses=1]
- %tmp409 = getelementptr i8* %tmp392, i32 %tmp408 ; <i8*> [#uses=1]
- store i8 %tmp407, i8* %tmp409, align 1
- %tmp414 = icmp eq i32 %L492b.0, %tmp155 ; <i1> [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1]
- br i1 %tmp414, label %bb481, label %bb382
-
-bb420: ; preds = %bb84
- br i1 %tmp431, label %bb481, label %bb436.preheader
-
-bb436.preheader: ; preds = %bb420
- %tmp4468 = load i8** %tmp315, align 4 ; <i8*> [#uses=2]
- %tmp4599 = sub i32 %tmp148, %tmp330 ; <i32> [#uses=1]
- %tmp46010 = getelementptr i8* %tmp4468, i32 %tmp4599 ; <i8*> [#uses=1]
- %tmp46111 = load i8* %tmp46010, align 1 ; <i8> [#uses=1]
- %tmp46212 = sub i32 %tmp155, %tmp330 ; <i32> [#uses=1]
- %tmp46313 = getelementptr i8* %tmp4468, i32 %tmp46212 ; <i8*> [#uses=1]
- store i8 %tmp46111, i8* %tmp46313, align 1
- %exitcond14 = icmp eq i32 %tmp155, %tmp324 ; <i1> [#uses=1]
- br i1 %exitcond14, label %bb481, label %bb.nph
-
-bb.nph: ; preds = %bb436.preheader
- %tmp5 = sub i32 %tmp148, %before ; <i32> [#uses=1]
- br label %bb478
-
-bb478: ; preds = %bb478, %bb.nph
- %indvar6422 = phi i32 [ 0, %bb.nph ], [ %indvar.next643, %bb478 ] ; <i32> [#uses=1]
- %indvar.next643 = add i32 %indvar6422, 1 ; <i32> [#uses=4]
- %L490b.0 = sub i32 %tmp155, %indvar.next643 ; <i32> [#uses=1]
- %R491b.0 = sub i32 %tmp148, %indvar.next643 ; <i32> [#uses=1]
- %tmp440 = load %struct.RETURN** %tmp63, align 4 ; <%struct.RETURN*> [#uses=1]
- %tmp441 = getelementptr %struct.RETURN* %tmp440, i32 0, i32 0 ; <i32*> [#uses=1]
- %tmp442 = load i32* %tmp441, align 4 ; <i32> [#uses=2]
- %tmp446 = load i8** %tmp315, align 4 ; <i8*> [#uses=2]
- %tmp459 = sub i32 %R491b.0, %tmp442 ; <i32> [#uses=1]
- %tmp460 = getelementptr i8* %tmp446, i32 %tmp459 ; <i8*> [#uses=1]
- %tmp461 = load i8* %tmp460, align 1 ; <i8> [#uses=1]
- %tmp462 = sub i32 %L490b.0, %tmp442 ; <i32> [#uses=1]
- %tmp463 = getelementptr i8* %tmp446, i32 %tmp462 ; <i8*> [#uses=1]
- store i8 %tmp461, i8* %tmp463, align 1
- %exitcond = icmp eq i32 %indvar.next643, %tmp5 ; <i1> [#uses=1]
- br i1 %exitcond, label %bb481, label %bb478
-
-bb481: ; preds = %bb478, %bb436.preheader, %bb420, %bb382, %bb359
- %tmp577 = add i32 %before, -1 ; <i32> [#uses=3]
- %tmp578 = add i32 %max154, %tmp577 ; <i32> [#uses=2]
- %tmp581 = icmp sge i32 %tmp578, %tmp577 ; <i1> [#uses=1]
- %max582 = select i1 %tmp581, i32 %tmp578, i32 %tmp577 ; <i32> [#uses=1]
- %tmp584 = sub i32 %max582, %before ; <i32> [#uses=1]
- %tmp585 = add i32 %tmp584, 1 ; <i32> [#uses=2]
- %tmp586 = icmp sgt i32 %tmp585, -1 ; <i1> [#uses=1]
- %max587 = select i1 %tmp586, i32 %tmp585, i32 0 ; <i32> [#uses=1]
- %tmp591 = load %struct.RETURN** %tmp63, align 4 ; <%struct.RETURN*> [#uses=1]
- %tmp592 = getelementptr %struct.RETURN* %tmp591, i32 0, i32 0 ; <i32*> [#uses=1]
- %tmp593 = load i32* %tmp592, align 4 ; <i32> [#uses=1]
- %tmp597 = load i8** %tmp315, align 4 ; <i8*> [#uses=1]
- %tmp600621 = trunc i64 %new_item.0.0 to i32 ; <i32> [#uses=1]
- %tmp600622 = inttoptr i32 %tmp600621 to i8* ; <i8*> [#uses=1]
- %tmp601 = sub i32 %before, %tmp593 ; <i32> [#uses=1]
- %tmp602 = getelementptr i8* %tmp597, i32 %tmp601 ; <i8*> [#uses=1]
- tail call void @llvm.memcpy.i32( i8* %tmp602, i8* %tmp600622, i32 %max587, i32 1 )
- %tmp606 = load i32* %tmp71, align 4 ; <i32> [#uses=1]
- %tmp613 = add i32 %tmp606, %max154 ; <i32> [#uses=1]
- store i32 %tmp613, i32* %tmp71, align 4
- ret void
-}
diff --git a/test/CodeGen/Generic/getresult-undef.ll b/test/CodeGen/Generic/getresult-undef.ll
deleted file mode 100644
index c675535..0000000
--- a/test/CodeGen/Generic/getresult-undef.ll
+++ /dev/null
@@ -1,6 +0,0 @@
-; RUN: llc < %s
-
-define double @foo() {
- %t = getresult {double, double} undef, 1
- ret double %t
-}
diff --git a/test/CodeGen/Generic/invalid-memcpy.ll b/test/CodeGen/Generic/invalid-memcpy.ll
index 8448565..2dfa28b 100644
--- a/test/CodeGen/Generic/invalid-memcpy.ll
+++ b/test/CodeGen/Generic/invalid-memcpy.ll
@@ -4,16 +4,14 @@
; greater than the alignment guaranteed for Qux or C.0.1173), but it
; should compile, not crash the code generator.
-@C.0.1173 = external constant [33 x i8] ; <[33 x i8]*> [#uses=1]
+@C.0.1173 = external constant [33 x i8]
define void @Bork() {
entry:
- %Qux = alloca [33 x i8] ; <[33 x i8]*> [#uses=1]
- %Qux1 = bitcast [33 x i8]* %Qux to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i64( i8* %Qux1, i8* getelementptr ([33 x i8]* @C.0.1173, i32 0, i32 0), i64 33, i32 8 )
- ret void
+ %Qux = alloca [33 x i8]
+ %Qux1 = bitcast [33 x i8]* %Qux to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %Qux1, i8* getelementptr inbounds ([33 x i8]* @C.0.1173, i32 0, i32 0), i64 33, i32 8, i1 false)
+ ret void
}
-declare void @llvm.memcpy.i64(i8*, i8*, i64, i32)
-
-
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
diff --git a/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll b/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
index 282e973..a3cab5d 100644
--- a/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
+++ b/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
@@ -6,9 +6,9 @@ define void @foo(i64* %p, double* %q) nounwind {
%t = invoke { i64, double } @wild() to label %normal unwind label %handler
normal:
- %mrv_gr = getresult { i64, double } %t, 0
+ %mrv_gr = extractvalue { i64, double } %t, 0
store i64 %mrv_gr, i64* %p
- %mrv_gr12681 = getresult { i64, double } %t, 1
+ %mrv_gr12681 = extractvalue { i64, double } %t, 1
store double %mrv_gr12681, double* %q
ret void
diff --git a/test/CodeGen/Mips/alloca.ll b/test/CodeGen/Mips/alloca.ll
index 50eeecf..ff503ec 100644
--- a/test/CodeGen/Mips/alloca.ll
+++ b/test/CodeGen/Mips/alloca.ll
@@ -4,15 +4,15 @@ define i32 @twoalloca(i32 %size) nounwind {
entry:
; CHECK: subu $[[T0:[0-9]+]], $sp, $[[SZ:[0-9]+]]
; CHECK: addu $sp, $zero, $[[T0]]
-; CHECK: addu $[[SP1:[0-9]+]], $zero, $sp
-; CHECK: subu $[[T1:[0-9]+]], $sp, $[[SZ]]
-; CHECK: addu $sp, $zero, $[[T1]]
-; CHECK: addu $[[SP2:[0-9]+]], $zero, $sp
+; CHECK: addiu $[[T1:[0-9]+]], $sp, [[OFF:[0-9]+]]
+; CHECK: subu $[[T2:[0-9]+]], $sp, $[[SZ]]
+; CHECK: addu $sp, $zero, $[[T2]]
+; CHECK: addiu $[[T3:[0-9]+]], $sp, [[OFF]]
; CHECK: lw $25, %call16(foo)($gp)
-; CHECK: addiu $4, $[[SP1]], 24
+; CHECK: addu $4, $zero, $[[T1]]
; CHECK: jalr $25
; CHECK: lw $25, %call16(foo)($gp)
-; CHECK: addiu $4, $[[SP2]], 24
+; CHECK: addu $4, $zero, $[[T3]]
; CHECK: jalr $25
%tmp1 = alloca i8, i32 %size, align 4
%add.ptr = getelementptr inbounds i8* %tmp1, i32 5
@@ -29,3 +29,72 @@ declare void @foo2(double, double, i32)
declare i32 @foo(i8*)
+@.str = private unnamed_addr constant [22 x i8] c"%d %d %d %d %d %d %d\0A\00", align 1
+
+define i32 @alloca2(i32 %size) nounwind {
+entry:
+; dynamic allocated stack area and $gp restore slot have the same offsets
+; relative to $sp.
+;
+; CHECK: alloca2
+; CHECK: .cprestore [[OFF:[0-9]+]]
+; CHECK: subu $[[T0:[0-9]+]], $sp, $[[SZ:[0-9]+]]
+; CHECK: addu $sp, $zero, $[[T0]]
+; CHECK: addiu $[[T1:[0-9]+]], $sp, [[OFF]]
+
+ %tmp1 = alloca i8, i32 %size, align 4
+ %0 = bitcast i8* %tmp1 to i32*
+ %cmp = icmp sgt i32 %size, 10
+ br i1 %cmp, label %if.then, label %if.else
+
+if.then: ; preds = %entry
+; CHECK: addiu $4, $[[T1]], 40
+
+ %add.ptr = getelementptr inbounds i8* %tmp1, i32 40
+ %1 = bitcast i8* %add.ptr to i32*
+ call void @foo3(i32* %1) nounwind
+ %arrayidx15.pre = getelementptr inbounds i8* %tmp1, i32 12
+ %.pre = bitcast i8* %arrayidx15.pre to i32*
+ br label %if.end
+
+if.else: ; preds = %entry
+; CHECK: addiu $4, $[[T1]], 12
+
+ %add.ptr5 = getelementptr inbounds i8* %tmp1, i32 12
+ %2 = bitcast i8* %add.ptr5 to i32*
+ call void @foo3(i32* %2) nounwind
+ br label %if.end
+
+if.end: ; preds = %if.else, %if.then
+; CHECK: lw $5, 0($[[T1]])
+; CHECK: lw $25, %call16(printf)
+
+ %.pre-phi = phi i32* [ %2, %if.else ], [ %.pre, %if.then ]
+ %tmp7 = load i32* %0, align 4, !tbaa !0
+ %arrayidx9 = getelementptr inbounds i8* %tmp1, i32 4
+ %3 = bitcast i8* %arrayidx9 to i32*
+ %tmp10 = load i32* %3, align 4, !tbaa !0
+ %arrayidx12 = getelementptr inbounds i8* %tmp1, i32 8
+ %4 = bitcast i8* %arrayidx12 to i32*
+ %tmp13 = load i32* %4, align 4, !tbaa !0
+ %tmp16 = load i32* %.pre-phi, align 4, !tbaa !0
+ %arrayidx18 = getelementptr inbounds i8* %tmp1, i32 16
+ %5 = bitcast i8* %arrayidx18 to i32*
+ %tmp19 = load i32* %5, align 4, !tbaa !0
+ %arrayidx21 = getelementptr inbounds i8* %tmp1, i32 20
+ %6 = bitcast i8* %arrayidx21 to i32*
+ %tmp22 = load i32* %6, align 4, !tbaa !0
+ %arrayidx24 = getelementptr inbounds i8* %tmp1, i32 24
+ %7 = bitcast i8* %arrayidx24 to i32*
+ %tmp25 = load i32* %7, align 4, !tbaa !0
+ %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str, i32 0, i32 0), i32 %tmp7, i32 %tmp10, i32 %tmp13, i32 %tmp16, i32 %tmp19, i32 %tmp22, i32 %tmp25) nounwind
+ ret i32 0
+}
+
+declare void @foo3(i32*)
+
+declare i32 @printf(i8* nocapture, ...) nounwind
+
+!0 = metadata !{metadata !"int", metadata !1}
+!1 = metadata !{metadata !"omnipotent char", metadata !2}
+!2 = metadata !{metadata !"Simple C/C++ TBAA", null}
diff --git a/test/CodeGen/Mips/inlineasmmemop.ll b/test/CodeGen/Mips/inlineasmmemop.ll
new file mode 100644
index 0000000..c565892
--- /dev/null
+++ b/test/CodeGen/Mips/inlineasmmemop.ll
@@ -0,0 +1,23 @@
+; RUN: llc -march=mipsel -mcpu=4ke < %s | FileCheck %s
+
+@g1 = external global i32
+
+define i32 @f1(i32 %x) nounwind {
+entry:
+; CHECK: addiu $[[T0:[0-9]+]], $sp
+; CHECK: #APP
+; CHECK: sw $4, 0($[[T0]])
+; CHECK: #NO_APP
+; CHECK: lw $[[T1:[0-9]+]], %got(g1)($gp)
+; CHECK: #APP
+; CHECK: lw $[[T3:[0-9]+]], 0($[[T0]])
+; CHECK: #NO_APP
+; CHECK: sw $[[T3]], 0($[[T1]])
+
+ %l1 = alloca i32, align 4
+ call void asm "sw $1, $0", "=*m,r"(i32* %l1, i32 %x) nounwind
+ %0 = call i32 asm "lw $0, $1", "=r,*m"(i32* %l1) nounwind
+ store i32 %0, i32* @g1, align 4
+ ret i32 %0
+}
+
diff --git a/test/CodeGen/Mips/private.ll b/test/CodeGen/Mips/private.ll
index 34b7547..4cc48f0 100644
--- a/test/CodeGen/Mips/private.ll
+++ b/test/CodeGen/Mips/private.ll
@@ -6,8 +6,6 @@
; RUN: grep \\\$baz: %t
; RUN: grep lw.*\\\$baz %t
-declare void @foo()
-
define private void @foo() {
ret void
}
diff --git a/test/CodeGen/PTX/add.ll b/test/CodeGen/PTX/add.ll
index b89a2f6..c16be49 100644
--- a/test/CodeGen/PTX/add.ll
+++ b/test/CodeGen/PTX/add.ll
@@ -22,14 +22,14 @@ define ptx_device i64 @t1_u64(i64 %x, i64 %y) {
}
define ptx_device float @t1_f32(float %x, float %y) {
-; CHECK: add.f32 r0, r1, r2
+; CHECK: add.rn.f32 r0, r1, r2
; CHECK-NEXT: ret;
%z = fadd float %x, %y
ret float %z
}
define ptx_device double @t1_f64(double %x, double %y) {
-; CHECK: add.f64 rd0, rd1, rd2
+; CHECK: add.rn.f64 rd0, rd1, rd2
; CHECK-NEXT: ret;
%z = fadd double %x, %y
ret double %z
@@ -57,14 +57,14 @@ define ptx_device i64 @t2_u64(i64 %x) {
}
define ptx_device float @t2_f32(float %x) {
-; CHECK: add.f32 r0, r1, 0F3F800000;
+; CHECK: add.rn.f32 r0, r1, 0F3F800000;
; CHECK-NEXT: ret;
%z = fadd float %x, 1.0
ret float %z
}
define ptx_device double @t2_f64(double %x) {
-; CHECK: add.f64 rd0, rd1, 0D3FF0000000000000;
+; CHECK: add.rn.f64 rd0, rd1, 0D3FF0000000000000;
; CHECK-NEXT: ret;
%z = fadd double %x, 1.0
ret double %z
diff --git a/test/CodeGen/PTX/cvt.ll b/test/CodeGen/PTX/cvt.ll
index 984cb4d..f723369 100644
--- a/test/CodeGen/PTX/cvt.ll
+++ b/test/CodeGen/PTX/cvt.ll
@@ -4,8 +4,10 @@
; (note: we convert back to i32 to return)
define ptx_device i32 @cvt_pred_i16(i16 %x, i1 %y) {
-; CHECK: cvt.pred.u16 p0, rh1;
-; CHECK: ret;
+; CHECK: setp.gt.b16 p0, rh1, 0
+; CHECK-NEXT: and.pred p0, p0, p1;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
%a = trunc i16 %x to i1
%b = and i1 %a, %y
%c = zext i1 %b to i32
@@ -13,8 +15,10 @@ define ptx_device i32 @cvt_pred_i16(i16 %x, i1 %y) {
}
define ptx_device i32 @cvt_pred_i32(i32 %x, i1 %y) {
-; CHECK: cvt.pred.u32 p0, r1;
-; CHECK: ret;
+; CHECK: setp.gt.b32 p0, r1, 0
+; CHECK-NEXT: and.pred p0, p0, p1;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
%a = trunc i32 %x to i1
%b = and i1 %a, %y
%c = zext i1 %b to i32
@@ -22,8 +26,10 @@ define ptx_device i32 @cvt_pred_i32(i32 %x, i1 %y) {
}
define ptx_device i32 @cvt_pred_i64(i64 %x, i1 %y) {
-; CHECK: cvt.pred.u64 p0, rd1;
-; CHECK: ret;
+; CHECK: setp.gt.b64 p0, rd1, 0
+; CHECK-NEXT: and.pred p0, p0, p1;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
%a = trunc i64 %x to i1
%b = and i1 %a, %y
%c = zext i1 %b to i32
@@ -31,8 +37,10 @@ define ptx_device i32 @cvt_pred_i64(i64 %x, i1 %y) {
}
define ptx_device i32 @cvt_pred_f32(float %x, i1 %y) {
-; CHECK: cvt.rni.pred.f32 p0, r1;
-; CHECK: ret;
+; CHECK: setp.gt.b32 p0, r1, 0
+; CHECK-NEXT: and.pred p0, p0, p1;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
%a = fptoui float %x to i1
%b = and i1 %a, %y
%c = zext i1 %b to i32
@@ -40,8 +48,10 @@ define ptx_device i32 @cvt_pred_f32(float %x, i1 %y) {
}
define ptx_device i32 @cvt_pred_f64(double %x, i1 %y) {
-; CHECK: cvt.rni.pred.f64 p0, rd1;
-; CHECK: ret;
+; CHECK: setp.gt.b64 p0, rd1, 0
+; CHECK-NEXT: and.pred p0, p0, p1;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
%a = fptoui double %x to i1
%b = and i1 %a, %y
%c = zext i1 %b to i32
@@ -51,36 +61,36 @@ define ptx_device i32 @cvt_pred_f64(double %x, i1 %y) {
; i16
define ptx_device i16 @cvt_i16_preds(i1 %x) {
-; CHECK: cvt.u16.pred rh0, p1;
-; CHECK: ret;
+; CHECK: selp.u16 rh0, 1, 0, p1;
+; CHECK-NEXT: ret;
%a = zext i1 %x to i16
ret i16 %a
}
define ptx_device i16 @cvt_i16_i32(i32 %x) {
; CHECK: cvt.u16.u32 rh0, r1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = trunc i32 %x to i16
ret i16 %a
}
define ptx_device i16 @cvt_i16_i64(i64 %x) {
; CHECK: cvt.u16.u64 rh0, rd1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = trunc i64 %x to i16
ret i16 %a
}
define ptx_device i16 @cvt_i16_f32(float %x) {
-; CHECK: cvt.rni.u16.f32 rh0, r1;
-; CHECK: ret;
+; CHECK: cvt.rzi.u16.f32 rh0, r1;
+; CHECK-NEXT: ret;
%a = fptoui float %x to i16
ret i16 %a
}
define ptx_device i16 @cvt_i16_f64(double %x) {
-; CHECK: cvt.rni.u16.f64 rh0, rd1;
-; CHECK: ret;
+; CHECK: cvt.rzi.u16.f64 rh0, rd1;
+; CHECK-NEXT: ret;
%a = fptoui double %x to i16
ret i16 %a
}
@@ -88,36 +98,36 @@ define ptx_device i16 @cvt_i16_f64(double %x) {
; i32
define ptx_device i32 @cvt_i32_preds(i1 %x) {
-; CHECK: cvt.u32.pred r0, p1;
-; CHECK: ret;
+; CHECK: selp.u32 r0, 1, 0, p1;
+; CHECK-NEXT: ret;
%a = zext i1 %x to i32
ret i32 %a
}
define ptx_device i32 @cvt_i32_i16(i16 %x) {
; CHECK: cvt.u32.u16 r0, rh1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = zext i16 %x to i32
ret i32 %a
}
define ptx_device i32 @cvt_i32_i64(i64 %x) {
; CHECK: cvt.u32.u64 r0, rd1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = trunc i64 %x to i32
ret i32 %a
}
define ptx_device i32 @cvt_i32_f32(float %x) {
-; CHECK: cvt.rni.u32.f32 r0, r1;
-; CHECK: ret;
+; CHECK: cvt.rzi.u32.f32 r0, r1;
+; CHECK-NEXT: ret;
%a = fptoui float %x to i32
ret i32 %a
}
define ptx_device i32 @cvt_i32_f64(double %x) {
-; CHECK: cvt.rni.u32.f64 r0, rd1;
-; CHECK: ret;
+; CHECK: cvt.rzi.u32.f64 r0, rd1;
+; CHECK-NEXT: ret;
%a = fptoui double %x to i32
ret i32 %a
}
@@ -125,35 +135,35 @@ define ptx_device i32 @cvt_i32_f64(double %x) {
; i64
define ptx_device i64 @cvt_i64_preds(i1 %x) {
-; CHECK: cvt.u64.pred rd0, p1;
-; CHECK: ret;
+; CHECK: selp.u64 rd0, 1, 0, p1;
+; CHECK-NEXT: ret;
%a = zext i1 %x to i64
ret i64 %a
}
define ptx_device i64 @cvt_i64_i16(i16 %x) {
; CHECK: cvt.u64.u16 rd0, rh1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = zext i16 %x to i64
ret i64 %a
}
define ptx_device i64 @cvt_i64_i32(i32 %x) {
; CHECK: cvt.u64.u32 rd0, r1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = zext i32 %x to i64
ret i64 %a
}
define ptx_device i64 @cvt_i64_f32(float %x) {
-; CHECK: cvt.rni.u64.f32 rd0, r1;
-; CHECK: ret;
+; CHECK: cvt.rzi.u64.f32 rd0, r1;
+; CHECK-NEXT: ret;
%a = fptoui float %x to i64
ret i64 %a
}
define ptx_device i64 @cvt_i64_f64(double %x) {
-; CHECK: cvt.rni.u64.f64 rd0, rd1;
+; CHECK: cvt.rzi.u64.f64 rd0, rd1;
; CHECK: ret;
%a = fptoui double %x to i64
ret i64 %a
@@ -162,36 +172,36 @@ define ptx_device i64 @cvt_i64_f64(double %x) {
; f32
define ptx_device float @cvt_f32_preds(i1 %x) {
-; CHECK: cvt.rn.f32.pred r0, p1;
-; CHECK: ret;
+; CHECK: selp.f32 r0, 0F3F800000, 0F00000000, p1;
+; CHECK-NEXT: ret;
%a = uitofp i1 %x to float
ret float %a
}
define ptx_device float @cvt_f32_i16(i16 %x) {
; CHECK: cvt.rn.f32.u16 r0, rh1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = uitofp i16 %x to float
ret float %a
}
define ptx_device float @cvt_f32_i32(i32 %x) {
; CHECK: cvt.rn.f32.u32 r0, r1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = uitofp i32 %x to float
ret float %a
}
define ptx_device float @cvt_f32_i64(i64 %x) {
; CHECK: cvt.rn.f32.u64 r0, rd1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = uitofp i64 %x to float
ret float %a
}
define ptx_device float @cvt_f32_f64(double %x) {
; CHECK: cvt.rn.f32.f64 r0, rd1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = fptrunc double %x to float
ret float %a
}
@@ -199,36 +209,36 @@ define ptx_device float @cvt_f32_f64(double %x) {
; f64
define ptx_device double @cvt_f64_preds(i1 %x) {
-; CHECK: cvt.rn.f64.pred rd0, p1;
-; CHECK: ret;
+; CHECK: selp.f64 rd0, 0D3F80000000000000, 0D0000000000000000, p1;
+; CHECK-NEXT: ret;
%a = uitofp i1 %x to double
ret double %a
}
define ptx_device double @cvt_f64_i16(i16 %x) {
; CHECK: cvt.rn.f64.u16 rd0, rh1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = uitofp i16 %x to double
ret double %a
}
define ptx_device double @cvt_f64_i32(i32 %x) {
; CHECK: cvt.rn.f64.u32 rd0, r1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = uitofp i32 %x to double
ret double %a
}
define ptx_device double @cvt_f64_i64(i64 %x) {
; CHECK: cvt.rn.f64.u64 rd0, rd1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = uitofp i64 %x to double
ret double %a
}
define ptx_device double @cvt_f64_f32(float %x) {
; CHECK: cvt.f64.f32 rd0, r1;
-; CHECK: ret;
+; CHECK-NEXT: ret;
%a = fpext float %x to double
ret double %a
}
diff --git a/test/CodeGen/PTX/fdiv-sm10.ll b/test/CodeGen/PTX/fdiv-sm10.ll
index 9aff251..eb32222 100644
--- a/test/CodeGen/PTX/fdiv-sm10.ll
+++ b/test/CodeGen/PTX/fdiv-sm10.ll
@@ -1,7 +1,7 @@
; RUN: llc < %s -march=ptx32 -mattr=+sm10 | FileCheck %s
define ptx_device float @t1_f32(float %x, float %y) {
-; CHECK: div.approx.f32 r0, r1, r2;
+; CHECK: div.f32 r0, r1, r2;
; CHECK-NEXT: ret;
%a = fdiv float %x, %y
ret float %a
diff --git a/test/CodeGen/PTX/fdiv-sm13.ll b/test/CodeGen/PTX/fdiv-sm13.ll
index 84e0ada..ad24f35 100644
--- a/test/CodeGen/PTX/fdiv-sm13.ll
+++ b/test/CodeGen/PTX/fdiv-sm13.ll
@@ -1,7 +1,7 @@
; RUN: llc < %s -march=ptx32 -mattr=+sm13 | FileCheck %s
define ptx_device float @t1_f32(float %x, float %y) {
-; CHECK: div.approx.f32 r0, r1, r2;
+; CHECK: div.rn.f32 r0, r1, r2;
; CHECK-NEXT: ret;
%a = fdiv float %x, %y
ret float %a
diff --git a/test/CodeGen/PTX/mul.ll b/test/CodeGen/PTX/mul.ll
index 93f94e3..2093556 100644
--- a/test/CodeGen/PTX/mul.ll
+++ b/test/CodeGen/PTX/mul.ll
@@ -11,28 +11,28 @@
;}
define ptx_device float @t1_f32(float %x, float %y) {
-; CHECK: mul.f32 r0, r1, r2
+; CHECK: mul.rn.f32 r0, r1, r2
; CHECK-NEXT: ret;
%z = fmul float %x, %y
ret float %z
}
define ptx_device double @t1_f64(double %x, double %y) {
-; CHECK: mul.f64 rd0, rd1, rd2
+; CHECK: mul.rn.f64 rd0, rd1, rd2
; CHECK-NEXT: ret;
%z = fmul double %x, %y
ret double %z
}
define ptx_device float @t2_f32(float %x) {
-; CHECK: mul.f32 r0, r1, 0F40A00000;
+; CHECK: mul.rn.f32 r0, r1, 0F40A00000;
; CHECK-NEXT: ret;
%z = fmul float %x, 5.0
ret float %z
}
define ptx_device double @t2_f64(double %x) {
-; CHECK: mul.f64 rd0, rd1, 0D4014000000000000;
+; CHECK: mul.rn.f64 rd0, rd1, 0D4014000000000000;
; CHECK-NEXT: ret;
%z = fmul double %x, 5.0
ret double %z
diff --git a/test/CodeGen/PTX/options.ll b/test/CodeGen/PTX/options.ll
index 92effa6..0fb6602 100644
--- a/test/CodeGen/PTX/options.ll
+++ b/test/CodeGen/PTX/options.ll
@@ -5,6 +5,8 @@
; RUN: llc < %s -march=ptx32 -mattr=sm10 | grep ".target sm_10"
; RUN: llc < %s -march=ptx32 -mattr=sm13 | grep ".target sm_13"
; RUN: llc < %s -march=ptx32 -mattr=sm20 | grep ".target sm_20"
+; RUN: llc < %s -march=ptx32 -mattr=ptx23 | grep ".address_size 32"
+; RUN: llc < %s -march=ptx64 -mattr=ptx23 | grep ".address_size 64"
define ptx_device void @t1() {
ret void
diff --git a/test/CodeGen/PTX/setp.ll b/test/CodeGen/PTX/setp.ll
index 5836122..3e01a75 100644
--- a/test/CodeGen/PTX/setp.ll
+++ b/test/CodeGen/PTX/setp.ll
@@ -2,7 +2,7 @@
define ptx_device i32 @test_setp_eq_u32_rr(i32 %x, i32 %y) {
; CHECK: setp.eq.u32 p0, r1, r2;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp eq i32 %x, %y
%z = zext i1 %p to i32
@@ -11,7 +11,7 @@ define ptx_device i32 @test_setp_eq_u32_rr(i32 %x, i32 %y) {
define ptx_device i32 @test_setp_ne_u32_rr(i32 %x, i32 %y) {
; CHECK: setp.ne.u32 p0, r1, r2;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp ne i32 %x, %y
%z = zext i1 %p to i32
@@ -20,7 +20,7 @@ define ptx_device i32 @test_setp_ne_u32_rr(i32 %x, i32 %y) {
define ptx_device i32 @test_setp_lt_u32_rr(i32 %x, i32 %y) {
; CHECK: setp.lt.u32 p0, r1, r2;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp ult i32 %x, %y
%z = zext i1 %p to i32
@@ -29,7 +29,7 @@ define ptx_device i32 @test_setp_lt_u32_rr(i32 %x, i32 %y) {
define ptx_device i32 @test_setp_le_u32_rr(i32 %x, i32 %y) {
; CHECK: setp.le.u32 p0, r1, r2;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp ule i32 %x, %y
%z = zext i1 %p to i32
@@ -38,7 +38,7 @@ define ptx_device i32 @test_setp_le_u32_rr(i32 %x, i32 %y) {
define ptx_device i32 @test_setp_gt_u32_rr(i32 %x, i32 %y) {
; CHECK: setp.gt.u32 p0, r1, r2;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp ugt i32 %x, %y
%z = zext i1 %p to i32
@@ -47,16 +47,52 @@ define ptx_device i32 @test_setp_gt_u32_rr(i32 %x, i32 %y) {
define ptx_device i32 @test_setp_ge_u32_rr(i32 %x, i32 %y) {
; CHECK: setp.ge.u32 p0, r1, r2;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp uge i32 %x, %y
%z = zext i1 %p to i32
ret i32 %z
}
+define ptx_device i32 @test_setp_lt_s32_rr(i32 %x, i32 %y) {
+; CHECK: setp.lt.s32 p0, r1, r2;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp slt i32 %x, %y
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_le_s32_rr(i32 %x, i32 %y) {
+; CHECK: setp.le.s32 p0, r1, r2;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp sle i32 %x, %y
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_gt_s32_rr(i32 %x, i32 %y) {
+; CHECK: setp.gt.s32 p0, r1, r2;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp sgt i32 %x, %y
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_ge_s32_rr(i32 %x, i32 %y) {
+; CHECK: setp.ge.s32 p0, r1, r2;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp sge i32 %x, %y
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
define ptx_device i32 @test_setp_eq_u32_ri(i32 %x) {
; CHECK: setp.eq.u32 p0, r1, 1;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp eq i32 %x, 1
%z = zext i1 %p to i32
@@ -65,7 +101,7 @@ define ptx_device i32 @test_setp_eq_u32_ri(i32 %x) {
define ptx_device i32 @test_setp_ne_u32_ri(i32 %x) {
; CHECK: setp.ne.u32 p0, r1, 1;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp ne i32 %x, 1
%z = zext i1 %p to i32
@@ -74,7 +110,7 @@ define ptx_device i32 @test_setp_ne_u32_ri(i32 %x) {
define ptx_device i32 @test_setp_lt_u32_ri(i32 %x) {
; CHECK: setp.eq.u32 p0, r1, 0;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp ult i32 %x, 1
%z = zext i1 %p to i32
@@ -83,7 +119,7 @@ define ptx_device i32 @test_setp_lt_u32_ri(i32 %x) {
define ptx_device i32 @test_setp_le_u32_ri(i32 %x) {
; CHECK: setp.lt.u32 p0, r1, 2;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp ule i32 %x, 1
%z = zext i1 %p to i32
@@ -92,7 +128,7 @@ define ptx_device i32 @test_setp_le_u32_ri(i32 %x) {
define ptx_device i32 @test_setp_gt_u32_ri(i32 %x) {
; CHECK: setp.gt.u32 p0, r1, 1;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp ugt i32 %x, 1
%z = zext i1 %p to i32
@@ -101,17 +137,53 @@ define ptx_device i32 @test_setp_gt_u32_ri(i32 %x) {
define ptx_device i32 @test_setp_ge_u32_ri(i32 %x) {
; CHECK: setp.ne.u32 p0, r1, 0;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%p = icmp uge i32 %x, 1
%z = zext i1 %p to i32
ret i32 %z
}
+define ptx_device i32 @test_setp_lt_s32_ri(i32 %x) {
+; CHECK: setp.lt.s32 p0, r1, 1;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp slt i32 %x, 1
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_le_s32_ri(i32 %x) {
+; CHECK: setp.lt.s32 p0, r1, 2;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp sle i32 %x, 1
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_gt_s32_ri(i32 %x) {
+; CHECK: setp.gt.s32 p0, r1, 1;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp sgt i32 %x, 1
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_ge_s32_ri(i32 %x) {
+; CHECK: setp.gt.s32 p0, r1, 0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp sge i32 %x, 1
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
define ptx_device i32 @test_setp_4_op_format_1(i32 %x, i32 %y, i32 %u, i32 %v) {
; CHECK: setp.gt.u32 p0, r3, r4;
; CHECK-NEXT: setp.eq.and.u32 p0, r1, r2, p0;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%c = icmp eq i32 %x, %y
%d = icmp ugt i32 %u, %v
@@ -121,9 +193,9 @@ define ptx_device i32 @test_setp_4_op_format_1(i32 %x, i32 %y, i32 %u, i32 %v) {
}
define ptx_device i32 @test_setp_4_op_format_2(i32 %x, i32 %y, i32 %w) {
-; CHECK: cvt.pred.u32 p0, r3;
+; CHECK: setp.gt.b32 p0, r3, 0;
; CHECK-NEXT: setp.eq.and.u32 p0, r1, r2, !p0;
-; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: selp.u32 r0, 1, 0, p0;
; CHECK-NEXT: ret;
%c = trunc i32 %w to i1
%d = icmp eq i32 %x, %y
diff --git a/test/CodeGen/PTX/sub.ll b/test/CodeGen/PTX/sub.ll
index 9efeaac..4d55280 100644
--- a/test/CodeGen/PTX/sub.ll
+++ b/test/CodeGen/PTX/sub.ll
@@ -22,14 +22,14 @@ define ptx_device i64 @t1_u64(i64 %x, i64 %y) {
}
define ptx_device float @t1_f32(float %x, float %y) {
-; CHECK: sub.f32 r0, r1, r2
+; CHECK: sub.rn.f32 r0, r1, r2
; CHECK-NEXT: ret;
%z = fsub float %x, %y
ret float %z
}
define ptx_device double @t1_f64(double %x, double %y) {
-; CHECK: sub.f64 rd0, rd1, rd2
+; CHECK: sub.rn.f64 rd0, rd1, rd2
; CHECK-NEXT: ret;
%z = fsub double %x, %y
ret double %z
@@ -57,14 +57,14 @@ define ptx_device i64 @t2_u64(i64 %x) {
}
define ptx_device float @t2_f32(float %x) {
-; CHECK: add.f32 r0, r1, 0FBF800000;
+; CHECK: add.rn.f32 r0, r1, 0FBF800000;
; CHECK-NEXT: ret;
%z = fsub float %x, 1.0
ret float %z
}
define ptx_device double @t2_f64(double %x) {
-; CHECK: add.f64 rd0, rd1, 0DBFF0000000000000;
+; CHECK: add.rn.f64 rd0, rd1, 0DBFF0000000000000;
; CHECK-NEXT: ret;
%z = fsub double %x, 1.0
ret double %z
diff --git a/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll b/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll
index 7b00ac6..c779288 100644
--- a/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll
+++ b/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll
@@ -7,7 +7,6 @@ entry:
%temp = alloca i32, align 4 ; <i32*> [#uses=2]
%ctz_x = alloca i32, align 4 ; <i32*> [#uses=3]
%ctz_c = alloca i32, align 4 ; <i32*> [#uses=2]
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 61440, i32* %ctz_x
%tmp = load i32* %ctz_x ; <i32> [#uses=1]
%tmp1 = sub i32 0, %tmp ; <i32> [#uses=1]
diff --git a/test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll b/test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll
index 42f2152..c141551 100644
--- a/test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll
+++ b/test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll
@@ -13,7 +13,6 @@ entry:
%i_addr = alloca i32 ; <i32*> [#uses=2]
%q_addr = alloca i32 ; <i32*> [#uses=2]
%retval = alloca i32, align 4 ; <i32*> [#uses=1]
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 %i, i32* %i_addr
store i32 %q, i32* %q_addr
%tmp = load i32* %i_addr ; <i32> [#uses=1]
diff --git a/test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll b/test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll
deleted file mode 100644
index 83f3f6f..0000000
--- a/test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll
+++ /dev/null
@@ -1,14 +0,0 @@
-; RUN: llc < %s -march=ppc32
-; PR2986
-@argc = external global i32 ; <i32*> [#uses=1]
-@buffer = external global [32 x i8], align 4 ; <[32 x i8]*> [#uses=1]
-
-define void @test1() nounwind noinline {
-entry:
- %0 = load i32* @argc, align 4 ; <i32> [#uses=1]
- %1 = trunc i32 %0 to i8 ; <i8> [#uses=1]
- tail call void @llvm.memset.i32(i8* getelementptr ([32 x i8]* @buffer, i32 0, i32 0), i8 %1, i32 17, i32 4)
- unreachable
-}
-
-declare void @llvm.memset.i32(i8*, i8, i32, i32) nounwind
diff --git a/test/CodeGen/PowerPC/2009-11-15-ReMatBug.ll b/test/CodeGen/PowerPC/2009-11-15-ReMatBug.ll
deleted file mode 100644
index 54f4b2e..0000000
--- a/test/CodeGen/PowerPC/2009-11-15-ReMatBug.ll
+++ /dev/null
@@ -1,155 +0,0 @@
-; RUN: llc < %s -mtriple=powerpc-apple-darwin8
-
-%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
-%struct.__gcov_var = type { %struct.FILE*, i32, i32, i32, i32, i32, i32, [1025 x i32] }
-%struct.__sFILEX = type opaque
-%struct.__sbuf = type { i8*, i32 }
-%struct.gcov_ctr_info = type { i32, i64*, void (i64*, i32)* }
-%struct.gcov_ctr_summary = type { i32, i32, i64, i64, i64 }
-%struct.gcov_fn_info = type { i32, i32, [0 x i32] }
-%struct.gcov_info = type { i32, %struct.gcov_info*, i32, i8*, i32, %struct.gcov_fn_info*, i32, [0 x %struct.gcov_ctr_info] }
-%struct.gcov_summary = type { i32, [1 x %struct.gcov_ctr_summary] }
-
-@__gcov_var = external global %struct.__gcov_var ; <%struct.__gcov_var*> [#uses=1]
-@__sF = external global [0 x %struct.FILE] ; <[0 x %struct.FILE]*> [#uses=1]
-@.str = external constant [56 x i8], align 4 ; <[56 x i8]*> [#uses=1]
-@gcov_list = external global %struct.gcov_info* ; <%struct.gcov_info**> [#uses=1]
-@.str7 = external constant [35 x i8], align 4 ; <[35 x i8]*> [#uses=1]
-@.str8 = external constant [9 x i8], align 4 ; <[9 x i8]*> [#uses=1]
-@.str9 = external constant [10 x i8], align 4 ; <[10 x i8]*> [#uses=1]
-@.str10 = external constant [36 x i8], align 4 ; <[36 x i8]*> [#uses=1]
-
-declare i32 @"\01_fprintf$LDBL128"(%struct.FILE*, i8*, ...) nounwind
-
-define void @gcov_exit() nounwind {
-entry:
- %gi_ptr.0357 = load %struct.gcov_info** @gcov_list, align 4 ; <%struct.gcov_info*> [#uses=1]
- %0 = alloca i8, i32 undef, align 1 ; <i8*> [#uses=3]
- br i1 undef, label %return, label %bb.nph341
-
-bb.nph341: ; preds = %entry
- %object27 = bitcast %struct.gcov_summary* undef to i8* ; <i8*> [#uses=1]
- br label %bb25
-
-bb25: ; preds = %read_fatal, %bb.nph341
- %gi_ptr.1329 = phi %struct.gcov_info* [ %gi_ptr.0357, %bb.nph341 ], [ undef, %read_fatal ] ; <%struct.gcov_info*> [#uses=1]
- call void @llvm.memset.i32(i8* %object27, i8 0, i32 36, i32 8)
- br i1 undef, label %bb49.1, label %bb48
-
-bb48: ; preds = %bb25
- br label %bb49.1
-
-bb51: ; preds = %bb48.4, %bb49.3
- switch i32 undef, label %bb58 [
- i32 0, label %rewrite
- i32 1734567009, label %bb59
- ]
-
-bb58: ; preds = %bb51
- %1 = call i32 (%struct.FILE*, i8*, ...)* @"\01_fprintf$LDBL128"(%struct.FILE* getelementptr inbounds ([0 x %struct.FILE]* @__sF, i32 0, i32 2), i8* getelementptr inbounds ([35 x i8]* @.str7, i32 0, i32 0), i8* %0) nounwind ; <i32> [#uses=0]
- br label %read_fatal
-
-bb59: ; preds = %bb51
- br i1 undef, label %bb60, label %bb3.i156
-
-bb3.i156: ; preds = %bb59
- store i8 52, i8* undef, align 1
- store i8 42, i8* undef, align 1
- %2 = call i32 (%struct.FILE*, i8*, ...)* @"\01_fprintf$LDBL128"(%struct.FILE* getelementptr inbounds ([0 x %struct.FILE]* @__sF, i32 0, i32 2), i8* getelementptr inbounds ([56 x i8]* @.str, i32 0, i32 0), i8* %0, i8* undef, i8* undef) nounwind ; <i32> [#uses=0]
- br label %read_fatal
-
-bb60: ; preds = %bb59
- br i1 undef, label %bb78.preheader, label %rewrite
-
-bb78.preheader: ; preds = %bb60
- br i1 undef, label %bb62, label %bb80
-
-bb62: ; preds = %bb78.preheader
- br i1 undef, label %bb64, label %read_mismatch
-
-bb64: ; preds = %bb62
- br i1 undef, label %bb65, label %read_mismatch
-
-bb65: ; preds = %bb64
- br i1 undef, label %bb75, label %read_mismatch
-
-read_mismatch: ; preds = %bb98, %bb119.preheader, %bb72, %bb71, %bb65, %bb64, %bb62
- %3 = icmp eq i32 undef, -1 ; <i1> [#uses=1]
- %iftmp.11.0 = select i1 %3, i8* getelementptr inbounds ([10 x i8]* @.str9, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8]* @.str8, i32 0, i32 0) ; <i8*> [#uses=1]
- %4 = call i32 (%struct.FILE*, i8*, ...)* @"\01_fprintf$LDBL128"(%struct.FILE* getelementptr inbounds ([0 x %struct.FILE]* @__sF, i32 0, i32 2), i8* getelementptr inbounds ([36 x i8]* @.str10, i32 0, i32 0), i8* %0, i8* %iftmp.11.0) nounwind ; <i32> [#uses=0]
- br label %read_fatal
-
-bb71: ; preds = %bb75
- %5 = load i32* undef, align 4 ; <i32> [#uses=1]
- %6 = getelementptr inbounds %struct.gcov_info* %gi_ptr.1329, i32 0, i32 7, i32 undef, i32 2 ; <void (i64*, i32)**> [#uses=1]
- %7 = load void (i64*, i32)** %6, align 4 ; <void (i64*, i32)*> [#uses=1]
- %8 = call i32 @__gcov_read_unsigned() nounwind ; <i32> [#uses=1]
- %9 = call i32 @__gcov_read_unsigned() nounwind ; <i32> [#uses=1]
- %10 = icmp eq i32 %tmp386, %8 ; <i1> [#uses=1]
- br i1 %10, label %bb72, label %read_mismatch
-
-bb72: ; preds = %bb71
- %11 = icmp eq i32 undef, %9 ; <i1> [#uses=1]
- br i1 %11, label %bb73, label %read_mismatch
-
-bb73: ; preds = %bb72
- call void %7(i64* null, i32 %5) nounwind
- unreachable
-
-bb74: ; preds = %bb75
- %12 = add i32 %13, 1 ; <i32> [#uses=1]
- br label %bb75
-
-bb75: ; preds = %bb74, %bb65
- %13 = phi i32 [ %12, %bb74 ], [ 0, %bb65 ] ; <i32> [#uses=2]
- %tmp386 = add i32 0, 27328512 ; <i32> [#uses=1]
- %14 = shl i32 1, %13 ; <i32> [#uses=1]
- %15 = load i32* undef, align 4 ; <i32> [#uses=1]
- %16 = and i32 %15, %14 ; <i32> [#uses=1]
- %17 = icmp eq i32 %16, 0 ; <i1> [#uses=1]
- br i1 %17, label %bb74, label %bb71
-
-bb80: ; preds = %bb78.preheader
- unreachable
-
-read_fatal: ; preds = %read_mismatch, %bb3.i156, %bb58
- br i1 undef, label %return, label %bb25
-
-rewrite: ; preds = %bb60, %bb51
- store i32 -1, i32* getelementptr inbounds (%struct.__gcov_var* @__gcov_var, i32 0, i32 6), align 4
- br i1 undef, label %bb94, label %bb119.preheader
-
-bb94: ; preds = %rewrite
- unreachable
-
-bb119.preheader: ; preds = %rewrite
- br i1 undef, label %read_mismatch, label %bb98
-
-bb98: ; preds = %bb119.preheader
- br label %read_mismatch
-
-return: ; preds = %read_fatal, %entry
- ret void
-
-bb49.1: ; preds = %bb48, %bb25
- br i1 undef, label %bb49.2, label %bb48.2
-
-bb49.2: ; preds = %bb48.2, %bb49.1
- br i1 undef, label %bb49.3, label %bb48.3
-
-bb48.2: ; preds = %bb49.1
- br label %bb49.2
-
-bb49.3: ; preds = %bb48.3, %bb49.2
- br i1 undef, label %bb51, label %bb48.4
-
-bb48.3: ; preds = %bb49.2
- br label %bb49.3
-
-bb48.4: ; preds = %bb49.3
- br label %bb51
-}
-
-declare i32 @__gcov_read_unsigned() nounwind
-
-declare void @llvm.memset.i32(i8* nocapture, i8, i32, i32) nounwind
diff --git a/test/CodeGen/PowerPC/atomic-1.ll b/test/CodeGen/PowerPC/atomic-1.ll
index ec4e42d..a2cf170 100644
--- a/test/CodeGen/PowerPC/atomic-1.ll
+++ b/test/CodeGen/PowerPC/atomic-1.ll
@@ -1,21 +1,23 @@
; RUN: llc < %s -march=ppc32 | grep lwarx | count 3
; RUN: llc < %s -march=ppc32 | grep stwcx. | count 4
-define i32 @exchange_and_add(i32* %mem, i32 %val) nounwind {
- %tmp = call i32 @llvm.atomic.load.add.i32( i32* %mem, i32 %val )
- ret i32 %tmp
+define i32 @exchange_and_add(i32* %mem, i32 %val) nounwind {
+ %tmp = call i32 @llvm.atomic.load.add.i32.p0i32(i32* %mem, i32 %val)
+ ret i32 %tmp
}
-define i32 @exchange_and_cmp(i32* %mem) nounwind {
- %tmp = call i32 @llvm.atomic.cmp.swap.i32( i32* %mem, i32 0, i32 1 )
- ret i32 %tmp
+define i32 @exchange_and_cmp(i32* %mem) nounwind {
+ %tmp = call i32 @llvm.atomic.cmp.swap.i32.p0i32(i32* %mem, i32 0, i32 1)
+ ret i32 %tmp
}
-define i32 @exchange(i32* %mem, i32 %val) nounwind {
- %tmp = call i32 @llvm.atomic.swap.i32( i32* %mem, i32 1 )
- ret i32 %tmp
+define i32 @exchange(i32* %mem, i32 %val) nounwind {
+ %tmp = call i32 @llvm.atomic.swap.i32.p0i32(i32* %mem, i32 1)
+ ret i32 %tmp
}
-declare i32 @llvm.atomic.load.add.i32(i32*, i32) nounwind
-declare i32 @llvm.atomic.cmp.swap.i32(i32*, i32, i32) nounwind
-declare i32 @llvm.atomic.swap.i32(i32*, i32) nounwind
+declare i32 @llvm.atomic.load.add.i32.p0i32(i32* nocapture, i32) nounwind
+
+declare i32 @llvm.atomic.cmp.swap.i32.p0i32(i32* nocapture, i32, i32) nounwind
+
+declare i32 @llvm.atomic.swap.i32.p0i32(i32* nocapture, i32) nounwind
diff --git a/test/CodeGen/PowerPC/atomic-2.ll b/test/CodeGen/PowerPC/atomic-2.ll
index 6d9daef..0fa2a29 100644
--- a/test/CodeGen/PowerPC/atomic-2.ll
+++ b/test/CodeGen/PowerPC/atomic-2.ll
@@ -1,21 +1,23 @@
; RUN: llc < %s -march=ppc64 | grep ldarx | count 3
; RUN: llc < %s -march=ppc64 | grep stdcx. | count 4
-define i64 @exchange_and_add(i64* %mem, i64 %val) nounwind {
- %tmp = call i64 @llvm.atomic.load.add.i64( i64* %mem, i64 %val )
- ret i64 %tmp
+define i64 @exchange_and_add(i64* %mem, i64 %val) nounwind {
+ %tmp = call i64 @llvm.atomic.load.add.i64.p0i64(i64* %mem, i64 %val)
+ ret i64 %tmp
}
-define i64 @exchange_and_cmp(i64* %mem) nounwind {
- %tmp = call i64 @llvm.atomic.cmp.swap.i64( i64* %mem, i64 0, i64 1 )
- ret i64 %tmp
+define i64 @exchange_and_cmp(i64* %mem) nounwind {
+ %tmp = call i64 @llvm.atomic.cmp.swap.i64.p0i64(i64* %mem, i64 0, i64 1)
+ ret i64 %tmp
}
-define i64 @exchange(i64* %mem, i64 %val) nounwind {
- %tmp = call i64 @llvm.atomic.swap.i64( i64* %mem, i64 1 )
- ret i64 %tmp
+define i64 @exchange(i64* %mem, i64 %val) nounwind {
+ %tmp = call i64 @llvm.atomic.swap.i64.p0i64(i64* %mem, i64 1)
+ ret i64 %tmp
}
-declare i64 @llvm.atomic.load.add.i64(i64*, i64) nounwind
-declare i64 @llvm.atomic.cmp.swap.i64(i64*, i64, i64) nounwind
-declare i64 @llvm.atomic.swap.i64(i64*, i64) nounwind
+declare i64 @llvm.atomic.load.add.i64.p0i64(i64* nocapture, i64) nounwind
+
+declare i64 @llvm.atomic.cmp.swap.i64.p0i64(i64* nocapture, i64, i64) nounwind
+
+declare i64 @llvm.atomic.swap.i64.p0i64(i64* nocapture, i64) nounwind
diff --git a/test/CodeGen/PowerPC/invalid-memcpy.ll b/test/CodeGen/PowerPC/invalid-memcpy.ll
deleted file mode 100644
index 3b1f306..0000000
--- a/test/CodeGen/PowerPC/invalid-memcpy.ll
+++ /dev/null
@@ -1,20 +0,0 @@
-; RUN: llc < %s -march=ppc32
-; RUN: llc < %s -march=ppc64
-
-; This testcase is invalid (the alignment specified for memcpy is
-; greater than the alignment guaranteed for Qux or C.0.1173, but it
-; should compile, not crash the code generator.
-
-@C.0.1173 = external constant [33 x i8] ; <[33 x i8]*> [#uses=1]
-
-define void @Bork() {
-entry:
- %Qux = alloca [33 x i8] ; <[33 x i8]*> [#uses=1]
- %Qux1 = bitcast [33 x i8]* %Qux to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i64( i8* %Qux1, i8* getelementptr ([33 x i8]* @C.0.1173, i32 0, i32 0), i64 33, i32 8 )
- ret void
-}
-
-declare void @llvm.memcpy.i64(i8*, i8*, i64, i32)
-
-
diff --git a/test/CodeGen/PowerPC/multiple-return-values.ll b/test/CodeGen/PowerPC/multiple-return-values.ll
deleted file mode 100644
index b9317f9..0000000
--- a/test/CodeGen/PowerPC/multiple-return-values.ll
+++ /dev/null
@@ -1,17 +0,0 @@
-; RUN: llc < %s -march=ppc32
-; RUN: llc < %s -march=ppc64
-
-define {i64, float} @bar(i64 %a, float %b) {
- %y = add i64 %a, 7
- %z = fadd float %b, 7.0
- ret i64 %y, float %z
-}
-
-define i64 @foo() {
- %M = call {i64, float} @bar(i64 21, float 21.0)
- %N = getresult {i64, float} %M, 0
- %O = getresult {i64, float} %M, 1
- %P = fptosi float %O to i64
- %Q = add i64 %P, %N
- ret i64 %Q
-}
diff --git a/test/CodeGen/PowerPC/ppc64-32bit-addic.ll b/test/CodeGen/PowerPC/ppc64-32bit-addic.ll
new file mode 100644
index 0000000..4d323da
--- /dev/null
+++ b/test/CodeGen/PowerPC/ppc64-32bit-addic.ll
@@ -0,0 +1,29 @@
+; Check that the ADDIC optimizations are not applied on PPC64
+; RUN: llc < %s | FileCheck %s
+; ModuleID = 'os_unix.c'
+target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64"
+target triple = "powerpc64-unknown-freebsd9.0"
+
+define i32 @notZero(i32 %call) nounwind {
+entry:
+; CHECK-NOT: addic
+ %not.tobool = icmp ne i32 %call, 0
+ %. = zext i1 %not.tobool to i32
+ ret i32 %.
+}
+
+define i32 @isMinusOne(i32 %call) nounwind {
+entry:
+; CHECK-NOT: addic
+ %not.tobool = icmp eq i32 %call, -1
+ %. = zext i1 %not.tobool to i32
+ ret i32 %.
+}
+
+define i32 @isNotMinusOne(i32 %call) nounwind {
+entry:
+; CHECK-NOT: addic
+ %not.tobool = icmp ne i32 %call, -1
+ %. = zext i1 %not.tobool to i32
+ ret i32 %.
+}
diff --git a/test/CodeGen/PowerPC/ppc64-crash.ll b/test/CodeGen/PowerPC/ppc64-crash.ll
new file mode 100644
index 0000000..073c322
--- /dev/null
+++ b/test/CodeGen/PowerPC/ppc64-crash.ll
@@ -0,0 +1,14 @@
+; RUN: llc %s -o -
+
+; ModuleID = 'undo.c'
+target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64"
+target triple = "powerpc64-unknown-freebsd"
+
+%struct.__sFILE = type {}
+%struct.pos_T = type { i64 }
+
+; check that we're not copying stuff between R and X registers
+define internal void @serialize_pos(%struct.pos_T* byval %pos, %struct.__sFILE* %fp) nounwind {
+entry:
+ ret void
+}
diff --git a/test/CodeGen/SPARC/private.ll b/test/CodeGen/SPARC/private.ll
index f091aa6..f06ccd0 100644
--- a/test/CodeGen/SPARC/private.ll
+++ b/test/CodeGen/SPARC/private.ll
@@ -6,8 +6,6 @@
; RUN: grep .baz: %t
; RUN: grep ld.*\.baz %t
-declare void @foo()
-
define private void @foo() {
ret void
}
diff --git a/test/CodeGen/Thumb/dyn-stackalloc.ll b/test/CodeGen/Thumb/dyn-stackalloc.ll
index cd35be6..f3f0834 100644
--- a/test/CodeGen/Thumb/dyn-stackalloc.ll
+++ b/test/CodeGen/Thumb/dyn-stackalloc.ll
@@ -60,7 +60,7 @@ define void @t2(%struct.comment* %vc, i8* %tag, i8* %contents) {
%tmp9 = call i8* @strcpy( i8* %tmp6, i8* %tag )
%tmp6.len = call i32 @strlen( i8* %tmp6 )
%tmp6.indexed = getelementptr i8* %tmp6, i32 %tmp6.len
- call void @llvm.memcpy.i32( i8* %tmp6.indexed, i8* getelementptr ([2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1 )
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp6.indexed, i8* getelementptr inbounds ([2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1, i1 false)
%tmp15 = call i8* @strcat( i8* %tmp6, i8* %contents )
call fastcc void @comment_add( %struct.comment* %vc, i8* %tmp6 )
ret void
@@ -72,6 +72,6 @@ declare i8* @strcat(i8*, i8*)
declare fastcc void @comment_add(%struct.comment*, i8*)
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
declare i8* @strcpy(i8*, i8*)
diff --git a/test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll b/test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll
index 41b3029..0b56103 100644
--- a/test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll
+++ b/test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll
@@ -1,10 +1,10 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim
- type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16)*, i32 } ; type %0
- type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16*)*, i32 } ; type %1
- type { void (%"struct.xalanc_1_8::FormatterToXML"*, %"struct.xalanc_1_8::XalanDOMString"*)*, i32 } ; type %2
- type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16*, i32, i32)*, i32 } ; type %3
- type { void (%"struct.xalanc_1_8::FormatterToXML"*)*, i32 } ; type %4
+ %0 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16)*, i32 } ; type %0
+ %1 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16*)*, i32 } ; type %1
+ %2 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, %"struct.xalanc_1_8::XalanDOMString"*)*, i32 } ; type %2
+ %3 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16*, i32, i32)*, i32 } ; type %3
+ %4 = type { void (%"struct.xalanc_1_8::FormatterToXML"*)*, i32 } ; type %4
%"struct.std::CharVectorType" = type { %"struct.std::_Vector_base<char,std::allocator<char> >" }
%"struct.std::_Bit_const_iterator" = type { %"struct.std::_Bit_iterator_base" }
%"struct.std::_Bit_iterator_base" = type { i32*, i32 }
diff --git a/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll b/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll
index b832637..28ac28b 100644
--- a/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll
+++ b/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll
@@ -1,10 +1,10 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim
- type { %struct.GAP } ; type %0
- type { i16, i8, i8 } ; type %1
- type { [2 x i32], [2 x i32] } ; type %2
- type { %struct.rec* } ; type %3
- type { i8, i8, i16, i8, i8, i8, i8 } ; type %4
+ %0 = type { %struct.GAP } ; type %0
+ %1 = type { i16, i8, i8 } ; type %1
+ %2 = type { [2 x i32], [2 x i32] } ; type %2
+ %3 = type { %struct.rec* } ; type %3
+ %4 = type { i8, i8, i16, i8, i8, i8, i8 } ; type %4
%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
%struct.FILE_POS = type { i8, i8, i16, i32 }
%struct.FIRST_UNION = type { %struct.FILE_POS }
diff --git a/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll b/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll
index 02fad4b..88accf8 100644
--- a/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll
+++ b/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll
@@ -1,11 +1,11 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim -O3
- type { i16, i8, i8 } ; type %0
- type { [2 x i32], [2 x i32] } ; type %1
- type { %struct.GAP } ; type %2
- type { %struct.rec* } ; type %3
- type { i8, i8, i16, i8, i8, i8, i8 } ; type %4
- type { i8, i8, i8, i8 } ; type %5
+ %0 = type { i16, i8, i8 } ; type %0
+ %1 = type { [2 x i32], [2 x i32] } ; type %1
+ %2 = type { %struct.GAP } ; type %2
+ %3 = type { %struct.rec* } ; type %3
+ %4 = type { i8, i8, i16, i8, i8, i8, i8 } ; type %4
+ %5 = type { i8, i8, i8, i8 } ; type %5
%struct.COMPOSITE = type { i8, i16, i16 }
%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
%struct.FILE_POS = type { i8, i8, i16, i32 }
diff --git a/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll b/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll
index bfea003..779e100 100644
--- a/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll
+++ b/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll
@@ -1,4 +1,3 @@
-; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8
; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 | not grep fcpys
; rdar://7117307
@@ -13,7 +12,7 @@ entry:
br i1 undef, label %bb, label %bb6.preheader
bb6.preheader: ; preds = %entry
- call void @llvm.memcpy.i32(i8* undef, i8* undef, i32 12, i32 4)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* undef, i8* undef, i32 12, i32 4, i1 false)
br i1 undef, label %bb15, label %bb13
bb: ; preds = %entry
@@ -31,4 +30,4 @@ bb15: ; preds = %bb13, %bb6.preheader
ret void
}
-declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/CodeGen/Thumb2/ldr-str-imm12.ll b/test/CodeGen/Thumb2/ldr-str-imm12.ll
index e1932bd..4597ba5 100644
--- a/test/CodeGen/Thumb2/ldr-str-imm12.ll
+++ b/test/CodeGen/Thumb2/ldr-str-imm12.ll
@@ -22,7 +22,7 @@
define %union.rec* @Manifest(%union.rec* %x, %union.rec* %env, %struct.STYLE* %style, %union.rec** %bthr, %union.rec** %fthr, %union.rec** %target, %union.rec** %crs, i32 %ok, i32 %need_expand, %union.rec** %enclose, i32 %fcr) nounwind {
entry:
-; CHECK: ldr.w {{(r[0-9]+)|(lr)}}, [r7, #28]
+; CHECK: ldr{{(.w)?}} {{(r[0-9]+)|(lr)}}, [r7, #28]
%xgaps.i = alloca [32 x %union.rec*], align 4 ; <[32 x %union.rec*]*> [#uses=0]
%ycomp.i = alloca [32 x %union.rec*], align 4 ; <[32 x %union.rec*]*> [#uses=0]
br label %bb20
diff --git a/test/CodeGen/X86/2004-02-12-Memcpy.ll b/test/CodeGen/X86/2004-02-12-Memcpy.ll
deleted file mode 100644
index f15a1b4..0000000
--- a/test/CodeGen/X86/2004-02-12-Memcpy.ll
+++ /dev/null
@@ -1,25 +0,0 @@
-; RUN: llc < %s -march=x86 -mtriple=i686-pc-linux-gnu | grep movs | count 1
-
-@A = global [32 x i32] zeroinitializer
-@B = global [32 x i32] zeroinitializer
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
-define void @main() nounwind {
- ; dword copy
- call void @llvm.memcpy.i32(i8* bitcast ([32 x i32]* @A to i8*),
- i8* bitcast ([32 x i32]* @B to i8*),
- i32 128, i32 4 )
-
- ; word copy
- call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*),
- i8* bitcast ([32 x i32]* @B to i8*),
- i32 128, i32 2 )
-
- ; byte copy
- call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*),
- i8* bitcast ([32 x i32]* @B to i8*),
- i32 128, i32 1 )
-
- ret void
-}
diff --git a/test/CodeGen/X86/2006-11-28-Memcpy.ll b/test/CodeGen/X86/2006-11-28-Memcpy.ll
deleted file mode 100644
index 8c1573f..0000000
--- a/test/CodeGen/X86/2006-11-28-Memcpy.ll
+++ /dev/null
@@ -1,34 +0,0 @@
-; PR1022, PR1023
-; RUN: llc < %s -march=x86 | grep -- -573785174 | count 2
-; RUN: llc < %s -march=x86 | grep -E {movl _?bytes2} | count 1
-
-@fmt = constant [4 x i8] c"%x\0A\00" ; <[4 x i8]*> [#uses=2]
-@bytes = constant [4 x i8] c"\AA\BB\CC\DD" ; <[4 x i8]*> [#uses=1]
-@bytes2 = global [4 x i8] c"\AA\BB\CC\DD" ; <[4 x i8]*> [#uses=1]
-
-define i32 @test1() nounwind {
- %y = alloca i32 ; <i32*> [#uses=2]
- %c = bitcast i32* %y to i8* ; <i8*> [#uses=1]
- %z = getelementptr [4 x i8]* @bytes, i32 0, i32 0 ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %c, i8* %z, i32 4, i32 1 )
- %r = load i32* %y ; <i32> [#uses=1]
- %t = bitcast [4 x i8]* @fmt to i8* ; <i8*> [#uses=1]
- %tmp = call i32 (i8*, ...)* @printf( i8* %t, i32 %r ) ; <i32> [#uses=0]
- ret i32 0
-}
-
-define void @test2() nounwind {
- %y = alloca i32 ; <i32*> [#uses=2]
- %c = bitcast i32* %y to i8* ; <i8*> [#uses=1]
- %z = getelementptr [4 x i8]* @bytes2, i32 0, i32 0 ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %c, i8* %z, i32 4, i32 1 )
- %r = load i32* %y ; <i32> [#uses=1]
- %t = bitcast [4 x i8]* @fmt to i8* ; <i8*> [#uses=1]
- %tmp = call i32 (i8*, ...)* @printf( i8* %t, i32 %r ) ; <i32> [#uses=0]
- ret void
-}
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
-declare i32 @printf(i8*, ...)
-
diff --git a/test/CodeGen/X86/2007-03-16-InlineAsm.ll b/test/CodeGen/X86/2007-03-16-InlineAsm.ll
index 9580726..3bd6d59 100644
--- a/test/CodeGen/X86/2007-03-16-InlineAsm.ll
+++ b/test/CodeGen/X86/2007-03-16-InlineAsm.ll
@@ -9,7 +9,6 @@ entry:
%retval = alloca i32, align 4 ; <i32*> [#uses=2]
%tmp = alloca i32, align 4 ; <i32*> [#uses=2]
%ret = alloca i32, align 4 ; <i32*> [#uses=2]
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 %A, i32* %A_addr
store i32 %B, i32* %B_addr
%tmp1 = load i32* %A_addr ; <i32> [#uses=1]
diff --git a/test/CodeGen/X86/2007-05-05-Personality.ll b/test/CodeGen/X86/2007-05-05-Personality.ll
index 0f49d2e..d1fc70d 100644
--- a/test/CodeGen/X86/2007-05-05-Personality.ll
+++ b/test/CodeGen/X86/2007-05-05-Personality.ll
@@ -3,35 +3,35 @@
; CHECK: .cfi_personality 0, __gnat_eh_personality
; CHECK: .cfi_lsda 0, .Lexception0
-@error = external global i8 ; <i8*> [#uses=2]
+@error = external global i8
define void @_ada_x() {
entry:
- invoke void @raise( )
- to label %eh_then unwind label %unwind
-
-unwind: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2]
- %eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i8* @error ) ; <i32> [#uses=1]
- %eh_typeid = tail call i32 @llvm.eh.typeid.for.i32( i8* @error ) ; <i32> [#uses=1]
- %tmp2 = icmp eq i32 %eh_select, %eh_typeid ; <i1> [#uses=1]
- br i1 %tmp2, label %eh_then, label %Unwind
-
-eh_then: ; preds = %unwind, %entry
- ret void
-
-Unwind: ; preds = %unwind
- tail call i32 (...)* @_Unwind_Resume( i8* %eh_ptr ) ; <i32>:0 [#uses=0]
- unreachable
+ invoke void @raise()
+ to label %eh_then unwind label %unwind
+
+unwind: ; preds = %entry
+ %eh_ptr = tail call i8* @llvm.eh.exception()
+ %eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i8* @error)
+ %eh_typeid = tail call i32 @llvm.eh.typeid.for(i8* @error)
+ %tmp2 = icmp eq i32 %eh_select, %eh_typeid
+ br i1 %tmp2, label %eh_then, label %Unwind
+
+eh_then: ; preds = %unwind, %entry
+ ret void
+
+Unwind: ; preds = %unwind
+ %0 = tail call i32 (...)* @_Unwind_Resume(i8* %eh_ptr)
+ unreachable
}
declare void @raise()
-declare i8* @llvm.eh.exception()
+declare i8* @llvm.eh.exception() nounwind readonly
-declare i32 @llvm.eh.selector.i32(i8*, i8*, ...)
+declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
-declare i32 @llvm.eh.typeid.for.i32(i8*)
+declare i32 @llvm.eh.typeid.for(i8*) nounwind
declare i32 @__gnat_eh_personality(...)
diff --git a/test/CodeGen/X86/2007-06-05-LSR-Dominator.ll b/test/CodeGen/X86/2007-06-05-LSR-Dominator.ll
deleted file mode 100644
index 36a97ef..0000000
--- a/test/CodeGen/X86/2007-06-05-LSR-Dominator.ll
+++ /dev/null
@@ -1,129 +0,0 @@
-; PR1495
-; RUN: llc < %s -march=x86
-
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "i686-pc-linux-gnu"
- %struct.AVRational = type { i32, i32 }
- %struct.FFTComplex = type { float, float }
- %struct.FFTContext = type { i32, i32, i16*, %struct.FFTComplex*, %struct.FFTComplex*, void (%struct.FFTContext*, %struct.FFTComplex*)*, void (%struct.MDCTContext*, float*, float*, float*)* }
- %struct.MDCTContext = type { i32, i32, float*, float*, %struct.FFTContext }
- %struct.Minima = type { i32, i32, i32, i32 }
- %struct.codebook_t = type { i32, i8*, i32*, i32, float, float, i32, i32, i32*, float*, float* }
- %struct.floor_class_t = type { i32, i32, i32, i32* }
- %struct.floor_t = type { i32, i32*, i32, %struct.floor_class_t*, i32, i32, i32, %struct.Minima* }
- %struct.mapping_t = type { i32, i32*, i32*, i32*, i32, i32*, i32* }
- %struct.residue_t = type { i32, i32, i32, i32, i32, i32, [8 x i8]*, [2 x float]* }
- %struct.venc_context_t = type { i32, i32, [2 x i32], [2 x %struct.MDCTContext], [2 x float*], i32, float*, float*, float*, float*, float, i32, %struct.codebook_t*, i32, %struct.floor_t*, i32, %struct.residue_t*, i32, %struct.mapping_t*, i32, %struct.AVRational* }
-
-define fastcc i32 @put_main_header(%struct.venc_context_t* %venc, i8** %out) {
-entry:
- br i1 false, label %bb1820, label %bb288.bb148_crit_edge
-
-bb288.bb148_crit_edge: ; preds = %entry
- ret i32 0
-
-cond_next1712: ; preds = %bb1820.bb1680_crit_edge
- ret i32 0
-
-bb1817: ; preds = %bb1820.bb1680_crit_edge
- br label %bb1820
-
-bb1820: ; preds = %bb1817, %entry
- %pb.1.50 = phi i32 [ %tmp1693, %bb1817 ], [ 8, %entry ] ; <i32> [#uses=3]
- br i1 false, label %bb2093, label %bb1820.bb1680_crit_edge
-
-bb1820.bb1680_crit_edge: ; preds = %bb1820
- %tmp1693 = add i32 %pb.1.50, 8 ; <i32> [#uses=2]
- %tmp1702 = icmp slt i32 %tmp1693, 0 ; <i1> [#uses=1]
- br i1 %tmp1702, label %cond_next1712, label %bb1817
-
-bb2093: ; preds = %bb1820
- %tmp2102 = add i32 %pb.1.50, 65 ; <i32> [#uses=0]
- %tmp2236 = add i32 %pb.1.50, 72 ; <i32> [#uses=1]
- %tmp2237 = sdiv i32 %tmp2236, 8 ; <i32> [#uses=2]
- br i1 false, label %bb2543, label %bb2536.bb2396_crit_edge
-
-bb2536.bb2396_crit_edge: ; preds = %bb2093
- ret i32 0
-
-bb2543: ; preds = %bb2093
- br i1 false, label %cond_next2576, label %bb2690
-
-cond_next2576: ; preds = %bb2543
- ret i32 0
-
-bb2682: ; preds = %bb2690
- ret i32 0
-
-bb2690: ; preds = %bb2543
- br i1 false, label %bb2682, label %bb2698
-
-bb2698: ; preds = %bb2690
- br i1 false, label %cond_next2726, label %bb2831
-
-cond_next2726: ; preds = %bb2698
- ret i32 0
-
-bb2831: ; preds = %bb2698
- br i1 false, label %cond_next2859, label %bb2964
-
-cond_next2859: ; preds = %bb2831
- br i1 false, label %bb2943, label %cond_true2866
-
-cond_true2866: ; preds = %cond_next2859
- br i1 false, label %cond_true2874, label %cond_false2897
-
-cond_true2874: ; preds = %cond_true2866
- ret i32 0
-
-cond_false2897: ; preds = %cond_true2866
- ret i32 0
-
-bb2943: ; preds = %cond_next2859
- ret i32 0
-
-bb2964: ; preds = %bb2831
- br i1 false, label %cond_next2997, label %bb4589
-
-cond_next2997: ; preds = %bb2964
- ret i32 0
-
-bb3103: ; preds = %bb4589
- ret i32 0
-
-bb4589: ; preds = %bb2964
- br i1 false, label %bb3103, label %bb4597
-
-bb4597: ; preds = %bb4589
- br i1 false, label %cond_next4630, label %bb4744
-
-cond_next4630: ; preds = %bb4597
- br i1 false, label %bb4744, label %cond_true4724
-
-cond_true4724: ; preds = %cond_next4630
- br i1 false, label %bb4736, label %bb7531
-
-bb4736: ; preds = %cond_true4724
- ret i32 0
-
-bb4744: ; preds = %cond_next4630, %bb4597
- ret i32 0
-
-bb7531: ; preds = %cond_true4724
- %v_addr.023.0.i6 = add i32 %tmp2237, -255 ; <i32> [#uses=1]
- br label %bb.i14
-
-bb.i14: ; preds = %bb.i14, %bb7531
- %n.021.0.i8 = phi i32 [ 0, %bb7531 ], [ %indvar.next, %bb.i14 ] ; <i32> [#uses=2]
- %tmp..i9 = mul i32 %n.021.0.i8, -255 ; <i32> [#uses=1]
- %tmp5.i11 = add i32 %v_addr.023.0.i6, %tmp..i9 ; <i32> [#uses=1]
- %tmp10.i12 = icmp ugt i32 %tmp5.i11, 254 ; <i1> [#uses=1]
- %indvar.next = add i32 %n.021.0.i8, 1 ; <i32> [#uses=1]
- br i1 %tmp10.i12, label %bb.i14, label %bb12.loopexit.i18
-
-bb12.loopexit.i18: ; preds = %bb.i14
- call void @llvm.memcpy.i32( i8* null, i8* null, i32 %tmp2237, i32 1 )
- ret i32 0
-}
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
diff --git a/test/CodeGen/X86/2007-10-15-CoalescerCrash.ll b/test/CodeGen/X86/2007-10-15-CoalescerCrash.ll
index c68628d..2b56b4e 100644
--- a/test/CodeGen/X86/2007-10-15-CoalescerCrash.ll
+++ b/test/CodeGen/X86/2007-10-15-CoalescerCrash.ll
@@ -362,7 +362,7 @@ bb1159: ; preds = %cond_next1150
cond_true1169: ; preds = %bb1159
%tmp11741175 = trunc i64 %lsum.11225.0 to i32 ; <i32> [#uses=1]
- %tmp1178 = tail call i32 (%struct._IO_FILE* noalias , i8* noalias , ...)* @fprintf( %struct._IO_FILE* noalias %file , i8* getelementptr ([49 x i8]* @.str32, i32 0, i64 0) , i32 %tmp11741175, i32 0 ) ; <i32> [#uses=0]
+ %tmp1178 = tail call i32 (%struct._IO_FILE* , i8* , ...)* @fprintf( %struct._IO_FILE* noalias %file , i8* getelementptr ([49 x i8]* @.str32, i32 0, i64 0) , i32 %tmp11741175, i32 0 ) ; <i32> [#uses=0]
ret void
UnifiedReturnBlock: ; preds = %bb1159
diff --git a/test/CodeGen/X86/2008-06-04-MemCpyLoweringBug.ll b/test/CodeGen/X86/2008-06-04-MemCpyLoweringBug.ll
deleted file mode 100644
index 236b7cd..0000000
--- a/test/CodeGen/X86/2008-06-04-MemCpyLoweringBug.ll
+++ /dev/null
@@ -1,19 +0,0 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim | grep subl | grep 24
-
- %struct.argument_t = type { i8*, %struct.argument_t*, i32, %struct.ipc_type_t*, i32, void (...)*, void (...)*, void (...)*, void (...)*, void (...)*, i8*, i8*, i8*, i8*, i8*, i32, i32, i32, %struct.routine*, %struct.argument_t*, %struct.argument_t*, %struct.argument_t*, %struct.argument_t*, %struct.argument_t*, %struct.argument_t*, %struct.argument_t*, i32, i32, i32, i32, i32, i32 }
- %struct.ipc_type_t = type { i8*, %struct.ipc_type_t*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i8*, i32, i32, i32, i32, i32, i32, %struct.ipc_type_t*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
- %struct.routine = type opaque
-@"\01LC" = external constant [11 x i8] ; <[11 x i8]*> [#uses=1]
-
-define i8* @InArgMsgField(%struct.argument_t* %arg, i8* %str) nounwind {
-entry:
- %who = alloca [20 x i8] ; <[20 x i8]*> [#uses=1]
- %who1 = getelementptr [20 x i8]* %who, i32 0, i32 0 ; <i8*> [#uses=2]
- call void @llvm.memset.i32( i8* %who1, i8 0, i32 20, i32 1 )
- call void @llvm.memcpy.i32( i8* %who1, i8* getelementptr ([11 x i8]* @"\01LC", i32 0, i32 0), i32 11, i32 1 )
- unreachable
-}
-
-declare void @llvm.memset.i32(i8*, i8, i32, i32) nounwind
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
diff --git a/test/CodeGen/X86/2008-10-27-StackRealignment.ll b/test/CodeGen/X86/2008-10-27-StackRealignment.ll
index 3d0766c..a57f716 100644
--- a/test/CodeGen/X86/2008-10-27-StackRealignment.ll
+++ b/test/CodeGen/X86/2008-10-27-StackRealignment.ll
@@ -11,12 +11,12 @@ target triple = "i386-pc-linux-gnu"
define void @foo(i32 %t) nounwind {
%tmp1210 = alloca i8, i32 32, align 4
- call void @llvm.memset.i64(i8* %tmp1210, i8 0, i64 32, i32 4)
-
+ call void @llvm.memset.p0i8.i64(i8* %tmp1210, i8 0, i64 32, i32 4, i1 false)
%x = alloca i8, i32 %t
call void @dummy(i8* %x)
ret void
}
-declare void @dummy(i8* %x)
-declare void @llvm.memset.i64(i8*, i8, i64, i32) nounwind
+declare void @dummy(i8*)
+
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
diff --git a/test/CodeGen/X86/2009-01-25-NoSSE.ll b/test/CodeGen/X86/2009-01-25-NoSSE.ll
index 0583ef1..8406c4a 100644
--- a/test/CodeGen/X86/2009-01-25-NoSSE.ll
+++ b/test/CodeGen/X86/2009-01-25-NoSSE.ll
@@ -3,18 +3,18 @@
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-unknown-linux-gnu"
- %struct.ktermios = type { i32, i32, i32, i32, i8, [19 x i8], i32, i32 }
+
+%struct.ktermios = type { i32, i32, i32, i32, i8, [19 x i8], i32, i32 }
define void @foo() nounwind {
entry:
- %termios = alloca %struct.ktermios, align 8
- %termios1 = bitcast %struct.ktermios* %termios to i8*
- call void @llvm.memset.i64(i8* %termios1, i8 0, i64 44, i32 8)
- call void @bar(%struct.ktermios* %termios) nounwind
- ret void
+ %termios = alloca %struct.ktermios, align 8
+ %termios1 = bitcast %struct.ktermios* %termios to i8*
+ call void @llvm.memset.p0i8.i64(i8* %termios1, i8 0, i64 44, i32 8, i1 false)
+ call void @bar(%struct.ktermios* %termios) nounwind
+ ret void
}
-declare void @llvm.memset.i64(i8* nocapture, i8, i64, i32) nounwind
-
declare void @bar(%struct.ktermios*)
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
diff --git a/test/CodeGen/X86/2009-04-09-InlineAsmCrash.ll b/test/CodeGen/X86/2009-04-09-InlineAsmCrash.ll
deleted file mode 100644
index 97bbd93..0000000
--- a/test/CodeGen/X86/2009-04-09-InlineAsmCrash.ll
+++ /dev/null
@@ -1,165 +0,0 @@
-; RUN: llc < %s
-; rdar://6774324
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
-target triple = "i386-apple-darwin10.0"
- type <{ i32, %1 }> ; type %0
- type <{ [216 x i8] }> ; type %1
- type <{ %3, %4*, %28*, i64, i32, %6, %6, i32, i32, i32, i32, void (i8*, i32)*, i8*, %29*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x i8*], i32, %30, i32, %24, %4*, %4*, i64, i64, i32, i32, void (i32, %2*)*, i32, i32, i32, i32, i32, i32, i32, i32, %24, i64, i64, i64, i64, i64, %21, i32, i32, %21, i32, %31*, %3, %33, %34, %9*, i32, i32, %3, %3, %35, %41*, %42*, %11, i32, i32, i32, i8, i8, i8, i8, %69*, %69, %9*, %9*, [11 x %61], %3, i8*, i32, i64, i64, i32, i32, i32, i64 }> ; type %2
- type <{ %3*, %3* }> ; type %3
- type <{ %3, i32, %2*, %2*, %2*, %5*, i32, i32, %21, i64, i64, i64, i32, %22, %9*, %6, %4*, %23 }> ; type %4
- type <{ %3, %3, %4*, %4*, i32, %6, %9*, %9*, %5*, %20* }> ; type %5
- type <{ %7, i16, i8, i8, %8 }> ; type %6
- type <{ i32 }> ; type %7
- type <{ i8*, i8*, [2 x i32], i16, i8, i8, i8*, i8, i8, i8, i8, i8* }> ; type %8
- type <{ %10, %13, %15, i32, i32, i32, i32, %9*, %9*, %16*, i32, %17*, i64, i32 }> ; type %9
- type <{ i32, i32, %11 }> ; type %10
- type <{ %12 }> ; type %11
- type <{ [12 x i8] }> ; type %12
- type <{ %14 }> ; type %13
- type <{ [40 x i8] }> ; type %14
- type <{ [4 x i8] }> ; type %15
- type <{ %15, %15 }> ; type %16
- type <{ %17*, %17*, %9*, i32, %18*, %19* }> ; type %17
- type opaque ; type %18
- type <{ i32, i32, %9*, %9*, i32, i32 }> ; type %19
- type <{ %5*, %20*, %20*, %20* }> ; type %20
- type <{ %3, %3*, void (i8*, i8*)*, i8*, i8*, i64 }> ; type %21
- type <{ i32, [4 x i32], i32, i32, [128 x %3] }> ; type %22
- type <{ %24, %24, %24, %24*, %24*, %24*, %25, %26, %27, i32, i32, i8* }> ; type %23
- type <{ i64, i32, i32, i32 }> ; type %24
- type <{ i32, i32 }> ; type %25
- type <{ i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32, i32 }> ; type %26
- type <{ [16 x %17*], i32 }> ; type %27
- type <{ i8, i8, i8, i8, %7, %3 }> ; type %28
- type <{ i32, %11*, i8*, i8*, %11* }> ; type %29
- type <{ i32, i32, i32, i32, i64 }> ; type %30
- type <{ %32*, %3, %3, i32, i32, i32, %5* }> ; type %31
- type opaque ; type %32
- type <{ [44 x i8] }> ; type %33
- type <{ %17* }> ; type %34
- type <{ %36, %36*, i32, [4 x %40], i32, i32, i64, i32 }> ; type %35
- type <{ i8*, %0*, %37*, i64, %39, i32, %39, %6, i64, i64, i8*, i32 }> ; type %36
- type <{ i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, %38 }> ; type %37
- type <{ i16, i16, i8, i8, i16, i32, i16, i16, i32, i16, i16, i32, i32, [8 x [8 x i16]], [8 x [16 x i16]], [96 x i8] }> ; type %38
- type <{ i8, i8, i8, i8, i8, i8, i8, i8 }> ; type %39
- type <{ i64 }> ; type %40
- type <{ %11, i32, i32, i32, %42*, %3, i8*, %3, %5*, %32*, i32, i32, i32, i32, i32, i32, i32, %59, %60, i64, i64, i32, %11, %9*, %9*, %9*, [11 x %61], %9*, %9*, %9*, %9*, %9*, [3 x %9*], %62*, %3, %3, i32, i32, %9*, %9*, i32, %67*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, %68*, [2 x i32], i64, i64, i32 }> ; type %41
- type <{ %43, %44, %47*, i64, i64, i64, i32, %11, %54, %46*, %46*, i32, i32, i32, i32, i32, i32, i32 }> ; type %42
- type <{ i16, i8, i8, i32, i32 }> ; type %43
- type <{ %45, i32, i32 }> ; type %44
- type <{ %46*, %46*, i64, i64 }> ; type %45
- type <{ %45, %15, i64, i8, i8, i8, i8, i16, i16 }> ; type %46
- type <{ i64*, i64, %48*, i32, i32, i32, %6, %53, i32, i64, i64*, i64*, %48*, %48*, %48*, i32 }> ; type %47
- type <{ %3, %43, i64, %49*, i32, i32, i32, i32, %48*, %48*, i64, %50*, i64, %52*, i32, i16, i16, i8, i8, i8, i8, %3, %3, i64, i32, i32, i32, i8*, i32, i8, i8, i8, i8, %3 }> ; type %48
- type <{ %3, %3, %49*, %48*, i64, i8, i8, i8, i8, i32, i8, i8, i8, i8 }> ; type %49
- type <{ i32, %51* }> ; type %50
- type <{ void (%50*)*, void (%50*)*, i32 (%50*, %52*, i32)*, i32 (%50*)*, i32 (%50*, i64, i32, i32, i32*)*, i32 (%50*, i64, i32, i64*, i32*, i32, i32, i32)*, i32 (%50*, i64, i32)*, i32 (%50*, i64, i64, i32)*, i32 (%50*, i64, i64, i32)*, i32 (%50*, i32)*, i32 (%50*)*, i8* }> ; type %51
- type <{ i32, %48* }> ; type %52
- type <{ i32, i32, i32 }> ; type %53
- type <{ %11, %55*, i32, %53, i64 }> ; type %54
- type <{ %3, i32, i32, i32, i32, i32, [64 x i8], %56 }> ; type %55
- type <{ %57, %58, %58 }> ; type %56
- type <{ i64, i64, i64, i64, i64 }> ; type %57
- type <{ i64, i64, i64, i64, i64, i64, i64, i64 }> ; type %58
- type <{ [2 x i32] }> ; type %59
- type <{ [8 x i32] }> ; type %60
- type <{ %9*, i32, i32, i32 }> ; type %61
- type <{ %11, i32, %11, i32, i32, %63*, i32, %64*, %65, i32, i32, i32, i32, %41* }> ; type %62
- type <{ %10*, i32, %15, %15 }> ; type %63
- type opaque ; type %64
- type <{ i32, %66*, %66*, %66**, %66*, %66** }> ; type %65
- type <{ %63, i32, %62*, %66*, %66* }> ; type %66
- type <{ i32, i32, [0 x %39] }> ; type %67
- type opaque ; type %68
- type <{ %69*, void (%69*, %2*)* }> ; type %69
- type <{ %70*, %2*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i32, i32, i32, i32, i32, i32, i32, %71, i32, i32, i64, i64, i64, %72, i8*, i8*, %73, %4*, %79*, %81*, %39*, %84, i32, i32, i32, i8*, i32, i32, i32, i32, i32, i32, i32, i64*, i32, i64*, i8*, i32, [256 x i32], i64, i64, %86, %77*, i64, i64, %88*, %2*, %2* }> ; type %70
- type <{ %3, i64, i32, i32 }> ; type %71
- type <{ i64, i64, i64 }> ; type %72
- type <{ %73*, %73*, %73*, %73*, %74*, %75*, %76*, %70*, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, [3 x %78*], i8*, i8* }> ; type %73
- type <{ %74*, %74*, %75*, %76*, %73*, i32, i32, i32, i32, i32, i8*, i8* }> ; type %74
- type <{ %75*, %73*, %74*, %76*, i32, i32, i32, i32, %78*, i8*, i8* }> ; type %75
- type <{ %76*, %73*, %74*, %75*, i32, i32, i32, i32, i8*, i8*, %77* }> ; type %76
- type opaque ; type %77
- type <{ %78*, %75*, i8, i8, i8, i8, i16, i16, i16, i8, i8, i32, [0 x %73*] }> ; type %78
- type <{ i32, i32, i32, [20 x %80] }> ; type %79
- type <{ i64*, i8* }> ; type %80
- type <{ [256 x %39], [19 x %39], i8, i8, i8, i8, i8, i8, i8, i8, %82, i8, i8, i8, i8, i8, i8, i8, i8, %82, %83 }> ; type %81
- type <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16 }> ; type %82
- type <{ [16 x i64], i64 }> ; type %83
- type <{ %82*, %85, %85, %39*, i32 }> ; type %84
- type <{ i16, %39* }> ; type %85
- type <{ %87, i8* }> ; type %86
- type <{ i32, i32, i32, i8, i8, i16, i32, i32, i32, i32, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }> ; type %87
- type <{ i64, i64, i32, i32, i32, i32 }> ; type %88
- type <{ i32, i32, i32, i32, i32, i32, i32 }> ; type %89
-@kernel_stack_size = external global i32 ; <i32*> [#uses=1]
-
-define void @test(%0*) nounwind {
- %2 = tail call %2* asm sideeffect "mov %gs:${1:P},$0", "=r,i,~{dirflag},~{fpsr},~{flags}"(i32 ptrtoint (%2** getelementptr (%70* null, i32 0, i32 1) to i32)) nounwind ; <%2*> [#uses=1]
- %3 = getelementptr %2* %2, i32 0, i32 15 ; <i32*> [#uses=1]
- %4 = load i32* %3 ; <i32> [#uses=2]
- %5 = icmp eq i32 %4, 0 ; <i1> [#uses=1]
- br i1 %5, label %47, label %6
-
-; <label>:6 ; preds = %1
- %7 = load i32* @kernel_stack_size ; <i32> [#uses=1]
- %8 = add i32 %7, %4 ; <i32> [#uses=1]
- %9 = inttoptr i32 %8 to %89* ; <%89*> [#uses=12]
- %10 = tail call %2* asm sideeffect "mov %gs:${1:P},$0", "=r,i,~{dirflag},~{fpsr},~{flags}"(i32 ptrtoint (%2** getelementptr (%70* null, i32 0, i32 1) to i32)) nounwind ; <%2*> [#uses=1]
- %11 = getelementptr %2* %10, i32 0, i32 65, i32 1 ; <%36**> [#uses=1]
- %12 = load %36** %11 ; <%36*> [#uses=1]
- %13 = getelementptr %36* %12, i32 0, i32 1 ; <%0**> [#uses=1]
- %14 = load %0** %13 ; <%0*> [#uses=1]
- %15 = icmp eq %0* %14, %0 ; <i1> [#uses=1]
- br i1 %15, label %40, label %16
-
-; <label>:16 ; preds = %6
- %17 = getelementptr %0* %0, i32 0, i32 1 ; <%1*> [#uses=1]
- %18 = getelementptr %89* %9, i32 -1, i32 0 ; <i32*> [#uses=1]
- %19 = getelementptr %0* %0, i32 0, i32 1, i32 0, i32 32 ; <i8*> [#uses=1]
- %20 = bitcast i8* %19 to i32* ; <i32*> [#uses=1]
- %21 = load i32* %20 ; <i32> [#uses=1]
- store i32 %21, i32* %18
- %22 = getelementptr %89* %9, i32 -1, i32 1 ; <i32*> [#uses=1]
- %23 = ptrtoint %1* %17 to i32 ; <i32> [#uses=1]
- store i32 %23, i32* %22
- %24 = getelementptr %89* %9, i32 -1, i32 2 ; <i32*> [#uses=1]
- %25 = getelementptr %0* %0, i32 0, i32 1, i32 0, i32 24 ; <i8*> [#uses=1]
- %26 = bitcast i8* %25 to i32* ; <i32*> [#uses=1]
- %27 = load i32* %26 ; <i32> [#uses=1]
- store i32 %27, i32* %24
- %28 = getelementptr %89* %9, i32 -1, i32 3 ; <i32*> [#uses=1]
- %29 = getelementptr %0* %0, i32 0, i32 1, i32 0, i32 16 ; <i8*> [#uses=1]
- %30 = bitcast i8* %29 to i32* ; <i32*> [#uses=1]
- %31 = load i32* %30 ; <i32> [#uses=1]
- store i32 %31, i32* %28
- %32 = getelementptr %89* %9, i32 -1, i32 4 ; <i32*> [#uses=1]
- %33 = getelementptr %0* %0, i32 0, i32 1, i32 0, i32 20 ; <i8*> [#uses=1]
- %34 = bitcast i8* %33 to i32* ; <i32*> [#uses=1]
- %35 = load i32* %34 ; <i32> [#uses=1]
- store i32 %35, i32* %32
- %36 = getelementptr %89* %9, i32 -1, i32 5 ; <i32*> [#uses=1]
- %37 = getelementptr %0* %0, i32 0, i32 1, i32 0, i32 56 ; <i8*> [#uses=1]
- %38 = bitcast i8* %37 to i32* ; <i32*> [#uses=1]
- %39 = load i32* %38 ; <i32> [#uses=1]
- store i32 %39, i32* %36
- ret void
-
-; <label>:40 ; preds = %6
- %41 = getelementptr %89* %9, i32 -1, i32 0 ; <i32*> [#uses=1]
- tail call void asm sideeffect "movl %ebx, $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %41) nounwind
- %42 = getelementptr %89* %9, i32 -1, i32 1 ; <i32*> [#uses=1]
- tail call void asm sideeffect "movl %esp, $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %42) nounwind
- %43 = getelementptr %89* %9, i32 -1, i32 2 ; <i32*> [#uses=1]
- tail call void asm sideeffect "movl %ebp, $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %43) nounwind
- %44 = getelementptr %89* %9, i32 -1, i32 3 ; <i32*> [#uses=1]
- tail call void asm sideeffect "movl %edi, $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %44) nounwind
- %45 = getelementptr %89* %9, i32 -1, i32 4 ; <i32*> [#uses=1]
- tail call void asm sideeffect "movl %esi, $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %45) nounwind
- %46 = getelementptr %89* %9, i32 -1, i32 5 ; <i32*> [#uses=1]
- tail call void asm sideeffect "movl $$1f, $0\0A1:", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %46) nounwind
- ret void
-
-; <label>:47 ; preds = %1
- ret void
-}
diff --git a/test/CodeGen/X86/2009-04-12-FastIselOverflowCrash.ll b/test/CodeGen/X86/2009-04-12-FastIselOverflowCrash.ll
index 27f11cf..b1222d1 100644
--- a/test/CodeGen/X86/2009-04-12-FastIselOverflowCrash.ll
+++ b/test/CodeGen/X86/2009-04-12-FastIselOverflowCrash.ll
@@ -2,7 +2,7 @@
; radr://6772169
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-apple-darwin10"
- type { i32, i1 } ; type %0
+ %0 = type { i32, i1 } ; type %0
declare %0 @llvm.sadd.with.overflow.i32(i32, i32) nounwind
diff --git a/test/CodeGen/X86/2009-04-13-2AddrAssert-2.ll b/test/CodeGen/X86/2009-04-13-2AddrAssert-2.ll
index ff8cf0a..3d70b58 100644
--- a/test/CodeGen/X86/2009-04-13-2AddrAssert-2.ll
+++ b/test/CodeGen/X86/2009-04-13-2AddrAssert-2.ll
@@ -2,7 +2,7 @@
; rdar://6781755
; PR3934
- type { i32, i32 } ; type %0
+ %0 = type { i32, i32 } ; type %0
define void @bn_sqr_comba8(i32* nocapture %r, i32* %a) nounwind {
entry:
diff --git a/test/CodeGen/X86/2009-04-27-LiveIntervalsBug.ll b/test/CodeGen/X86/2009-04-27-LiveIntervalsBug.ll
deleted file mode 100644
index 0a2fcdb..0000000
--- a/test/CodeGen/X86/2009-04-27-LiveIntervalsBug.ll
+++ /dev/null
@@ -1,165 +0,0 @@
-; RUN: llc < %s -mtriple=i386-unknown-linux-gnu | grep cmpxchgl | not grep eax
-; PR4076
-
- type { i8, i8, i8 } ; type %0
- type { i32, i8** } ; type %1
- type { %3* } ; type %2
- type { %4 } ; type %3
- type { %5 } ; type %4
- type { %6, i32, %7 } ; type %5
- type { i8* } ; type %6
- type { i32, [12 x i8] } ; type %7
- type { %9 } ; type %8
- type { %10, %11*, i8 } ; type %9
- type { %11* } ; type %10
- type { i32, %6, i8*, %12, %13*, i8, i32, %28, %29, i32, %30, i32, i32, i32, i8*, i8*, i8, i8 } ; type %11
- type { %13* } ; type %12
- type { %14, i32, %13*, %21 } ; type %13
- type { %15, %16 } ; type %14
- type { i32 (...)** } ; type %15
- type { %17, i8* (i32)*, void (i8*)*, i8 } ; type %16
- type { i32 (...)**, i8*, i8*, i8*, i8*, i8*, i8*, %18 } ; type %17
- type { %19* } ; type %18
- type { i32, %20**, i32, %20**, i8** } ; type %19
- type { i32 (...)**, i32 } ; type %20
- type { %22, %25*, i8, i8, %17*, %26*, %27*, %27* } ; type %21
- type { i32 (...)**, i32, i32, i32, i32, i32, %23*, %24, [8 x %24], i32, %24*, %18 } ; type %22
- type { %23*, void (i32, %22*, i32)*, i32, i32 } ; type %23
- type { i8*, i32 } ; type %24
- type { i32 (...)**, %21 } ; type %25
- type { %20, i32*, i8, i32*, i32*, i16*, i8, [256 x i8], [256 x i8], i8 } ; type %26
- type { %20 } ; type %27
- type { void (%9*)*, i32 } ; type %28
- type { %15* } ; type %29
- type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8* } ; type %30
-@AtomicOps_Internalx86CPUFeatures = external global %0 ; <%0*> [#uses=1]
-internal constant [19 x i8] c"xxxxxxxxxxxxxxxxxx\00" ; <[19 x i8]*>:0 [#uses=1]
-internal constant [47 x i8] c"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\00" ; <[47 x i8]*>:1 [#uses=1]
-
-define i8** @func6(i8 zeroext, i32, i32, %1*) nounwind {
-; <label>:4
- %5 = alloca i32, align 4 ; <i32*> [#uses=2]
- %6 = alloca i32, align 4 ; <i32*> [#uses=2]
- %7 = alloca %2, align 8 ; <%2*> [#uses=3]
- %8 = alloca %8, align 8 ; <%8*> [#uses=2]
- br label %17
-
-; <label>:9 ; preds = %17
- %10 = getelementptr %1* %3, i32 %19, i32 0 ; <i32*> [#uses=1]
- %11 = load i32* %10, align 4 ; <i32> [#uses=1]
- %12 = icmp eq i32 %11, %2 ; <i1> [#uses=1]
- br i1 %12, label %13, label %16
-
-; <label>:13 ; preds = %9
- %14 = getelementptr %1* %3, i32 %19, i32 1 ; <i8***> [#uses=1]
- %15 = load i8*** %14, align 4 ; <i8**> [#uses=1]
- ret i8** %15
-
-; <label>:16 ; preds = %9
- %indvar.next13 = add i32 %18, 1 ; <i32> [#uses=1]
- br label %17
-
-; <label>:17 ; preds = %16, %4
- %18 = phi i32 [ 0, %4 ], [ %indvar.next13, %16 ] ; <i32> [#uses=2]
- %19 = add i32 %18, %1 ; <i32> [#uses=3]
- %20 = icmp sgt i32 %19, 3 ; <i1> [#uses=1]
- br i1 %20, label %21, label %9
-
-; <label>:21 ; preds = %17
- call void @func5()
- %22 = getelementptr %1* %3, i32 0, i32 0 ; <i32*> [#uses=1]
- %23 = load i32* %22, align 4 ; <i32> [#uses=1]
- %24 = icmp eq i32 %23, 0 ; <i1> [#uses=1]
- br i1 %24, label %._crit_edge, label %._crit_edge1
-
-._crit_edge1: ; preds = %._crit_edge1, %21
- %25 = phi i32 [ 0, %21 ], [ %26, %._crit_edge1 ] ; <i32> [#uses=1]
- %26 = add i32 %25, 1 ; <i32> [#uses=4]
- %27 = getelementptr %1* %3, i32 %26, i32 0 ; <i32*> [#uses=1]
- %28 = load i32* %27, align 4 ; <i32> [#uses=1]
- %29 = icmp ne i32 %28, 0 ; <i1> [#uses=1]
- %30 = icmp ne i32 %26, 4 ; <i1> [#uses=1]
- %31 = and i1 %29, %30 ; <i1> [#uses=1]
- br i1 %31, label %._crit_edge1, label %._crit_edge
-
-._crit_edge: ; preds = %._crit_edge1, %21
- %32 = phi i32 [ 0, %21 ], [ %26, %._crit_edge1 ] ; <i32> [#uses=3]
- %33 = call i8* @pthread_getspecific(i32 0) nounwind ; <i8*> [#uses=2]
- %34 = icmp ne i8* %33, null ; <i1> [#uses=1]
- %35 = icmp eq i8 %0, 0 ; <i1> [#uses=1]
- %36 = or i1 %34, %35 ; <i1> [#uses=1]
- br i1 %36, label %._crit_edge4, label %37
-
-; <label>:37 ; preds = %._crit_edge
- %38 = call i8* @func2(i32 2048) ; <i8*> [#uses=4]
- call void @llvm.memset.i32(i8* %38, i8 0, i32 2048, i32 4)
- %39 = call i32 @pthread_setspecific(i32 0, i8* %38) nounwind ; <i32> [#uses=2]
- store i32 %39, i32* %5
- store i32 0, i32* %6
- %40 = icmp eq i32 %39, 0 ; <i1> [#uses=1]
- br i1 %40, label %41, label %43
-
-; <label>:41 ; preds = %37
- %42 = getelementptr %2* %7, i32 0, i32 0 ; <%3**> [#uses=1]
- store %3* null, %3** %42, align 8
- br label %._crit_edge4
-
-; <label>:43 ; preds = %37
- %44 = call %3* @func1(i32* %5, i32* %6, i8* getelementptr ([47 x i8]* @1, i32 0, i32 0)) ; <%3*> [#uses=2]
- %45 = getelementptr %2* %7, i32 0, i32 0 ; <%3**> [#uses=1]
- store %3* %44, %3** %45, align 8
- %46 = icmp eq %3* %44, null ; <i1> [#uses=1]
- br i1 %46, label %._crit_edge4, label %47
-
-; <label>:47 ; preds = %43
- call void @func4(%8* %8, i8* getelementptr ([19 x i8]* @0, i32 0, i32 0), i32 165, %2* %7)
- call void @func3(%8* %8) noreturn
- unreachable
-
-._crit_edge4: ; preds = %43, %41, %._crit_edge
- %48 = phi i8* [ %38, %41 ], [ %33, %._crit_edge ], [ %38, %43 ] ; <i8*> [#uses=2]
- %49 = bitcast i8* %48 to i8** ; <i8**> [#uses=3]
- %50 = icmp ne i8* %48, null ; <i1> [#uses=1]
- %51 = icmp slt i32 %32, 4 ; <i1> [#uses=1]
- %52 = and i1 %50, %51 ; <i1> [#uses=1]
- br i1 %52, label %53, label %._crit_edge6
-
-; <label>:53 ; preds = %._crit_edge4
- %54 = getelementptr %1* %3, i32 %32, i32 0 ; <i32*> [#uses=1]
- %55 = call i32 asm sideeffect "lock; cmpxchgl $1,$2", "={ax},q,*m,0,~{dirflag},~{fpsr},~{flags},~{memory}"(i32 %2, i32* %54, i32 0) nounwind ; <i32> [#uses=1]
- %56 = load i8* getelementptr (%0* @AtomicOps_Internalx86CPUFeatures, i32 0, i32 0), align 8 ; <i8> [#uses=1]
- %57 = icmp eq i8 %56, 0 ; <i1> [#uses=1]
- br i1 %57, label %._crit_edge7, label %58
-
-; <label>:58 ; preds = %53
- call void asm sideeffect "lfence", "~{dirflag},~{fpsr},~{flags},~{memory}"() nounwind
- br label %._crit_edge7
-
-._crit_edge7: ; preds = %58, %53
- %59 = icmp eq i32 %55, 0 ; <i1> [#uses=1]
- br i1 %59, label %60, label %._crit_edge6
-
-._crit_edge6: ; preds = %._crit_edge7, %._crit_edge4
- ret i8** %49
-
-; <label>:60 ; preds = %._crit_edge7
- %61 = getelementptr %1* %3, i32 %32, i32 1 ; <i8***> [#uses=1]
- store i8** %49, i8*** %61, align 4
- ret i8** %49
-}
-
-declare %3* @func1(i32* nocapture, i32* nocapture, i8*)
-
-declare void @func5()
-
-declare void @func4(%8*, i8*, i32, %2*)
-
-declare void @func3(%8*) noreturn
-
-declare i8* @pthread_getspecific(i32) nounwind
-
-declare i8* @func2(i32)
-
-declare void @llvm.memset.i32(i8* nocapture, i8, i32, i32) nounwind
-
-declare i32 @pthread_setspecific(i32, i8*) nounwind
diff --git a/test/CodeGen/X86/2009-04-29-LinearScanBug.ll b/test/CodeGen/X86/2009-04-29-LinearScanBug.ll
index 6843723..2fbf7aa 100644
--- a/test/CodeGen/X86/2009-04-29-LinearScanBug.ll
+++ b/test/CodeGen/X86/2009-04-29-LinearScanBug.ll
@@ -1,33 +1,33 @@
; RUN: llc < %s -mtriple=i386-apple-darwin10
; rdar://6837009
- type { %struct.pf_state*, %struct.pf_state*, %struct.pf_state*, i32 } ; type %0
- type { %2 } ; type %1
- type { %struct.pf_addr, %struct.pf_addr } ; type %2
- type { %struct.in6_addr } ; type %3
- type { [4 x i32] } ; type %4
- type { %struct.pfi_dynaddr*, [4 x i8] } ; type %5
- type { %struct.pfi_dynaddr*, %struct.pfi_dynaddr** } ; type %6
- type { %struct.pfr_ktable*, %struct.pfr_ktable*, %struct.pfr_ktable*, i32 } ; type %7
- type { %struct.pfr_ktable* } ; type %8
- type { i8* } ; type %9
- type { %11 } ; type %10
- type { i8*, i8*, %struct.radix_node* } ; type %11
- type { [2 x %struct.pf_rulequeue], %13, %13 } ; type %12
- type { %struct.pf_rulequeue*, %struct.pf_rule**, i32, i32, i32 } ; type %13
- type { %struct.pf_anchor*, %struct.pf_anchor*, %struct.pf_anchor*, i32 } ; type %14
- type { %struct.pfi_kif*, %struct.pfi_kif*, %struct.pfi_kif*, i32 } ; type %15
- type { %struct.ifnet*, %struct.ifnet** } ; type %16
- type { %18 } ; type %17
- type { %struct.pkthdr, %19 } ; type %18
- type { %struct.m_ext, [176 x i8] } ; type %19
- type { %struct.ifmultiaddr*, %struct.ifmultiaddr** } ; type %20
- type { i32, %22 } ; type %21
- type { i8*, [4 x i8] } ; type %22
- type { %struct.tcphdr* } ; type %23
- type { %struct.pf_ike_state } ; type %24
- type { %struct.pf_state_key*, %struct.pf_state_key*, %struct.pf_state_key*, i32 } ; type %25
- type { %struct.pf_src_node*, %struct.pf_src_node*, %struct.pf_src_node*, i32 } ; type %26
+ %0 = type { %struct.pf_state*, %struct.pf_state*, %struct.pf_state*, i32 }
+ %1 = type { %2 }
+ %2 = type { %struct.pf_addr, %struct.pf_addr }
+ %3 = type { %struct.in6_addr }
+ %4 = type { [4 x i32] }
+ %5 = type { %struct.pfi_dynaddr*, [4 x i8] }
+ %6 = type { %struct.pfi_dynaddr*, %struct.pfi_dynaddr** }
+ %7 = type { %struct.pfr_ktable*, %struct.pfr_ktable*, %struct.pfr_ktable*, i32 }
+ %8 = type { %struct.pfr_ktable* }
+ %9 = type { i8* }
+ %10 = type { %11 }
+ %11 = type { i8*, i8*, %struct.radix_node* }
+ %12 = type { [2 x %struct.pf_rulequeue], %13, %13 }
+ %13 = type { %struct.pf_rulequeue*, %struct.pf_rule**, i32, i32, i32 }
+ %14 = type { %struct.pf_anchor*, %struct.pf_anchor*, %struct.pf_anchor*, i32 }
+ %15 = type { %struct.pfi_kif*, %struct.pfi_kif*, %struct.pfi_kif*, i32 }
+ %16 = type { %struct.ifnet*, %struct.ifnet** }
+ %17 = type { %18 }
+ %18 = type { %struct.pkthdr, %19 }
+ %19 = type { %struct.m_ext, [176 x i8] }
+ %20 = type { %struct.ifmultiaddr*, %struct.ifmultiaddr** }
+ %21 = type { i32, %22 }
+ %22 = type { i8*, [4 x i8] }
+ %23 = type { %struct.tcphdr* }
+ %24 = type { %struct.pf_ike_state }
+ %25 = type { %struct.pf_state_key*, %struct.pf_state_key*, %struct.pf_state_key*, i32 }
+ %26 = type { %struct.pf_src_node*, %struct.pf_src_node*, %struct.pf_src_node*, i32 }
%struct.anon = type { %struct.pf_state*, %struct.pf_state** }
%struct.au_mask_t = type { i32, i32 }
%struct.bpf_if = type opaque
diff --git a/test/CodeGen/X86/2009-04-29-RegAllocAssert.ll b/test/CodeGen/X86/2009-04-29-RegAllocAssert.ll
index d1f9cf8..e803d6b 100644
--- a/test/CodeGen/X86/2009-04-29-RegAllocAssert.ll
+++ b/test/CodeGen/X86/2009-04-29-RegAllocAssert.ll
@@ -1,9 +1,9 @@
; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -disable-fp-elim -relocation-model=pic
; PR4099
- type { [62 x %struct.Bitvec*] } ; type %0
- type { i8* } ; type %1
- type { double } ; type %2
+ %0 = type { [62 x %struct.Bitvec*] } ; type %0
+ %1 = type { i8* } ; type %1
+ %2 = type { double } ; type %2
%struct..5sPragmaType = type { i8*, i32 }
%struct.AggInfo = type { i8, i8, i32, %struct.ExprList*, i32, %struct.AggInfo_col*, i32, i32, i32, %struct.AggInfo_func*, i32, i32 }
%struct.AggInfo_col = type { %struct.Table*, i32, i32, i32, i32, %struct.Expr* }
diff --git a/test/CodeGen/X86/2009-06-04-VirtualLiveIn.ll b/test/CodeGen/X86/2009-06-04-VirtualLiveIn.ll
index 9415732..3dcc0d4 100644
--- a/test/CodeGen/X86/2009-06-04-VirtualLiveIn.ll
+++ b/test/CodeGen/X86/2009-06-04-VirtualLiveIn.ll
@@ -1,9 +1,9 @@
; RUN: llc < %s -march=x86
- type { %struct.GAP } ; type %0
- type { i16, i8, i8 } ; type %1
- type { [2 x i32], [2 x i32] } ; type %2
- type { %struct.rec* } ; type %3
+ %0 = type { %struct.GAP } ; type %0
+ %1 = type { i16, i8, i8 } ; type %1
+ %2 = type { [2 x i32], [2 x i32] } ; type %2
+ %3 = type { %struct.rec* } ; type %3
%struct.FILE_POS = type { i8, i8, i16, i32 }
%struct.FIRST_UNION = type { %struct.FILE_POS }
%struct.FOURTH_UNION = type { %struct.STYLE }
diff --git a/test/CodeGen/X86/2009-08-06-branchfolder-crash.ll b/test/CodeGen/X86/2009-08-06-branchfolder-crash.ll
index b329c91..2080c0a 100644
--- a/test/CodeGen/X86/2009-08-06-branchfolder-crash.ll
+++ b/test/CodeGen/X86/2009-08-06-branchfolder-crash.ll
@@ -87,8 +87,6 @@ for.inc: ; preds = %for.inc, %lor.end.i, %lor.rhs.i, %land.lhs.true3.i
br label %for.inc
}
-declare i32 @safe()
-
define i32 @func_35(i8 signext %p_35) nounwind readonly {
entry:
%tobool = icmp eq i8 %p_35, 0 ; <i1> [#uses=1]
diff --git a/test/CodeGen/X86/2009-08-14-Win64MemoryIndirectArg.ll b/test/CodeGen/X86/2009-08-14-Win64MemoryIndirectArg.ll
index 6b0d6d9..bf668e3 100644
--- a/test/CodeGen/X86/2009-08-14-Win64MemoryIndirectArg.ll
+++ b/test/CodeGen/X86/2009-08-14-Win64MemoryIndirectArg.ll
@@ -2,8 +2,8 @@
target triple = "x86_64-mingw"
; ModuleID = 'mm.bc'
- type opaque ; type %0
- type opaque ; type %1
+ %0 = type opaque ; type %0
+ %1 = type opaque ; type %1
define internal fastcc float @computeMipmappingRho(%0* %shaderExecutionStatePtr, i32 %index, <4 x float> %texCoord, <4 x float> %texCoordDX, <4 x float> %texCoordDY) readonly {
indexCheckBlock:
diff --git a/test/CodeGen/X86/2009-09-19-earlyclobber.ll b/test/CodeGen/X86/2009-09-19-earlyclobber.ll
index 4f44cae..66f5118 100644
--- a/test/CodeGen/X86/2009-09-19-earlyclobber.ll
+++ b/test/CodeGen/X86/2009-09-19-earlyclobber.ll
@@ -4,7 +4,7 @@
; Registers other than RAX, RCX are OK, but they must be different.
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-apple-darwin10.0"
- type { i64, i64 } ; type %0
+ %0 = type { i64, i64 } ; type %0
define i64 @flsst(i64 %find) nounwind ssp {
entry:
diff --git a/test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll b/test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll
index d33f93e..94075e7 100644
--- a/test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll
+++ b/test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll
@@ -16,7 +16,7 @@ bb1:
; CHECK: LBB0_1:
; CHECK: movaps %xmm0, (%rsp)
%tmp2 = phi i32 [ %tmp3, %bb1 ], [ 0, %entry ]
- call void @llvm.memcpy.i64(i8* %tmp1, i8* getelementptr inbounds ([28 x i8]* @str, i64 0, i64 0), i64 28, i32 1)
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* getelementptr inbounds ([28 x i8]* @str, i64 0, i64 0), i64 28, i32 1, i1 false)
%tmp3 = add i32 %tmp2, 1
%tmp4 = icmp eq i32 %tmp3, %count
br i1 %tmp4, label %bb2, label %bb1
@@ -25,4 +25,4 @@ bb2:
ret void
}
-declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
diff --git a/test/CodeGen/X86/2011-06-14-PreschedRegalias.ll b/test/CodeGen/X86/2011-06-14-PreschedRegalias.ll
index 0532375..114b985 100644
--- a/test/CodeGen/X86/2011-06-14-PreschedRegalias.ll
+++ b/test/CodeGen/X86/2011-06-14-PreschedRegalias.ll
@@ -1,5 +1,5 @@
; RUN: llc < %s -march=x86-64 -stress-sched | FileCheck %s
-; REQUIRES: Asserts
+; REQUIRES: asserts
; Test interference between physreg aliases during preRAsched.
; mul wants an operand in AL, but call clobbers it.
diff --git a/test/CodeGen/X86/bswap.ll b/test/CodeGen/X86/bswap.ll
index 0a72c1c..a7540aa 100644
--- a/test/CodeGen/X86/bswap.ll
+++ b/test/CodeGen/X86/bswap.ll
@@ -1,8 +1,6 @@
; bswap should be constant folded when it is passed a constant argument
-; RUN: llc < %s -march=x86 | \
-; RUN: grep bswapl | count 3
-; RUN: llc < %s -march=x86 | grep rolw | count 1
+; RUN: llc < %s -march=x86 | FileCheck %s
declare i16 @llvm.bswap.i16(i16)
@@ -11,17 +9,51 @@ declare i32 @llvm.bswap.i32(i32)
declare i64 @llvm.bswap.i64(i64)
define i16 @W(i16 %A) {
+; CHECK: W:
+; CHECK: rolw $8, %ax
%Z = call i16 @llvm.bswap.i16( i16 %A ) ; <i16> [#uses=1]
ret i16 %Z
}
define i32 @X(i32 %A) {
+; CHECK: X:
+; CHECK: bswapl %eax
%Z = call i32 @llvm.bswap.i32( i32 %A ) ; <i32> [#uses=1]
ret i32 %Z
}
define i64 @Y(i64 %A) {
+; CHECK: Y:
+; CHECK: bswapl %eax
+; CHECK: bswapl %edx
%Z = call i64 @llvm.bswap.i64( i64 %A ) ; <i64> [#uses=1]
ret i64 %Z
}
+; rdar://9164521
+define i32 @test1(i32 %a) nounwind readnone {
+entry:
+; CHECK: test1
+; CHECK: bswapl %eax
+; CHECK: shrl $16, %eax
+ %and = lshr i32 %a, 8
+ %shr3 = and i32 %and, 255
+ %and2 = shl i32 %a, 8
+ %shl = and i32 %and2, 65280
+ %or = or i32 %shr3, %shl
+ ret i32 %or
+}
+
+define i32 @test2(i32 %a) nounwind readnone {
+entry:
+; CHECK: test2
+; CHECK: bswapl %eax
+; CHECK: sarl $16, %eax
+ %and = lshr i32 %a, 8
+ %shr4 = and i32 %and, 255
+ %and2 = shl i32 %a, 8
+ %or = or i32 %shr4, %and2
+ %sext = shl i32 %or, 16
+ %conv3 = ashr exact i32 %sext, 16
+ ret i32 %conv3
+}
diff --git a/test/CodeGen/X86/coalescer-cross.ll b/test/CodeGen/X86/coalescer-cross.ll
index 976db64..3f1fec1 100644
--- a/test/CodeGen/X86/coalescer-cross.ll
+++ b/test/CodeGen/X86/coalescer-cross.ll
@@ -5,8 +5,8 @@
; CHECK: os_clock
; CHECK-NOT: movaps
- type { %struct.TValue } ; type %0
- type { %struct.L_Umaxalign, i32, %struct.Node* } ; type %1
+ %0 = type { %struct.TValue } ; type %0
+ %1 = type { %struct.L_Umaxalign, i32, %struct.Node* } ; type %1
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.TValue*, i32*, i32, i32 }
%struct.GCObject = type { %struct.lua_State }
%struct.L_Umaxalign = type { double }
diff --git a/test/CodeGen/X86/darwin-bzero.ll b/test/CodeGen/X86/darwin-bzero.ll
index a9573cf..3099526 100644
--- a/test/CodeGen/X86/darwin-bzero.ll
+++ b/test/CodeGen/X86/darwin-bzero.ll
@@ -1,8 +1,8 @@
; RUN: llc < %s -mtriple=i386-apple-darwin10 | grep __bzero
-declare void @llvm.memset.i32(i8*, i8, i32, i32)
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
define void @foo(i8* %p, i32 %len) {
- call void @llvm.memset.i32(i8* %p, i8 0, i32 %len, i32 1)
+ call void @llvm.memset.p0i8.i32(i8* %p, i8 0, i32 %len, i32 1, i1 false)
ret void
}
diff --git a/test/CodeGen/X86/fast-isel-bail.ll b/test/CodeGen/X86/fast-isel-bail.ll
index 9072c5c..a485827 100644
--- a/test/CodeGen/X86/fast-isel-bail.ll
+++ b/test/CodeGen/X86/fast-isel-bail.ll
@@ -3,7 +3,7 @@
; This file is for regression tests for cases where FastISel needs
; to gracefully bail out and let SelectionDAGISel take over.
- type { i64, i8* } ; type %0
+ %0 = type { i64, i8* } ; type %0
declare void @bar(%0)
diff --git a/test/CodeGen/X86/fold-sext-trunc.ll b/test/CodeGen/X86/fold-sext-trunc.ll
index 2605123..b453310 100644
--- a/test/CodeGen/X86/fold-sext-trunc.ll
+++ b/test/CodeGen/X86/fold-sext-trunc.ll
@@ -1,7 +1,7 @@
; RUN: llc < %s -march=x86-64 | grep movslq | count 1
; PR4050
- type { i64 } ; type %0
+ %0 = type { i64 } ; type %0
%struct.S1 = type { i16, i32 }
@g_10 = external global %struct.S1 ; <%struct.S1*> [#uses=2]
diff --git a/test/CodeGen/X86/fp-stack-2results.ll b/test/CodeGen/X86/fp-stack-2results.ll
index 321e267..e986e36 100644
--- a/test/CodeGen/X86/fp-stack-2results.ll
+++ b/test/CodeGen/X86/fp-stack-2results.ll
@@ -1,12 +1,16 @@
; RUN: llc < %s -march=x86 | grep fldz
; RUN: llc < %s -march=x86-64 | grep fld1
+%0 = type { x86_fp80, x86_fp80 }
+
; This is basically this code on x86-64:
; _Complex long double test() { return 1.0; }
define {x86_fp80, x86_fp80} @test() {
%A = fpext double 1.0 to x86_fp80
%B = fpext double 0.0 to x86_fp80
- ret x86_fp80 %A, x86_fp80 %B
+ %mrv = insertvalue %0 undef, x86_fp80 %A, 0
+ %mrv1 = insertvalue %0 %mrv, x86_fp80 %B, 1
+ ret %0 %mrv1
}
@@ -16,16 +20,18 @@ define {x86_fp80, x86_fp80} @test() {
; ret
define {x86_fp80, x86_fp80} @test2() {
%A = fpext double 1.0 to x86_fp80
- ret x86_fp80 %A, x86_fp80 %A
+ %mrv = insertvalue %0 undef, x86_fp80 %A, 0
+ %mrv1 = insertvalue %0 %mrv, x86_fp80 %A, 1
+ ret %0 %mrv1
}
; Uses both values.
define void @call1(x86_fp80 *%P1, x86_fp80 *%P2) {
%a = call {x86_fp80,x86_fp80} @test()
- %b = getresult {x86_fp80,x86_fp80} %a, 0
+ %b = extractvalue {x86_fp80,x86_fp80} %a, 0
store x86_fp80 %b, x86_fp80* %P1
- %c = getresult {x86_fp80,x86_fp80} %a, 1
+ %c = extractvalue {x86_fp80,x86_fp80} %a, 1
store x86_fp80 %c, x86_fp80* %P2
ret void
}
@@ -33,10 +39,10 @@ define void @call1(x86_fp80 *%P1, x86_fp80 *%P2) {
; Uses both values, requires fxch
define void @call2(x86_fp80 *%P1, x86_fp80 *%P2) {
%a = call {x86_fp80,x86_fp80} @test()
- %b = getresult {x86_fp80,x86_fp80} %a, 1
+ %b = extractvalue {x86_fp80,x86_fp80} %a, 1
store x86_fp80 %b, x86_fp80* %P1
- %c = getresult {x86_fp80,x86_fp80} %a, 0
+ %c = extractvalue {x86_fp80,x86_fp80} %a, 0
store x86_fp80 %c, x86_fp80* %P2
ret void
}
@@ -44,7 +50,7 @@ define void @call2(x86_fp80 *%P1, x86_fp80 *%P2) {
; Uses ST(0), ST(1) is dead but must be popped.
define void @call3(x86_fp80 *%P1, x86_fp80 *%P2) {
%a = call {x86_fp80,x86_fp80} @test()
- %b = getresult {x86_fp80,x86_fp80} %a, 0
+ %b = extractvalue {x86_fp80,x86_fp80} %a, 0
store x86_fp80 %b, x86_fp80* %P1
ret void
}
@@ -53,7 +59,7 @@ define void @call3(x86_fp80 *%P1, x86_fp80 *%P2) {
define void @call4(x86_fp80 *%P1, x86_fp80 *%P2) {
%a = call {x86_fp80,x86_fp80} @test()
- %c = getresult {x86_fp80,x86_fp80} %a, 1
+ %c = extractvalue {x86_fp80,x86_fp80} %a, 1
store x86_fp80 %c, x86_fp80* %P2
ret void
}
diff --git a/test/CodeGen/X86/inline-asm-mrv.ll b/test/CodeGen/X86/inline-asm-mrv.ll
index 78d7e77..733205d 100644
--- a/test/CodeGen/X86/inline-asm-mrv.ll
+++ b/test/CodeGen/X86/inline-asm-mrv.ll
@@ -11,7 +11,7 @@ define i32 @test1(i8* %v, i8* %blk2, i8* %blk1, i32 %stride, i32 %h) nounwind {
%tmp12 = sext i32 %stride to i64 ; <i64> [#uses=1]
%mrv = call {i32, i8*, i8*} asm sideeffect "$0 $1 $2 $3 $4 $5 $6",
"=r,=r,=r,r,r,r,r"( i64 %tmp12, i32 %h, i8* %blk1, i8* %blk2 ) nounwind
- %tmp6 = getresult {i32, i8*, i8*} %mrv, 0
+ %tmp6 = extractvalue {i32, i8*, i8*} %mrv, 0
%tmp7 = call i32 asm sideeffect "set $0",
"=r,~{dirflag},~{fpsr},~{flags}"( ) nounwind
ret i32 %tmp7
@@ -19,16 +19,16 @@ define i32 @test1(i8* %v, i8* %blk2, i8* %blk1, i32 %stride, i32 %h) nounwind {
define <4 x float> @test2() nounwind {
%mrv = call {<4 x float>, <4 x float>} asm "set $0, $1", "=x,=x"()
- %a = getresult {<4 x float>, <4 x float>} %mrv, 0
- %b = getresult {<4 x float>, <4 x float>} %mrv, 1
+ %a = extractvalue {<4 x float>, <4 x float>} %mrv, 0
+ %b = extractvalue {<4 x float>, <4 x float>} %mrv, 1
%c = fadd <4 x float> %a, %b
ret <4 x float> %c
}
define <4 x i32> @test3() nounwind {
%mrv = call {<4 x i32>, <4 x i32>} asm "set $0, $1", "=x,=x"()
- %a = getresult {<4 x i32>, <4 x i32>} %mrv, 0
- %b = getresult {<4 x i32>, <4 x i32>} %mrv, 1
+ %a = extractvalue {<4 x i32>, <4 x i32>} %mrv, 0
+ %b = extractvalue {<4 x i32>, <4 x i32>} %mrv, 1
%c = add <4 x i32> %a, %b
ret <4 x i32> %c
}
diff --git a/test/CodeGen/X86/inline-asm-q-regs.ll b/test/CodeGen/X86/inline-asm-q-regs.ll
index ab44206..321fd30 100644
--- a/test/CodeGen/X86/inline-asm-q-regs.ll
+++ b/test/CodeGen/X86/inline-asm-q-regs.ll
@@ -1,7 +1,7 @@
; RUN: llc < %s -march=x86-64
; rdar://7066579
- type { i64, i64, i64, i64, i64 } ; type %0
+ %0 = type { i64, i64, i64, i64, i64 } ; type %0
define void @t() nounwind {
entry:
diff --git a/test/CodeGen/X86/mem-promote-integers.ll b/test/CodeGen/X86/mem-promote-integers.ll
new file mode 100644
index 0000000..80103d1
--- /dev/null
+++ b/test/CodeGen/X86/mem-promote-integers.ll
@@ -0,0 +1,391 @@
+; Test the basic functionality of integer element promotions of different types.
+; This tests checks passing of arguments, loading and storing to memory and
+; basic arithmetic.
+; RUN: llc -march=x86 -promote-elements < %s
+; RUN: llc -march=x86-64 -promote-elements < %s
+
+define <1 x i8> @test_1xi8(<1 x i8> %x, <1 x i8>* %b) {
+ %bb = load <1 x i8>* %b
+ %tt = xor <1 x i8> %x, %bb
+ store <1 x i8> %tt, <1 x i8>* %b
+ br label %next
+
+next:
+ ret <1 x i8> %tt
+}
+
+
+define <1 x i16> @test_1xi16(<1 x i16> %x, <1 x i16>* %b) {
+ %bb = load <1 x i16>* %b
+ %tt = xor <1 x i16> %x, %bb
+ store <1 x i16> %tt, <1 x i16>* %b
+ br label %next
+
+next:
+ ret <1 x i16> %tt
+}
+
+
+define <1 x i32> @test_1xi32(<1 x i32> %x, <1 x i32>* %b) {
+ %bb = load <1 x i32>* %b
+ %tt = xor <1 x i32> %x, %bb
+ store <1 x i32> %tt, <1 x i32>* %b
+ br label %next
+
+next:
+ ret <1 x i32> %tt
+}
+
+
+define <1 x i64> @test_1xi64(<1 x i64> %x, <1 x i64>* %b) {
+ %bb = load <1 x i64>* %b
+ %tt = xor <1 x i64> %x, %bb
+ store <1 x i64> %tt, <1 x i64>* %b
+ br label %next
+
+next:
+ ret <1 x i64> %tt
+}
+
+
+define <1 x i128> @test_1xi128(<1 x i128> %x, <1 x i128>* %b) {
+ %bb = load <1 x i128>* %b
+ %tt = xor <1 x i128> %x, %bb
+ store <1 x i128> %tt, <1 x i128>* %b
+ br label %next
+
+next:
+ ret <1 x i128> %tt
+}
+
+
+define <1 x i256> @test_1xi256(<1 x i256> %x, <1 x i256>* %b) {
+ %bb = load <1 x i256>* %b
+ %tt = xor <1 x i256> %x, %bb
+ store <1 x i256> %tt, <1 x i256>* %b
+ br label %next
+
+next:
+ ret <1 x i256> %tt
+}
+
+
+define <1 x i512> @test_1xi512(<1 x i512> %x, <1 x i512>* %b) {
+ %bb = load <1 x i512>* %b
+ %tt = xor <1 x i512> %x, %bb
+ store <1 x i512> %tt, <1 x i512>* %b
+ br label %next
+
+next:
+ ret <1 x i512> %tt
+}
+
+
+define <2 x i8> @test_2xi8(<2 x i8> %x, <2 x i8>* %b) {
+ %bb = load <2 x i8>* %b
+ %tt = xor <2 x i8> %x, %bb
+ store <2 x i8> %tt, <2 x i8>* %b
+ br label %next
+
+next:
+ ret <2 x i8> %tt
+}
+
+
+define <2 x i16> @test_2xi16(<2 x i16> %x, <2 x i16>* %b) {
+ %bb = load <2 x i16>* %b
+ %tt = xor <2 x i16> %x, %bb
+ store <2 x i16> %tt, <2 x i16>* %b
+ br label %next
+
+next:
+ ret <2 x i16> %tt
+}
+
+
+define <2 x i32> @test_2xi32(<2 x i32> %x, <2 x i32>* %b) {
+ %bb = load <2 x i32>* %b
+ %tt = xor <2 x i32> %x, %bb
+ store <2 x i32> %tt, <2 x i32>* %b
+ br label %next
+
+next:
+ ret <2 x i32> %tt
+}
+
+
+define <2 x i64> @test_2xi64(<2 x i64> %x, <2 x i64>* %b) {
+ %bb = load <2 x i64>* %b
+ %tt = xor <2 x i64> %x, %bb
+ store <2 x i64> %tt, <2 x i64>* %b
+ br label %next
+
+next:
+ ret <2 x i64> %tt
+}
+
+
+define <2 x i128> @test_2xi128(<2 x i128> %x, <2 x i128>* %b) {
+ %bb = load <2 x i128>* %b
+ %tt = xor <2 x i128> %x, %bb
+ store <2 x i128> %tt, <2 x i128>* %b
+ br label %next
+
+next:
+ ret <2 x i128> %tt
+}
+
+
+define <2 x i256> @test_2xi256(<2 x i256> %x, <2 x i256>* %b) {
+ %bb = load <2 x i256>* %b
+ %tt = xor <2 x i256> %x, %bb
+ store <2 x i256> %tt, <2 x i256>* %b
+ br label %next
+
+next:
+ ret <2 x i256> %tt
+}
+
+
+define <2 x i512> @test_2xi512(<2 x i512> %x, <2 x i512>* %b) {
+ %bb = load <2 x i512>* %b
+ %tt = xor <2 x i512> %x, %bb
+ store <2 x i512> %tt, <2 x i512>* %b
+ br label %next
+
+next:
+ ret <2 x i512> %tt
+}
+
+
+define <3 x i8> @test_3xi8(<3 x i8> %x, <3 x i8>* %b) {
+ %bb = load <3 x i8>* %b
+ %tt = xor <3 x i8> %x, %bb
+ store <3 x i8> %tt, <3 x i8>* %b
+ br label %next
+
+next:
+ ret <3 x i8> %tt
+}
+
+
+define <3 x i16> @test_3xi16(<3 x i16> %x, <3 x i16>* %b) {
+ %bb = load <3 x i16>* %b
+ %tt = xor <3 x i16> %x, %bb
+ store <3 x i16> %tt, <3 x i16>* %b
+ br label %next
+
+next:
+ ret <3 x i16> %tt
+}
+
+
+define <3 x i32> @test_3xi32(<3 x i32> %x, <3 x i32>* %b) {
+ %bb = load <3 x i32>* %b
+ %tt = xor <3 x i32> %x, %bb
+ store <3 x i32> %tt, <3 x i32>* %b
+ br label %next
+
+next:
+ ret <3 x i32> %tt
+}
+
+
+define <3 x i64> @test_3xi64(<3 x i64> %x, <3 x i64>* %b) {
+ %bb = load <3 x i64>* %b
+ %tt = xor <3 x i64> %x, %bb
+ store <3 x i64> %tt, <3 x i64>* %b
+ br label %next
+
+next:
+ ret <3 x i64> %tt
+}
+
+
+define <3 x i128> @test_3xi128(<3 x i128> %x, <3 x i128>* %b) {
+ %bb = load <3 x i128>* %b
+ %tt = xor <3 x i128> %x, %bb
+ store <3 x i128> %tt, <3 x i128>* %b
+ br label %next
+
+next:
+ ret <3 x i128> %tt
+}
+
+
+define <3 x i256> @test_3xi256(<3 x i256> %x, <3 x i256>* %b) {
+ %bb = load <3 x i256>* %b
+ %tt = xor <3 x i256> %x, %bb
+ store <3 x i256> %tt, <3 x i256>* %b
+ br label %next
+
+next:
+ ret <3 x i256> %tt
+}
+
+
+define <3 x i512> @test_3xi512(<3 x i512> %x, <3 x i512>* %b) {
+ %bb = load <3 x i512>* %b
+ %tt = xor <3 x i512> %x, %bb
+ store <3 x i512> %tt, <3 x i512>* %b
+ br label %next
+
+next:
+ ret <3 x i512> %tt
+}
+
+
+define <4 x i8> @test_4xi8(<4 x i8> %x, <4 x i8>* %b) {
+ %bb = load <4 x i8>* %b
+ %tt = xor <4 x i8> %x, %bb
+ store <4 x i8> %tt, <4 x i8>* %b
+ br label %next
+
+next:
+ ret <4 x i8> %tt
+}
+
+
+define <4 x i16> @test_4xi16(<4 x i16> %x, <4 x i16>* %b) {
+ %bb = load <4 x i16>* %b
+ %tt = xor <4 x i16> %x, %bb
+ store <4 x i16> %tt, <4 x i16>* %b
+ br label %next
+
+next:
+ ret <4 x i16> %tt
+}
+
+
+define <4 x i32> @test_4xi32(<4 x i32> %x, <4 x i32>* %b) {
+ %bb = load <4 x i32>* %b
+ %tt = xor <4 x i32> %x, %bb
+ store <4 x i32> %tt, <4 x i32>* %b
+ br label %next
+
+next:
+ ret <4 x i32> %tt
+}
+
+
+define <4 x i64> @test_4xi64(<4 x i64> %x, <4 x i64>* %b) {
+ %bb = load <4 x i64>* %b
+ %tt = xor <4 x i64> %x, %bb
+ store <4 x i64> %tt, <4 x i64>* %b
+ br label %next
+
+next:
+ ret <4 x i64> %tt
+}
+
+
+define <4 x i128> @test_4xi128(<4 x i128> %x, <4 x i128>* %b) {
+ %bb = load <4 x i128>* %b
+ %tt = xor <4 x i128> %x, %bb
+ store <4 x i128> %tt, <4 x i128>* %b
+ br label %next
+
+next:
+ ret <4 x i128> %tt
+}
+
+
+define <4 x i256> @test_4xi256(<4 x i256> %x, <4 x i256>* %b) {
+ %bb = load <4 x i256>* %b
+ %tt = xor <4 x i256> %x, %bb
+ store <4 x i256> %tt, <4 x i256>* %b
+ br label %next
+
+next:
+ ret <4 x i256> %tt
+}
+
+
+define <4 x i512> @test_4xi512(<4 x i512> %x, <4 x i512>* %b) {
+ %bb = load <4 x i512>* %b
+ %tt = xor <4 x i512> %x, %bb
+ store <4 x i512> %tt, <4 x i512>* %b
+ br label %next
+
+next:
+ ret <4 x i512> %tt
+}
+
+
+define <5 x i8> @test_5xi8(<5 x i8> %x, <5 x i8>* %b) {
+ %bb = load <5 x i8>* %b
+ %tt = xor <5 x i8> %x, %bb
+ store <5 x i8> %tt, <5 x i8>* %b
+ br label %next
+
+next:
+ ret <5 x i8> %tt
+}
+
+
+define <5 x i16> @test_5xi16(<5 x i16> %x, <5 x i16>* %b) {
+ %bb = load <5 x i16>* %b
+ %tt = xor <5 x i16> %x, %bb
+ store <5 x i16> %tt, <5 x i16>* %b
+ br label %next
+
+next:
+ ret <5 x i16> %tt
+}
+
+
+define <5 x i32> @test_5xi32(<5 x i32> %x, <5 x i32>* %b) {
+ %bb = load <5 x i32>* %b
+ %tt = xor <5 x i32> %x, %bb
+ store <5 x i32> %tt, <5 x i32>* %b
+ br label %next
+
+next:
+ ret <5 x i32> %tt
+}
+
+
+define <5 x i64> @test_5xi64(<5 x i64> %x, <5 x i64>* %b) {
+ %bb = load <5 x i64>* %b
+ %tt = xor <5 x i64> %x, %bb
+ store <5 x i64> %tt, <5 x i64>* %b
+ br label %next
+
+next:
+ ret <5 x i64> %tt
+}
+
+
+define <5 x i128> @test_5xi128(<5 x i128> %x, <5 x i128>* %b) {
+ %bb = load <5 x i128>* %b
+ %tt = xor <5 x i128> %x, %bb
+ store <5 x i128> %tt, <5 x i128>* %b
+ br label %next
+
+next:
+ ret <5 x i128> %tt
+}
+
+
+define <5 x i256> @test_5xi256(<5 x i256> %x, <5 x i256>* %b) {
+ %bb = load <5 x i256>* %b
+ %tt = xor <5 x i256> %x, %bb
+ store <5 x i256> %tt, <5 x i256>* %b
+ br label %next
+
+next:
+ ret <5 x i256> %tt
+}
+
+
+define <5 x i512> @test_5xi512(<5 x i512> %x, <5 x i512>* %b) {
+ %bb = load <5 x i512>* %b
+ %tt = xor <5 x i512> %x, %bb
+ store <5 x i512> %tt, <5 x i512>* %b
+ br label %next
+
+next:
+ ret <5 x i512> %tt
+}
+
+
diff --git a/test/CodeGen/X86/memcpy-2.ll b/test/CodeGen/X86/memcpy-2.ll
index 17cd8e8..eae2e70 100644
--- a/test/CodeGen/X86/memcpy-2.ll
+++ b/test/CodeGen/X86/memcpy-2.ll
@@ -38,7 +38,7 @@ entry:
; X86-64: movq $0
%tmp1 = alloca [25 x i8]
%tmp2 = bitcast [25 x i8]* %tmp1 to i8*
- call void @llvm.memcpy.i32( i8* %tmp2, i8* getelementptr ([25 x i8]* @.str, i32 0, i32 0), i32 25, i32 1 ) nounwind
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp2, i8* getelementptr inbounds ([25 x i8]* @.str, i32 0, i32 0), i32 25, i32 1, i1 false)
unreachable
}
@@ -72,7 +72,7 @@ entry:
; X86-64: movaps %xmm0, (%rdi)
%tmp2 = bitcast %struct.s0* %a to i8* ; <i8*> [#uses=1]
%tmp3 = bitcast %struct.s0* %b to i8* ; <i8*> [#uses=1]
- tail call void @llvm.memcpy.i32(i8* %tmp2, i8* %tmp3, i32 16, i32 16)
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp2, i8* %tmp3, i32 16, i32 16, i1 false)
ret void
}
@@ -115,7 +115,7 @@ entry:
; X86-64: movq %rax, (%rdi)
%tmp2 = bitcast %struct.s0* %a to i8* ; <i8*> [#uses=1]
%tmp3 = bitcast %struct.s0* %b to i8* ; <i8*> [#uses=1]
- tail call void @llvm.memcpy.i32(i8* %tmp2, i8* %tmp3, i32 16, i32 8)
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp2, i8* %tmp3, i32 16, i32 8, i1 false)
ret void
}
@@ -160,8 +160,8 @@ entry:
; X86-64: movl $2021161080
%tmp1 = alloca [30 x i8]
%tmp2 = bitcast [30 x i8]* %tmp1 to i8*
- call void @llvm.memcpy.i32(i8* %tmp2, i8* getelementptr inbounds ([30 x i8]* @.str2, i32 0, i32 0), i32 30, i32 1)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp2, i8* getelementptr inbounds ([30 x i8]* @.str2, i32 0, i32 0), i32 30, i32 1, i1 false)
unreachable
}
-declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/CodeGen/X86/memmove-4.ll b/test/CodeGen/X86/memmove-4.ll
deleted file mode 100644
index 027db1f..0000000
--- a/test/CodeGen/X86/memmove-4.ll
+++ /dev/null
@@ -1,12 +0,0 @@
-; RUN: llc < %s | not grep call
-
-target triple = "i686-pc-linux-gnu"
-
-define void @a(i8* %a, i8* %b) nounwind {
- %tmp2 = bitcast i8* %a to i8*
- %tmp3 = bitcast i8* %b to i8*
- tail call void @llvm.memmove.i32( i8* %tmp2, i8* %tmp3, i32 12, i32 4 )
- ret void
-}
-
-declare void @llvm.memmove.i32(i8*, i8*, i32, i32)
diff --git a/test/CodeGen/X86/memset-2.ll b/test/CodeGen/X86/memset-2.ll
index 993583b..b2bd72b 100644
--- a/test/CodeGen/X86/memset-2.ll
+++ b/test/CodeGen/X86/memset-2.ll
@@ -6,7 +6,7 @@ define fastcc void @t1() nounwind {
entry:
; CHECK: t1:
; CHECK: calll _memset
- call void @llvm.memset.i32( i8* null, i8 0, i32 188, i32 1 ) nounwind
+ call void @llvm.memset.p0i8.i32(i8* null, i8 0, i32 188, i32 1, i1 false)
unreachable
}
@@ -14,7 +14,7 @@ define fastcc void @t2(i8 signext %c) nounwind {
entry:
; CHECK: t2:
; CHECK: calll _memset
- call void @llvm.memset.i32( i8* undef, i8 %c, i32 76, i32 1 ) nounwind
+ call void @llvm.memset.p0i8.i32(i8* undef, i8 %c, i32 76, i32 1, i1 false)
unreachable
}
diff --git a/test/CodeGen/X86/memset-3.ll b/test/CodeGen/X86/memset-3.ll
index 9b20ad5..29febfa 100644
--- a/test/CodeGen/X86/memset-3.ll
+++ b/test/CodeGen/X86/memset-3.ll
@@ -5,8 +5,8 @@ define void @t() nounwind ssp {
entry:
%buf = alloca [512 x i8], align 1
%ptr = getelementptr inbounds [512 x i8]* %buf, i32 0, i32 0
- call void @llvm.memset.i32(i8* %ptr, i8 undef, i32 512, i32 1)
+ call void @llvm.memset.p0i8.i32(i8* %ptr, i8 undef, i32 512, i32 1, i1 false)
unreachable
}
-declare void @llvm.memset.i32(i8* nocapture, i8, i32, i32) nounwind
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
diff --git a/test/CodeGen/X86/memset.ll b/test/CodeGen/X86/memset.ll
index cf7464d..72b3e0f 100644
--- a/test/CodeGen/X86/memset.ll
+++ b/test/CodeGen/X86/memset.ll
@@ -8,11 +8,11 @@ entry:
%up_mvd = alloca [8 x %struct.x] ; <[8 x %struct.x]*> [#uses=2]
%up_mvd116 = getelementptr [8 x %struct.x]* %up_mvd, i32 0, i32 0 ; <%struct.x*> [#uses=1]
%tmp110117 = bitcast [8 x %struct.x]* %up_mvd to i8* ; <i8*> [#uses=1]
- call void @llvm.memset.i64( i8* %tmp110117, i8 0, i64 32, i32 8 )
+ call void @llvm.memset.p0i8.i64(i8* %tmp110117, i8 0, i64 32, i32 8, i1 false)
call void @foo( %struct.x* %up_mvd116 ) nounwind
ret void
}
declare void @foo(%struct.x*)
-declare void @llvm.memset.i64(i8*, i8, i64, i32) nounwind
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
diff --git a/test/CodeGen/X86/memset64-on-x86-32.ll b/test/CodeGen/X86/memset64-on-x86-32.ll
index 3f069b4..e20fce1 100644
--- a/test/CodeGen/X86/memset64-on-x86-32.ll
+++ b/test/CodeGen/X86/memset64-on-x86-32.ll
@@ -4,9 +4,8 @@
define void @bork() nounwind {
entry:
- call void @llvm.memset.i64( i8* null, i8 0, i64 80, i32 4 )
- ret void
+ call void @llvm.memset.p0i8.i64(i8* null, i8 0, i64 80, i32 4, i1 false)
+ ret void
}
-declare void @llvm.memset.i64(i8*, i8, i64, i32) nounwind
-
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
diff --git a/test/CodeGen/X86/mmx-shuffle.ll b/test/CodeGen/X86/mmx-shuffle.ll
index 9f7501e..869f32b 100644
--- a/test/CodeGen/X86/mmx-shuffle.ll
+++ b/test/CodeGen/X86/mmx-shuffle.ll
@@ -5,12 +5,12 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3
target triple = "i686-pc-linux-gnu"
%struct.DrawHelper = type { void (i32, %struct.QT_FT_Span*, i8*)*, void (i32, %struct.QT_FT_Span*, i8*)*, void (%struct.QRasterBuffer*, i32, i32, i32, i8*, i32, i32, i32)*, void (%struct.QRasterBuffer*, i32, i32, i32, i8*, i32, i32, i32)*, void (%struct.QRasterBuffer*, i32, i32, i32, i32, i32)* }
%struct.QBasicAtomic = type { i32 }
- %struct.QClipData = type { i32, "struct.QClipData::ClipLine"*, i32, i32, %struct.QT_FT_Span*, i32, i32, i32, i32 }
- "struct.QClipData::ClipLine" = type { i32, %struct.QT_FT_Span* }
+ %struct.QClipData = type { i32, %"struct.QClipData::ClipLine"*, i32, i32, %struct.QT_FT_Span*, i32, i32, i32, i32 }
+ %"struct.QClipData::ClipLine" = type { i32, %struct.QT_FT_Span* }
%struct.QRasterBuffer = type { %struct.QRect, %struct.QRegion, %struct.QClipData*, %struct.QClipData*, i8, i32, i32, %struct.DrawHelper*, i32, i32, i32, i8* }
%struct.QRect = type { i32, i32, i32, i32 }
- %struct.QRegion = type { "struct.QRegion::QRegionData"* }
- "struct.QRegion::QRegionData" = type { %struct.QBasicAtomic, %struct._XRegion*, i8*, %struct.QRegionPrivate* }
+ %struct.QRegion = type { %"struct.QRegion::QRegionData"* }
+ %"struct.QRegion::QRegionData" = type { %struct.QBasicAtomic, %struct._XRegion*, i8*, %struct.QRegionPrivate* }
%struct.QRegionPrivate = type opaque
%struct.QT_FT_Span = type { i16, i16, i16, i8 }
%struct._XRegion = type opaque
diff --git a/test/CodeGen/X86/muloti.ll b/test/CodeGen/X86/muloti.ll
new file mode 100644
index 0000000..2f0986e
--- /dev/null
+++ b/test/CodeGen/X86/muloti.ll
@@ -0,0 +1,81 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
+%0 = type { i64, i64 }
+%1 = type { i128, i1 }
+
+define %0 @x(i64 %a.coerce0, i64 %a.coerce1, i64 %b.coerce0, i64 %b.coerce1) nounwind uwtable ssp {
+; CHECK: x
+entry:
+ %tmp16 = zext i64 %a.coerce0 to i128
+ %tmp11 = zext i64 %a.coerce1 to i128
+ %tmp12 = shl nuw i128 %tmp11, 64
+ %ins14 = or i128 %tmp12, %tmp16
+ %tmp6 = zext i64 %b.coerce0 to i128
+ %tmp3 = zext i64 %b.coerce1 to i128
+ %tmp4 = shl nuw i128 %tmp3, 64
+ %ins = or i128 %tmp4, %tmp6
+ %0 = tail call %1 @llvm.smul.with.overflow.i128(i128 %ins14, i128 %ins)
+; CHECK: callq ___muloti4
+ %1 = extractvalue %1 %0, 0
+ %2 = extractvalue %1 %0, 1
+ br i1 %2, label %overflow, label %nooverflow
+
+overflow: ; preds = %entry
+ tail call void @llvm.trap()
+ unreachable
+
+nooverflow: ; preds = %entry
+ %tmp20 = trunc i128 %1 to i64
+ %tmp21 = insertvalue %0 undef, i64 %tmp20, 0
+ %tmp22 = lshr i128 %1, 64
+ %tmp23 = trunc i128 %tmp22 to i64
+ %tmp24 = insertvalue %0 %tmp21, i64 %tmp23, 1
+ ret %0 %tmp24
+}
+
+define %0 @foo(i64 %a.coerce0, i64 %a.coerce1, i64 %b.coerce0, i64 %b.coerce1) nounwind uwtable ssp {
+entry:
+; CHECK: foo
+ %retval = alloca i128, align 16
+ %coerce = alloca i128, align 16
+ %a.addr = alloca i128, align 16
+ %coerce1 = alloca i128, align 16
+ %b.addr = alloca i128, align 16
+ %0 = bitcast i128* %coerce to %0*
+ %1 = getelementptr %0* %0, i32 0, i32 0
+ store i64 %a.coerce0, i64* %1
+ %2 = getelementptr %0* %0, i32 0, i32 1
+ store i64 %a.coerce1, i64* %2
+ %a = load i128* %coerce, align 16
+ store i128 %a, i128* %a.addr, align 16
+ %3 = bitcast i128* %coerce1 to %0*
+ %4 = getelementptr %0* %3, i32 0, i32 0
+ store i64 %b.coerce0, i64* %4
+ %5 = getelementptr %0* %3, i32 0, i32 1
+ store i64 %b.coerce1, i64* %5
+ %b = load i128* %coerce1, align 16
+ store i128 %b, i128* %b.addr, align 16
+ %tmp = load i128* %a.addr, align 16
+ %tmp2 = load i128* %b.addr, align 16
+ %6 = call %1 @llvm.umul.with.overflow.i128(i128 %tmp, i128 %tmp2)
+; CHECK: cmov
+; CHECK: divti3
+ %7 = extractvalue %1 %6, 0
+ %8 = extractvalue %1 %6, 1
+ br i1 %8, label %overflow, label %nooverflow
+
+overflow: ; preds = %entry
+ call void @llvm.trap()
+ unreachable
+
+nooverflow: ; preds = %entry
+ store i128 %7, i128* %retval
+ %9 = bitcast i128* %retval to %0*
+ %10 = load %0* %9, align 1
+ ret %0 %10
+}
+
+declare %1 @llvm.umul.with.overflow.i128(i128, i128) nounwind readnone
+
+declare %1 @llvm.smul.with.overflow.i128(i128, i128) nounwind readnone
+
+declare void @llvm.trap() nounwind
diff --git a/test/CodeGen/X86/multiple-return-values-cross-block.ll b/test/CodeGen/X86/multiple-return-values-cross-block.ll
index e9837d0..b0cb061 100644
--- a/test/CodeGen/X86/multiple-return-values-cross-block.ll
+++ b/test/CodeGen/X86/multiple-return-values-cross-block.ll
@@ -4,12 +4,12 @@ declare {x86_fp80, x86_fp80} @test()
define void @call2(x86_fp80 *%P1, x86_fp80 *%P2) {
%a = call {x86_fp80,x86_fp80} @test()
- %b = getresult {x86_fp80,x86_fp80} %a, 1
+ %b = extractvalue {x86_fp80,x86_fp80} %a, 1
store x86_fp80 %b, x86_fp80* %P1
br label %L
L:
- %c = getresult {x86_fp80,x86_fp80} %a, 0
+ %c = extractvalue {x86_fp80,x86_fp80} %a, 0
store x86_fp80 %c, x86_fp80* %P2
ret void
}
diff --git a/test/CodeGen/X86/multiple-return-values.ll b/test/CodeGen/X86/multiple-return-values.ll
deleted file mode 100644
index 018d997..0000000
--- a/test/CodeGen/X86/multiple-return-values.ll
+++ /dev/null
@@ -1,16 +0,0 @@
-; RUN: llc < %s -march=x86
-
-define {i64, float} @bar(i64 %a, float %b) {
- %y = add i64 %a, 7
- %z = fadd float %b, 7.0
- ret i64 %y, float %z
-}
-
-define i64 @foo() {
- %M = call {i64, float} @bar(i64 21, float 21.0)
- %N = getresult {i64, float} %M, 0
- %O = getresult {i64, float} %M, 1
- %P = fptosi float %O to i64
- %Q = add i64 %P, %N
- ret i64 %Q
-}
diff --git a/test/CodeGen/X86/optimize-max-0.ll b/test/CodeGen/X86/optimize-max-0.ll
index 162c7a5..981a16a 100644
--- a/test/CodeGen/X86/optimize-max-0.ll
+++ b/test/CodeGen/X86/optimize-max-0.ll
@@ -8,454 +8,454 @@ target triple = "i386-apple-darwin9"
define void @foo(i8* %r, i32 %s, i32 %w, i32 %x, i8* %j, i32 %d) nounwind {
entry:
- %0 = mul i32 %x, %w ; <i32> [#uses=2]
- %1 = mul i32 %x, %w ; <i32> [#uses=1]
- %2 = sdiv i32 %1, 4 ; <i32> [#uses=1]
- %.sum2 = add i32 %2, %0 ; <i32> [#uses=2]
- %cond = icmp eq i32 %d, 1 ; <i1> [#uses=1]
- br i1 %cond, label %bb29, label %bb10.preheader
-
-bb10.preheader: ; preds = %entry
- %3 = icmp sgt i32 %x, 0 ; <i1> [#uses=1]
- br i1 %3, label %bb.nph9, label %bb18.loopexit
-
-bb.nph7: ; preds = %bb7.preheader
- %4 = mul i32 %y.08, %w ; <i32> [#uses=1]
- %5 = mul i32 %y.08, %s ; <i32> [#uses=1]
- %6 = add i32 %5, 1 ; <i32> [#uses=1]
- %tmp8 = icmp sgt i32 1, %w ; <i1> [#uses=1]
- %smax9 = select i1 %tmp8, i32 1, i32 %w ; <i32> [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb7, %bb.nph7
- %x.06 = phi i32 [ 0, %bb.nph7 ], [ %indvar.next7, %bb7 ] ; <i32> [#uses=3]
- %7 = add i32 %x.06, %4 ; <i32> [#uses=1]
- %8 = shl i32 %x.06, 1 ; <i32> [#uses=1]
- %9 = add i32 %6, %8 ; <i32> [#uses=1]
- %10 = getelementptr i8* %r, i32 %9 ; <i8*> [#uses=1]
- %11 = load i8* %10, align 1 ; <i8> [#uses=1]
- %12 = getelementptr i8* %j, i32 %7 ; <i8*> [#uses=1]
- store i8 %11, i8* %12, align 1
- br label %bb7
-
-bb7: ; preds = %bb6
- %indvar.next7 = add i32 %x.06, 1 ; <i32> [#uses=2]
- %exitcond10 = icmp ne i32 %indvar.next7, %smax9 ; <i1> [#uses=1]
- br i1 %exitcond10, label %bb6, label %bb7.bb9_crit_edge
-
-bb7.bb9_crit_edge: ; preds = %bb7
- br label %bb9
-
-bb9: ; preds = %bb7.preheader, %bb7.bb9_crit_edge
- br label %bb10
-
-bb10: ; preds = %bb9
- %indvar.next11 = add i32 %y.08, 1 ; <i32> [#uses=2]
- %exitcond12 = icmp ne i32 %indvar.next11, %x ; <i1> [#uses=1]
- br i1 %exitcond12, label %bb7.preheader, label %bb10.bb18.loopexit_crit_edge
-
-bb10.bb18.loopexit_crit_edge: ; preds = %bb10
- br label %bb10.bb18.loopexit_crit_edge.split
-
-bb10.bb18.loopexit_crit_edge.split: ; preds = %bb.nph9, %bb10.bb18.loopexit_crit_edge
- br label %bb18.loopexit
-
-bb.nph9: ; preds = %bb10.preheader
- %13 = icmp sgt i32 %w, 0 ; <i1> [#uses=1]
- br i1 %13, label %bb.nph9.split, label %bb10.bb18.loopexit_crit_edge.split
-
-bb.nph9.split: ; preds = %bb.nph9
- br label %bb7.preheader
-
-bb7.preheader: ; preds = %bb.nph9.split, %bb10
- %y.08 = phi i32 [ 0, %bb.nph9.split ], [ %indvar.next11, %bb10 ] ; <i32> [#uses=3]
- br i1 true, label %bb.nph7, label %bb9
-
-bb.nph5: ; preds = %bb18.loopexit
- %14 = sdiv i32 %w, 2 ; <i32> [#uses=1]
- %15 = icmp slt i32 %w, 2 ; <i1> [#uses=1]
- %16 = sdiv i32 %x, 2 ; <i32> [#uses=2]
- br i1 %15, label %bb18.bb20_crit_edge.split, label %bb.nph5.split
-
-bb.nph5.split: ; preds = %bb.nph5
- %tmp2 = icmp sgt i32 1, %16 ; <i1> [#uses=1]
- %smax3 = select i1 %tmp2, i32 1, i32 %16 ; <i32> [#uses=1]
- br label %bb13
-
-bb13: ; preds = %bb18, %bb.nph5.split
- %y.14 = phi i32 [ 0, %bb.nph5.split ], [ %indvar.next1, %bb18 ] ; <i32> [#uses=4]
- %17 = mul i32 %14, %y.14 ; <i32> [#uses=2]
- %18 = shl i32 %y.14, 1 ; <i32> [#uses=1]
- %19 = srem i32 %y.14, 2 ; <i32> [#uses=1]
- %20 = add i32 %19, %18 ; <i32> [#uses=1]
- %21 = mul i32 %20, %s ; <i32> [#uses=2]
- br i1 true, label %bb.nph3, label %bb17
-
-bb.nph3: ; preds = %bb13
- %22 = add i32 %17, %0 ; <i32> [#uses=1]
- %23 = add i32 %17, %.sum2 ; <i32> [#uses=1]
- %24 = sdiv i32 %w, 2 ; <i32> [#uses=2]
- %tmp = icmp sgt i32 1, %24 ; <i1> [#uses=1]
- %smax = select i1 %tmp, i32 1, i32 %24 ; <i32> [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb15, %bb.nph3
- %x.12 = phi i32 [ 0, %bb.nph3 ], [ %indvar.next, %bb15 ] ; <i32> [#uses=5]
- %25 = shl i32 %x.12, 2 ; <i32> [#uses=1]
- %26 = add i32 %25, %21 ; <i32> [#uses=1]
- %27 = getelementptr i8* %r, i32 %26 ; <i8*> [#uses=1]
- %28 = load i8* %27, align 1 ; <i8> [#uses=1]
- %.sum = add i32 %22, %x.12 ; <i32> [#uses=1]
- %29 = getelementptr i8* %j, i32 %.sum ; <i8*> [#uses=1]
- store i8 %28, i8* %29, align 1
- %30 = shl i32 %x.12, 2 ; <i32> [#uses=1]
- %31 = or i32 %30, 2 ; <i32> [#uses=1]
- %32 = add i32 %31, %21 ; <i32> [#uses=1]
- %33 = getelementptr i8* %r, i32 %32 ; <i8*> [#uses=1]
- %34 = load i8* %33, align 1 ; <i8> [#uses=1]
- %.sum6 = add i32 %23, %x.12 ; <i32> [#uses=1]
- %35 = getelementptr i8* %j, i32 %.sum6 ; <i8*> [#uses=1]
- store i8 %34, i8* %35, align 1
- br label %bb15
-
-bb15: ; preds = %bb14
- %indvar.next = add i32 %x.12, 1 ; <i32> [#uses=2]
- %exitcond = icmp ne i32 %indvar.next, %smax ; <i1> [#uses=1]
- br i1 %exitcond, label %bb14, label %bb15.bb17_crit_edge
-
-bb15.bb17_crit_edge: ; preds = %bb15
- br label %bb17
-
-bb17: ; preds = %bb15.bb17_crit_edge, %bb13
- br label %bb18
-
-bb18.loopexit: ; preds = %bb10.bb18.loopexit_crit_edge.split, %bb10.preheader
- %36 = icmp slt i32 %x, 2 ; <i1> [#uses=1]
- br i1 %36, label %bb20, label %bb.nph5
-
-bb18: ; preds = %bb17
- %indvar.next1 = add i32 %y.14, 1 ; <i32> [#uses=2]
- %exitcond4 = icmp ne i32 %indvar.next1, %smax3 ; <i1> [#uses=1]
- br i1 %exitcond4, label %bb13, label %bb18.bb20_crit_edge
-
-bb18.bb20_crit_edge: ; preds = %bb18
- br label %bb18.bb20_crit_edge.split
-
-bb18.bb20_crit_edge.split: ; preds = %bb18.bb20_crit_edge, %bb.nph5
- br label %bb20
-
-bb20: ; preds = %bb18.bb20_crit_edge.split, %bb18.loopexit
- switch i32 %d, label %return [
- i32 3, label %bb22
- i32 1, label %bb29
- ]
-
-bb22: ; preds = %bb20
- %37 = mul i32 %x, %w ; <i32> [#uses=1]
- %38 = sdiv i32 %37, 4 ; <i32> [#uses=1]
- %.sum3 = add i32 %38, %.sum2 ; <i32> [#uses=2]
- %39 = add i32 %x, 15 ; <i32> [#uses=1]
- %40 = and i32 %39, -16 ; <i32> [#uses=1]
- %41 = add i32 %w, 15 ; <i32> [#uses=1]
- %42 = and i32 %41, -16 ; <i32> [#uses=1]
- %43 = mul i32 %40, %s ; <i32> [#uses=1]
- %44 = icmp sgt i32 %x, 0 ; <i1> [#uses=1]
- br i1 %44, label %bb.nph, label %bb26
-
-bb.nph: ; preds = %bb22
- br label %bb23
-
-bb23: ; preds = %bb24, %bb.nph
- %y.21 = phi i32 [ 0, %bb.nph ], [ %indvar.next5, %bb24 ] ; <i32> [#uses=3]
- %45 = mul i32 %y.21, %42 ; <i32> [#uses=1]
- %.sum1 = add i32 %45, %43 ; <i32> [#uses=1]
- %46 = getelementptr i8* %r, i32 %.sum1 ; <i8*> [#uses=1]
- %47 = mul i32 %y.21, %w ; <i32> [#uses=1]
- %.sum5 = add i32 %47, %.sum3 ; <i32> [#uses=1]
- %48 = getelementptr i8* %j, i32 %.sum5 ; <i8*> [#uses=1]
- tail call void @llvm.memcpy.i32(i8* %48, i8* %46, i32 %w, i32 1)
- br label %bb24
-
-bb24: ; preds = %bb23
- %indvar.next5 = add i32 %y.21, 1 ; <i32> [#uses=2]
- %exitcond6 = icmp ne i32 %indvar.next5, %x ; <i1> [#uses=1]
- br i1 %exitcond6, label %bb23, label %bb24.bb26_crit_edge
-
-bb24.bb26_crit_edge: ; preds = %bb24
- br label %bb26
-
-bb26: ; preds = %bb24.bb26_crit_edge, %bb22
- %49 = mul i32 %x, %w ; <i32> [#uses=1]
- %.sum4 = add i32 %.sum3, %49 ; <i32> [#uses=1]
- %50 = getelementptr i8* %j, i32 %.sum4 ; <i8*> [#uses=1]
- %51 = mul i32 %x, %w ; <i32> [#uses=1]
- %52 = sdiv i32 %51, 2 ; <i32> [#uses=1]
- tail call void @llvm.memset.i32(i8* %50, i8 -128, i32 %52, i32 1)
- ret void
-
-bb29: ; preds = %bb20, %entry
- %53 = add i32 %w, 15 ; <i32> [#uses=1]
- %54 = and i32 %53, -16 ; <i32> [#uses=1]
- %55 = icmp sgt i32 %x, 0 ; <i1> [#uses=1]
- br i1 %55, label %bb.nph11, label %bb33
-
-bb.nph11: ; preds = %bb29
- br label %bb30
-
-bb30: ; preds = %bb31, %bb.nph11
- %y.310 = phi i32 [ 0, %bb.nph11 ], [ %indvar.next13, %bb31 ] ; <i32> [#uses=3]
- %56 = mul i32 %y.310, %54 ; <i32> [#uses=1]
- %57 = getelementptr i8* %r, i32 %56 ; <i8*> [#uses=1]
- %58 = mul i32 %y.310, %w ; <i32> [#uses=1]
- %59 = getelementptr i8* %j, i32 %58 ; <i8*> [#uses=1]
- tail call void @llvm.memcpy.i32(i8* %59, i8* %57, i32 %w, i32 1)
- br label %bb31
-
-bb31: ; preds = %bb30
- %indvar.next13 = add i32 %y.310, 1 ; <i32> [#uses=2]
- %exitcond14 = icmp ne i32 %indvar.next13, %x ; <i1> [#uses=1]
- br i1 %exitcond14, label %bb30, label %bb31.bb33_crit_edge
-
-bb31.bb33_crit_edge: ; preds = %bb31
- br label %bb33
-
-bb33: ; preds = %bb31.bb33_crit_edge, %bb29
- %60 = mul i32 %x, %w ; <i32> [#uses=1]
- %61 = getelementptr i8* %j, i32 %60 ; <i8*> [#uses=1]
- %62 = mul i32 %x, %w ; <i32> [#uses=1]
- %63 = sdiv i32 %62, 2 ; <i32> [#uses=1]
- tail call void @llvm.memset.i32(i8* %61, i8 -128, i32 %63, i32 1)
- ret void
-
-return: ; preds = %bb20
- ret void
+ %0 = mul i32 %x, %w
+ %1 = mul i32 %x, %w
+ %2 = sdiv i32 %1, 4
+ %.sum2 = add i32 %2, %0
+ %cond = icmp eq i32 %d, 1
+ br i1 %cond, label %bb29, label %bb10.preheader
+
+bb10.preheader: ; preds = %entry
+ %3 = icmp sgt i32 %x, 0
+ br i1 %3, label %bb.nph9, label %bb18.loopexit
+
+bb.nph7: ; preds = %bb7.preheader
+ %4 = mul i32 %y.08, %w
+ %5 = mul i32 %y.08, %s
+ %6 = add i32 %5, 1
+ %tmp8 = icmp sgt i32 1, %w
+ %smax9 = select i1 %tmp8, i32 1, i32 %w
+ br label %bb6
+
+bb6: ; preds = %bb7, %bb.nph7
+ %x.06 = phi i32 [ 0, %bb.nph7 ], [ %indvar.next7, %bb7 ]
+ %7 = add i32 %x.06, %4
+ %8 = shl i32 %x.06, 1
+ %9 = add i32 %6, %8
+ %10 = getelementptr i8* %r, i32 %9
+ %11 = load i8* %10, align 1
+ %12 = getelementptr i8* %j, i32 %7
+ store i8 %11, i8* %12, align 1
+ br label %bb7
+
+bb7: ; preds = %bb6
+ %indvar.next7 = add i32 %x.06, 1
+ %exitcond10 = icmp ne i32 %indvar.next7, %smax9
+ br i1 %exitcond10, label %bb6, label %bb7.bb9_crit_edge
+
+bb7.bb9_crit_edge: ; preds = %bb7
+ br label %bb9
+
+bb9: ; preds = %bb7.preheader, %bb7.bb9_crit_edge
+ br label %bb10
+
+bb10: ; preds = %bb9
+ %indvar.next11 = add i32 %y.08, 1
+ %exitcond12 = icmp ne i32 %indvar.next11, %x
+ br i1 %exitcond12, label %bb7.preheader, label %bb10.bb18.loopexit_crit_edge
+
+bb10.bb18.loopexit_crit_edge: ; preds = %bb10
+ br label %bb10.bb18.loopexit_crit_edge.split
+
+bb10.bb18.loopexit_crit_edge.split: ; preds = %bb.nph9, %bb10.bb18.loopexit_crit_edge
+ br label %bb18.loopexit
+
+bb.nph9: ; preds = %bb10.preheader
+ %13 = icmp sgt i32 %w, 0
+ br i1 %13, label %bb.nph9.split, label %bb10.bb18.loopexit_crit_edge.split
+
+bb.nph9.split: ; preds = %bb.nph9
+ br label %bb7.preheader
+
+bb7.preheader: ; preds = %bb.nph9.split, %bb10
+ %y.08 = phi i32 [ 0, %bb.nph9.split ], [ %indvar.next11, %bb10 ]
+ br i1 true, label %bb.nph7, label %bb9
+
+bb.nph5: ; preds = %bb18.loopexit
+ %14 = sdiv i32 %w, 2
+ %15 = icmp slt i32 %w, 2
+ %16 = sdiv i32 %x, 2
+ br i1 %15, label %bb18.bb20_crit_edge.split, label %bb.nph5.split
+
+bb.nph5.split: ; preds = %bb.nph5
+ %tmp2 = icmp sgt i32 1, %16
+ %smax3 = select i1 %tmp2, i32 1, i32 %16
+ br label %bb13
+
+bb13: ; preds = %bb18, %bb.nph5.split
+ %y.14 = phi i32 [ 0, %bb.nph5.split ], [ %indvar.next1, %bb18 ]
+ %17 = mul i32 %14, %y.14
+ %18 = shl i32 %y.14, 1
+ %19 = srem i32 %y.14, 2
+ %20 = add i32 %19, %18
+ %21 = mul i32 %20, %s
+ br i1 true, label %bb.nph3, label %bb17
+
+bb.nph3: ; preds = %bb13
+ %22 = add i32 %17, %0
+ %23 = add i32 %17, %.sum2
+ %24 = sdiv i32 %w, 2
+ %tmp = icmp sgt i32 1, %24
+ %smax = select i1 %tmp, i32 1, i32 %24
+ br label %bb14
+
+bb14: ; preds = %bb15, %bb.nph3
+ %x.12 = phi i32 [ 0, %bb.nph3 ], [ %indvar.next, %bb15 ]
+ %25 = shl i32 %x.12, 2
+ %26 = add i32 %25, %21
+ %27 = getelementptr i8* %r, i32 %26
+ %28 = load i8* %27, align 1
+ %.sum = add i32 %22, %x.12
+ %29 = getelementptr i8* %j, i32 %.sum
+ store i8 %28, i8* %29, align 1
+ %30 = shl i32 %x.12, 2
+ %31 = or i32 %30, 2
+ %32 = add i32 %31, %21
+ %33 = getelementptr i8* %r, i32 %32
+ %34 = load i8* %33, align 1
+ %.sum6 = add i32 %23, %x.12
+ %35 = getelementptr i8* %j, i32 %.sum6
+ store i8 %34, i8* %35, align 1
+ br label %bb15
+
+bb15: ; preds = %bb14
+ %indvar.next = add i32 %x.12, 1
+ %exitcond = icmp ne i32 %indvar.next, %smax
+ br i1 %exitcond, label %bb14, label %bb15.bb17_crit_edge
+
+bb15.bb17_crit_edge: ; preds = %bb15
+ br label %bb17
+
+bb17: ; preds = %bb15.bb17_crit_edge, %bb13
+ br label %bb18
+
+bb18.loopexit: ; preds = %bb10.bb18.loopexit_crit_edge.split, %bb10.preheader
+ %36 = icmp slt i32 %x, 2
+ br i1 %36, label %bb20, label %bb.nph5
+
+bb18: ; preds = %bb17
+ %indvar.next1 = add i32 %y.14, 1
+ %exitcond4 = icmp ne i32 %indvar.next1, %smax3
+ br i1 %exitcond4, label %bb13, label %bb18.bb20_crit_edge
+
+bb18.bb20_crit_edge: ; preds = %bb18
+ br label %bb18.bb20_crit_edge.split
+
+bb18.bb20_crit_edge.split: ; preds = %bb18.bb20_crit_edge, %bb.nph5
+ br label %bb20
+
+bb20: ; preds = %bb18.bb20_crit_edge.split, %bb18.loopexit
+ switch i32 %d, label %return [
+ i32 3, label %bb22
+ i32 1, label %bb29
+ ]
+
+bb22: ; preds = %bb20
+ %37 = mul i32 %x, %w
+ %38 = sdiv i32 %37, 4
+ %.sum3 = add i32 %38, %.sum2
+ %39 = add i32 %x, 15
+ %40 = and i32 %39, -16
+ %41 = add i32 %w, 15
+ %42 = and i32 %41, -16
+ %43 = mul i32 %40, %s
+ %44 = icmp sgt i32 %x, 0
+ br i1 %44, label %bb.nph, label %bb26
+
+bb.nph: ; preds = %bb22
+ br label %bb23
+
+bb23: ; preds = %bb24, %bb.nph
+ %y.21 = phi i32 [ 0, %bb.nph ], [ %indvar.next5, %bb24 ]
+ %45 = mul i32 %y.21, %42
+ %.sum1 = add i32 %45, %43
+ %46 = getelementptr i8* %r, i32 %.sum1
+ %47 = mul i32 %y.21, %w
+ %.sum5 = add i32 %47, %.sum3
+ %48 = getelementptr i8* %j, i32 %.sum5
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %48, i8* %46, i32 %w, i32 1, i1 false)
+ br label %bb24
+
+bb24: ; preds = %bb23
+ %indvar.next5 = add i32 %y.21, 1
+ %exitcond6 = icmp ne i32 %indvar.next5, %x
+ br i1 %exitcond6, label %bb23, label %bb24.bb26_crit_edge
+
+bb24.bb26_crit_edge: ; preds = %bb24
+ br label %bb26
+
+bb26: ; preds = %bb24.bb26_crit_edge, %bb22
+ %49 = mul i32 %x, %w
+ %.sum4 = add i32 %.sum3, %49
+ %50 = getelementptr i8* %j, i32 %.sum4
+ %51 = mul i32 %x, %w
+ %52 = sdiv i32 %51, 2
+ tail call void @llvm.memset.p0i8.i32(i8* %50, i8 -128, i32 %52, i32 1, i1 false)
+ ret void
+
+bb29: ; preds = %bb20, %entry
+ %53 = add i32 %w, 15
+ %54 = and i32 %53, -16
+ %55 = icmp sgt i32 %x, 0
+ br i1 %55, label %bb.nph11, label %bb33
+
+bb.nph11: ; preds = %bb29
+ br label %bb30
+
+bb30: ; preds = %bb31, %bb.nph11
+ %y.310 = phi i32 [ 0, %bb.nph11 ], [ %indvar.next13, %bb31 ]
+ %56 = mul i32 %y.310, %54
+ %57 = getelementptr i8* %r, i32 %56
+ %58 = mul i32 %y.310, %w
+ %59 = getelementptr i8* %j, i32 %58
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %59, i8* %57, i32 %w, i32 1, i1 false)
+ br label %bb31
+
+bb31: ; preds = %bb30
+ %indvar.next13 = add i32 %y.310, 1
+ %exitcond14 = icmp ne i32 %indvar.next13, %x
+ br i1 %exitcond14, label %bb30, label %bb31.bb33_crit_edge
+
+bb31.bb33_crit_edge: ; preds = %bb31
+ br label %bb33
+
+bb33: ; preds = %bb31.bb33_crit_edge, %bb29
+ %60 = mul i32 %x, %w
+ %61 = getelementptr i8* %j, i32 %60
+ %62 = mul i32 %x, %w
+ %63 = sdiv i32 %62, 2
+ tail call void @llvm.memset.p0i8.i32(i8* %61, i8 -128, i32 %63, i32 1, i1 false)
+ ret void
+
+return: ; preds = %bb20
+ ret void
}
define void @bar(i8* %r, i32 %s, i32 %w, i32 %x, i8* %j, i32 %d) nounwind {
entry:
- %0 = mul i32 %x, %w ; <i32> [#uses=2]
- %1 = mul i32 %x, %w ; <i32> [#uses=1]
- %2 = udiv i32 %1, 4 ; <i32> [#uses=1]
- %.sum2 = add i32 %2, %0 ; <i32> [#uses=2]
- %cond = icmp eq i32 %d, 1 ; <i1> [#uses=1]
- br i1 %cond, label %bb29, label %bb10.preheader
-
-bb10.preheader: ; preds = %entry
- %3 = icmp ne i32 %x, 0 ; <i1> [#uses=1]
- br i1 %3, label %bb.nph9, label %bb18.loopexit
-
-bb.nph7: ; preds = %bb7.preheader
- %4 = mul i32 %y.08, %w ; <i32> [#uses=1]
- %5 = mul i32 %y.08, %s ; <i32> [#uses=1]
- %6 = add i32 %5, 1 ; <i32> [#uses=1]
- %tmp8 = icmp ugt i32 1, %w ; <i1> [#uses=1]
- %smax9 = select i1 %tmp8, i32 1, i32 %w ; <i32> [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb7, %bb.nph7
- %x.06 = phi i32 [ 0, %bb.nph7 ], [ %indvar.next7, %bb7 ] ; <i32> [#uses=3]
- %7 = add i32 %x.06, %4 ; <i32> [#uses=1]
- %8 = shl i32 %x.06, 1 ; <i32> [#uses=1]
- %9 = add i32 %6, %8 ; <i32> [#uses=1]
- %10 = getelementptr i8* %r, i32 %9 ; <i8*> [#uses=1]
- %11 = load i8* %10, align 1 ; <i8> [#uses=1]
- %12 = getelementptr i8* %j, i32 %7 ; <i8*> [#uses=1]
- store i8 %11, i8* %12, align 1
- br label %bb7
-
-bb7: ; preds = %bb6
- %indvar.next7 = add i32 %x.06, 1 ; <i32> [#uses=2]
- %exitcond10 = icmp ne i32 %indvar.next7, %smax9 ; <i1> [#uses=1]
- br i1 %exitcond10, label %bb6, label %bb7.bb9_crit_edge
-
-bb7.bb9_crit_edge: ; preds = %bb7
- br label %bb9
-
-bb9: ; preds = %bb7.preheader, %bb7.bb9_crit_edge
- br label %bb10
-
-bb10: ; preds = %bb9
- %indvar.next11 = add i32 %y.08, 1 ; <i32> [#uses=2]
- %exitcond12 = icmp ne i32 %indvar.next11, %x ; <i1> [#uses=1]
- br i1 %exitcond12, label %bb7.preheader, label %bb10.bb18.loopexit_crit_edge
-
-bb10.bb18.loopexit_crit_edge: ; preds = %bb10
- br label %bb10.bb18.loopexit_crit_edge.split
-
-bb10.bb18.loopexit_crit_edge.split: ; preds = %bb.nph9, %bb10.bb18.loopexit_crit_edge
- br label %bb18.loopexit
-
-bb.nph9: ; preds = %bb10.preheader
- %13 = icmp ugt i32 %w, 0 ; <i1> [#uses=1]
- br i1 %13, label %bb.nph9.split, label %bb10.bb18.loopexit_crit_edge.split
-
-bb.nph9.split: ; preds = %bb.nph9
- br label %bb7.preheader
-
-bb7.preheader: ; preds = %bb.nph9.split, %bb10
- %y.08 = phi i32 [ 0, %bb.nph9.split ], [ %indvar.next11, %bb10 ] ; <i32> [#uses=3]
- br i1 true, label %bb.nph7, label %bb9
-
-bb.nph5: ; preds = %bb18.loopexit
- %14 = udiv i32 %w, 2 ; <i32> [#uses=1]
- %15 = icmp ult i32 %w, 2 ; <i1> [#uses=1]
- %16 = udiv i32 %x, 2 ; <i32> [#uses=2]
- br i1 %15, label %bb18.bb20_crit_edge.split, label %bb.nph5.split
-
-bb.nph5.split: ; preds = %bb.nph5
- %tmp2 = icmp ugt i32 1, %16 ; <i1> [#uses=1]
- %smax3 = select i1 %tmp2, i32 1, i32 %16 ; <i32> [#uses=1]
- br label %bb13
-
-bb13: ; preds = %bb18, %bb.nph5.split
- %y.14 = phi i32 [ 0, %bb.nph5.split ], [ %indvar.next1, %bb18 ] ; <i32> [#uses=4]
- %17 = mul i32 %14, %y.14 ; <i32> [#uses=2]
- %18 = shl i32 %y.14, 1 ; <i32> [#uses=1]
- %19 = urem i32 %y.14, 2 ; <i32> [#uses=1]
- %20 = add i32 %19, %18 ; <i32> [#uses=1]
- %21 = mul i32 %20, %s ; <i32> [#uses=2]
- br i1 true, label %bb.nph3, label %bb17
-
-bb.nph3: ; preds = %bb13
- %22 = add i32 %17, %0 ; <i32> [#uses=1]
- %23 = add i32 %17, %.sum2 ; <i32> [#uses=1]
- %24 = udiv i32 %w, 2 ; <i32> [#uses=2]
- %tmp = icmp ugt i32 1, %24 ; <i1> [#uses=1]
- %smax = select i1 %tmp, i32 1, i32 %24 ; <i32> [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb15, %bb.nph3
- %x.12 = phi i32 [ 0, %bb.nph3 ], [ %indvar.next, %bb15 ] ; <i32> [#uses=5]
- %25 = shl i32 %x.12, 2 ; <i32> [#uses=1]
- %26 = add i32 %25, %21 ; <i32> [#uses=1]
- %27 = getelementptr i8* %r, i32 %26 ; <i8*> [#uses=1]
- %28 = load i8* %27, align 1 ; <i8> [#uses=1]
- %.sum = add i32 %22, %x.12 ; <i32> [#uses=1]
- %29 = getelementptr i8* %j, i32 %.sum ; <i8*> [#uses=1]
- store i8 %28, i8* %29, align 1
- %30 = shl i32 %x.12, 2 ; <i32> [#uses=1]
- %31 = or i32 %30, 2 ; <i32> [#uses=1]
- %32 = add i32 %31, %21 ; <i32> [#uses=1]
- %33 = getelementptr i8* %r, i32 %32 ; <i8*> [#uses=1]
- %34 = load i8* %33, align 1 ; <i8> [#uses=1]
- %.sum6 = add i32 %23, %x.12 ; <i32> [#uses=1]
- %35 = getelementptr i8* %j, i32 %.sum6 ; <i8*> [#uses=1]
- store i8 %34, i8* %35, align 1
- br label %bb15
-
-bb15: ; preds = %bb14
- %indvar.next = add i32 %x.12, 1 ; <i32> [#uses=2]
- %exitcond = icmp ne i32 %indvar.next, %smax ; <i1> [#uses=1]
- br i1 %exitcond, label %bb14, label %bb15.bb17_crit_edge
-
-bb15.bb17_crit_edge: ; preds = %bb15
- br label %bb17
-
-bb17: ; preds = %bb15.bb17_crit_edge, %bb13
- br label %bb18
-
-bb18.loopexit: ; preds = %bb10.bb18.loopexit_crit_edge.split, %bb10.preheader
- %36 = icmp ult i32 %x, 2 ; <i1> [#uses=1]
- br i1 %36, label %bb20, label %bb.nph5
-
-bb18: ; preds = %bb17
- %indvar.next1 = add i32 %y.14, 1 ; <i32> [#uses=2]
- %exitcond4 = icmp ne i32 %indvar.next1, %smax3 ; <i1> [#uses=1]
- br i1 %exitcond4, label %bb13, label %bb18.bb20_crit_edge
-
-bb18.bb20_crit_edge: ; preds = %bb18
- br label %bb18.bb20_crit_edge.split
-
-bb18.bb20_crit_edge.split: ; preds = %bb18.bb20_crit_edge, %bb.nph5
- br label %bb20
-
-bb20: ; preds = %bb18.bb20_crit_edge.split, %bb18.loopexit
- switch i32 %d, label %return [
- i32 3, label %bb22
- i32 1, label %bb29
- ]
-
-bb22: ; preds = %bb20
- %37 = mul i32 %x, %w ; <i32> [#uses=1]
- %38 = udiv i32 %37, 4 ; <i32> [#uses=1]
- %.sum3 = add i32 %38, %.sum2 ; <i32> [#uses=2]
- %39 = add i32 %x, 15 ; <i32> [#uses=1]
- %40 = and i32 %39, -16 ; <i32> [#uses=1]
- %41 = add i32 %w, 15 ; <i32> [#uses=1]
- %42 = and i32 %41, -16 ; <i32> [#uses=1]
- %43 = mul i32 %40, %s ; <i32> [#uses=1]
- %44 = icmp ugt i32 %x, 0 ; <i1> [#uses=1]
- br i1 %44, label %bb.nph, label %bb26
-
-bb.nph: ; preds = %bb22
- br label %bb23
-
-bb23: ; preds = %bb24, %bb.nph
- %y.21 = phi i32 [ 0, %bb.nph ], [ %indvar.next5, %bb24 ] ; <i32> [#uses=3]
- %45 = mul i32 %y.21, %42 ; <i32> [#uses=1]
- %.sum1 = add i32 %45, %43 ; <i32> [#uses=1]
- %46 = getelementptr i8* %r, i32 %.sum1 ; <i8*> [#uses=1]
- %47 = mul i32 %y.21, %w ; <i32> [#uses=1]
- %.sum5 = add i32 %47, %.sum3 ; <i32> [#uses=1]
- %48 = getelementptr i8* %j, i32 %.sum5 ; <i8*> [#uses=1]
- tail call void @llvm.memcpy.i32(i8* %48, i8* %46, i32 %w, i32 1)
- br label %bb24
-
-bb24: ; preds = %bb23
- %indvar.next5 = add i32 %y.21, 1 ; <i32> [#uses=2]
- %exitcond6 = icmp ne i32 %indvar.next5, %x ; <i1> [#uses=1]
- br i1 %exitcond6, label %bb23, label %bb24.bb26_crit_edge
-
-bb24.bb26_crit_edge: ; preds = %bb24
- br label %bb26
-
-bb26: ; preds = %bb24.bb26_crit_edge, %bb22
- %49 = mul i32 %x, %w ; <i32> [#uses=1]
- %.sum4 = add i32 %.sum3, %49 ; <i32> [#uses=1]
- %50 = getelementptr i8* %j, i32 %.sum4 ; <i8*> [#uses=1]
- %51 = mul i32 %x, %w ; <i32> [#uses=1]
- %52 = udiv i32 %51, 2 ; <i32> [#uses=1]
- tail call void @llvm.memset.i32(i8* %50, i8 -128, i32 %52, i32 1)
- ret void
-
-bb29: ; preds = %bb20, %entry
- %53 = add i32 %w, 15 ; <i32> [#uses=1]
- %54 = and i32 %53, -16 ; <i32> [#uses=1]
- %55 = icmp ugt i32 %x, 0 ; <i1> [#uses=1]
- br i1 %55, label %bb.nph11, label %bb33
-
-bb.nph11: ; preds = %bb29
- br label %bb30
-
-bb30: ; preds = %bb31, %bb.nph11
- %y.310 = phi i32 [ 0, %bb.nph11 ], [ %indvar.next13, %bb31 ] ; <i32> [#uses=3]
- %56 = mul i32 %y.310, %54 ; <i32> [#uses=1]
- %57 = getelementptr i8* %r, i32 %56 ; <i8*> [#uses=1]
- %58 = mul i32 %y.310, %w ; <i32> [#uses=1]
- %59 = getelementptr i8* %j, i32 %58 ; <i8*> [#uses=1]
- tail call void @llvm.memcpy.i32(i8* %59, i8* %57, i32 %w, i32 1)
- br label %bb31
-
-bb31: ; preds = %bb30
- %indvar.next13 = add i32 %y.310, 1 ; <i32> [#uses=2]
- %exitcond14 = icmp ne i32 %indvar.next13, %x ; <i1> [#uses=1]
- br i1 %exitcond14, label %bb30, label %bb31.bb33_crit_edge
-
-bb31.bb33_crit_edge: ; preds = %bb31
- br label %bb33
-
-bb33: ; preds = %bb31.bb33_crit_edge, %bb29
- %60 = mul i32 %x, %w ; <i32> [#uses=1]
- %61 = getelementptr i8* %j, i32 %60 ; <i8*> [#uses=1]
- %62 = mul i32 %x, %w ; <i32> [#uses=1]
- %63 = udiv i32 %62, 2 ; <i32> [#uses=1]
- tail call void @llvm.memset.i32(i8* %61, i8 -128, i32 %63, i32 1)
- ret void
-
-return: ; preds = %bb20
- ret void
+ %0 = mul i32 %x, %w
+ %1 = mul i32 %x, %w
+ %2 = udiv i32 %1, 4
+ %.sum2 = add i32 %2, %0
+ %cond = icmp eq i32 %d, 1
+ br i1 %cond, label %bb29, label %bb10.preheader
+
+bb10.preheader: ; preds = %entry
+ %3 = icmp ne i32 %x, 0
+ br i1 %3, label %bb.nph9, label %bb18.loopexit
+
+bb.nph7: ; preds = %bb7.preheader
+ %4 = mul i32 %y.08, %w
+ %5 = mul i32 %y.08, %s
+ %6 = add i32 %5, 1
+ %tmp8 = icmp ugt i32 1, %w
+ %smax9 = select i1 %tmp8, i32 1, i32 %w
+ br label %bb6
+
+bb6: ; preds = %bb7, %bb.nph7
+ %x.06 = phi i32 [ 0, %bb.nph7 ], [ %indvar.next7, %bb7 ]
+ %7 = add i32 %x.06, %4
+ %8 = shl i32 %x.06, 1
+ %9 = add i32 %6, %8
+ %10 = getelementptr i8* %r, i32 %9
+ %11 = load i8* %10, align 1
+ %12 = getelementptr i8* %j, i32 %7
+ store i8 %11, i8* %12, align 1
+ br label %bb7
+
+bb7: ; preds = %bb6
+ %indvar.next7 = add i32 %x.06, 1
+ %exitcond10 = icmp ne i32 %indvar.next7, %smax9
+ br i1 %exitcond10, label %bb6, label %bb7.bb9_crit_edge
+
+bb7.bb9_crit_edge: ; preds = %bb7
+ br label %bb9
+
+bb9: ; preds = %bb7.preheader, %bb7.bb9_crit_edge
+ br label %bb10
+
+bb10: ; preds = %bb9
+ %indvar.next11 = add i32 %y.08, 1
+ %exitcond12 = icmp ne i32 %indvar.next11, %x
+ br i1 %exitcond12, label %bb7.preheader, label %bb10.bb18.loopexit_crit_edge
+
+bb10.bb18.loopexit_crit_edge: ; preds = %bb10
+ br label %bb10.bb18.loopexit_crit_edge.split
+
+bb10.bb18.loopexit_crit_edge.split: ; preds = %bb.nph9, %bb10.bb18.loopexit_crit_edge
+ br label %bb18.loopexit
+
+bb.nph9: ; preds = %bb10.preheader
+ %13 = icmp ugt i32 %w, 0
+ br i1 %13, label %bb.nph9.split, label %bb10.bb18.loopexit_crit_edge.split
+
+bb.nph9.split: ; preds = %bb.nph9
+ br label %bb7.preheader
+
+bb7.preheader: ; preds = %bb.nph9.split, %bb10
+ %y.08 = phi i32 [ 0, %bb.nph9.split ], [ %indvar.next11, %bb10 ]
+ br i1 true, label %bb.nph7, label %bb9
+
+bb.nph5: ; preds = %bb18.loopexit
+ %14 = udiv i32 %w, 2
+ %15 = icmp ult i32 %w, 2
+ %16 = udiv i32 %x, 2
+ br i1 %15, label %bb18.bb20_crit_edge.split, label %bb.nph5.split
+
+bb.nph5.split: ; preds = %bb.nph5
+ %tmp2 = icmp ugt i32 1, %16
+ %smax3 = select i1 %tmp2, i32 1, i32 %16
+ br label %bb13
+
+bb13: ; preds = %bb18, %bb.nph5.split
+ %y.14 = phi i32 [ 0, %bb.nph5.split ], [ %indvar.next1, %bb18 ]
+ %17 = mul i32 %14, %y.14
+ %18 = shl i32 %y.14, 1
+ %19 = urem i32 %y.14, 2
+ %20 = add i32 %19, %18
+ %21 = mul i32 %20, %s
+ br i1 true, label %bb.nph3, label %bb17
+
+bb.nph3: ; preds = %bb13
+ %22 = add i32 %17, %0
+ %23 = add i32 %17, %.sum2
+ %24 = udiv i32 %w, 2
+ %tmp = icmp ugt i32 1, %24
+ %smax = select i1 %tmp, i32 1, i32 %24
+ br label %bb14
+
+bb14: ; preds = %bb15, %bb.nph3
+ %x.12 = phi i32 [ 0, %bb.nph3 ], [ %indvar.next, %bb15 ]
+ %25 = shl i32 %x.12, 2
+ %26 = add i32 %25, %21
+ %27 = getelementptr i8* %r, i32 %26
+ %28 = load i8* %27, align 1
+ %.sum = add i32 %22, %x.12
+ %29 = getelementptr i8* %j, i32 %.sum
+ store i8 %28, i8* %29, align 1
+ %30 = shl i32 %x.12, 2
+ %31 = or i32 %30, 2
+ %32 = add i32 %31, %21
+ %33 = getelementptr i8* %r, i32 %32
+ %34 = load i8* %33, align 1
+ %.sum6 = add i32 %23, %x.12
+ %35 = getelementptr i8* %j, i32 %.sum6
+ store i8 %34, i8* %35, align 1
+ br label %bb15
+
+bb15: ; preds = %bb14
+ %indvar.next = add i32 %x.12, 1
+ %exitcond = icmp ne i32 %indvar.next, %smax
+ br i1 %exitcond, label %bb14, label %bb15.bb17_crit_edge
+
+bb15.bb17_crit_edge: ; preds = %bb15
+ br label %bb17
+
+bb17: ; preds = %bb15.bb17_crit_edge, %bb13
+ br label %bb18
+
+bb18.loopexit: ; preds = %bb10.bb18.loopexit_crit_edge.split, %bb10.preheader
+ %36 = icmp ult i32 %x, 2
+ br i1 %36, label %bb20, label %bb.nph5
+
+bb18: ; preds = %bb17
+ %indvar.next1 = add i32 %y.14, 1
+ %exitcond4 = icmp ne i32 %indvar.next1, %smax3
+ br i1 %exitcond4, label %bb13, label %bb18.bb20_crit_edge
+
+bb18.bb20_crit_edge: ; preds = %bb18
+ br label %bb18.bb20_crit_edge.split
+
+bb18.bb20_crit_edge.split: ; preds = %bb18.bb20_crit_edge, %bb.nph5
+ br label %bb20
+
+bb20: ; preds = %bb18.bb20_crit_edge.split, %bb18.loopexit
+ switch i32 %d, label %return [
+ i32 3, label %bb22
+ i32 1, label %bb29
+ ]
+
+bb22: ; preds = %bb20
+ %37 = mul i32 %x, %w
+ %38 = udiv i32 %37, 4
+ %.sum3 = add i32 %38, %.sum2
+ %39 = add i32 %x, 15
+ %40 = and i32 %39, -16
+ %41 = add i32 %w, 15
+ %42 = and i32 %41, -16
+ %43 = mul i32 %40, %s
+ %44 = icmp ugt i32 %x, 0
+ br i1 %44, label %bb.nph, label %bb26
+
+bb.nph: ; preds = %bb22
+ br label %bb23
+
+bb23: ; preds = %bb24, %bb.nph
+ %y.21 = phi i32 [ 0, %bb.nph ], [ %indvar.next5, %bb24 ]
+ %45 = mul i32 %y.21, %42
+ %.sum1 = add i32 %45, %43
+ %46 = getelementptr i8* %r, i32 %.sum1
+ %47 = mul i32 %y.21, %w
+ %.sum5 = add i32 %47, %.sum3
+ %48 = getelementptr i8* %j, i32 %.sum5
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %48, i8* %46, i32 %w, i32 1, i1 false)
+ br label %bb24
+
+bb24: ; preds = %bb23
+ %indvar.next5 = add i32 %y.21, 1
+ %exitcond6 = icmp ne i32 %indvar.next5, %x
+ br i1 %exitcond6, label %bb23, label %bb24.bb26_crit_edge
+
+bb24.bb26_crit_edge: ; preds = %bb24
+ br label %bb26
+
+bb26: ; preds = %bb24.bb26_crit_edge, %bb22
+ %49 = mul i32 %x, %w
+ %.sum4 = add i32 %.sum3, %49
+ %50 = getelementptr i8* %j, i32 %.sum4
+ %51 = mul i32 %x, %w
+ %52 = udiv i32 %51, 2
+ tail call void @llvm.memset.p0i8.i32(i8* %50, i8 -128, i32 %52, i32 1, i1 false)
+ ret void
+
+bb29: ; preds = %bb20, %entry
+ %53 = add i32 %w, 15
+ %54 = and i32 %53, -16
+ %55 = icmp ugt i32 %x, 0
+ br i1 %55, label %bb.nph11, label %bb33
+
+bb.nph11: ; preds = %bb29
+ br label %bb30
+
+bb30: ; preds = %bb31, %bb.nph11
+ %y.310 = phi i32 [ 0, %bb.nph11 ], [ %indvar.next13, %bb31 ]
+ %56 = mul i32 %y.310, %54
+ %57 = getelementptr i8* %r, i32 %56
+ %58 = mul i32 %y.310, %w
+ %59 = getelementptr i8* %j, i32 %58
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %59, i8* %57, i32 %w, i32 1, i1 false)
+ br label %bb31
+
+bb31: ; preds = %bb30
+ %indvar.next13 = add i32 %y.310, 1
+ %exitcond14 = icmp ne i32 %indvar.next13, %x
+ br i1 %exitcond14, label %bb30, label %bb31.bb33_crit_edge
+
+bb31.bb33_crit_edge: ; preds = %bb31
+ br label %bb33
+
+bb33: ; preds = %bb31.bb33_crit_edge, %bb29
+ %60 = mul i32 %x, %w
+ %61 = getelementptr i8* %j, i32 %60
+ %62 = mul i32 %x, %w
+ %63 = udiv i32 %62, 2
+ tail call void @llvm.memset.p0i8.i32(i8* %61, i8 -128, i32 %63, i32 1, i1 false)
+ ret void
+
+return: ; preds = %bb20
+ ret void
}
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
-declare void @llvm.memset.i32(i8*, i8, i32, i32) nounwind
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
diff --git a/test/CodeGen/X86/personality.ll b/test/CodeGen/X86/personality.ll
index e952a9b..d3d8e3f 100644
--- a/test/CodeGen/X86/personality.ll
+++ b/test/CodeGen/X86/personality.ll
@@ -4,40 +4,41 @@
define void @_Z1fv() {
entry:
- invoke void @_Z1gv( )
- to label %return unwind label %unwind
+ invoke void @_Z1gv()
+ to label %return unwind label %unwind
-unwind: ; preds = %entry
- br i1 false, label %eh_then, label %cleanup20
+unwind: ; preds = %entry
+ br i1 false, label %eh_then, label %cleanup20
-eh_then: ; preds = %unwind
- invoke void @__cxa_end_catch( )
- to label %return unwind label %unwind10
+eh_then: ; preds = %unwind
+ invoke void @__cxa_end_catch()
+ to label %return unwind label %unwind10
-unwind10: ; preds = %eh_then
- %eh_select13 = tail call i64 (i8*, i8*, ...)* @llvm.eh.selector.i64( i8* null, i8* bitcast (void ()* @__gxx_personality_v0 to i8*), i32 1 ) ; <i32> [#uses=2]
- %tmp18 = icmp slt i64 %eh_select13, 0 ; <i1> [#uses=1]
- br i1 %tmp18, label %filter, label %cleanup20
+unwind10: ; preds = %eh_then
+ %upgraded.eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* null, i8* bitcast (void ()* @__gxx_personality_v0 to i8*), i32 1)
+ %upgraded.eh_select131 = sext i32 %upgraded.eh_select13 to i64
+ %tmp18 = icmp slt i64 %upgraded.eh_select131, 0
+ br i1 %tmp18, label %filter, label %cleanup20
-filter: ; preds = %unwind10
- unreachable
+filter: ; preds = %unwind10
+ unreachable
-cleanup20: ; preds = %unwind10, %unwind
- %eh_selector.0 = phi i64 [ 0, %unwind ], [ %eh_select13, %unwind10 ] ; <i32> [#uses=0]
- ret void
+cleanup20: ; preds = %unwind10, %unwind
+ %eh_selector.0 = phi i64 [ 0, %unwind ], [ %upgraded.eh_select131, %unwind10 ]
+ ret void
-return: ; preds = %eh_then, %entry
- ret void
+return: ; preds = %eh_then, %entry
+ ret void
}
declare void @_Z1gv()
-declare i64 @llvm.eh.selector.i64(i8*, i8*, ...)
-
declare void @__gxx_personality_v0()
declare void @__cxa_end_catch()
+declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
+
; X64: zPLR
; X64: .byte 155
; X64-NEXT: .long ___gxx_personality_v0@GOTPCREL+4
diff --git a/test/CodeGen/X86/pre-split2.ll b/test/CodeGen/X86/pre-split2.ll
deleted file mode 100644
index 670737b..0000000
--- a/test/CodeGen/X86/pre-split2.ll
+++ /dev/null
@@ -1,26 +0,0 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats -regalloc=linearscan |& \
-; RUN: grep {pre-alloc-split} | count 2
-
-define i32 @t(i32 %arg) {
-entry:
- br label %bb6
-
-.noexc6: ; preds = %bb6
- %0 = and i32 %2, -8 ; <i32> [#uses=1]
- tail call void @llvm.memmove.i32(i8* %3, i8* null, i32 %0, i32 1) nounwind
- store double %1, double* null, align 8
- br label %bb6
-
-bb6: ; preds = %.noexc6, %entry
- %1 = uitofp i32 %arg to double ; <double> [#uses=1]
- %2 = sub i32 0, 0 ; <i32> [#uses=1]
- %3 = invoke i8* @_Znwm(i32 0)
- to label %.noexc6 unwind label %lpad32 ; <i8*> [#uses=1]
-
-lpad32: ; preds = %bb6
- unreachable
-}
-
-declare void @llvm.memmove.i32(i8*, i8*, i32, i32) nounwind
-
-declare i8* @_Znwm(i32)
diff --git a/test/CodeGen/X86/pre-split3.ll b/test/CodeGen/X86/pre-split3.ll
deleted file mode 100644
index 0c49a91..0000000
--- a/test/CodeGen/X86/pre-split3.ll
+++ /dev/null
@@ -1,26 +0,0 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan -stats |& \
-; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1
-
-define i32 @t(i32 %arg) {
-entry:
- br label %bb6
-
-.noexc6: ; preds = %bb6
- %0 = and i32 %2, -8 ; <i32> [#uses=1]
- tail call void @llvm.memmove.i32(i8* %3, i8* null, i32 %0, i32 1) nounwind
- store double %1, double* null, align 8
- br label %bb6
-
-bb6: ; preds = %.noexc6, %entry
- %1 = uitofp i32 %arg to double ; <double> [#uses=1]
- %2 = sub i32 0, 0 ; <i32> [#uses=1]
- %3 = invoke i8* @_Znwm(i32 0)
- to label %.noexc6 unwind label %lpad32 ; <i8*> [#uses=1]
-
-lpad32: ; preds = %bb6
- unreachable
-}
-
-declare void @llvm.memmove.i32(i8*, i8*, i32, i32) nounwind
-
-declare i8* @_Znwm(i32)
diff --git a/test/CodeGen/X86/private.ll b/test/CodeGen/X86/private.ll
index f52f8c7..484afc9 100644
--- a/test/CodeGen/X86/private.ll
+++ b/test/CodeGen/X86/private.ll
@@ -5,8 +5,6 @@
; RUN: llc < %s -mtriple=x86_64-pc-linux | grep .Lbaz:
; RUN: llc < %s -mtriple=x86_64-pc-linux | grep movl.*\.Lbaz
-declare void @foo()
-
define private void @foo() {
ret void
}
diff --git a/test/CodeGen/X86/promote-trunc.ll b/test/CodeGen/X86/promote-trunc.ll
new file mode 100644
index 0000000..4211d82
--- /dev/null
+++ b/test/CodeGen/X86/promote-trunc.ll
@@ -0,0 +1,11 @@
+; RUN: llc -promote-elements < %s -march=x86-64
+
+define<4 x i8> @func_8_64() {
+ %F = load <4 x i64>* undef
+ %G = trunc <4 x i64> %F to <4 x i8>
+ %H = load <4 x i64>* undef
+ %Y = trunc <4 x i64> %H to <4 x i8>
+ %T = add <4 x i8> %Y, %G
+ ret <4 x i8> %T
+}
+
diff --git a/test/CodeGen/X86/sibcall.ll b/test/CodeGen/X86/sibcall.ll
index 4a98efb..a9a5420 100644
--- a/test/CodeGen/X86/sibcall.ll
+++ b/test/CodeGen/X86/sibcall.ll
@@ -312,8 +312,6 @@ entry:
ret void
}
-declare void @foo()
-
; If caller / callee calling convention mismatch then check if the return
; values are returned in the same registers.
; rdar://7874780
diff --git a/test/CodeGen/X86/tail-dup-addr.ll b/test/CodeGen/X86/tail-dup-addr.ll
new file mode 100644
index 0000000..c5a105c
--- /dev/null
+++ b/test/CodeGen/X86/tail-dup-addr.ll
@@ -0,0 +1,28 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
+
+; Test that we don't drop a block that has its address taken.
+
+; CHECK: Ltmp1: ## Block address taken
+; CHECK: Ltmp2: ## Block address taken
+
+@a = common global i32 0, align 4
+@p = common global i8* null, align 8
+
+define void @foo() noreturn nounwind uwtable ssp {
+entry:
+ %tmp = load i32* @a, align 4
+ %foo = icmp eq i32 0, %tmp
+ br i1 %foo, label %sw.bb, label %sw.default
+
+sw.bb: ; preds = %entry
+ store i8* blockaddress(@foo, %sw.bb1), i8** @p, align 8
+ br label %sw.bb1
+
+sw.bb1: ; preds = %sw.default, %sw.bb, %entry
+ store i8* blockaddress(@foo, %sw.default), i8** @p, align 8
+ br label %sw.default
+
+sw.default: ; preds = %sw.bb1, %entry
+ store i8* blockaddress(@foo, %sw.bb1), i8** @p, align 8
+ br label %sw.bb1
+}
diff --git a/test/CodeGen/X86/unaligned-load.ll b/test/CodeGen/X86/unaligned-load.ll
index 9f70489..d8fffbe 100644
--- a/test/CodeGen/X86/unaligned-load.ll
+++ b/test/CodeGen/X86/unaligned-load.ll
@@ -10,9 +10,17 @@ entry:
%String2Loc = alloca [31 x i8], align 1
br label %bb
-bb:
+bb: ; preds = %bb, %entry
%String2Loc9 = getelementptr inbounds [31 x i8]* %String2Loc, i64 0, i64 0
- call void @llvm.memcpy.i64(i8* %String2Loc9, i8* getelementptr inbounds ([31 x i8]* @.str3, i64 0, i64 0), i64 31, i32 1)
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %String2Loc9, i8* getelementptr inbounds ([31 x i8]* @.str3, i64 0, i64 0), i64 31, i32 1, i1 false)
+ br label %bb
+
+return: ; No predecessors!
+ ret void
+}
+
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
+
; I386: calll {{_?}}memcpy
; CORE2: movabsq
@@ -20,13 +28,6 @@ bb:
; CORE2: movabsq
; COREI7: movups _.str3
- br label %bb
-
-return:
- ret void
-}
-
-declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
; CORE2: .section
; CORE2: .align 3
diff --git a/test/CodeGen/X86/variable-sized-darwin-bzero.ll b/test/CodeGen/X86/variable-sized-darwin-bzero.ll
index 4817db2..1e86d75 100644
--- a/test/CodeGen/X86/variable-sized-darwin-bzero.ll
+++ b/test/CodeGen/X86/variable-sized-darwin-bzero.ll
@@ -1,8 +1,8 @@
; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin10 | grep __bzero
-declare void @llvm.memset.i64(i8*, i8, i64, i32)
-
define void @foo(i8* %p, i64 %n) {
- call void @llvm.memset.i64(i8* %p, i8 0, i64 %n, i32 4)
+ call void @llvm.memset.p0i8.i64(i8* %p, i8 0, i64 %n, i32 4, i1 false)
ret void
}
+
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
diff --git a/test/CodeGen/XCore/private.ll b/test/CodeGen/XCore/private.ll
index c595a6d..537d63b 100644
--- a/test/CodeGen/XCore/private.ll
+++ b/test/CodeGen/XCore/private.ll
@@ -6,8 +6,6 @@
; RUN: grep .Lbaz: %t
; RUN: grep ldw.*\.Lbaz %t
-declare void @foo()
-
define private void @foo() {
ret void
}
diff --git a/test/DebugInfo/X86/earlydup-crash.ll b/test/DebugInfo/X86/earlydup-crash.ll
new file mode 100644
index 0000000..5bd0c7e
--- /dev/null
+++ b/test/DebugInfo/X86/earlydup-crash.ll
@@ -0,0 +1,85 @@
+; RUN: llc %s -mtriple=i386-apple-macosx10.6.7 -o /dev/null
+
+; This used to crash because early dup was not ignoring debug instructions.
+
+%struct.cpp_dir = type { %struct.cpp_dir*, i8*, i32, i8, i8**, i8*, i8* (i8*, %struct.cpp_dir*)*, i64, i32, i8 }
+
+declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
+
+define internal i8* @framework_construct_pathname(i8* %fname, %struct.cpp_dir* %dir) nounwind ssp {
+entry:
+ br i1 undef, label %bb33, label %bb
+
+bb: ; preds = %entry
+ %tmp = icmp eq i32 undef, 0
+ %tmp1 = add i32 0, 11
+ call void @llvm.dbg.value(metadata !{i32 %tmp1}, i64 0, metadata !0)
+ br i1 undef, label %bb18, label %bb31.preheader
+
+bb31.preheader: ; preds = %bb19, %bb
+ %tmp2 = getelementptr inbounds i8* %fname, i32 0
+ br label %bb31
+
+bb18: ; preds = %bb
+ %tmp3 = icmp eq i32 undef, 0
+ br i1 %tmp3, label %bb19, label %bb33
+
+bb19: ; preds = %bb18
+ call void @foobar(i32 0)
+ br label %bb31.preheader
+
+bb22: ; preds = %bb31
+ %tmp4 = add i32 0, %tmp1
+ call void @foobar(i32 %tmp4)
+ br i1 undef, label %bb33, label %bb31
+
+bb31: ; preds = %bb22, %bb31.preheader
+ br i1 false, label %bb33, label %bb22
+
+bb33: ; preds = %bb31, %bb22, %bb18, %entry
+ ret i8* undef
+}
+
+declare void @foobar(i32)
+
+!0 = metadata !{i32 590080, metadata !1, metadata !"frname_len", metadata !3, i32 517, metadata !38, i32 0} ; [ DW_TAG_auto_variable ]
+!1 = metadata !{i32 589835, metadata !2, i32 515, i32 0, metadata !3, i32 19} ; [ DW_TAG_lexical_block ]
+!2 = metadata !{i32 589870, i32 0, metadata !3, metadata !"framework_construct_pathname", metadata !"framework_construct_pathname", metadata !"", metadata !3, i32 515, metadata !5, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 true, i8* (i8*, %struct.cpp_dir*)* @framework_construct_pathname} ; [ DW_TAG_subprogram ]
+!3 = metadata !{i32 589865, metadata !"darwin-c.c", metadata !"/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/config", metadata !4} ; [ DW_TAG_file_type ]
+!4 = metadata !{i32 589841, i32 0, i32 1, metadata !"/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/config/darwin-c.c", metadata !"/Users/espindola/llvm/build-llvm-gcc/gcc", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 true, i1 true, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
+!5 = metadata !{i32 589845, metadata !3, metadata !"", metadata !3, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !6, i32 0, null} ; [ DW_TAG_subroutine_type ]
+!6 = metadata !{metadata !7, metadata !9, metadata !11}
+!7 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !8} ; [ DW_TAG_pointer_type ]
+!8 = metadata !{i32 589860, metadata !3, metadata !"char", metadata !3, i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ]
+!9 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !10} ; [ DW_TAG_pointer_type ]
+!10 = metadata !{i32 589862, metadata !3, metadata !"", metadata !3, i32 0, i64 8, i64 8, i64 0, i32 0, metadata !8} ; [ DW_TAG_const_type ]
+!11 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !12} ; [ DW_TAG_pointer_type ]
+!12 = metadata !{i32 589846, metadata !13, metadata !"cpp_dir", metadata !13, i32 45, i64 0, i64 0, i64 0, i32 0, metadata !14} ; [ DW_TAG_typedef ]
+!13 = metadata !{i32 589865, metadata !"cpplib.h", metadata !"/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/../libcpp/include", metadata !4} ; [ DW_TAG_file_type ]
+!14 = metadata !{i32 589843, metadata !3, metadata !"cpp_dir", metadata !13, i32 43, i64 352, i64 32, i64 0, i32 0, null, metadata !15, i32 0, null} ; [ DW_TAG_structure_type ]
+!15 = metadata !{metadata !16, metadata !18, metadata !19, metadata !21, metadata !23, metadata !25, metadata !27, metadata !29, metadata !33, metadata !36}
+!16 = metadata !{i32 589837, metadata !14, metadata !"next", metadata !13, i32 572, i64 32, i64 32, i64 0, i32 0, metadata !17} ; [ DW_TAG_member ]
+!17 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !14} ; [ DW_TAG_pointer_type ]
+!18 = metadata !{i32 589837, metadata !14, metadata !"name", metadata !13, i32 575, i64 32, i64 32, i64 32, i32 0, metadata !7} ; [ DW_TAG_member ]
+!19 = metadata !{i32 589837, metadata !14, metadata !"len", metadata !13, i32 576, i64 32, i64 32, i64 64, i32 0, metadata !20} ; [ DW_TAG_member ]
+!20 = metadata !{i32 589860, metadata !3, metadata !"unsigned int", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ]
+!21 = metadata !{i32 589837, metadata !14, metadata !"sysp", metadata !13, i32 580, i64 8, i64 8, i64 96, i32 0, metadata !22} ; [ DW_TAG_member ]
+!22 = metadata !{i32 589860, metadata !3, metadata !"unsigned char", metadata !3, i32 0, i64 8, i64 8, i64 0, i32 0, i32 8} ; [ DW_TAG_base_type ]
+!23 = metadata !{i32 589837, metadata !14, metadata !"name_map", metadata !13, i32 584, i64 32, i64 32, i64 128, i32 0, metadata !24} ; [ DW_TAG_member ]
+!24 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !9} ; [ DW_TAG_pointer_type ]
+!25 = metadata !{i32 589837, metadata !14, metadata !"header_map", metadata !13, i32 590, i64 32, i64 32, i64 160, i32 0, metadata !26} ; [ DW_TAG_member ]
+!26 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, null} ; [ DW_TAG_pointer_type ]
+!27 = metadata !{i32 589837, metadata !14, metadata !"construct", metadata !13, i32 597, i64 32, i64 32, i64 192, i32 0, metadata !28} ; [ DW_TAG_member ]
+!28 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !5} ; [ DW_TAG_pointer_type ]
+!29 = metadata !{i32 589837, metadata !14, metadata !"ino", metadata !13, i32 601, i64 64, i64 64, i64 224, i32 0, metadata !30} ; [ DW_TAG_member ]
+!30 = metadata !{i32 589846, metadata !31, metadata !"ino_t", metadata !31, i32 141, i64 0, i64 0, i64 0, i32 0, metadata !32} ; [ DW_TAG_typedef ]
+!31 = metadata !{i32 589865, metadata !"types.h", metadata !"/usr/include/sys", metadata !4} ; [ DW_TAG_file_type ]
+!32 = metadata !{i32 589860, metadata !3, metadata !"long long unsigned int", metadata !3, i32 0, i64 64, i64 64, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ]
+!33 = metadata !{i32 589837, metadata !14, metadata !"dev", metadata !13, i32 602, i64 32, i64 32, i64 288, i32 0, metadata !34} ; [ DW_TAG_member ]
+!34 = metadata !{i32 589846, metadata !31, metadata !"dev_t", metadata !31, i32 107, i64 0, i64 0, i64 0, i32 0, metadata !35} ; [ DW_TAG_typedef ]
+!35 = metadata !{i32 589860, metadata !3, metadata !"int", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
+!36 = metadata !{i32 589837, metadata !14, metadata !"user_supplied_p", metadata !13, i32 605, i64 8, i64 8, i64 320, i32 0, metadata !37} ; [ DW_TAG_member ]
+!37 = metadata !{i32 589860, metadata !3, metadata !"_Bool", metadata !3, i32 0, i64 8, i64 8, i64 0, i32 0, i32 2} ; [ DW_TAG_base_type ]
+!38 = metadata !{i32 589846, metadata !39, metadata !"size_t", metadata !39, i32 326, i64 0, i64 0, i64 0, i32 0, metadata !40} ; [ DW_TAG_typedef ]
+!39 = metadata !{i32 589865, metadata !"stddef.h", metadata !"/Users/espindola/llvm/build-llvm-gcc/./prev-gcc/include", metadata !4} ; [ DW_TAG_file_type ]
+!40 = metadata !{i32 589860, metadata !3, metadata !"long unsigned int", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ]
diff --git a/test/Feature/calltest.ll b/test/Feature/calltest.ll
index feafd3c..dcdb1a0 100644
--- a/test/Feature/calltest.ll
+++ b/test/Feature/calltest.ll
@@ -4,8 +4,6 @@
%FunTy = type i32 (i32)
-declare i32 @test(i32) ; Test forward declaration merging
-
define void @invoke(%FunTy* %x) {
%foo = call i32 %x( i32 123 ) ; <i32> [#uses=0]
%foo2 = tail call i32 %x( i32 123 ) ; <i32> [#uses=0]
diff --git a/test/Feature/forwardreftest.ll b/test/Feature/forwardreftest.ll
index 26d214a..6ca1be7 100644
--- a/test/Feature/forwardreftest.ll
+++ b/test/Feature/forwardreftest.ll
@@ -4,9 +4,9 @@
%myty = type i32
%myfn = type float (i32,double,i32,i16)
-type i32(%myfn*)
-type i32(i32)
-type i32(i32(i32)*)
+%0 = type i32(%myfn*)
+%1 = type i32(i32)
+%2 = type i32(i32(i32)*)
%thisfuncty = type i32 (i32) *
diff --git a/test/Feature/globalredefinition.ll b/test/Feature/globalredefinition.ll
deleted file mode 100644
index 42e2d1a..0000000
--- a/test/Feature/globalredefinition.ll
+++ /dev/null
@@ -1,18 +0,0 @@
-; RUN: llvm-as < %s | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-; Test forward references and redefinitions of globals
-
-@A = global i32* @B ; <i32**> [#uses=0]
-@B = global i32 7 ; <i32*> [#uses=1]
-
-declare void @X()
-
-declare void @X()
-
-define void @X() {
- ret void
-}
-
-declare void @X()
diff --git a/test/Feature/opaquetypes.ll b/test/Feature/opaquetypes.ll
index 6539c1a..37fdf93 100644
--- a/test/Feature/opaquetypes.ll
+++ b/test/Feature/opaquetypes.ll
@@ -16,13 +16,10 @@
%AAA = type { \2*, {\2*}, [12x{\2*}], {[1x{\2*}]} }
; Test numbered types
-type %CCC
-type %BBB
+%0 = type %CCC
+%1 = type %BBB
%Composite = type { %0, %1 }
-; Test simple opaque type resolution...
-%intty = type i32
-
; Perform a simple forward reference...
%ty1 = type { %ty2, i32 }
%ty2 = type float
diff --git a/test/Feature/paramattrs.ll b/test/Feature/paramattrs.ll
index 91aa460..9860f5a 100644
--- a/test/Feature/paramattrs.ll
+++ b/test/Feature/paramattrs.ll
@@ -2,8 +2,8 @@
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN: diff %t1.ll %t2.ll
-%ZFunTy = type i32(i8 zeroext)
-%SFunTy = type i32(i8 signext)
+%ZFunTy = type i32(i8)
+%SFunTy = type i32(i8)
declare signext i16 @"test"(i16 signext %arg)
declare zeroext i8 @"test2" (i16 zeroext %a2)
@@ -14,7 +14,7 @@ declare void @exit(i32) noreturn nounwind
define i32 @main(i32 inreg %argc, i8 ** inreg %argv) nounwind {
%val = trunc i32 %argc to i16
- %res1 = call signext i16 (i16 signext) *@test(i16 signext %val)
+ %res1 = call signext i16 (i16 ) *@test(i16 signext %val)
%two = add i16 %res1, %res1
%res2 = call zeroext i8 @test2(i16 zeroext %two )
%retVal = sext i16 %two to i32
diff --git a/test/Feature/testtype.ll b/test/Feature/testtype.ll
index 124aa09..c5af723 100644
--- a/test/Feature/testtype.ll
+++ b/test/Feature/testtype.ll
@@ -11,8 +11,8 @@
%fwd = type %fwdref*
; same as above with unnamed types
-type { %1* }
-type %0*
+%0 = type { %1* }
+%1 = type %0*
%test = type %1
%test2 = type [2 x i32]
diff --git a/test/Feature/weak_constant.ll b/test/Feature/weak_constant.ll
index 9025aaa..fba7f12 100644
--- a/test/Feature/weak_constant.ll
+++ b/test/Feature/weak_constant.ll
@@ -4,7 +4,7 @@
; RUN: grep 7 %t | count 1
; RUN: grep 9 %t | count 1
- type { i32, i32 } ; type %0
+ %0 = type { i32, i32 } ; type %0
@a = weak constant i32 undef ; <i32*> [#uses=1]
@b = weak constant i32 5 ; <i32*> [#uses=1]
@c = weak constant %0 { i32 7, i32 9 } ; <%0*> [#uses=1]
diff --git a/test/FrontendC/2008-07-29-EHLabel.ll b/test/FrontendC/2008-07-29-EHLabel.ll
deleted file mode 100644
index 186eafa..0000000
--- a/test/FrontendC/2008-07-29-EHLabel.ll
+++ /dev/null
@@ -1,282 +0,0 @@
-; RUN: llc -disable-cfi %s -o - | %llvmgcc -xassembler -c -o /dev/null -
-; PR2609
- %struct..0._11 = type { i32 }
- %struct..1__pthread_mutex_s = type { i32, i32, i32, i32, i32, %struct..0._11 }
- %struct.pthread_attr_t = type { i32, [32 x i8] }
- %struct.pthread_mutex_t = type { %struct..1__pthread_mutex_s }
- %"struct.std::__ctype_abstract_base<wchar_t>" = type { %"struct.std::locale::facet" }
- %"struct.std::basic_ios<char,std::char_traits<char> >" = type { %"struct.std::ios_base", %"struct.std::basic_ostream<char,std::char_traits<char> >"*, i8, i8, %"struct.std::basic_streambuf<char,std::char_traits<char> >"*, %"struct.std::ctype<char>"*, %"struct.std::__ctype_abstract_base<wchar_t>"*, %"struct.std::__ctype_abstract_base<wchar_t>"* }
- %"struct.std::basic_istream<char,std::char_traits<char> >" = type { i32 (...)**, i32, %"struct.std::basic_ios<char,std::char_traits<char> >" }
- %"struct.std::basic_istream<char,std::char_traits<char> >::sentry" = type { i8 }
- %"struct.std::basic_ostream<char,std::char_traits<char> >" = type { i32 (...)**, %"struct.std::basic_ios<char,std::char_traits<char> >" }
- %"struct.std::basic_streambuf<char,std::char_traits<char> >" = type { i32 (...)**, i8*, i8*, i8*, i8*, i8*, i8*, %"struct.std::locale" }
- %"struct.std::ctype<char>" = type { %"struct.std::locale::facet", i32*, i8, i32*, i32*, i16*, i8, [256 x i8], [256 x i8], i8 }
- %"struct.std::ios_base" = type { i32 (...)**, i32, i32, i32, i32, i32, %"struct.std::ios_base::_Callback_list"*, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, %"struct.std::ios_base::_Words"*, %"struct.std::locale" }
- %"struct.std::ios_base::_Callback_list" = type { %"struct.std::ios_base::_Callback_list"*, void (i32, %"struct.std::ios_base"*, i32)*, i32, i32 }
- %"struct.std::ios_base::_Words" = type { i8*, i32 }
- %"struct.std::locale" = type { %"struct.std::locale::_Impl"* }
- %"struct.std::locale::_Impl" = type { i32, %"struct.std::locale::facet"**, i32, %"struct.std::locale::facet"**, i8** }
- %"struct.std::locale::facet" = type { i32 (...)**, i32 }
-
-@_ZL20__gthrw_pthread_oncePiPFvvE = alias weak i32 (i32*, void ()*)* @pthread_once ; <i32 (i32*, void ()*)*> [#uses=0]
-@_ZL27__gthrw_pthread_getspecificj = alias weak i8* (i32)* @pthread_getspecific ; <i8* (i32)*> [#uses=0]
-@_ZL27__gthrw_pthread_setspecificjPKv = alias weak i32 (i32, i8*)* @pthread_setspecific ; <i32 (i32, i8*)*> [#uses=0]
-@_ZL22__gthrw_pthread_createPmPK14pthread_attr_tPFPvS3_ES3_ = alias weak i32 (i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)* @pthread_create ; <i32 (i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)*> [#uses=0]
-@_ZL22__gthrw_pthread_cancelm = alias weak i32 (i32)* @pthread_cancel ; <i32 (i32)*> [#uses=0]
-@_ZL26__gthrw_pthread_mutex_lockP15pthread_mutex_t = alias weak i32 (%struct.pthread_mutex_t*)* @pthread_mutex_lock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
-@_ZL29__gthrw_pthread_mutex_trylockP15pthread_mutex_t = alias weak i32 (%struct.pthread_mutex_t*)* @pthread_mutex_trylock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
-@_ZL28__gthrw_pthread_mutex_unlockP15pthread_mutex_t = alias weak i32 (%struct.pthread_mutex_t*)* @pthread_mutex_unlock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
-@_ZL26__gthrw_pthread_mutex_initP15pthread_mutex_tPK19pthread_mutexattr_t = alias weak i32 (%struct.pthread_mutex_t*, %struct..0._11*)* @pthread_mutex_init ; <i32 (%struct.pthread_mutex_t*, %struct..0._11*)*> [#uses=0]
-@_ZL26__gthrw_pthread_key_createPjPFvPvE = alias weak i32 (i32*, void (i8*)*)* @pthread_key_create ; <i32 (i32*, void (i8*)*)*> [#uses=0]
-@_ZL26__gthrw_pthread_key_deletej = alias weak i32 (i32)* @pthread_key_delete ; <i32 (i32)*> [#uses=0]
-@_ZL30__gthrw_pthread_mutexattr_initP19pthread_mutexattr_t = alias weak i32 (%struct..0._11*)* @pthread_mutexattr_init ; <i32 (%struct..0._11*)*> [#uses=0]
-@_ZL33__gthrw_pthread_mutexattr_settypeP19pthread_mutexattr_ti = alias weak i32 (%struct..0._11*, i32)* @pthread_mutexattr_settype ; <i32 (%struct..0._11*, i32)*> [#uses=0]
-@_ZL33__gthrw_pthread_mutexattr_destroyP19pthread_mutexattr_t = alias weak i32 (%struct..0._11*)* @pthread_mutexattr_destroy ; <i32 (%struct..0._11*)*> [#uses=0]
-
-define %"struct.std::basic_istream<char,std::char_traits<char> >"* @_ZNSi7getlineEPcic(%"struct.std::basic_istream<char,std::char_traits<char> >"* %this, i8* %__s, i32 %__n, i8 signext %__delim) {
-entry:
- %__cerb = alloca %"struct.std::basic_istream<char,std::char_traits<char> >::sentry" ; <%"struct.std::basic_istream<char,std::char_traits<char> >::sentry"*> [#uses=2]
- getelementptr %"struct.std::basic_istream<char,std::char_traits<char> >"* %this, i32 0, i32 1 ; <i32*>:0 [#uses=7]
- store i32 0, i32* %0, align 4
- call void @_ZNSi6sentryC1ERSib( %"struct.std::basic_istream<char,std::char_traits<char> >::sentry"* %__cerb, %"struct.std::basic_istream<char,std::char_traits<char> >"* %this, i8 zeroext 1 )
- getelementptr %"struct.std::basic_istream<char,std::char_traits<char> >::sentry"* %__cerb, i32 0, i32 0 ; <i8*>:1 [#uses=1]
- load i8* %1, align 8 ; <i8>:2 [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; <i1> [#uses=1]
- br i1 %toBool, label %bb162, label %bb
-
-bb: ; preds = %entry
- zext i8 %__delim to i32 ; <i32>:3 [#uses=1]
- getelementptr %"struct.std::basic_istream<char,std::char_traits<char> >"* %this, i32 0, i32 0 ; <i32 (...)***>:4 [#uses=1]
- load i32 (...)*** %4, align 4 ; <i32 (...)**>:5 [#uses=1]
- getelementptr i32 (...)** %5, i32 -3 ; <i32 (...)**>:6 [#uses=1]
- bitcast i32 (...)** %6 to i32* ; <i32*>:7 [#uses=1]
- load i32* %7, align 4 ; <i32>:8 [#uses=1]
- bitcast %"struct.std::basic_istream<char,std::char_traits<char> >"* %this to i8* ; <i8*>:9 [#uses=1]
- %ctg2186 = getelementptr i8* %9, i32 %8 ; <i8*> [#uses=1]
- bitcast i8* %ctg2186 to %"struct.std::basic_ios<char,std::char_traits<char> >"* ; <%"struct.std::basic_ios<char,std::char_traits<char> >"*>:10 [#uses=1]
- getelementptr %"struct.std::basic_ios<char,std::char_traits<char> >"* %10, i32 0, i32 4 ; <%"struct.std::basic_streambuf<char,std::char_traits<char> >"**>:11 [#uses=1]
- load %"struct.std::basic_streambuf<char,std::char_traits<char> >"** %11, align 4 ; <%"struct.std::basic_streambuf<char,std::char_traits<char> >"*>:12 [#uses=9]
- getelementptr %"struct.std::basic_streambuf<char,std::char_traits<char> >"* %12, i32 0, i32 2 ; <i8**>:13 [#uses=10]
- load i8** %13, align 4 ; <i8*>:14 [#uses=2]
- getelementptr %"struct.std::basic_streambuf<char,std::char_traits<char> >"* %12, i32 0, i32 3 ; <i8**>:15 [#uses=6]
- load i8** %15, align 4 ; <i8*>:16 [#uses=1]
- icmp ult i8* %14, %16 ; <i1>:17 [#uses=1]
- br i1 %17, label %bb81, label %bb82
-
-bb81: ; preds = %bb
- load i8* %14, align 1 ; <i8>:18 [#uses=1]
- zext i8 %18 to i32 ; <i32>:19 [#uses=1]
- %.pre = getelementptr %"struct.std::basic_streambuf<char,std::char_traits<char> >"* %12, i32 0, i32 0 ; <i32 (...)***> [#uses=1]
- br label %bb119.preheader
-
-bb82: ; preds = %bb
- getelementptr %"struct.std::basic_streambuf<char,std::char_traits<char> >"* %12, i32 0, i32 0 ; <i32 (...)***>:20 [#uses=2]
- load i32 (...)*** %20, align 4 ; <i32 (...)**>:21 [#uses=1]
- getelementptr i32 (...)** %21, i32 9 ; <i32 (...)**>:22 [#uses=1]
- load i32 (...)** %22, align 4 ; <i32 (...)*>:23 [#uses=1]
- bitcast i32 (...)* %23 to i32 (%"struct.std::basic_streambuf<char,std::char_traits<char> >"*)* ; <i32 (%"struct.std::basic_streambuf<char,std::char_traits<char> >"*)*>:24 [#uses=1]
- invoke i32 %24( %"struct.std::basic_streambuf<char,std::char_traits<char> >"* %12 )
- to label %bb119.preheader unwind label %lpad ; <i32>:25 [#uses=1]
-
-bb119.preheader: ; preds = %bb82, %bb81
- %.pre-phi = phi i32 (...)*** [ %.pre, %bb81 ], [ %20, %bb82 ] ; <i32 (...)***> [#uses=4]
- %__c79.0.ph = phi i32 [ %19, %bb81 ], [ %25, %bb82 ] ; <i32> [#uses=1]
- sext i8 %__delim to i32 ; <i32>:26 [#uses=1]
- br label %bb119
-
-bb84: ; preds = %bb119
- sub i32 %__n, %82 ; <i32>:27 [#uses=1]
- add i32 %27, -1 ; <i32>:28 [#uses=2]
- load i8** %15, align 4 ; <i8*>:29 [#uses=1]
- ptrtoint i8* %29 to i32 ; <i32>:30 [#uses=1]
- load i8** %13, align 4 ; <i8*>:31 [#uses=3]
- ptrtoint i8* %31 to i32 ; <i32>:32 [#uses=2]
- sub i32 %30, %32 ; <i32>:33 [#uses=2]
- icmp slt i32 %28, %33 ; <i1>:34 [#uses=1]
- select i1 %34, i32 %28, i32 %33 ; <i32>:35 [#uses=3]
- icmp sgt i32 %35, 1 ; <i1>:36 [#uses=1]
- br i1 %36, label %bb90, label %bb99
-
-bb90: ; preds = %bb84
- call i8* @memchr( i8* %31, i32 %26, i32 %35 ) nounwind readonly ; <i8*>:37 [#uses=2]
- icmp eq i8* %37, null ; <i1>:38 [#uses=1]
- br i1 %38, label %bb93, label %bb92
-
-bb92: ; preds = %bb90
- ptrtoint i8* %37 to i32 ; <i32>:39 [#uses=1]
- sub i32 %39, %32 ; <i32>:40 [#uses=1]
- br label %bb93
-
-bb93: ; preds = %bb92, %bb90
- %__size.0 = phi i32 [ %40, %bb92 ], [ %35, %bb90 ] ; <i32> [#uses=4]
- call void @llvm.memcpy.i32( i8* %__s_addr.0, i8* %31, i32 %__size.0, i32 1 )
- getelementptr i8* %__s_addr.0, i32 %__size.0 ; <i8*>:41 [#uses=3]
- load i8** %13, align 4 ; <i8*>:42 [#uses=1]
- getelementptr i8* %42, i32 %__size.0 ; <i8*>:43 [#uses=1]
- store i8* %43, i8** %13, align 4
- load i32* %0, align 4 ; <i32>:44 [#uses=1]
- add i32 %44, %__size.0 ; <i32>:45 [#uses=1]
- store i32 %45, i32* %0, align 4
- load i8** %13, align 4 ; <i8*>:46 [#uses=2]
- load i8** %15, align 4 ; <i8*>:47 [#uses=1]
- icmp ult i8* %46, %47 ; <i1>:48 [#uses=1]
- br i1 %48, label %bb95, label %bb96
-
-bb95: ; preds = %bb93
- load i8* %46, align 1 ; <i8>:49 [#uses=1]
- zext i8 %49 to i32 ; <i32>:50 [#uses=1]
- br label %bb119
-
-bb96: ; preds = %bb93
- load i32 (...)*** %.pre-phi, align 4 ; <i32 (...)**>:51 [#uses=1]
- getelementptr i32 (...)** %51, i32 9 ; <i32 (...)**>:52 [#uses=1]
- load i32 (...)** %52, align 4 ; <i32 (...)*>:53 [#uses=1]
- bitcast i32 (...)* %53 to i32 (%"struct.std::basic_streambuf<char,std::char_traits<char> >"*)* ; <i32 (%"struct.std::basic_streambuf<char,std::char_traits<char> >"*)*>:54 [#uses=1]
- invoke i32 %54( %"struct.std::basic_streambuf<char,std::char_traits<char> >"* %12 )
- to label %bb119 unwind label %lpad ; <i32>:55 [#uses=1]
-
-bb99: ; preds = %bb84
- trunc i32 %__c79.0 to i8 ; <i8>:56 [#uses=1]
- store i8 %56, i8* %__s_addr.0, align 1
- getelementptr i8* %__s_addr.0, i32 1 ; <i8*>:57 [#uses=5]
- load i32* %0, align 4 ; <i32>:58 [#uses=1]
- add i32 %58, 1 ; <i32>:59 [#uses=1]
- store i32 %59, i32* %0, align 4
- load i8** %13, align 4 ; <i8*>:60 [#uses=3]
- load i8** %15, align 4 ; <i8*>:61 [#uses=1]
- icmp ult i8* %60, %61 ; <i1>:62 [#uses=1]
- br i1 %62, label %bb101, label %bb102
-
-bb101: ; preds = %bb99
- load i8* %60, align 1 ; <i8>:63 [#uses=1]
- zext i8 %63 to i32 ; <i32>:64 [#uses=1]
- getelementptr i8* %60, i32 1 ; <i8*>:65 [#uses=1]
- store i8* %65, i8** %13, align 4
- br label %bb104
-
-bb102: ; preds = %bb99
- load i32 (...)*** %.pre-phi, align 4 ; <i32 (...)**>:66 [#uses=1]
- getelementptr i32 (...)** %66, i32 10 ; <i32 (...)**>:67 [#uses=1]
- load i32 (...)** %67, align 4 ; <i32 (...)*>:68 [#uses=1]
- bitcast i32 (...)* %68 to i32 (%"struct.std::basic_streambuf<char,std::char_traits<char> >"*)* ; <i32 (%"struct.std::basic_streambuf<char,std::char_traits<char> >"*)*>:69 [#uses=1]
- invoke i32 %69( %"struct.std::basic_streambuf<char,std::char_traits<char> >"* %12 )
- to label %bb104 unwind label %lpad ; <i32>:70 [#uses=1]
-
-bb104: ; preds = %bb102, %bb101
- %__ret44.0 = phi i32 [ %64, %bb101 ], [ %70, %bb102 ] ; <i32> [#uses=1]
- icmp eq i32 %__ret44.0, -1 ; <i1>:71 [#uses=1]
- br i1 %71, label %bb119, label %bb112
-
-bb112: ; preds = %bb104
- load i8** %13, align 4 ; <i8*>:72 [#uses=2]
- load i8** %15, align 4 ; <i8*>:73 [#uses=1]
- icmp ult i8* %72, %73 ; <i1>:74 [#uses=1]
- br i1 %74, label %bb114, label %bb115
-
-bb114: ; preds = %bb112
- load i8* %72, align 1 ; <i8>:75 [#uses=1]
- zext i8 %75 to i32 ; <i32>:76 [#uses=1]
- br label %bb119
-
-bb115: ; preds = %bb112
- load i32 (...)*** %.pre-phi, align 4 ; <i32 (...)**>:77 [#uses=1]
- getelementptr i32 (...)** %77, i32 9 ; <i32 (...)**>:78 [#uses=1]
- load i32 (...)** %78, align 4 ; <i32 (...)*>:79 [#uses=1]
- bitcast i32 (...)* %79 to i32 (%"struct.std::basic_streambuf<char,std::char_traits<char> >"*)* ; <i32 (%"struct.std::basic_streambuf<char,std::char_traits<char> >"*)*>:80 [#uses=1]
- invoke i32 %80( %"struct.std::basic_streambuf<char,std::char_traits<char> >"* %12 )
- to label %bb119 unwind label %lpad ; <i32>:81 [#uses=1]
-
-bb119: ; preds = %bb115, %bb114, %bb104, %bb96, %bb95, %bb119.preheader
- %__c79.0 = phi i32 [ %__c79.0.ph, %bb119.preheader ], [ %50, %bb95 ], [ %76, %bb114 ], [ %55, %bb96 ], [ -1, %bb104 ], [ %81, %bb115 ] ; <i32> [#uses=3]
- %__s_addr.0 = phi i8* [ %__s, %bb119.preheader ], [ %41, %bb95 ], [ %57, %bb114 ], [ %41, %bb96 ], [ %57, %bb104 ], [ %57, %bb115 ] ; <i8*> [#uses=5]
- load i32* %0, align 4 ; <i32>:82 [#uses=2]
- add i32 %82, 1 ; <i32>:83 [#uses=2]
- %.not = icmp sge i32 %83, %__n ; <i1> [#uses=1]
- icmp eq i32 %__c79.0, -1 ; <i1>:84 [#uses=3]
- icmp eq i32 %__c79.0, %3 ; <i1>:85 [#uses=2]
- %or.cond = or i1 %84, %85 ; <i1> [#uses=1]
- %or.cond188 = or i1 %or.cond, %.not ; <i1> [#uses=1]
- br i1 %or.cond188, label %bb141, label %bb84
-
-bb141: ; preds = %bb119
- %.not194 = xor i1 %85, true ; <i1> [#uses=1]
- %brmerge = or i1 %84, %.not194 ; <i1> [#uses=1]
- %.mux = select i1 %84, i32 2, i32 4 ; <i32> [#uses=0]
- br i1 %brmerge, label %bb162, label %bb146
-
-bb146: ; preds = %bb141
- store i32 %83, i32* %0, align 4
- load i8** %13, align 4 ; <i8*>:86 [#uses=2]
- load i8** %15, align 4 ; <i8*>:87 [#uses=1]
- icmp ult i8* %86, %87 ; <i1>:88 [#uses=1]
- br i1 %88, label %bb148, label %bb149
-
-bb148: ; preds = %bb146
- getelementptr i8* %86, i32 1 ; <i8*>:89 [#uses=1]
- store i8* %89, i8** %13, align 4
- ret %"struct.std::basic_istream<char,std::char_traits<char> >"* %this
-
-bb149: ; preds = %bb146
- load i32 (...)*** %.pre-phi, align 4 ; <i32 (...)**>:90 [#uses=1]
- getelementptr i32 (...)** %90, i32 10 ; <i32 (...)**>:91 [#uses=1]
- load i32 (...)** %91, align 4 ; <i32 (...)*>:92 [#uses=1]
- bitcast i32 (...)* %92 to i32 (%"struct.std::basic_streambuf<char,std::char_traits<char> >"*)* ; <i32 (%"struct.std::basic_streambuf<char,std::char_traits<char> >"*)*>:93 [#uses=1]
- invoke i32 %93( %"struct.std::basic_streambuf<char,std::char_traits<char> >"* %12 )
- to label %bb162 unwind label %lpad ; <i32>:94 [#uses=0]
-
-bb162: ; preds = %bb149, %bb141, %entry
- ret %"struct.std::basic_istream<char,std::char_traits<char> >"* %this
-
-lpad: ; preds = %bb149, %bb115, %bb102, %bb96, %bb82
- %__s_addr.1 = phi i8* [ %__s, %bb82 ], [ %__s_addr.0, %bb149 ], [ %41, %bb96 ], [ %57, %bb102 ], [ %57, %bb115 ] ; <i8*> [#uses=0]
- call void @__cxa_rethrow( ) noreturn
- unreachable
-}
-
-declare i8* @__cxa_begin_catch(i8*) nounwind
-
-declare i8* @llvm.eh.exception() nounwind
-
-declare i32 @llvm.eh.selector.i32(i8*, i8*, ...) nounwind
-
-declare void @__cxa_rethrow() noreturn
-
-declare void @__cxa_end_catch()
-
-declare i32 @__gxx_personality_v0(...)
-
-declare void @_ZNSi6sentryC1ERSib(%"struct.std::basic_istream<char,std::char_traits<char> >::sentry"*, %"struct.std::basic_istream<char,std::char_traits<char> >"*, i8 zeroext )
-
-declare i8* @memchr(i8*, i32, i32) nounwind readonly
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
-
-declare void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(%"struct.std::basic_ios<char,std::char_traits<char> >"*, i32)
-
-declare extern_weak i32 @pthread_once(i32*, void ()*)
-
-declare extern_weak i8* @pthread_getspecific(i32)
-
-declare extern_weak i32 @pthread_setspecific(i32, i8*)
-
-declare extern_weak i32 @pthread_create(i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)
-
-declare extern_weak i32 @pthread_cancel(i32)
-
-declare extern_weak i32 @pthread_mutex_lock(%struct.pthread_mutex_t*)
-
-declare extern_weak i32 @pthread_mutex_trylock(%struct.pthread_mutex_t*)
-
-declare extern_weak i32 @pthread_mutex_unlock(%struct.pthread_mutex_t*)
-
-declare extern_weak i32 @pthread_mutex_init(%struct.pthread_mutex_t*, %struct..0._11*)
-
-declare extern_weak i32 @pthread_key_create(i32*, void (i8*)*)
-
-declare extern_weak i32 @pthread_key_delete(i32)
-
-declare extern_weak i32 @pthread_mutexattr_init(%struct..0._11*)
-
-declare extern_weak i32 @pthread_mutexattr_settype(%struct..0._11*, i32)
-
-declare extern_weak i32 @pthread_mutexattr_destroy(%struct..0._11*)
diff --git a/test/Integer/BitArith.ll b/test/Integer/BitArith.ll
deleted file mode 100644
index 350a984..0000000
--- a/test/Integer/BitArith.ll
+++ /dev/null
@@ -1,25 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-declare void @"foo"(i31 %i, i63 %j, i10 %k)
-
-
-; foo test basic arith operations
-define void @"foo"(i31 %i, i63 %j, i10 %k)
-begin
- %t1 = trunc i63 %j to i31
- %t2 = add i31 %t1, %i
- %t20 = add i31 3, %t1
- %t3 = zext i31 %i to i63
- %t4 = sub i63 %t3, %j
- %t40 = sub i63 %j, -100
- %t5 = mul i10 %k, 7
- %t6 = sdiv i63 %j, -2
- %t7 = udiv i63 %j, %t3
- %t8 = urem i10 %k, 10
- %t9 = srem i10 %k, -10
- ret void
-end
-
diff --git a/test/Integer/BitBit.ll b/test/Integer/BitBit.ll
deleted file mode 100644
index 420bbe5..0000000
--- a/test/Integer/BitBit.ll
+++ /dev/null
@@ -1,24 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-declare void @"foo"(i31 %i, i33 %j)
-
-
-; foo test basic bitwise operations
-define void @"foo"(i31 %i, i33 %j)
-begin
- %t1 = trunc i33 %j to i31
- %t2 = and i31 %t1, %i
- %t3 = sext i31 %i to i33
- %t4 = or i33 %t3, %j
- %t5 = xor i31 %t2, 7
- %t6 = shl i31 %i, 2
- %t7 = trunc i31 %i to i8
- %t8 = shl i8 %t7, 3
- %t9 = lshr i33 %j, 31
- %t7z = zext i8 %t7 to i33
- %t10 = ashr i33 %j, %t7z
- ret void
-end
-
diff --git a/test/Integer/BitCast.ll b/test/Integer/BitCast.ll
deleted file mode 100644
index 0bef023..0000000
--- a/test/Integer/BitCast.ll
+++ /dev/null
@@ -1,26 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; 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)
-
-
-; foo test basic arith operations
-define void @"foo"(i31 %i, i1280 %j, i1 %k, float %f)
-begin
- %t1 = trunc i1280 %j to i31
- %t2 = trunc i31 %t1 to i1
-
- %t3 = zext i31 %i to i1280
- %t4 = sext i31 %i to i1280
-
- %t5 = fptoui float 0x400921FA00000000 to i31
- %t6 = uitofp i31 %t5 to double
-
- %t7 = fptosi double 0xC0934A456D5CFAAD to i28
- %t8 = sitofp i8 -1 to double
- %t9 = uitofp i8 255 to double
-
- ret void
-end
-
diff --git a/test/Integer/BitIcmp.ll b/test/Integer/BitIcmp.ll
deleted file mode 100644
index c224612..0000000
--- a/test/Integer/BitIcmp.ll
+++ /dev/null
@@ -1,43 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-define i55 @"simpleIcmp"(i55 %i0, i55 %j0)
-begin
- %t1 = icmp eq i55 %i0, %j0
- %t2 = icmp ne i55 %i0, %j0
- %t3 = icmp ult i55 %i0, %j0
- %t4 = icmp sgt i55 %i0, %j0
- %t5 = icmp ule i55 %i0, %j0
- %t6 = icmp sge i55 %i0, %j0
-
- %t7 = icmp eq i55 %i0, 1098765432
- %t8 = icmp ne i55 %i0, -31415926
-
- %t9 = icmp ult i55 10000, %j0
- %t10 = icmp sgt i55 -10000, %j0
-
- ret i55 %i0
-end
-
-define i31 @"phitest"(i12 %i)
-begin
-
-HasArg:
- %n1 = add i12 1, %i
- br label %Continue
-
-Continue:
- %n = phi i12 [%n1, %HasArg], [%next, %Continue]
- %next = add i12 1, %n
- br label %Continue
-end
-
-define i18 @"select"(i18 %i)
-begin
- %t = icmp sgt i18 %i, 100
- %k = select i1 %t, i18 %i, i18 999
- ret i18 %k
-end
-
diff --git a/test/Integer/BitMisc.ll b/test/Integer/BitMisc.ll
deleted file mode 100644
index 8ce4d4a..0000000
--- a/test/Integer/BitMisc.ll
+++ /dev/null
@@ -1,24 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-@MyVar = external global i19
-@MyIntList = external global { i39 *, i19 }
- external global i19 ; i19*:0
-
-@AConst = constant i19 -123
-
-@AString = constant [4 x i8] c"test"
-
-@ZeroInit = global { [100 x i19 ], [40 x float ] } { [100 x i19] zeroinitializer,
- [40 x float] zeroinitializer }
-
-
-define i19 @"foo"(i19 %blah)
-begin
- store i19 5, i19* @MyVar
- %idx = getelementptr { i39 *, i19 } * @MyIntList, i64 0, i32 1
- store i19 12, i19* %idx
- ret i19 %blah
-end
diff --git a/test/Integer/cfgstructures_bt.ll b/test/Integer/cfgstructures_bt.ll
deleted file mode 100644
index 09aec1f..0000000
--- a/test/Integer/cfgstructures_bt.ll
+++ /dev/null
@@ -1,56 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-;; This is an irreducible flow graph
-
-
-define void @"irreducible"(i1 %cond)
-begin
- br i1 %cond, label %X, label %Y
-
-X:
- br label %Y
-Y:
- br label %X
-end
-
-;; This is a pair of loops that share the same header
-
-define void @"sharedheader"(i1 %cond)
-begin
- br label %A
-A:
- br i1 %cond, label %X, label %Y
-
-X:
- br label %A
-Y:
- br label %A
-end
-
-;; This is a simple nested loop
-define void @"nested"(i1 %cond1, i1 %cond2, i1 %cond3)
-begin
- br label %Loop1
-
-Loop1:
- br label %Loop2
-
-Loop2:
- br label %Loop3
-
-Loop3:
- br i1 %cond3, label %Loop3, label %L3Exit
-
-L3Exit:
- br i1 %cond2, label %Loop2, label %L2Exit
-
-L2Exit:
- br i1 %cond1, label %Loop1, label %L1Exit
-
-L1Exit:
- ret void
-end
-
diff --git a/test/Integer/forwardreftest_bt.ll b/test/Integer/forwardreftest_bt.ll
deleted file mode 100644
index 5d73eff..0000000
--- a/test/Integer/forwardreftest_bt.ll
+++ /dev/null
@@ -1,33 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
- %myty = type i55
- %myfn = type float (i55,double,i55,i16)
- type i55(%myfn*)
- type i55(i55)
- type i55(i55(i55)*)
-
- %thisfuncty = type i55 (i55) *
-
-declare void @F(%thisfuncty, %thisfuncty, %thisfuncty)
-
-; This function always returns zero
-define i55 @zarro(i55 %Func)
-begin
-Startup:
- add i55 0, 10
- ret i55 0
-end
-
-define i55 @test(i55)
-begin
- call void @F(%thisfuncty @zarro, %thisfuncty @test, %thisfuncty @foozball)
- ret i55 0
-end
-
-define i55 @foozball(i55)
-begin
- ret i55 0
-end
-
diff --git a/test/Integer/globalredefinition_bt.ll b/test/Integer/globalredefinition_bt.ll
deleted file mode 100644
index b369b2a..0000000
--- a/test/Integer/globalredefinition_bt.ll
+++ /dev/null
@@ -1,18 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-; Test forward references and redefinitions of globals
-
-@A = global i17* @B
-@B = global i17 7
-
-declare void @X()
-
-declare void @X()
-
-define void @X() {
- ret void
-}
-
-declare void @X()
diff --git a/test/Integer/globalvars_bt.ll b/test/Integer/globalvars_bt.ll
deleted file mode 100644
index 5c43185..0000000
--- a/test/Integer/globalvars_bt.ll
+++ /dev/null
@@ -1,26 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-
-@MyVar = external global i27
-@MyIntList = external global { \2 *, i27 }
- external global i27 ; i27*:0
-
-@AConst = constant i27 123
-
-@AString = constant [4 x i8] c"test"
-
-@ZeroInit = global { [100 x i27 ], [40 x float ] } { [100 x i27] zeroinitializer,
- [40 x float] zeroinitializer }
-
-
-define i27 @"foo"(i27 %blah)
-begin
- store i27 5, i27 *@MyVar
- %idx = getelementptr { \2 *, i27 } * @MyIntList, i64 0, i32 1
- store i27 12, i27* %idx
- ret i27 %blah
-end
-
diff --git a/test/Integer/indirectcall2_bt.ll b/test/Integer/indirectcall2_bt.ll
deleted file mode 100644
index 5b7c68d..0000000
--- a/test/Integer/indirectcall2_bt.ll
+++ /dev/null
@@ -1,24 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-define i63 @"test"(i63 %X)
-begin
- ret i63 %X
-end
-
-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)
- br label %BaseCase
-
-BaseCase:
- %X = phi i63 [1, %0], [2, %RecurseCase]
- ret i63 %X
-end
-
diff --git a/test/Integer/indirectcall_bt.ll b/test/Integer/indirectcall_bt.ll
deleted file mode 100644
index d586fca..0000000
--- a/test/Integer/indirectcall_bt.ll
+++ /dev/null
@@ -1,52 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-declare i32 @"atoi"(i8 *)
-
-define i63 @"fib"(i63 %n)
-begin
- icmp ult i63 %n, 2 ; {i1}:1
- br i1 %1, label %BaseCase, label %RecurseCase
-
-BaseCase:
- ret i63 1
-
-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)
- %result = add i63 %f2, %f1
- ret i63 %result
-end
-
-define i63 @"realmain"(i32 %argc, i8 ** %argv)
-begin
- icmp eq i32 %argc, 2 ; {i1}:1
- br i1 %1, label %HasArg, label %Continue
-HasArg:
- ; %n1 = atoi(argv[1])
- %n1 = add i32 1, 1
- br label %Continue
-
-Continue:
- %n = phi i32 [%n1, %HasArg], [1, %0]
- %N = sext i32 %n to i63
- %F = call i63(i63) *@fib(i63 %N)
- ret i63 %F
-end
-
-define i63 @"trampoline"(i63 %n, i63(i63)* %fibfunc)
-begin
- %F = call i63(i63) *%fibfunc(i63 %n)
- ret i63 %F
-end
-
-define i32 @"main"()
-begin
- %Result = call i63 @trampoline(i63 10, i63(i63) *@fib)
- %Result2 = trunc i63 %Result to i32
- ret i32 %Result2
-end
diff --git a/test/Integer/opaquetypes_bt.ll b/test/Integer/opaquetypes_bt.ll
deleted file mode 100644
index 5771342..0000000
--- a/test/Integer/opaquetypes_bt.ll
+++ /dev/null
@@ -1,58 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-; This test case is used to test opaque type processing, forward references,
-; and recursive types. Oh my.
-;
-
-%SQ1 = type { i31 }
-%SQ2 = type { %ITy }
-%ITy = type i31
-
-
-%CCC = type { \2* }
-%BBB = type { \2*, \2 * }
-%AAA = type { \2*, {\2*}, [12x{\2*}], {[1x{\2*}]} }
-
-; Test numbered types
-type %CCC
-type %BBB
-%Composite = type { %0, %1 }
-
-; Test simple opaque type resolution...
-%i31ty = type i31
-
-; Perform a simple forward reference...
-%ty1 = type { %ty2, i31 }
-%ty2 = type float
-
-; Do a recursive type...
-%list = type { %list * }
-%listp = type { %listp } *
-
-; Do two mutually recursive types...
-%TyA = type { %ty2, %TyB * }
-%TyB = type { double, %TyA * }
-
-; A complex recursive type...
-%Y = type { {%Y*}, %Y* }
-%Z = type { { %Z * }, [12x%Z] *, {{{ %Z * }}} }
-
-; More ridiculous test cases...
-%A = type [ 123x %A*]
-%M = type %M (%M, %M) *
-%P = type %P*
-
-; Recursive ptrs
-%u = type %v*
-%v = type %u*
-
-; Test the parser for unnamed recursive types...
-%P1 = type \1 *
-%Y1 = type { { \3 * }, \2 * }
-%Z1 = type { { \3 * }, [12x\3] *, { { { \5 * } } } }
-
-
-
-
diff --git a/test/Integer/paramattrs_bt.ll b/test/Integer/paramattrs_bt.ll
deleted file mode 100644
index 6db9a53..0000000
--- a/test/Integer/paramattrs_bt.ll
+++ /dev/null
@@ -1,19 +0,0 @@
-; RUN: llvm-as < %s | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-%ZFunTy = type i33(i8 zeroext)
-%SFunTy = type i33(i8 signext)
-
-declare signext i16 @"test"(i16 signext %arg)
-declare zeroext i8 @"test2" (i16 zeroext %a2)
-
-
-define i33 @main(i33 %argc, i8 **%argv) {
- %val = trunc i33 %argc to i16
- %res = call signext i16 (i16 signext) *@test(i16 signext %val)
- %two = add i16 %res, %res
- %res2 = call zeroext i8 @test2(i16 zeroext %two )
- %retVal = sext i16 %two to i33
- ret i33 %retVal
-}
diff --git a/test/Integer/prototype_bt.ll b/test/Integer/prototype_bt.ll
deleted file mode 100644
index 2236e8b..0000000
--- a/test/Integer/prototype_bt.ll
+++ /dev/null
@@ -1,13 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-declare i31 @"bar"(i31 %in)
-
-define i31 @"foo"(i31 %blah)
-begin
- %xx = call i31 @bar(i31 %blah)
- ret i31 %xx
-end
-
diff --git a/test/Integer/recursivetype_bt.ll b/test/Integer/recursivetype_bt.ll
deleted file mode 100644
index d5ce3f5..0000000
--- a/test/Integer/recursivetype_bt.ll
+++ /dev/null
@@ -1,108 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-; This file contains the output from the following compiled C code:
-; typedef struct list {
-; struct list *Next;
-; i32 Data;
-; } list;
-;
-; // Iterative insert fn
-; void InsertIntoListTail(list **L, i32 Data) {
-; while (*L)
-; L = &(*L)->Next;
-; *L = (list*)malloc(sizeof(list));
-; (*L)->Data = Data;
-; (*L)->Next = 0;
-; }
-;
-; // Recursive list search fn
-; list *FindData(list *L, i32 Data) {
-; if (L == 0) return 0;
-; if (L->Data == Data) return L;
-; return FindData(L->Next, Data);
-; }
-;
-; void DoListStuff() {
-; list *MyList = 0;
-; InsertIntoListTail(&MyList, 100);
-; InsertIntoListTail(&MyList, 12);
-; InsertIntoListTail(&MyList, 42);
-; InsertIntoListTail(&MyList, 1123);
-; InsertIntoListTail(&MyList, 1213);
-;
-; if (FindData(MyList, 75)) foundIt();
-; if (FindData(MyList, 42)) foundIt();
-; if (FindData(MyList, 700)) foundIt();
-; }
-
-%list = type { %list*, i36 }
-
-declare i8 *@"malloc"(i32)
-
-;;**********************
-;;**********************
-
-define void @"InsertIntoListTail"(%list** %L, i36 %Data)
-begin
-bb1:
- %reg116 = load %list** %L ;;<%list*>
- %cast1004 = inttoptr i64 0 to %list* ;;<%list*>
- %cond1000 = icmp eq %list* %reg116, %cast1004 ;;<i1>
- br i1 %cond1000, label %bb3, label %bb2
-
-bb2:
- %reg117 = phi %list** [ %reg118, %bb2 ], [ %L, %bb1 ] ;;<%list**>
- %cast1010 = bitcast %list** %reg117 to %list*** ;;<%list***>
- %reg118 = load %list*** %cast1010 ;;<%list**>
- %reg109 = load %list** %reg118 ;;<%list*>
- %cast1005 = inttoptr i64 0 to %list* ;;<%list*>
- %cond1001 = icmp ne %list* %reg109, %cast1005 ;;<i1>
- br i1 %cond1001, label %bb2, label %bb3
-
-bb3:
- %reg119 = phi %list** [ %reg118, %bb2 ], [ %L, %bb1 ] ;;<%list**>
- %cast1006 = bitcast %list** %reg119 to i8** ;;<i8**>
- %reg111 = call i8* @malloc(i32 16) ;;<i8*>
- store i8* %reg111, i8** %cast1006 ;;<void>
- %reg112 = ptrtoint i8* %reg111 to i64
- %reg1002 = add i64 %reg112, 8
- %reg1005 = inttoptr i64 %reg1002 to i8* ;;<i8*>
- %cast1008 = bitcast i8* %reg1005 to i36* ;;<i36*>
- store i36 %Data, i36* %cast1008 ;;<void>
- %cast1003 = inttoptr i64 0 to i64* ;;<i64*>
- %cast1009 = bitcast i8* %reg111 to i64** ;;<i64**>
- store i64* %cast1003, i64** %cast1009 ;;<void>
- ret void
-end
-
-define %list* @"FindData"(%list* %L, i36 %Data)
-begin
-bb1:
- br label %bb2
-
-bb2:
- %reg115 = phi %list* [ %reg116, %bb6 ], [ %L, %bb1 ] ;;<%list*>
- %cast1014 = inttoptr i64 0 to %list* ;;<%list*>
- %cond1011 = icmp ne %list* %reg115, %cast1014 ;;<i1>
- br i1 %cond1011, label %bb4, label %bb3
-
-bb3:
- ret %list* null
-
-bb4:
- %idx = getelementptr %list* %reg115, i64 0, i32 1 ;;<i36>
- %reg111 = load i36* %idx
- %cond1013 = icmp ne i36 %reg111, %Data ;;<i1>
- br i1 %cond1013, label %bb6, label %bb5
-
-bb5:
- ret %list* %reg115
-
-bb6:
- %idx2 = getelementptr %list* %reg115, i64 0, i32 0 ;;<%list*>
- %reg116 = load %list** %idx2
- br label %bb2
-end
diff --git a/test/Integer/simplecalltest_bt.ll b/test/Integer/simplecalltest_bt.ll
deleted file mode 100644
index 45dc0f1..0000000
--- a/test/Integer/simplecalltest_bt.ll
+++ /dev/null
@@ -1,28 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-%FunTy = type i31(i31)
-
-
-define void @"invoke"(%FunTy *%x)
-begin
- %foo = call %FunTy* %x(i31 123)
- ret void
-end
-
-define i31 @"main"(i31 %argc, i8 **%argv, i8 **%envp)
-begin
- %retval = call i31 (i31) *@test(i31 %argc)
- %two = add i31 %retval, %retval
- %retval2 = call i31 @test(i31 %argc)
-
- %two2 = add i31 %two, %retval2
- call void @invoke (%FunTy* @test)
- ret i31 %two2
-end
-
-define i31 @"test"(i31 %i0)
-begin
- ret i31 %i0
-end
diff --git a/test/Integer/small_bt.ll b/test/Integer/small_bt.ll
deleted file mode 100644
index 00fcace..0000000
--- a/test/Integer/small_bt.ll
+++ /dev/null
@@ -1,13 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-%x = type i19
-
-
-define i19 @"foo"(i19 %in)
-begin
-label:
- ret i19 2
-end
-
diff --git a/test/Integer/testalloca_bt.ll b/test/Integer/testalloca_bt.ll
deleted file mode 100644
index e8e73c5..0000000
--- a/test/Integer/testalloca_bt.ll
+++ /dev/null
@@ -1,28 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-%inners = type {float, {i8 } }
-%struct = type { i33 , {float, {i8 } } , i64 }
-
-
-define i33 @testfunction(i33 %i0, i33 %j0)
-begin
- alloca i8, i32 5
- %ptr = alloca i33 ; yields {i33*}:ptr
- store i33 3, i33* %ptr ; yields {void}
- %val = load i33* %ptr ; yields {i33}:val = i33 %3
-
- %sptr = alloca %struct ; yields {%struct*}:sptr
- %nsptr = getelementptr %struct * %sptr, i64 0, i32 1 ; yields {inners*}:nsptr
- %ubsptr = getelementptr %inners * %nsptr, i64 0, i32 1 ; yields {{i8}*}:ubsptr
- %idx = getelementptr {i8} * %ubsptr, i64 0, i32 0
- store i8 4, i8* %idx
-
- %fptr = getelementptr %struct * %sptr, i64 0, i32 1, i32 0 ; yields {float*}:fptr
- store float 4.0, float * %fptr
-
- ret i33 3
-end
-
diff --git a/test/Integer/testarith_bt.ll b/test/Integer/testarith_bt.ll
deleted file mode 100644
index 0820399..0000000
--- a/test/Integer/testarith_bt.ll
+++ /dev/null
@@ -1,21 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-define i31 @"simpleArith"(i31 %i0, i31 %j0)
-begin
- %t1 = add i31 %i0, %j0
- %t2 = sub i31 %i0, %j0
- %t3 = mul i31 %t1, %t2
- %t4 = udiv i31 %t1, %t2
- %t5 = sdiv i31 %t1, %t2
- %t6 = urem i31 %t1, %t2
- %t7 = srem i31 %t1, %t2
- %t8 = shl i31 %t1, 9
- %t9 = lshr i31 %t1, 9
- %t10= ashr i31 %t1, 9
- %f1 = sitofp i31 %t1 to float
- %f2 = fdiv float 4.0, %f1
- ret i31 %t3
-end
diff --git a/test/Integer/testconstants_bt.ll b/test/Integer/testconstants_bt.ll
deleted file mode 100644
index 8ca49cf..0000000
--- a/test/Integer/testconstants_bt.ll
+++ /dev/null
@@ -1,32 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; 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 ]
- constant { i55, i55 } { i55 4, i55 3 }
-
-
-define [2 x i55]* @testfunction(i55 %i0, i55 %j0)
-begin
- ret [2x i55]* @array
-end
-
-define i8* @otherfunc(i55, double)
-begin
- %somestr = getelementptr [11x i8]* @somestr, i64 0, i64 0
- ret i8* %somestr
-end
-
-define i8* @yetanotherfunc(i55, double)
-begin
- ret i8* null ; Test null
-end
-
-define i55 @negativeUnsigned() {
- ret i55 -1
-}
-
-define i55 @largeSigned() {
- ret i55 3900000000
-}
diff --git a/test/Integer/testicmp_bt.ll b/test/Integer/testicmp_bt.ll
deleted file mode 100644
index 40a2465..0000000
--- a/test/Integer/testicmp_bt.ll
+++ /dev/null
@@ -1,23 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-define i31 @"simpleIcmp"(i31 %i0, i31 %j0)
-begin
- %t1 = icmp eq i31 %i0, %j0
- %t2 = icmp ne i31 %i0, %j0
- %t3 = icmp ult i31 %i0, %j0
- %t4 = icmp sgt i31 %i0, %j0
- %t5 = icmp ule i31 %i0, %j0
- %t6 = icmp sge i31 %i0, %j0
-
- %t7 = icmp eq i31 %i0, 1098765432
- %t8 = icmp ne i31 %i0, -31415926
-
- %t9 = icmp ult i31 10000, %j0
- %t10 = icmp sgt i31 -10000, %j0
-
-
- ret i31 %i0
-end
diff --git a/test/Integer/testlogical_bt.ll b/test/Integer/testlogical_bt.ll
deleted file mode 100644
index a2c927d..0000000
--- a/test/Integer/testlogical_bt.ll
+++ /dev/null
@@ -1,13 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-define i31 @"simpleAdd"(i31 %i0, i31 %j0)
-begin
- %t1 = xor i31 %i0, %j0
- %t2 = or i31 %i0, %j0
- %t3 = and i31 %t1, %t2
- ret i31 %t3
-end
-
diff --git a/test/Integer/testlogical_new_bt.ll b/test/Integer/testlogical_new_bt.ll
deleted file mode 100644
index 49a26dc..0000000
--- a/test/Integer/testlogical_new_bt.ll
+++ /dev/null
@@ -1,15 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-define i31 @"simpleAdd"(i31 %i0, i31 %j0)
-begin
- %t1 = xor i31 %i0, %j0
- %t2 = or i31 %i0, %j0
- %t3 = and i31 %t1, %t2
- %t4 = shl i31 %i0, 2
- %t5 = ashr i31 %i0, 2
- %t6 = lshr i31 %j0, 22
- ret i31 %t3
-end
diff --git a/test/Integer/testswitch_bt.ll b/test/Integer/testswitch_bt.ll
deleted file mode 100644
index bf7cdc5..0000000
--- a/test/Integer/testswitch_bt.ll
+++ /dev/null
@@ -1,24 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
- %i35 = type i35
-
-
-define i35 @"squared"(%i35 %i0)
-begin
- switch i35 %i0, label %Default [
- i35 1, label %Case1
- i35 2, label %Case2
- i35 4, label %Case4 ]
-
-Default:
- ret i35 -1 ; Unrecognized input value
-
-Case1:
- ret i35 1
-Case2:
- ret i35 4
-Case4:
- ret i35 16
-end
diff --git a/test/Integer/testvarargs_bt.ll b/test/Integer/testvarargs_bt.ll
deleted file mode 100644
index 3227d14..0000000
--- a/test/Integer/testvarargs_bt.ll
+++ /dev/null
@@ -1,14 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-
-declare i31 @"printf"(i8*, ...) ;; Prototype for: i32 __builtin_printf(const char*, ...)
-
-define i31 @"testvarar"()
-begin
- call i31(i8*, ...) *@printf(i8 * null, i31 12, i8 42)
- ret i31 %1
-end
-
-
diff --git a/test/MC/AsmParser/directive_comm.s b/test/MC/AsmParser/directive_comm.s
index 6cc7937..5e60ab7 100644
--- a/test/MC/AsmParser/directive_comm.s
+++ b/test/MC/AsmParser/directive_comm.s
@@ -3,6 +3,8 @@
# CHECK: TEST0:
# CHECK: .comm a,6,2
# CHECK: .comm b,8
+# CHECK: .comm c,8
TEST0:
.comm a, 4+2, 2
.comm b,8
+ .common c,8
diff --git a/test/MC/X86/x86-64.s b/test/MC/X86/x86-64.s
index a36ba25..472748f 100644
--- a/test/MC/X86/x86-64.s
+++ b/test/MC/X86/x86-64.s
@@ -1128,3 +1128,11 @@ xsetbv // CHECK: xsetbv # encoding: [0x0f,0x01,0xd1]
// CHECK: strq
// CHECK: encoding: [0x48,0x0f,0x00,0xc8]
str %rax
+
+// CHECK: movd %rdi, %xmm0
+// CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7]
+ movq %rdi,%xmm0
+
+// CHECK: movd %rdi, %xmm0
+// CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7]
+ movd %rdi,%xmm0
diff --git a/test/Makefile b/test/Makefile
index e38226a..4e34e72 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -171,15 +171,21 @@ site.exp: FORCE
@test ! -f site.exp || mv site.exp site.bak
@mv site.tmp site.exp
+ifeq ($(DISABLE_ASSERTIONS),1)
+ENABLE_ASSERTIONS=0
+else
+ENABLE_ASSERTIONS=1
+endif
+
lit.site.cfg: site.exp
@echo "Making LLVM 'lit.site.cfg' file..."
@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
- @$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> lit.tmp
@$(ECHOPATH) s=@LLVMGCCDIR@=$(LLVMGCCDIR)=g >> lit.tmp
@$(ECHOPATH) s=@PYTHON_EXECUTABLE@=python=g >> lit.tmp
@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp
+ @$(ECHOPATH) s=@LLVM_ENABLE_ASSERTIONS@=$(ENABLE_ASSERTIONS)=g >> lit.tmp
@sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
@-rm -f lit.tmp
diff --git a/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll b/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll
index 43462fa..8910bda 100644
--- a/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll
+++ b/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll
@@ -1,7 +1,6 @@
; RUN: opt < %s -adce
-define i32 @"main"(i32 %argc)
-begin
+define i32 @"main"(i32 %argc) {
br label %2
%retval = phi i32 [ %argc, %2 ] ; <i32> [#uses=2]
@@ -9,5 +8,4 @@ begin
ret i32 %two
br label %1
-end
-
+}
diff --git a/test/Transforms/DeadStoreElimination/crash.ll b/test/Transforms/DeadStoreElimination/crash.ll
index bb279cd..148695f 100644
--- a/test/Transforms/DeadStoreElimination/crash.ll
+++ b/test/Transforms/DeadStoreElimination/crash.ll
@@ -36,11 +36,11 @@ bb14: ; preds = %bb4
%6 = getelementptr inbounds i16* %2, i64 undef ; <i16*> [#uses=1]
store i16 undef, i16* %6, align 2
%7 = getelementptr inbounds i8* %5, i64 undef ; <i8*> [#uses=1]
- call void @llvm.memcpy.i64(i8* %7, i8* undef, i64 undef, i32 1) nounwind
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %7, i8* undef, i64 undef, i32 1, i1 false)
unreachable
}
-declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
; rdar://7635088
diff --git a/test/Transforms/DeadStoreElimination/lifetime.ll b/test/Transforms/DeadStoreElimination/lifetime.ll
index 2b5cc5a..6785653 100644
--- a/test/Transforms/DeadStoreElimination/lifetime.ll
+++ b/test/Transforms/DeadStoreElimination/lifetime.ll
@@ -4,7 +4,7 @@ target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:1
declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
-declare void @llvm.memset.i8(i8*, i8, i8, i32)
+declare void @llvm.memset.p0i8.i8(i8* nocapture, i8, i8, i32, i1) nounwind
define void @test1() {
; CHECK: @test1
@@ -14,7 +14,7 @@ define void @test1() {
call void @llvm.lifetime.end(i64 1, i8* %A)
; CHECK: lifetime.end
- call void @llvm.memset.i8(i8* %A, i8 0, i8 -1, i32 0)
+ call void @llvm.memset.p0i8.i8(i8* %A, i8 0, i8 -1, i32 0, i1 false)
; CHECK-NOT: memset
ret void
diff --git a/test/Transforms/DeadStoreElimination/memintrinsics.ll b/test/Transforms/DeadStoreElimination/memintrinsics.ll
index e31e9fa..d5c5365 100644
--- a/test/Transforms/DeadStoreElimination/memintrinsics.ll
+++ b/test/Transforms/DeadStoreElimination/memintrinsics.ll
@@ -1,8 +1,8 @@
; RUN: opt -S -dse < %s | FileCheck %s
-declare void @llvm.memcpy.i8(i8*, i8*, i8, i32)
-declare void @llvm.memmove.i8(i8*, i8*, i8, i32)
-declare void @llvm.memset.i8(i8*, i8, i8, i32)
+declare void @llvm.memcpy.p0i8.p0i8.i8(i8* nocapture, i8* nocapture, i8, i32, i1) nounwind
+declare void @llvm.memmove.p0i8.p0i8.i8(i8* nocapture, i8* nocapture, i8, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i8(i8* nocapture, i8, i8, i32, i1) nounwind
define void @test1() {
; CHECK: @test1
@@ -12,7 +12,7 @@ define void @test1() {
store i8 0, i8* %A ;; Written to by memcpy
; CHECK-NOT: store
- call void @llvm.memcpy.i8(i8* %A, i8* %B, i8 -1, i32 0)
+ call void @llvm.memcpy.p0i8.p0i8.i8(i8* %A, i8* %B, i8 -1, i32 0, i1 false)
ret void
; CHECK: ret void
@@ -26,7 +26,7 @@ define void @test2() {
store i8 0, i8* %A ;; Written to by memmove
; CHECK-NOT: store
- call void @llvm.memmove.i8(i8* %A, i8* %B, i8 -1, i32 0)
+ call void @llvm.memmove.p0i8.p0i8.i8(i8* %A, i8* %B, i8 -1, i32 0, i1 false)
ret void
; CHECK: ret void
@@ -40,7 +40,7 @@ define void @test3() {
store i8 0, i8* %A ;; Written to by memset
; CHECK-NOT: store
- call void @llvm.memset.i8(i8* %A, i8 0, i8 -1, i32 0)
+ call void @llvm.memset.p0i8.i8(i8* %A, i8 0, i8 -1, i32 0, i1 false)
ret void
; CHECK: ret void
diff --git a/test/Transforms/DeadStoreElimination/simple.ll b/test/Transforms/DeadStoreElimination/simple.ll
index 23576da..5f143fc 100644
--- a/test/Transforms/DeadStoreElimination/simple.ll
+++ b/test/Transforms/DeadStoreElimination/simple.ll
@@ -3,8 +3,6 @@ target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:1
declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
-declare void @llvm.memset.i64(i8*, i8, i64, i32)
-declare void @llvm.memcpy.i64(i8*, i8*, i64, i32)
declare i8* @llvm.init.trampoline(i8*, i8*, i8*)
define void @test1(i32* %Q, i32* %P) {
@@ -65,7 +63,7 @@ define void @test5(i32* %Q) {
; alias).
define void @test6(i32 *%p, i8 *%q) {
store i32 10, i32* %p, align 4 ;; dead.
- call void @llvm.memset.i64(i8* %q, i8 42, i64 900, i32 1)
+ call void @llvm.memset.p0i8.i64(i8* %q, i8 42, i64 900, i32 1, i1 false)
store i32 30, i32* %p, align 4
ret void
; CHECK: @test6
@@ -76,7 +74,7 @@ define void @test6(i32 *%p, i8 *%q) {
; alias).
define void @test7(i32 *%p, i8 *%q, i8* noalias %r) {
store i32 10, i32* %p, align 4 ;; dead.
- call void @llvm.memcpy.i64(i8* %q, i8* %r, i64 900, i32 1)
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %q, i8* %r, i64 900, i32 1, i1 false)
store i32 30, i32* %p, align 4
ret void
; CHECK: @test7
@@ -184,8 +182,8 @@ define void @test14(i32* %Q) {
;; Fully dead overwrite of memcpy.
define void @test15(i8* %P, i8* %Q) nounwind ssp {
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 12, i32 1)
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 12, i32 1)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
ret void
; CHECK: @test15
; CHECK-NEXT: call void @llvm.memcpy
@@ -194,8 +192,8 @@ define void @test15(i8* %P, i8* %Q) nounwind ssp {
;; Full overwrite of smaller memcpy.
define void @test16(i8* %P, i8* %Q) nounwind ssp {
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 8, i32 1)
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 12, i32 1)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i32 1, i1 false)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
ret void
; CHECK: @test16
; CHECK-NEXT: call void @llvm.memcpy
@@ -204,8 +202,8 @@ define void @test16(i8* %P, i8* %Q) nounwind ssp {
;; Overwrite of memset by memcpy.
define void @test17(i8* %P, i8* noalias %Q) nounwind ssp {
- tail call void @llvm.memset.i64(i8* %P, i8 42, i64 8, i32 1)
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 12, i32 1)
+ tail call void @llvm.memset.p0i8.i64(i8* %P, i8 42, i64 8, i32 1, i1 false)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
ret void
; CHECK: @test17
; CHECK-NEXT: call void @llvm.memcpy
@@ -228,8 +226,8 @@ define void @test17v(i8* %P, i8* %Q) nounwind ssp {
; A = B
; A = A
define void @test18(i8* %P, i8* %Q, i8* %R) nounwind ssp {
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 12, i32 1)
- tail call void @llvm.memcpy.i64(i8* %P, i8* %R, i64 12, i32 1)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i32 1, i1 false)
ret void
; CHECK: @test18
; CHECK-NEXT: call void @llvm.memcpy
diff --git a/test/Transforms/FunctionAttrs/2008-10-04-LocalMemory.ll b/test/Transforms/FunctionAttrs/2008-10-04-LocalMemory.ll
deleted file mode 100644
index faac118..0000000
--- a/test/Transforms/FunctionAttrs/2008-10-04-LocalMemory.ll
+++ /dev/null
@@ -1,64 +0,0 @@
-; RUN: opt < %s -basicaa -functionattrs -S | FileCheck %s
-
-%struct.X = type { i32*, i32* }
-
-declare i32 @g(i32*) readnone
-
-define i32 @f() {
-; CHECK: @f() readnone
- %x = alloca i32 ; <i32*> [#uses=2]
- store i32 0, i32* %x
- %y = call i32 @g(i32* %x) ; <i32> [#uses=1]
- ret i32 %y
-}
-
-define i32 @foo() nounwind {
-; CHECK: @foo() nounwind readonly
-entry:
- %y = alloca %struct.X ; <%struct.X*> [#uses=2]
- %x = alloca %struct.X ; <%struct.X*> [#uses=2]
- %j = alloca i32 ; <i32*> [#uses=2]
- %i = alloca i32 ; <i32*> [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- store i32 0, i32* %i, align 4
- store i32 1, i32* %j, align 4
- %0 = getelementptr inbounds %struct.X* %y, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %i, i32** %0, align 8
- %1 = getelementptr inbounds %struct.X* %x, i32 0, i32 1 ; <i32**> [#uses=1]
- store i32* %j, i32** %1, align 8
- %x1 = bitcast %struct.X* %x to i8* ; <i8*> [#uses=2]
- %y2 = bitcast %struct.X* %y to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i64(i8* %x1, i8* %y2, i64 8, i32 1)
- %2 = bitcast i8* %x1 to i32** ; <i32**> [#uses=1]
- %3 = load i32** %2, align 8 ; <i32*> [#uses=1]
- %4 = load i32* %3, align 4 ; <i32> [#uses=1]
- br label %return
-
-return: ; preds = %entry
- ret i32 %4
-}
-
-define i32 @t(i32 %a, i32 %b, i32 %c) nounwind {
-; CHECK: @t(i32 %a, i32 %b, i32 %c) nounwind readnone
-entry:
- %a.addr = alloca i32 ; <i32*> [#uses=3]
- %c.addr = alloca i32 ; <i32*> [#uses=2]
- store i32 %a, i32* %a.addr
- store i32 %c, i32* %c.addr
- %tmp = load i32* %a.addr ; <i32> [#uses=1]
- %tobool = icmp ne i32 %tmp, 0 ; <i1> [#uses=1]
- br i1 %tobool, label %if.then, label %if.else
-
-if.then: ; preds = %entry
- br label %if.end
-
-if.else: ; preds = %entry
- br label %if.end
-
-if.end: ; preds = %if.else, %if.then
- %p.0 = phi i32* [ %a.addr, %if.then ], [ %c.addr, %if.else ] ; <i32*> [#uses=1]
- %tmp2 = load i32* %p.0 ; <i32> [#uses=1]
- ret i32 %tmp2
-}
-
-declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
diff --git a/test/Transforms/GVN/2008-02-24-NonDominatedMemcpy.ll b/test/Transforms/GVN/2008-02-24-NonDominatedMemcpy.ll
deleted file mode 100644
index 9a75e1a..0000000
--- a/test/Transforms/GVN/2008-02-24-NonDominatedMemcpy.ll
+++ /dev/null
@@ -1,25 +0,0 @@
-; RUN: opt < %s -gvn -dse -S | grep {call.*memcpy} | count 1
-
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
-target triple = "x86_64-apple-darwin8"
- %struct.ggFrame3 = type { %struct.ggPoint3, %struct.ggONB3 }
- %struct.ggHMatrix3 = type { [4 x [4 x double]] }
- %struct.ggONB3 = type { %struct.ggPoint3, %struct.ggPoint3, %struct.ggPoint3 }
- %struct.ggPoint3 = type { [3 x double] }
- %struct.ggQuaternion = type { [4 x double], i32, %struct.ggHMatrix3 }
-
-declare void @llvm.memcpy.i64(i8*, i8*, i64, i32) nounwind
-
-define void @_Z10ggCRSplineRK8ggFrame3S1_S1_S1_d(%struct.ggFrame3* noalias sret %agg.result, %struct.ggFrame3* %f0, %struct.ggFrame3* %f1, %struct.ggFrame3* %f2, %struct.ggFrame3* %f3, double %t) nounwind {
-entry:
- %qresult = alloca %struct.ggQuaternion ; <%struct.ggQuaternion*> [#uses=1]
- %tmp = alloca %struct.ggONB3 ; <%struct.ggONB3*> [#uses=2]
- call void @_ZN12ggQuaternion7getONB3Ev( %struct.ggONB3* noalias sret %tmp, %struct.ggQuaternion* %qresult ) nounwind
- %tmp1.i = getelementptr %struct.ggFrame3* %agg.result, i32 0, i32 1 ; <%struct.ggONB3*> [#uses=1]
- %tmp13.i = bitcast %struct.ggONB3* %tmp1.i to i8* ; <i8*> [#uses=1]
- %tmp24.i = bitcast %struct.ggONB3* %tmp to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i64( i8* %tmp13.i, i8* %tmp24.i, i64 72, i32 8 ) nounwind
- ret void
-}
-
-declare void @_ZN12ggQuaternion7getONB3Ev(%struct.ggONB3* noalias sret , %struct.ggQuaternion*) nounwind
diff --git a/test/Transforms/GVN/2008-02-26-MemCpySize.ll b/test/Transforms/GVN/2008-02-26-MemCpySize.ll
deleted file mode 100644
index 6ed8a76..0000000
--- a/test/Transforms/GVN/2008-02-26-MemCpySize.ll
+++ /dev/null
@@ -1,46 +0,0 @@
-; RUN: opt < %s -gvn -dse -S | grep {call.*memcpy.*cell} | count 2
-; PR2099
-
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
-target triple = "i686-apple-darwin9"
- %struct.s = type { [11 x i8], i32 }
-@.str = internal constant [11 x i8] c"0123456789\00" ; <[11 x i8]*> [#uses=1]
-@cell = weak global %struct.s zeroinitializer ; <%struct.s*> [#uses=2]
-
-declare i32 @check(%struct.s* byval %p) nounwind
-
-declare i32 @strcmp(i8*, i8*) nounwind readonly
-
-define i32 @main() noreturn nounwind {
-entry:
- %p = alloca %struct.s, align 8 ; <%struct.s*> [#uses=2]
- store i32 99, i32* getelementptr (%struct.s* @cell, i32 0, i32 1), align 4
- call void @llvm.memcpy.i32( i8* getelementptr (%struct.s* @cell, i32 0, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str, i32 0, i32 0), i32 11, i32 1 )
- %tmp = getelementptr %struct.s* %p, i32 0, i32 0, i32 0 ; <i8*> [#uses=2]
- call void @llvm.memcpy.i64( i8* %tmp, i8* getelementptr (%struct.s* @cell, i32 0, i32 0, i32 0), i64 16, i32 8 )
- %tmp1.i = getelementptr %struct.s* %p, i32 0, i32 1 ; <i32*> [#uses=1]
- %tmp2.i = load i32* %tmp1.i, align 4 ; <i32> [#uses=1]
- %tmp3.i = icmp eq i32 %tmp2.i, 99 ; <i1> [#uses=1]
- br i1 %tmp3.i, label %bb5.i, label %bb
-
-bb5.i: ; preds = %entry
- %tmp91.i = call i32 @strcmp( i8* %tmp, i8* getelementptr ([11 x i8]* @.str, i32 0, i32 0) ) nounwind readonly ; <i32> [#uses=1]
- %tmp53 = icmp eq i32 %tmp91.i, 0 ; <i1> [#uses=1]
- br i1 %tmp53, label %bb7, label %bb
-
-bb: ; preds = %bb5.i, %entry
- call void @abort( ) noreturn nounwind
- unreachable
-
-bb7: ; preds = %bb5.i
- call void @exit( i32 0 ) noreturn nounwind
- unreachable
-}
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
-
-declare void @abort() noreturn nounwind
-
-declare void @exit(i32) noreturn nounwind
-
-declare void @llvm.memcpy.i64(i8*, i8*, i64, i32) nounwind
diff --git a/test/Transforms/GVN/2011-04-27-phioperands.ll b/test/Transforms/GVN/2011-04-27-phioperands.ll
new file mode 100644
index 0000000..6e5075d
--- /dev/null
+++ b/test/Transforms/GVN/2011-04-27-phioperands.ll
@@ -0,0 +1,106 @@
+; RUN: opt %s -gvn -disable-output
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-f128:128:128-n8:16:32:64"
+
+@nuls = external global [10 x i8]
+
+define fastcc void @p_ere() nounwind {
+entry:
+ br label %"<bb 5>"
+
+"<L18>.i":
+ br i1 undef, label %"<bb 3>.i30.i", label %doemit.exit51.i
+
+"<bb 3>.i30.i":
+ unreachable
+
+doemit.exit51.i:
+ br label %"<bb 53>.i"
+
+"<L19>.i":
+ br i1 undef, label %"<bb 3>.i55.i", label %doemit.exit76.i
+
+"<bb 3>.i55.i":
+ unreachable
+
+doemit.exit76.i:
+ br label %"<bb 53>.i"
+
+"<L98>.i":
+ store i8* getelementptr inbounds ([10 x i8]* @nuls, i64 0, i64 0), i8** undef, align 8
+ br label %"<bb 53>.i"
+
+"<L99>.i":
+ br label %"<bb 53>.i"
+
+"<L24>.i":
+ br i1 undef, label %"<bb 53>.i", label %"<bb 35>.i"
+
+"<bb 35>.i":
+ br label %"<bb 53>.i"
+
+"<L28>.i":
+ br label %"<bb 53>.i"
+
+"<L29>.i":
+ br label %"<bb 53>.i"
+
+"<L39>.i":
+ br label %"<bb 53>.i"
+
+"<bb 53>.i":
+ %wascaret_2.i = phi i32 [ 0, %"<L39>.i" ], [ 0, %"<L29>.i" ], [ 0, %"<L28>.i" ], [ 0, %"<bb 35>.i" ], [ 0, %"<L99>.i" ], [ 0, %"<L98>.i" ], [ 0, %doemit.exit76.i ], [ 1, %doemit.exit51.i ], [ 0, %"<L24>.i" ]
+ %D.5496_84.i = load i8** undef, align 8
+ br i1 undef, label %"<bb 54>.i", label %"<bb 5>"
+
+"<bb 54>.i":
+ br i1 undef, label %"<bb 5>", label %"<bb 58>.i"
+
+"<bb 58>.i":
+ br i1 undef, label %"<bb 64>.i", label %"<bb 59>.i"
+
+"<bb 59>.i":
+ br label %"<bb 64>.i"
+
+"<bb 64>.i":
+ switch i32 undef, label %"<bb 5>" [
+ i32 42, label %"<L54>.i"
+ i32 43, label %"<L55>.i"
+ i32 63, label %"<L56>.i"
+ i32 123, label %"<bb 5>.i258.i"
+ ]
+
+"<L54>.i":
+ br i1 undef, label %"<bb 3>.i105.i", label %doemit.exit127.i
+
+"<bb 3>.i105.i":
+ unreachable
+
+doemit.exit127.i:
+ unreachable
+
+"<L55>.i":
+ br i1 undef, label %"<bb 3>.i157.i", label %"<bb 5>"
+
+"<bb 3>.i157.i":
+ unreachable
+
+"<L56>.i":
+ br label %"<bb 5>"
+
+"<bb 5>.i258.i":
+ unreachable
+
+"<bb 5>":
+ switch i32 undef, label %"<L39>.i" [
+ i32 36, label %"<L19>.i"
+ i32 94, label %"<L18>.i"
+ i32 124, label %"<L98>.i"
+ i32 42, label %"<L99>.i"
+ i32 43, label %"<L99>.i"
+ i32 46, label %"<L24>.i"
+ i32 63, label %"<L99>.i"
+ i32 91, label %"<L28>.i"
+ i32 92, label %"<L29>.i"
+ ]
+}
diff --git a/test/Transforms/GVN/nonescaping-malloc.ll b/test/Transforms/GVN/nonescaping-malloc.ll
index 1d50205..dba9d81 100644
--- a/test/Transforms/GVN/nonescaping-malloc.ll
+++ b/test/Transforms/GVN/nonescaping-malloc.ll
@@ -20,13 +20,13 @@ target triple = "x86_64-apple-darwin10.0"
define %"struct.llvm::StringMapEntry<void*>"* @_Z3fooRN4llvm9StringMapIPvNS_15MallocAllocatorEEEPKc(%"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %X, i8* %P) ssp {
entry:
- %tmp = alloca %"struct.llvm::StringRef", align 8 ; <%"struct.llvm::StringRef"*> [#uses=3]
- %tmp.i = getelementptr inbounds %"struct.llvm::StringRef"* %tmp, i64 0, i32 0 ; <i8**> [#uses=1]
+ %tmp = alloca %"struct.llvm::StringRef", align 8
+ %tmp.i = getelementptr inbounds %"struct.llvm::StringRef"* %tmp, i64 0, i32 0
store i8* %P, i8** %tmp.i, align 8
- %tmp1.i = call i64 @strlen(i8* %P) nounwind readonly ; <i64> [#uses=1]
- %tmp2.i = getelementptr inbounds %"struct.llvm::StringRef"* %tmp, i64 0, i32 1 ; <i64*> [#uses=1]
+ %tmp1.i = call i64 @strlen(i8* %P) nounwind readonly
+ %tmp2.i = getelementptr inbounds %"struct.llvm::StringRef"* %tmp, i64 0, i32 1
store i64 %tmp1.i, i64* %tmp2.i, align 8
- %tmp1 = call %"struct.llvm::StringMapEntry<void*>"* @_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueERKNS_9StringRefE(%"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %X, %"struct.llvm::StringRef"* %tmp) ssp ; <%"struct.llvm::StringMapEntry<void*>"*> [#uses=1]
+ %tmp1 = call %"struct.llvm::StringMapEntry<void*>"* @_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueERKNS_9StringRefE(%"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %X, %"struct.llvm::StringRef"* %tmp) ssp
ret %"struct.llvm::StringMapEntry<void*>"* %tmp1
}
@@ -34,75 +34,75 @@ declare i64 @strlen(i8* nocapture) nounwind readonly
declare noalias i8* @malloc(i64) nounwind
-declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
-
declare i32 @_ZN4llvm13StringMapImpl15LookupBucketForENS_9StringRefE(%"struct.llvm::StringMapImpl"*, i64, i64)
define linkonce_odr %"struct.llvm::StringMapEntry<void*>"* @_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueERKNS_9StringRefE(%"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, %"struct.llvm::StringRef"* nocapture %Key) ssp align 2 {
entry:
- %elt = bitcast %"struct.llvm::StringRef"* %Key to i64* ; <i64*> [#uses=1]
- %val = load i64* %elt ; <i64> [#uses=3]
- %tmp = getelementptr inbounds %"struct.llvm::StringRef"* %Key, i64 0, i32 1 ; <i64*> [#uses=1]
- %val2 = load i64* %tmp ; <i64> [#uses=2]
- %tmp2.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0 ; <%"struct.llvm::StringMapImpl"*> [#uses=1]
- %tmp3.i = tail call i32 @_ZN4llvm13StringMapImpl15LookupBucketForENS_9StringRefE(%"struct.llvm::StringMapImpl"* %tmp2.i, i64 %val, i64 %val2) ; <i32> [#uses=1]
- %tmp4.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0, i32 0 ; <%"struct.llvm::StringMapImpl::ItemBucket"**> [#uses=1]
- %tmp5.i = load %"struct.llvm::StringMapImpl::ItemBucket"** %tmp4.i, align 8 ; <%"struct.llvm::StringMapImpl::ItemBucket"*> [#uses=1]
- %tmp6.i = zext i32 %tmp3.i to i64 ; <i64> [#uses=1]
- %tmp7.i = getelementptr inbounds %"struct.llvm::StringMapImpl::ItemBucket"* %tmp5.i, i64 %tmp6.i, i32 1 ; <%"struct.llvm::StringMapEntryBase"**> [#uses=2]
- %tmp8.i = load %"struct.llvm::StringMapEntryBase"** %tmp7.i, align 8 ; <%"struct.llvm::StringMapEntryBase"*> [#uses=3]
- %tmp9.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp8.i, null ; <i1> [#uses=1]
- %tmp13.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp8.i, inttoptr (i64 -1 to %"struct.llvm::StringMapEntryBase"*) ; <i1> [#uses=1]
- %or.cond.i = or i1 %tmp9.i, %tmp13.i ; <i1> [#uses=1]
+ %elt = bitcast %"struct.llvm::StringRef"* %Key to i64*
+ %val = load i64* %elt
+ %tmp = getelementptr inbounds %"struct.llvm::StringRef"* %Key, i64 0, i32 1
+ %val2 = load i64* %tmp
+ %tmp2.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0
+ %tmp3.i = tail call i32 @_ZN4llvm13StringMapImpl15LookupBucketForENS_9StringRefE(%"struct.llvm::StringMapImpl"* %tmp2.i, i64 %val, i64 %val2)
+ %tmp4.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0, i32 0
+ %tmp5.i = load %"struct.llvm::StringMapImpl::ItemBucket"** %tmp4.i, align 8
+ %tmp6.i = zext i32 %tmp3.i to i64
+ %tmp7.i = getelementptr inbounds %"struct.llvm::StringMapImpl::ItemBucket"* %tmp5.i, i64 %tmp6.i, i32 1
+ %tmp8.i = load %"struct.llvm::StringMapEntryBase"** %tmp7.i, align 8
+ %tmp9.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp8.i, null
+ %tmp13.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp8.i, inttoptr (i64 -1 to %"struct.llvm::StringMapEntryBase"*)
+ %or.cond.i = or i1 %tmp9.i, %tmp13.i
br i1 %or.cond.i, label %bb4.i, label %bb6.i
bb4.i: ; preds = %entry
- %tmp41.i = inttoptr i64 %val to i8* ; <i8*> [#uses=2]
- %tmp4.i35.i = getelementptr inbounds i8* %tmp41.i, i64 %val2 ; <i8*> [#uses=1]
- %tmp.i.i = ptrtoint i8* %tmp4.i35.i to i64 ; <i64> [#uses=1]
- %tmp1.i.i = trunc i64 %tmp.i.i to i32 ; <i32> [#uses=1]
- %tmp3.i.i = trunc i64 %val to i32 ; <i32> [#uses=1]
- %tmp4.i.i = sub i32 %tmp1.i.i, %tmp3.i.i ; <i32> [#uses=3]
- %tmp5.i.i = add i32 %tmp4.i.i, 17 ; <i32> [#uses=1]
- %tmp8.i.i = zext i32 %tmp5.i.i to i64 ; <i64> [#uses=1]
- %tmp.i20.i.i = tail call noalias i8* @malloc(i64 %tmp8.i.i) nounwind ; <i8*> [#uses=7]
- %tmp10.i.i = bitcast i8* %tmp.i20.i.i to %"struct.llvm::StringMapEntry<void*>"* ; <%"struct.llvm::StringMapEntry<void*>"*> [#uses=2]
- %tmp12.i.i = icmp eq i8* %tmp.i20.i.i, null ; <i1> [#uses=1]
+ %tmp41.i = inttoptr i64 %val to i8*
+ %tmp4.i35.i = getelementptr inbounds i8* %tmp41.i, i64 %val2
+ %tmp.i.i = ptrtoint i8* %tmp4.i35.i to i64
+ %tmp1.i.i = trunc i64 %tmp.i.i to i32
+ %tmp3.i.i = trunc i64 %val to i32
+ %tmp4.i.i = sub i32 %tmp1.i.i, %tmp3.i.i
+ %tmp5.i.i = add i32 %tmp4.i.i, 17
+ %tmp8.i.i = zext i32 %tmp5.i.i to i64
+ %tmp.i20.i.i = tail call noalias i8* @malloc(i64 %tmp8.i.i) nounwind
+ %tmp10.i.i = bitcast i8* %tmp.i20.i.i to %"struct.llvm::StringMapEntry<void*>"*
+ %tmp12.i.i = icmp eq i8* %tmp.i20.i.i, null
br i1 %tmp12.i.i, label %_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i, label %bb.i.i
bb.i.i: ; preds = %bb4.i
- %tmp.i.i.i.i = bitcast i8* %tmp.i20.i.i to i32* ; <i32*> [#uses=1]
+ %tmp.i.i.i.i = bitcast i8* %tmp.i20.i.i to i32*
store i32 %tmp4.i.i, i32* %tmp.i.i.i.i, align 4
- %tmp1.i19.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 8 ; <i8*> [#uses=1]
- %0 = bitcast i8* %tmp1.i19.i.i to i8** ; <i8**> [#uses=1]
+ %tmp1.i19.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 8
+ %0 = bitcast i8* %tmp1.i19.i.i to i8**
store i8* null, i8** %0, align 8
br label %_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i
-_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i: ; preds = %bb4.i, %bb.i.i
- %tmp.i18.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 16 ; <i8*> [#uses=1]
- %tmp15.i.i = zext i32 %tmp4.i.i to i64 ; <i64> [#uses=2]
- tail call void @llvm.memcpy.i64(i8* %tmp.i18.i.i, i8* %tmp41.i, i64 %tmp15.i.i, i32 1) nounwind
- %tmp.i18.sum.i.i = add i64 %tmp15.i.i, 16 ; <i64> [#uses=1]
- %tmp17.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 %tmp.i18.sum.i.i ; <i8*> [#uses=1]
+_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i: ; preds = %bb.i.i, %bb4.i
+ %tmp.i18.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 16
+ %tmp15.i.i = zext i32 %tmp4.i.i to i64
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp.i18.i.i, i8* %tmp41.i, i64 %tmp15.i.i, i32 1, i1 false)
+ %tmp.i18.sum.i.i = add i64 %tmp15.i.i, 16
+ %tmp17.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 %tmp.i18.sum.i.i
store i8 0, i8* %tmp17.i.i, align 1
- %tmp.i.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 8 ; <i8*> [#uses=1]
- %1 = bitcast i8* %tmp.i.i.i to i8** ; <i8**> [#uses=1]
+ %tmp.i.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 8
+ %1 = bitcast i8* %tmp.i.i.i to i8**
store i8* null, i8** %1, align 8
- %tmp22.i = load %"struct.llvm::StringMapEntryBase"** %tmp7.i, align 8 ; <%"struct.llvm::StringMapEntryBase"*> [#uses=1]
- %tmp24.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp22.i, inttoptr (i64 -1 to %"struct.llvm::StringMapEntryBase"*) ; <i1> [#uses=1]
+ %tmp22.i = load %"struct.llvm::StringMapEntryBase"** %tmp7.i, align 8
+ %tmp24.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp22.i, inttoptr (i64 -1 to %"struct.llvm::StringMapEntryBase"*)
br i1 %tmp24.i, label %bb9.i, label %_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueIS1_EERNS_14StringMapEntryIS1_EENS_9StringRefET_.exit
bb6.i: ; preds = %entry
- %tmp16.i = bitcast %"struct.llvm::StringMapEntryBase"* %tmp8.i to %"struct.llvm::StringMapEntry<void*>"* ; <%"struct.llvm::StringMapEntry<void*>"*> [#uses=1]
+ %tmp16.i = bitcast %"struct.llvm::StringMapEntryBase"* %tmp8.i to %"struct.llvm::StringMapEntry<void*>"*
ret %"struct.llvm::StringMapEntry<void*>"* %tmp16.i
bb9.i: ; preds = %_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i
- %tmp25.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0, i32 3 ; <i32*> [#uses=2]
- %tmp26.i = load i32* %tmp25.i, align 8 ; <i32> [#uses=1]
- %tmp27.i = add i32 %tmp26.i, -1 ; <i32> [#uses=1]
+ %tmp25.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0, i32 3
+ %tmp26.i = load i32* %tmp25.i, align 8
+ %tmp27.i = add i32 %tmp26.i, -1
store i32 %tmp27.i, i32* %tmp25.i, align 8
ret %"struct.llvm::StringMapEntry<void*>"* %tmp10.i.i
_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueIS1_EERNS_14StringMapEntryIS1_EENS_9StringRefET_.exit: ; preds = %_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i
ret %"struct.llvm::StringMapEntry<void*>"* %tmp10.i.i
}
+
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
diff --git a/test/Transforms/GVN/rle.ll b/test/Transforms/GVN/rle.ll
index 28b1fc7..2f0d2eb 100644
--- a/test/Transforms/GVN/rle.ll
+++ b/test/Transforms/GVN/rle.ll
@@ -135,7 +135,7 @@ define i8* @coerce_mustalias7(i64 %V, i64* %P) {
define signext i16 @memset_to_i16_local(i16* %A) nounwind ssp {
entry:
%conv = bitcast i16* %A to i8*
- tail call void @llvm.memset.i64(i8* %conv, i8 1, i64 200, i32 1)
+ tail call void @llvm.memset.p0i8.i64(i8* %conv, i8 1, i64 200, i32 1, i1 false)
%arrayidx = getelementptr inbounds i16* %A, i64 42
%tmp2 = load i16* %arrayidx
ret i16 %tmp2
@@ -148,7 +148,7 @@ entry:
define float @memset_to_float_local(float* %A, i8 %Val) nounwind ssp {
entry:
%conv = bitcast float* %A to i8* ; <i8*> [#uses=1]
- tail call void @llvm.memset.i64(i8* %conv, i8 %Val, i64 400, i32 1)
+ tail call void @llvm.memset.p0i8.i64(i8* %conv, i8 %Val, i64 400, i32 1, i1 false)
%arrayidx = getelementptr inbounds float* %A, i64 42 ; <float*> [#uses=1]
%tmp2 = load float* %arrayidx ; <float> [#uses=1]
ret float %tmp2
@@ -168,11 +168,11 @@ define i16 @memset_to_i16_nonlocal0(i16* %P, i1 %cond) {
%P3 = bitcast i16* %P to i8*
br i1 %cond, label %T, label %F
T:
- tail call void @llvm.memset.i64(i8* %P3, i8 1, i64 400, i32 1)
+ tail call void @llvm.memset.p0i8.i64(i8* %P3, i8 1, i64 400, i32 1, i1 false)
br label %Cont
F:
- tail call void @llvm.memset.i64(i8* %P3, i8 2, i64 400, i32 1)
+ tail call void @llvm.memset.p0i8.i64(i8* %P3, i8 2, i64 400, i32 1, i1 false)
br label %Cont
Cont:
@@ -193,7 +193,7 @@ Cont:
define float @memcpy_to_float_local(float* %A) nounwind ssp {
entry:
%conv = bitcast float* %A to i8* ; <i8*> [#uses=1]
- tail call void @llvm.memcpy.i64(i8* %conv, i8* bitcast ({i32, float, i32 }* @GCst to i8*), i64 12, i32 1)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %conv, i8* bitcast ({i32, float, i32 }* @GCst to i8*), i64 12, i32 1, i1 false)
%arrayidx = getelementptr inbounds float* %A, i64 1 ; <float*> [#uses=1]
%tmp2 = load float* %arrayidx ; <float> [#uses=1]
ret float %tmp2
@@ -203,11 +203,6 @@ entry:
}
-declare void @llvm.memset.i64(i8* nocapture, i8, i64, i32) nounwind
-declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
-
-
-
;; non-local i32/float -> i8 load forwarding.
define i8 @coerce_mustalias_nonlocal0(i32* %P, i1 %cond) {
@@ -539,7 +534,7 @@ define i32 @memset_to_load() nounwind readnone {
entry:
%x = alloca [256 x i32], align 4 ; <[256 x i32]*> [#uses=2]
%tmp = bitcast [256 x i32]* %x to i8* ; <i8*> [#uses=1]
- call void @llvm.memset.i64(i8* %tmp, i8 0, i64 1024, i32 4)
+ call void @llvm.memset.p0i8.i64(i8* %tmp, i8 0, i64 1024, i32 4, i1 false)
%arraydecay = getelementptr inbounds [256 x i32]* %x, i32 0, i32 0 ; <i32*>
%tmp1 = load i32* %arraydecay ; <i32> [#uses=1]
ret i32 %tmp1
@@ -643,3 +638,7 @@ entry:
; CHECK-ret i32
}
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
+
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
+
diff --git a/test/Transforms/GlobalOpt/memcpy.ll b/test/Transforms/GlobalOpt/memcpy.ll
index 8f063a2..94e07a0 100644
--- a/test/Transforms/GlobalOpt/memcpy.ll
+++ b/test/Transforms/GlobalOpt/memcpy.ll
@@ -3,13 +3,11 @@
@G1 = internal global [58 x i8] c"asdlfkajsdlfkajsd;lfkajds;lfkjasd;flkajsd;lkfja;sdlkfjasd\00" ; <[58 x i8]*> [#uses=1]
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
define void @foo() {
- %Blah = alloca [58 x i8] ; <[58 x i8]*> [#uses=1]
- %tmp.0 = getelementptr [58 x i8]* %Blah, i32 0, i32 0 ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %tmp.0, i8* getelementptr ([58 x i8]* @G1, i32 0, i32 0), i32 58, i32 1 )
- ret void
+ %Blah = alloca [58 x i8]
+ %tmp.0 = getelementptr [58 x i8]* %Blah, i32 0, i32 0
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp.0, i8* getelementptr inbounds ([58 x i8]* @G1, i32 0, i32 0), i32 58, i32 1, i1 false)
+ ret void
}
-
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/GlobalOpt/memset.ll b/test/Transforms/GlobalOpt/memset.ll
index a9b9d5e..3bb5ce9 100644
--- a/test/Transforms/GlobalOpt/memset.ll
+++ b/test/Transforms/GlobalOpt/memset.ll
@@ -1,21 +1,18 @@
; both globals are write only, delete them.
-; RUN: opt < %s -globalopt -S | \
-; RUN: not grep internal
+; RUN: opt < %s -globalopt -S | not grep internal
@G0 = internal global [58 x i8] c"asdlfkajsdlfkajsd;lfkajds;lfkjasd;flkajsd;lkfja;sdlkfjasd\00" ; <[58 x i8]*> [#uses=1]
@G1 = internal global [4 x i32] [ i32 1, i32 2, i32 3, i32 4 ] ; <[4 x i32]*> [#uses=1]
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
-declare void @llvm.memset.i32(i8*, i8, i32, i32)
-
define void @foo() {
- %Blah = alloca [58 x i8] ; <[58 x i8]*> [#uses=1]
- %tmp3 = bitcast [58 x i8]* %Blah to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* bitcast ([4 x i32]* @G1 to i8*), i8* %tmp3, i32 16, i32 1 )
- call void @llvm.memset.i32( i8* getelementptr ([58 x i8]* @G0, i32 0, i32 0), i8 17, i32 58, i32 1 )
- ret void
+ %Blah = alloca [58 x i8]
+ %tmp3 = bitcast [58 x i8]* %Blah to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([4 x i32]* @G1 to i8*), i8* %tmp3, i32 16, i32 1, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* getelementptr inbounds ([58 x i8]* @G0, i32 0, i32 0), i8 17, i32 58, i32 1, i1 false)
+ ret void
}
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
diff --git a/test/Transforms/IPConstantProp/return-constants.ll b/test/Transforms/IPConstantProp/return-constants.ll
index 79220dd..2cd99fe 100644
--- a/test/Transforms/IPConstantProp/return-constants.ll
+++ b/test/Transforms/IPConstantProp/return-constants.ll
@@ -4,38 +4,43 @@
;; Check that the second return values didn't get propagated
; RUN: cat %t | grep {%N = add i32 %B, %D}
-define internal {i32, i32} @foo(i1 %Q) {
- br i1 %Q, label %T, label %F
+%0 = type { i32, i32 }
-T: ; preds = %0
- ret i32 21, i32 22
+define internal %0 @foo(i1 %Q) {
+ br i1 %Q, label %T, label %F
-F: ; preds = %0
- ret i32 21, i32 23
+T: ; preds = %0
+ %mrv = insertvalue %0 undef, i32 21, 0
+ %mrv1 = insertvalue %0 %mrv, i32 22, 1
+ ret %0 %mrv1
+
+F: ; preds = %0
+ %mrv2 = insertvalue %0 undef, i32 21, 0
+ %mrv3 = insertvalue %0 %mrv2, i32 23, 1
+ ret %0 %mrv3
}
-define internal {i32, i32} @bar(i1 %Q) {
- %A = insertvalue { i32, i32 } undef, i32 21, 0
- br i1 %Q, label %T, label %F
+define internal %0 @bar(i1 %Q) {
+ %A = insertvalue %0 undef, i32 21, 0
+ br i1 %Q, label %T, label %F
-T: ; preds = %0
- %B = insertvalue { i32, i32 } %A, i32 22, 1
- ret { i32, i32 } %B
+T: ; preds = %0
+ %B = insertvalue %0 %A, i32 22, 1
+ ret %0 %B
-F: ; preds = %0
- %C = insertvalue { i32, i32 } %A, i32 23, 1
- ret { i32, i32 } %C
+F: ; preds = %0
+ %C = insertvalue %0 %A, i32 23, 1
+ ret %0 %C
}
-define { i32, i32 } @caller(i1 %Q) {
- %X = call {i32, i32} @foo( i1 %Q )
- %A = getresult {i32, i32} %X, 0
- %B = getresult {i32, i32} %X, 1
- %Y = call {i32, i32} @bar( i1 %Q )
- %C = extractvalue {i32, i32} %Y, 0
- %D = extractvalue {i32, i32} %Y, 1
- %M = add i32 %A, %C
- %N = add i32 %B, %D
- ret { i32, i32 } %X
+define %0 @caller(i1 %Q) {
+ %X = call %0 @foo(i1 %Q)
+ %A = extractvalue %0 %X, 0
+ %B = extractvalue %0 %X, 1
+ %Y = call %0 @bar(i1 %Q)
+ %C = extractvalue %0 %Y, 0
+ %D = extractvalue %0 %Y, 1
+ %M = add i32 %A, %C
+ %N = add i32 %B, %D
+ ret %0 %X
}
-
diff --git a/test/Transforms/IndVarSimplify/iv-zext.ll b/test/Transforms/IndVarSimplify/iv-zext.ll
index 00018ec..3a05c89 100644
--- a/test/Transforms/IndVarSimplify/iv-zext.ll
+++ b/test/Transforms/IndVarSimplify/iv-zext.ll
@@ -1,4 +1,5 @@
; RUN: opt < %s -indvars -S | FileCheck %s
+; RUN: opt < %s -indvars -disable-iv-rewrite -S | FileCheck %s
; CHECK-NOT: and
; CHECK-NOT: zext
diff --git a/test/Transforms/Inline/2008-03-04-StructRet.ll b/test/Transforms/Inline/2008-03-04-StructRet.ll
deleted file mode 100644
index 3311d56..0000000
--- a/test/Transforms/Inline/2008-03-04-StructRet.ll
+++ /dev/null
@@ -1,28 +0,0 @@
-; RUN: opt < %s -inline -disable-output
- %struct.Benchmark = type { i32 (...)** }
- %struct.Complex = type { double, double }
- %struct.ComplexBenchmark = type { %struct.Benchmark }
-
-define %struct.Complex @_Zml7ComplexS_1(double %a.0, double %a.1, double %b.0, double %b.1) nounwind {
-entry:
- %mrv = alloca %struct.Complex ; <%struct.Complex*> [#uses=2]
- %mrv.gep = getelementptr %struct.Complex* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
- %mrv.ld = load double* %mrv.gep ; <double> [#uses=1]
- %mrv.gep1 = getelementptr %struct.Complex* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
- %mrv.ld2 = load double* %mrv.gep1 ; <double> [#uses=1]
- ret double %mrv.ld, double %mrv.ld2
-}
-
-define void @_ZNK16ComplexBenchmark9oop_styleEv(%struct.ComplexBenchmark* %this) nounwind {
-entry:
- %tmp = alloca %struct.Complex ; <%struct.Complex*> [#uses=0]
- br label %bb31
-bb: ; preds = %bb31
- call %struct.Complex @_Zml7ComplexS_1( double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00 ) nounwind ; <%struct.Complex>:0 [#uses=1]
- %gr = getresult %struct.Complex %0, 1 ; <double> [#uses=0]
- br label %bb31
-bb31: ; preds = %bb, %entry
- br i1 false, label %bb, label %return
-return: ; preds = %bb31
- ret void
-}
diff --git a/test/Transforms/Inline/2008-03-07-Inline-2.ll b/test/Transforms/Inline/2008-03-07-Inline-2.ll
deleted file mode 100644
index 0c968e6..0000000
--- a/test/Transforms/Inline/2008-03-07-Inline-2.ll
+++ /dev/null
@@ -1,53 +0,0 @@
-; RUN: opt < %s -inline -disable-output
- %struct.Demand = type { double, double }
- %struct.branch = type { %struct.Demand, double, double, double, double, %struct.branch*, [12 x %struct.leaf*] }
- %struct.leaf = type { %struct.Demand, double, double }
-@P = external global double ; <double*> [#uses=1]
-
-define %struct.leaf* @build_leaf() nounwind {
-entry:
- unreachable
-}
-
-define %struct.Demand @Compute_Branch2(%struct.branch* %br, double %theta_R, double %theta_I, double %pi_R, double %pi_I) nounwind {
-entry:
- %mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=4]
- %a2 = alloca %struct.Demand ; <%struct.Demand*> [#uses=0]
- br i1 false, label %bb46, label %bb
-bb: ; preds = %entry
- %mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
- %mrv.ld = load double* %mrv.gep ; <double> [#uses=1]
- %mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
- %mrv.ld2 = load double* %mrv.gep1 ; <double> [#uses=1]
- ret double %mrv.ld, double %mrv.ld2
-bb46: ; preds = %entry
- br label %bb72
-bb49: ; preds = %bb72
- call %struct.Demand @Compute_Leaf1( %struct.leaf* null, double 0.000000e+00, double 0.000000e+00 ) nounwind ; <%struct.Demand>:0 [#uses=1]
- %gr = getresult %struct.Demand %0, 1 ; <double> [#uses=0]
- br label %bb72
-bb72: ; preds = %bb49, %bb46
- br i1 false, label %bb49, label %bb77
-bb77: ; preds = %bb72
- %mrv.gep3 = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
- %mrv.ld4 = load double* %mrv.gep3 ; <double> [#uses=1]
- %mrv.gep5 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
- %mrv.ld6 = load double* %mrv.gep5 ; <double> [#uses=1]
- ret double %mrv.ld4, double %mrv.ld6
-}
-
-define %struct.Demand @Compute_Leaf1(%struct.leaf* %l, double %pi_R, double %pi_I) nounwind {
-entry:
- %mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=2]
- %tmp10 = load double* @P, align 8 ; <double> [#uses=1]
- %tmp11 = fcmp olt double %tmp10, 0.000000e+00 ; <i1> [#uses=1]
- br i1 %tmp11, label %bb, label %bb13
-bb: ; preds = %entry
- br label %bb13
-bb13: ; preds = %bb, %entry
- %mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
- %mrv.ld = load double* %mrv.gep ; <double> [#uses=1]
- %mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
- %mrv.ld2 = load double* %mrv.gep1 ; <double> [#uses=1]
- ret double %mrv.ld, double %mrv.ld2
-}
diff --git a/test/Transforms/Inline/2008-03-07-Inline.ll b/test/Transforms/Inline/2008-03-07-Inline.ll
deleted file mode 100644
index 86afb2d..0000000
--- a/test/Transforms/Inline/2008-03-07-Inline.ll
+++ /dev/null
@@ -1,57 +0,0 @@
-; RUN: opt < %s -inline -disable-output
- %struct.Demand = type { double, double }
- %struct.branch = type { %struct.Demand, double, double, double, double, %struct.branch*, [12 x %struct.leaf*] }
- %struct.leaf = type { %struct.Demand, double, double }
-@P = external global double ; <double*> [#uses=1]
-
-define %struct.leaf* @build_leaf() nounwind {
-entry:
- unreachable
-}
-
-define %struct.Demand @Compute_Branch2(%struct.branch* %br, double %theta_R, double %theta_I, double %pi_R, double %pi_I) nounwind {
-entry:
- %mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=4]
- %a2 = alloca %struct.Demand ; <%struct.Demand*> [#uses=0]
- br i1 false, label %bb46, label %bb
-bb: ; preds = %entry
- %mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
- %mrv.ld = load double* %mrv.gep ; <double> [#uses=1]
- %mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
- %mrv.ld2 = load double* %mrv.gep1 ; <double> [#uses=1]
- ret double %mrv.ld, double %mrv.ld2
-bb46: ; preds = %entry
- br label %bb72
-bb49: ; preds = %bb72
- call %struct.Demand @Compute_Leaf1( %struct.leaf* null, double 0.000000e+00, double 0.000000e+00 ) nounwind ; <%struct.Demand>:0 [#uses=1]
- %gr = getresult %struct.Demand %0, 1 ; <double> [#uses=0]
- br label %bb72
-bb72: ; preds = %bb49, %bb46
- br i1 false, label %bb49, label %bb77
-bb77: ; preds = %bb72
- %mrv.gep3 = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
- %mrv.ld4 = load double* %mrv.gep3 ; <double> [#uses=1]
- %mrv.gep5 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
- %mrv.ld6 = load double* %mrv.gep5 ; <double> [#uses=1]
- ret double %mrv.ld4, double %mrv.ld6
-}
-
-define %struct.Demand @Compute_Leaf1(%struct.leaf* %l, double %pi_R, double %pi_I) nounwind {
-entry:
- %mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=4]
- %tmp10 = load double* @P, align 8 ; <double> [#uses=1]
- %tmp11 = fcmp olt double %tmp10, 0.000000e+00 ; <i1> [#uses=1]
- br i1 %tmp11, label %bb, label %bb13
-bb: ; preds = %entry
- %mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
- %mrv.ld = load double* %mrv.gep ; <double> [#uses=1]
- %mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
- %mrv.ld2 = load double* %mrv.gep1 ; <double> [#uses=1]
- ret double %mrv.ld, double %mrv.ld2
-bb13: ; preds = %entry
- %mrv.gep3 = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
- %mrv.ld4 = load double* %mrv.gep3 ; <double> [#uses=1]
- %mrv.gep5 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
- %mrv.ld6 = load double* %mrv.gep5 ; <double> [#uses=1]
- ret double %mrv.ld4, double %mrv.ld6
-}
diff --git a/test/Transforms/Inline/inline-invoke-tail.ll b/test/Transforms/Inline/inline-invoke-tail.ll
index 961f678..462c29a 100644
--- a/test/Transforms/Inline/inline-invoke-tail.ll
+++ b/test/Transforms/Inline/inline-invoke-tail.ll
@@ -4,7 +4,7 @@
define internal void @foo(i32* %p, i32* %q) {
%pp = bitcast i32* %p to i8*
%qq = bitcast i32* %q to i8*
- tail call void @llvm.memcpy.i32(i8* %pp, i8* %qq, i32 4, i32 1)
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %pp, i8* %qq, i32 4, i32 1, i1 false)
ret void
}
@@ -24,12 +24,14 @@ invcont:
lpad:
%eh_ptr = call i8* @llvm.eh.exception()
- %eh_select = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null)
+ %eh_select = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null)
unreachable
}
-declare i8* @llvm.eh.exception() nounwind
+declare i8* @llvm.eh.exception() nounwind readonly
-declare i32 @llvm.eh.selector.i32(i8*, i8*, ...) nounwind
+declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
declare i32 @__gxx_personality_v0(...)
+
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/InstCombine/2006-11-03-Memmove64.ll b/test/Transforms/InstCombine/2006-11-03-Memmove64.ll
deleted file mode 100644
index 35bb45e..0000000
--- a/test/Transforms/InstCombine/2006-11-03-Memmove64.ll
+++ /dev/null
@@ -1,16 +0,0 @@
-; RUN: opt < %s -instcombine -S | \
-; RUN: not grep memmove.i32
-; Instcombine was trying to turn this into a memmove.i32
-
-target datalayout = "e-p:64:64"
-target triple = "alphaev67-unknown-linux-gnu"
-@str10 = internal constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]
-
-define void @do_join(i8* %b) {
-entry:
- call void @llvm.memmove.i64( i8* %b, i8* getelementptr ([1 x i8]* @str10, i32 0, i64 0), i64 1, i32 1 )
- ret void
-}
-
-declare void @llvm.memmove.i64(i8*, i8*, i64, i32)
-
diff --git a/test/Transforms/InstCombine/2007-05-04-Crash.ll b/test/Transforms/InstCombine/2007-05-04-Crash.ll
deleted file mode 100644
index 9f50d8a..0000000
--- a/test/Transforms/InstCombine/2007-05-04-Crash.ll
+++ /dev/null
@@ -1,30 +0,0 @@
-; RUN: opt < %s -instcombine -disable-output
-; PR1384
-
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "i686-apple-darwin8"
- %struct.CFRuntimeBase = type { i32, [4 x i8] }
- %struct.CGColor = type opaque
- %struct.CGColorSpace = type { %struct.CFRuntimeBase, i8, i8, i8, i32, i32, i32, %struct.CGColor*, float*, %struct.CGMD5Signature, %struct.CGMD5Signature*, [0 x %struct.CGColorSpaceDescriptor] }
- %struct.CGColorSpaceCalibratedRGBData = type { [3 x float], [3 x float], [3 x float], [9 x float] }
- %struct.CGColorSpaceDescriptor = type { %struct.CGColorSpaceCalibratedRGBData }
- %struct.CGColorSpaceLabData = type { [3 x float], [3 x float], [4 x float] }
- %struct.CGMD5Signature = type { [16 x i8], i8 }
-
-declare fastcc %struct.CGColorSpace* @CGColorSpaceCreate(i32, i32)
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
-define %struct.CGColorSpace* @CGColorSpaceCreateLab(float* %whitePoint, float* %blackPoint, float* %range) {
-entry:
- %tmp17 = call fastcc %struct.CGColorSpace* @CGColorSpaceCreate( i32 5, i32 3 ) ; <%struct.CGColorSpace*> [#uses=2]
- %tmp28 = getelementptr %struct.CGColorSpace* %tmp17, i32 0, i32 11 ; <[0 x %struct.CGColorSpaceDescriptor]*> [#uses=1]
- %tmp29 = getelementptr [0 x %struct.CGColorSpaceDescriptor]* %tmp28, i32 0, i32 0 ; <%struct.CGColorSpaceDescriptor*> [#uses=1]
- %tmp30 = getelementptr %struct.CGColorSpaceDescriptor* %tmp29, i32 0, i32 0 ; <%struct.CGColorSpaceCalibratedRGBData*> [#uses=1]
- %tmp3031 = bitcast %struct.CGColorSpaceCalibratedRGBData* %tmp30 to %struct.CGColorSpaceLabData* ; <%struct.CGColorSpaceLabData*> [#uses=1]
- %tmp45 = getelementptr %struct.CGColorSpaceLabData* %tmp3031, i32 0, i32 2 ; <[4 x float]*> [#uses=1]
- %tmp46 = getelementptr [4 x float]* %tmp45, i32 0, i32 0 ; <float*> [#uses=1]
- %tmp4648 = bitcast float* %tmp46 to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %tmp4648, i8* null, i32 16, i32 4 )
- ret %struct.CGColorSpace* %tmp17
-}
diff --git a/test/Transforms/InstCombine/2007-05-18-CastFoldBug.ll b/test/Transforms/InstCombine/2007-05-18-CastFoldBug.ll
index 1c24df3..15988b6 100644
--- a/test/Transforms/InstCombine/2007-05-18-CastFoldBug.ll
+++ b/test/Transforms/InstCombine/2007-05-18-CastFoldBug.ll
@@ -3,7 +3,7 @@
define void @blah(i16* %tmp10) {
entry:
- call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend_stret to void (i16* sret )*)( i16* sret %tmp10 )
+ call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend_stret to void (i16*)*)( i16* sret %tmp10 )
ret void
}
diff --git a/test/Transforms/InstCombine/2007-09-11-Trampoline.ll b/test/Transforms/InstCombine/2007-09-11-Trampoline.ll
index d8f3d97..6190aa9 100644
--- a/test/Transforms/InstCombine/2007-09-11-Trampoline.ll
+++ b/test/Transforms/InstCombine/2007-09-11-Trampoline.ll
@@ -15,7 +15,7 @@ entry:
%tmp3 = getelementptr %struct.FRAME.nest* %FRAME.0, i32 0, i32 0 ; <i32*> [#uses=1]
store i32 %n, i32* %tmp3, align 8
%FRAME.06 = bitcast %struct.FRAME.nest* %FRAME.0 to i8* ; <i8*> [#uses=1]
- %tramp = call i8* @llvm.init.trampoline( i8* %TRAMP.216.sub, i8* bitcast (i32 (%struct.FRAME.nest* nest , i32)* @f to i8*), i8* %FRAME.06 ) ; <i8*> [#uses=1]
+ %tramp = call i8* @llvm.init.trampoline( i8* %TRAMP.216.sub, i8* bitcast (i32 (%struct.FRAME.nest* , i32)* @f to i8*), i8* %FRAME.06 ) ; <i8*> [#uses=1]
%tmp7 = getelementptr %struct.FRAME.nest* %FRAME.0, i32 0, i32 1 ; <i32 (i32)**> [#uses=1]
%tmp89 = bitcast i8* %tramp to i32 (i32)* ; <i32 (i32)*> [#uses=2]
store i32 (i32)* %tmp89, i32 (i32)** %tmp7, align 8
diff --git a/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll b/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll
index 710aff2..fe935f9 100644
--- a/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll
+++ b/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll
@@ -6,16 +6,15 @@ target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:1
define void @foo(i8* %P) {
entry:
- %P_addr = alloca i8* ; <i8**> [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- store i8* %P, i8** %P_addr
- %tmp = load i8** %P_addr, align 4 ; <i8*> [#uses=1]
- %tmp1 = getelementptr [4 x i8]* @.str, i32 0, i32 0 ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %tmp, i8* %tmp1, i32 4, i32 1 )
- br label %return
+ %P_addr = alloca i8*
+ store i8* %P, i8** %P_addr
+ %tmp = load i8** %P_addr, align 4
+ %tmp1 = getelementptr [4 x i8]* @.str, i32 0, i32 0
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp, i8* %tmp1, i32 4, i32 1, i1 false)
+ br label %return
-return: ; preds = %entry
- ret void
+return: ; preds = %entry
+ ret void
}
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/InstCombine/2007-11-25-CompatibleAttributes.ll b/test/Transforms/InstCombine/2007-11-25-CompatibleAttributes.ll
index 2109d34..e3192a9 100644
--- a/test/Transforms/InstCombine/2007-11-25-CompatibleAttributes.ll
+++ b/test/Transforms/InstCombine/2007-11-25-CompatibleAttributes.ll
@@ -5,7 +5,7 @@
define i32 @main(i32 %argc, i8** %argv) {
entry:
- %tmp32 = tail call i32 (i8* noalias , ...) * bitcast (i32 (i8*, ...) nounwind * @printf to i32 (i8* noalias , ...) nounwind *)( i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0) , i32 0 ) nounwind ; <i32> [#uses=0]
+ %tmp32 = tail call i32 (i8* , ...) * bitcast (i32 (i8*, ...) * @printf to i32 (i8* , ...) *)( i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0) , i32 0 ) nounwind ; <i32> [#uses=0]
ret i32 undef
}
diff --git a/test/Transforms/InstCombine/2009-02-20-InstCombine-SROA.ll b/test/Transforms/InstCombine/2009-02-20-InstCombine-SROA.ll
index b29d8d2..a51c47d 100644
--- a/test/Transforms/InstCombine/2009-02-20-InstCombine-SROA.ll
+++ b/test/Transforms/InstCombine/2009-02-20-InstCombine-SROA.ll
@@ -4,275 +4,276 @@
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin9.6"
- %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >" = type { i32* }
- %"struct.std::_Vector_base<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" }
- %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" = type { i32*, i32*, i32* }
- %"struct.std::bidirectional_iterator_tag" = type <{ i8 }>
- %"struct.std::forward_iterator_tag" = type <{ i8 }>
- %"struct.std::input_iterator_tag" = type <{ i8 }>
- %"struct.std::random_access_iterator_tag" = type <{ i8 }>
- %"struct.std::vector<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >" }
+
+%"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >" = type { i32* }
+%"struct.std::_Vector_base<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" }
+%"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" = type { i32*, i32*, i32* }
+%"struct.std::bidirectional_iterator_tag" = type <{ i8 }>
+%"struct.std::forward_iterator_tag" = type <{ i8 }>
+%"struct.std::input_iterator_tag" = type <{ i8 }>
+%"struct.std::random_access_iterator_tag" = type <{ i8 }>
+%"struct.std::vector<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >" }
define i32* @_Z3fooRSt6vectorIiSaIiEE(%"struct.std::vector<int,std::allocator<int> >"* %X) {
entry:
- %0 = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >" ; <%"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"*> [#uses=2]
- %__first_addr.i.i = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >" ; <%"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"*> [#uses=31]
- %__last_addr.i.i = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >" ; <%"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"*> [#uses=4]
- %unnamed_arg.i = alloca %"struct.std::bidirectional_iterator_tag", align 8 ; <%"struct.std::bidirectional_iterator_tag"*> [#uses=1]
- %1 = alloca %"struct.std::bidirectional_iterator_tag" ; <%"struct.std::bidirectional_iterator_tag"*> [#uses=1]
- %__first_addr.i = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >" ; <%"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"*> [#uses=2]
- %2 = alloca %"struct.std::bidirectional_iterator_tag" ; <%"struct.std::bidirectional_iterator_tag"*> [#uses=2]
- %3 = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >" ; <%"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"*> [#uses=2]
- %4 = alloca i32 ; <i32*> [#uses=8]
- %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- store i32 42, i32* %4, align 4
- %5 = getelementptr %"struct.std::vector<int,std::allocator<int> >"* %X, i32 0, i32 0 ; <%"struct.std::_Vector_base<int,std::allocator<int> >"*> [#uses=1]
- %6 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >"* %5, i32 0, i32 0 ; <%"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl"*> [#uses=1]
- %7 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl"* %6, i32 0, i32 1 ; <i32**> [#uses=1]
- %8 = load i32** %7, align 4 ; <i32*> [#uses=1]
- %9 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %3, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %8, i32** %9, align 4
- %10 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %3, i32 0, i32 0 ; <i32**> [#uses=1]
- %11 = load i32** %10, align 4 ; <i32*> [#uses=1]
- %tmp2.i = ptrtoint i32* %11 to i32 ; <i32> [#uses=1]
- %tmp1.i = inttoptr i32 %tmp2.i to i32* ; <i32*> [#uses=1]
- %tmp3 = ptrtoint i32* %tmp1.i to i32 ; <i32> [#uses=1]
- %tmp2 = inttoptr i32 %tmp3 to i32* ; <i32*> [#uses=1]
- %12 = getelementptr %"struct.std::vector<int,std::allocator<int> >"* %X, i32 0, i32 0 ; <%"struct.std::_Vector_base<int,std::allocator<int> >"*> [#uses=1]
- %13 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >"* %12, i32 0, i32 0 ; <%"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl"*> [#uses=1]
- %14 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl"* %13, i32 0, i32 0 ; <i32**> [#uses=1]
- %15 = load i32** %14, align 4 ; <i32*> [#uses=1]
- %16 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %0, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %15, i32** %16, align 4
- %17 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %0, i32 0, i32 0 ; <i32**> [#uses=1]
- %18 = load i32** %17, align 4 ; <i32*> [#uses=1]
- %tmp2.i17 = ptrtoint i32* %18 to i32 ; <i32> [#uses=1]
- %tmp1.i18 = inttoptr i32 %tmp2.i17 to i32* ; <i32*> [#uses=1]
- %tmp8 = ptrtoint i32* %tmp1.i18 to i32 ; <i32> [#uses=1]
- %tmp6 = inttoptr i32 %tmp8 to i32* ; <i32*> [#uses=1]
- %19 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %tmp6, i32** %19
- %20 = getelementptr %"struct.std::bidirectional_iterator_tag"* %1, i32 0, i32 0 ; <i8*> [#uses=1]
- %21 = load i8* %20, align 1 ; <i8> [#uses=1]
- %22 = or i8 %21, 0 ; <i8> [#uses=1]
- %23 = or i8 %22, 0 ; <i8> [#uses=1]
- %24 = or i8 %23, 0 ; <i8> [#uses=0]
- %25 = getelementptr %"struct.std::bidirectional_iterator_tag"* %2, i32 0, i32 0 ; <i8*> [#uses=1]
- store i8 0, i8* %25, align 1
- %elt.i = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %val.i = load i32** %elt.i ; <i32*> [#uses=1]
- %tmp.i = bitcast %"struct.std::bidirectional_iterator_tag"* %unnamed_arg.i to i8* ; <i8*> [#uses=1]
- %tmp9.i = bitcast %"struct.std::bidirectional_iterator_tag"* %2 to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i64(i8* %tmp.i, i8* %tmp9.i, i64 1, i32 1)
- %26 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %val.i, i32** %26
- %27 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %tmp2, i32** %27
- %28 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %29 = load i32** %28, align 4 ; <i32*> [#uses=1]
- %30 = ptrtoint i32* %29 to i32 ; <i32> [#uses=1]
- %31 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %32 = load i32** %31, align 4 ; <i32*> [#uses=1]
- %33 = ptrtoint i32* %32 to i32 ; <i32> [#uses=1]
- %34 = sub i32 %30, %33 ; <i32> [#uses=1]
- %35 = ashr i32 %34, 2 ; <i32> [#uses=1]
- %36 = ashr i32 %35, 2 ; <i32> [#uses=1]
- br label %bb12.i.i
+ %0 = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"
+ %__first_addr.i.i = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"
+ %__last_addr.i.i = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"
+ %unnamed_arg.i = alloca %"struct.std::bidirectional_iterator_tag", align 8
+ %1 = alloca %"struct.std::bidirectional_iterator_tag"
+ %__first_addr.i = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"
+ %2 = alloca %"struct.std::bidirectional_iterator_tag"
+ %3 = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"
+ %4 = alloca i32
+ %"alloca point" = bitcast i32 0 to i32
+ store i32 42, i32* %4, align 4
+ %5 = getelementptr %"struct.std::vector<int,std::allocator<int> >"* %X, i32 0, i32 0
+ %6 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >"* %5, i32 0, i32 0
+ %7 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl"* %6, i32 0, i32 1
+ %8 = load i32** %7, align 4
+ %9 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %3, i32 0, i32 0
+ store i32* %8, i32** %9, align 4
+ %10 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %3, i32 0, i32 0
+ %11 = load i32** %10, align 4
+ %tmp2.i = ptrtoint i32* %11 to i32
+ %tmp1.i = inttoptr i32 %tmp2.i to i32*
+ %tmp3 = ptrtoint i32* %tmp1.i to i32
+ %tmp2 = inttoptr i32 %tmp3 to i32*
+ %12 = getelementptr %"struct.std::vector<int,std::allocator<int> >"* %X, i32 0, i32 0
+ %13 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >"* %12, i32 0, i32 0
+ %14 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl"* %13, i32 0, i32 0
+ %15 = load i32** %14, align 4
+ %16 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %0, i32 0, i32 0
+ store i32* %15, i32** %16, align 4
+ %17 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %0, i32 0, i32 0
+ %18 = load i32** %17, align 4
+ %tmp2.i17 = ptrtoint i32* %18 to i32
+ %tmp1.i18 = inttoptr i32 %tmp2.i17 to i32*
+ %tmp8 = ptrtoint i32* %tmp1.i18 to i32
+ %tmp6 = inttoptr i32 %tmp8 to i32*
+ %19 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i, i32 0, i32 0
+ store i32* %tmp6, i32** %19
+ %20 = getelementptr %"struct.std::bidirectional_iterator_tag"* %1, i32 0, i32 0
+ %21 = load i8* %20, align 1
+ %22 = or i8 %21, 0
+ %23 = or i8 %22, 0
+ %24 = or i8 %23, 0
+ %25 = getelementptr %"struct.std::bidirectional_iterator_tag"* %2, i32 0, i32 0
+ store i8 0, i8* %25, align 1
+ %elt.i = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i, i32 0, i32 0
+ %val.i = load i32** %elt.i
+ %tmp.i = bitcast %"struct.std::bidirectional_iterator_tag"* %unnamed_arg.i to i8*
+ %tmp9.i = bitcast %"struct.std::bidirectional_iterator_tag"* %2 to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp.i, i8* %tmp9.i, i64 1, i32 1, i1 false)
+ %26 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ store i32* %val.i, i32** %26
+ %27 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0
+ store i32* %tmp2, i32** %27
+ %28 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0
+ %29 = load i32** %28, align 4
+ %30 = ptrtoint i32* %29 to i32
+ %31 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %32 = load i32** %31, align 4
+ %33 = ptrtoint i32* %32 to i32
+ %34 = sub i32 %30, %33
+ %35 = ashr i32 %34, 2
+ %36 = ashr i32 %35, 2
+ br label %bb12.i.i
-bb.i.i: ; preds = %bb12.i.i
- %37 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %38 = load i32** %37, align 4 ; <i32*> [#uses=1]
- %39 = load i32* %38, align 4 ; <i32> [#uses=1]
- %40 = load i32* %4, align 4 ; <i32> [#uses=1]
- %41 = icmp eq i32 %39, %40 ; <i1> [#uses=1]
- %42 = zext i1 %41 to i8 ; <i8> [#uses=1]
- %toBool.i.i = icmp ne i8 %42, 0 ; <i1> [#uses=1]
- br i1 %toBool.i.i, label %bb1.i.i, label %bb2.i.i
+bb.i.i: ; preds = %bb12.i.i
+ %37 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %38 = load i32** %37, align 4
+ %39 = load i32* %38, align 4
+ %40 = load i32* %4, align 4
+ %41 = icmp eq i32 %39, %40
+ %42 = zext i1 %41 to i8
+ %toBool.i.i = icmp ne i8 %42, 0
+ br i1 %toBool.i.i, label %bb1.i.i, label %bb2.i.i
-bb1.i.i: ; preds = %bb.i.i
- %43 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %44 = load i32** %43, align 4 ; <i32*> [#uses=1]
- br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
+bb1.i.i: ; preds = %bb.i.i
+ %43 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %44 = load i32** %43, align 4
+ br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
-bb2.i.i: ; preds = %bb.i.i
- %45 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %46 = load i32** %45, align 4 ; <i32*> [#uses=1]
- %47 = getelementptr i32* %46, i64 1 ; <i32*> [#uses=1]
- %48 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %47, i32** %48, align 4
- %49 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %50 = load i32** %49, align 4 ; <i32*> [#uses=1]
- %51 = load i32* %50, align 4 ; <i32> [#uses=1]
- %52 = load i32* %4, align 4 ; <i32> [#uses=1]
- %53 = icmp eq i32 %51, %52 ; <i1> [#uses=1]
- %54 = zext i1 %53 to i8 ; <i8> [#uses=1]
- %toBool3.i.i = icmp ne i8 %54, 0 ; <i1> [#uses=1]
- br i1 %toBool3.i.i, label %bb4.i.i, label %bb5.i.i
+bb2.i.i: ; preds = %bb.i.i
+ %45 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %46 = load i32** %45, align 4
+ %47 = getelementptr i32* %46, i64 1
+ %48 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ store i32* %47, i32** %48, align 4
+ %49 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %50 = load i32** %49, align 4
+ %51 = load i32* %50, align 4
+ %52 = load i32* %4, align 4
+ %53 = icmp eq i32 %51, %52
+ %54 = zext i1 %53 to i8
+ %toBool3.i.i = icmp ne i8 %54, 0
+ br i1 %toBool3.i.i, label %bb4.i.i, label %bb5.i.i
-bb4.i.i: ; preds = %bb2.i.i
- %55 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %56 = load i32** %55, align 4 ; <i32*> [#uses=1]
- br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
+bb4.i.i: ; preds = %bb2.i.i
+ %55 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %56 = load i32** %55, align 4
+ br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
-bb5.i.i: ; preds = %bb2.i.i
- %57 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %58 = load i32** %57, align 4 ; <i32*> [#uses=1]
- %59 = getelementptr i32* %58, i64 1 ; <i32*> [#uses=1]
- %60 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %59, i32** %60, align 4
- %61 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %62 = load i32** %61, align 4 ; <i32*> [#uses=1]
- %63 = load i32* %62, align 4 ; <i32> [#uses=1]
- %64 = load i32* %4, align 4 ; <i32> [#uses=1]
- %65 = icmp eq i32 %63, %64 ; <i1> [#uses=1]
- %66 = zext i1 %65 to i8 ; <i8> [#uses=1]
- %toBool6.i.i = icmp ne i8 %66, 0 ; <i1> [#uses=1]
- br i1 %toBool6.i.i, label %bb7.i.i, label %bb8.i.i
+bb5.i.i: ; preds = %bb2.i.i
+ %57 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %58 = load i32** %57, align 4
+ %59 = getelementptr i32* %58, i64 1
+ %60 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ store i32* %59, i32** %60, align 4
+ %61 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %62 = load i32** %61, align 4
+ %63 = load i32* %62, align 4
+ %64 = load i32* %4, align 4
+ %65 = icmp eq i32 %63, %64
+ %66 = zext i1 %65 to i8
+ %toBool6.i.i = icmp ne i8 %66, 0
+ br i1 %toBool6.i.i, label %bb7.i.i, label %bb8.i.i
-bb7.i.i: ; preds = %bb5.i.i
- %67 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %68 = load i32** %67, align 4 ; <i32*> [#uses=1]
- br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
+bb7.i.i: ; preds = %bb5.i.i
+ %67 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %68 = load i32** %67, align 4
+ br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
-bb8.i.i: ; preds = %bb5.i.i
- %69 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %70 = load i32** %69, align 4 ; <i32*> [#uses=1]
- %71 = getelementptr i32* %70, i64 1 ; <i32*> [#uses=1]
- %72 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %71, i32** %72, align 4
- %73 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %74 = load i32** %73, align 4 ; <i32*> [#uses=1]
- %75 = load i32* %74, align 4 ; <i32> [#uses=1]
- %76 = load i32* %4, align 4 ; <i32> [#uses=1]
- %77 = icmp eq i32 %75, %76 ; <i1> [#uses=1]
- %78 = zext i1 %77 to i8 ; <i8> [#uses=1]
- %toBool9.i.i = icmp ne i8 %78, 0 ; <i1> [#uses=1]
- br i1 %toBool9.i.i, label %bb10.i.i, label %bb11.i.i
+bb8.i.i: ; preds = %bb5.i.i
+ %69 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %70 = load i32** %69, align 4
+ %71 = getelementptr i32* %70, i64 1
+ %72 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ store i32* %71, i32** %72, align 4
+ %73 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %74 = load i32** %73, align 4
+ %75 = load i32* %74, align 4
+ %76 = load i32* %4, align 4
+ %77 = icmp eq i32 %75, %76
+ %78 = zext i1 %77 to i8
+ %toBool9.i.i = icmp ne i8 %78, 0
+ br i1 %toBool9.i.i, label %bb10.i.i, label %bb11.i.i
-bb10.i.i: ; preds = %bb8.i.i
- %79 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %80 = load i32** %79, align 4 ; <i32*> [#uses=1]
- br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
+bb10.i.i: ; preds = %bb8.i.i
+ %79 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %80 = load i32** %79, align 4
+ br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
-bb11.i.i: ; preds = %bb8.i.i
- %81 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %82 = load i32** %81, align 4 ; <i32*> [#uses=1]
- %83 = getelementptr i32* %82, i64 1 ; <i32*> [#uses=1]
- %84 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %83, i32** %84, align 4
- %85 = sub i32 %__trip_count.0.i.i, 1 ; <i32> [#uses=1]
- br label %bb12.i.i
+bb11.i.i: ; preds = %bb8.i.i
+ %81 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %82 = load i32** %81, align 4
+ %83 = getelementptr i32* %82, i64 1
+ %84 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ store i32* %83, i32** %84, align 4
+ %85 = sub i32 %__trip_count.0.i.i, 1
+ br label %bb12.i.i
-bb12.i.i: ; preds = %bb11.i.i, %entry
- %__trip_count.0.i.i = phi i32 [ %36, %entry ], [ %85, %bb11.i.i ] ; <i32> [#uses=2]
- %86 = icmp sgt i32 %__trip_count.0.i.i, 0 ; <i1> [#uses=1]
- br i1 %86, label %bb.i.i, label %bb13.i.i
+bb12.i.i: ; preds = %bb11.i.i, %entry
+ %__trip_count.0.i.i = phi i32 [ %36, %entry ], [ %85, %bb11.i.i ]
+ %86 = icmp sgt i32 %__trip_count.0.i.i, 0
+ br i1 %86, label %bb.i.i, label %bb13.i.i
-bb13.i.i: ; preds = %bb12.i.i
- %87 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %88 = load i32** %87, align 4 ; <i32*> [#uses=1]
- %89 = ptrtoint i32* %88 to i32 ; <i32> [#uses=1]
- %90 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %91 = load i32** %90, align 4 ; <i32*> [#uses=1]
- %92 = ptrtoint i32* %91 to i32 ; <i32> [#uses=1]
- %93 = sub i32 %89, %92 ; <i32> [#uses=1]
- %94 = ashr i32 %93, 2 ; <i32> [#uses=1]
- switch i32 %94, label %bb26.i.i [
- i32 1, label %bb22.i.i
- i32 2, label %bb18.i.i
- i32 3, label %bb14.i.i
- ]
+bb13.i.i: ; preds = %bb12.i.i
+ %87 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0
+ %88 = load i32** %87, align 4
+ %89 = ptrtoint i32* %88 to i32
+ %90 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %91 = load i32** %90, align 4
+ %92 = ptrtoint i32* %91 to i32
+ %93 = sub i32 %89, %92
+ %94 = ashr i32 %93, 2
+ switch i32 %94, label %bb26.i.i [
+ i32 1, label %bb22.i.i
+ i32 2, label %bb18.i.i
+ i32 3, label %bb14.i.i
+ ]
-bb14.i.i: ; preds = %bb13.i.i
- %95 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %96 = load i32** %95, align 4 ; <i32*> [#uses=1]
- %97 = load i32* %96, align 4 ; <i32> [#uses=1]
- %98 = load i32* %4, align 4 ; <i32> [#uses=1]
- %99 = icmp eq i32 %97, %98 ; <i1> [#uses=1]
- %100 = zext i1 %99 to i8 ; <i8> [#uses=1]
- %toBool15.i.i = icmp ne i8 %100, 0 ; <i1> [#uses=1]
- br i1 %toBool15.i.i, label %bb16.i.i, label %bb17.i.i
+bb14.i.i: ; preds = %bb13.i.i
+ %95 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %96 = load i32** %95, align 4
+ %97 = load i32* %96, align 4
+ %98 = load i32* %4, align 4
+ %99 = icmp eq i32 %97, %98
+ %100 = zext i1 %99 to i8
+ %toBool15.i.i = icmp ne i8 %100, 0
+ br i1 %toBool15.i.i, label %bb16.i.i, label %bb17.i.i
-bb16.i.i: ; preds = %bb14.i.i
- %101 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %102 = load i32** %101, align 4 ; <i32*> [#uses=1]
- br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
+bb16.i.i: ; preds = %bb14.i.i
+ %101 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %102 = load i32** %101, align 4
+ br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
-bb17.i.i: ; preds = %bb14.i.i
- %103 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %104 = load i32** %103, align 4 ; <i32*> [#uses=1]
- %105 = getelementptr i32* %104, i64 1 ; <i32*> [#uses=1]
- %106 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %105, i32** %106, align 4
- br label %bb18.i.i
+bb17.i.i: ; preds = %bb14.i.i
+ %103 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %104 = load i32** %103, align 4
+ %105 = getelementptr i32* %104, i64 1
+ %106 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ store i32* %105, i32** %106, align 4
+ br label %bb18.i.i
-bb18.i.i: ; preds = %bb17.i.i, %bb13.i.i
- %107 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %108 = load i32** %107, align 4 ; <i32*> [#uses=1]
- %109 = load i32* %108, align 4 ; <i32> [#uses=1]
- %110 = load i32* %4, align 4 ; <i32> [#uses=1]
- %111 = icmp eq i32 %109, %110 ; <i1> [#uses=1]
- %112 = zext i1 %111 to i8 ; <i8> [#uses=1]
- %toBool19.i.i = icmp ne i8 %112, 0 ; <i1> [#uses=1]
- br i1 %toBool19.i.i, label %bb20.i.i, label %bb21.i.i
+bb18.i.i: ; preds = %bb17.i.i, %bb13.i.i
+ %107 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %108 = load i32** %107, align 4
+ %109 = load i32* %108, align 4
+ %110 = load i32* %4, align 4
+ %111 = icmp eq i32 %109, %110
+ %112 = zext i1 %111 to i8
+ %toBool19.i.i = icmp ne i8 %112, 0
+ br i1 %toBool19.i.i, label %bb20.i.i, label %bb21.i.i
-bb20.i.i: ; preds = %bb18.i.i
- %113 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %114 = load i32** %113, align 4 ; <i32*> [#uses=1]
- br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
+bb20.i.i: ; preds = %bb18.i.i
+ %113 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %114 = load i32** %113, align 4
+ br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
-bb21.i.i: ; preds = %bb18.i.i
- %115 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %116 = load i32** %115, align 4 ; <i32*> [#uses=1]
- %117 = getelementptr i32* %116, i64 1 ; <i32*> [#uses=1]
- %118 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %117, i32** %118, align 4
- br label %bb22.i.i
+bb21.i.i: ; preds = %bb18.i.i
+ %115 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %116 = load i32** %115, align 4
+ %117 = getelementptr i32* %116, i64 1
+ %118 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ store i32* %117, i32** %118, align 4
+ br label %bb22.i.i
-bb22.i.i: ; preds = %bb21.i.i, %bb13.i.i
- %119 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %120 = load i32** %119, align 4 ; <i32*> [#uses=1]
- %121 = load i32* %120, align 4 ; <i32> [#uses=1]
- %122 = load i32* %4, align 4 ; <i32> [#uses=1]
- %123 = icmp eq i32 %121, %122 ; <i1> [#uses=1]
- %124 = zext i1 %123 to i8 ; <i8> [#uses=1]
- %toBool23.i.i = icmp ne i8 %124, 0 ; <i1> [#uses=1]
- br i1 %toBool23.i.i, label %bb24.i.i, label %bb25.i.i
+bb22.i.i: ; preds = %bb21.i.i, %bb13.i.i
+ %119 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %120 = load i32** %119, align 4
+ %121 = load i32* %120, align 4
+ %122 = load i32* %4, align 4
+ %123 = icmp eq i32 %121, %122
+ %124 = zext i1 %123 to i8
+ %toBool23.i.i = icmp ne i8 %124, 0
+ br i1 %toBool23.i.i, label %bb24.i.i, label %bb25.i.i
-bb24.i.i: ; preds = %bb22.i.i
- %125 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %126 = load i32** %125, align 4 ; <i32*> [#uses=1]
- br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
+bb24.i.i: ; preds = %bb22.i.i
+ %125 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %126 = load i32** %125, align 4
+ br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
-bb25.i.i: ; preds = %bb22.i.i
- %127 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %128 = load i32** %127, align 4 ; <i32*> [#uses=1]
- %129 = getelementptr i32* %128, i64 1 ; <i32*> [#uses=1]
- %130 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- store i32* %129, i32** %130, align 4
- br label %bb26.i.i
+bb25.i.i: ; preds = %bb22.i.i
+ %127 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ %128 = load i32** %127, align 4
+ %129 = getelementptr i32* %128, i64 1
+ %130 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
+ store i32* %129, i32** %130, align 4
+ br label %bb26.i.i
-bb26.i.i: ; preds = %bb25.i.i, %bb13.i.i
- %131 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0 ; <i32**> [#uses=1]
- %132 = load i32** %131, align 4 ; <i32*> [#uses=1]
- br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
+bb26.i.i: ; preds = %bb25.i.i, %bb13.i.i
+ %131 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0
+ %132 = load i32** %131, align 4
+ br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
-_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit: ; preds = %bb26.i.i, %bb24.i.i, %bb20.i.i, %bb16.i.i, %bb10.i.i, %bb7.i.i, %bb4.i.i, %bb1.i.i
- %.0.0.i.i = phi i32* [ %132, %bb26.i.i ], [ %126, %bb24.i.i ], [ %114, %bb20.i.i ], [ %102, %bb16.i.i ], [ %80, %bb10.i.i ], [ %68, %bb7.i.i ], [ %56, %bb4.i.i ], [ %44, %bb1.i.i ] ; <i32*> [#uses=1]
- %tmp2.i.i = ptrtoint i32* %.0.0.i.i to i32 ; <i32> [#uses=1]
- %tmp1.i.i = inttoptr i32 %tmp2.i.i to i32* ; <i32*> [#uses=1]
- %tmp4.i = ptrtoint i32* %tmp1.i.i to i32 ; <i32> [#uses=1]
- %tmp3.i = inttoptr i32 %tmp4.i to i32* ; <i32*> [#uses=1]
- %tmp8.i = ptrtoint i32* %tmp3.i to i32 ; <i32> [#uses=1]
- %tmp6.i = inttoptr i32 %tmp8.i to i32* ; <i32*> [#uses=1]
- %tmp12 = ptrtoint i32* %tmp6.i to i32 ; <i32> [#uses=1]
- %tmp10 = inttoptr i32 %tmp12 to i32* ; <i32*> [#uses=1]
- %tmp16 = ptrtoint i32* %tmp10 to i32 ; <i32> [#uses=1]
- br label %return
+_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit: ; preds = %bb26.i.i, %bb24.i.i, %bb20.i.i, %bb16.i.i, %bb10.i.i, %bb7.i.i, %bb4.i.i, %bb1.i.i
+ %.0.0.i.i = phi i32* [ %132, %bb26.i.i ], [ %126, %bb24.i.i ], [ %114, %bb20.i.i ], [ %102, %bb16.i.i ], [ %80, %bb10.i.i ], [ %68, %bb7.i.i ], [ %56, %bb4.i.i ], [ %44, %bb1.i.i ]
+ %tmp2.i.i = ptrtoint i32* %.0.0.i.i to i32
+ %tmp1.i.i = inttoptr i32 %tmp2.i.i to i32*
+ %tmp4.i = ptrtoint i32* %tmp1.i.i to i32
+ %tmp3.i = inttoptr i32 %tmp4.i to i32*
+ %tmp8.i = ptrtoint i32* %tmp3.i to i32
+ %tmp6.i = inttoptr i32 %tmp8.i to i32*
+ %tmp12 = ptrtoint i32* %tmp6.i to i32
+ %tmp10 = inttoptr i32 %tmp12 to i32*
+ %tmp16 = ptrtoint i32* %tmp10 to i32
+ br label %return
-return: ; preds = %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
- %tmp14 = inttoptr i32 %tmp16 to i32* ; <i32*> [#uses=1]
- ret i32* %tmp14
+return: ; preds = %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
+ %tmp14 = inttoptr i32 %tmp16 to i32*
+ ret i32* %tmp14
}
-declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
diff --git a/test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll b/test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll
deleted file mode 100644
index 2f6034e..0000000
--- a/test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: opt < %s -instcombine -S | FileCheck %s
-; PR9218
-
-%vec2x2 = type { <2 x double>, <2 x double> }
-
-define %vec2x2 @split(double) nounwind alwaysinline {
-; CHECK: @split
-; CHECK: ret %vec2x2 undef
- %vba = insertelement <2 x double> undef, double %0, i32 2
- ret <2 x double> %vba, <2 x double> %vba
-}
diff --git a/test/Transforms/InstCombine/bswap-fold.ll b/test/Transforms/InstCombine/bswap-fold.ll
index a6b30c0..442ce58 100644
--- a/test/Transforms/InstCombine/bswap-fold.ll
+++ b/test/Transforms/InstCombine/bswap-fold.ll
@@ -50,10 +50,6 @@ entry:
}
; PR5284
-declare i64 @llvm.bswap.i64(i64)
-declare i32 @llvm.bswap.i32(i32)
-declare i16 @llvm.bswap.i16(i16)
-
define i16 @test7(i32 %A) {
%B = tail call i32 @llvm.bswap.i32(i32 %A) nounwind
%C = trunc i32 %B to i16
diff --git a/test/Transforms/InstCombine/call2.ll b/test/Transforms/InstCombine/call2.ll
index 3a6bd67..1f45c7a 100644
--- a/test/Transforms/InstCombine/call2.ll
+++ b/test/Transforms/InstCombine/call2.ll
@@ -4,7 +4,6 @@
define i32 @bar() {
entry:
%retval = alloca i32, align 4 ; <i32*> [#uses=1]
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
%tmp = call i32 (...)* bitcast (i32 (i8*)* @f to i32 (...)*)( double 3.000000e+00 ) ; <i32> [#uses=0]
br label %return
@@ -17,7 +16,6 @@ define i32 @f(i8* %p) {
entry:
%p_addr = alloca i8* ; <i8**> [#uses=1]
%retval = alloca i32, align 4 ; <i32*> [#uses=1]
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i8* %p, i8** %p_addr
br label %return
diff --git a/test/Transforms/InstCombine/intrinsics.ll b/test/Transforms/InstCombine/intrinsics.ll
index 107f313..0d84ae4 100644
--- a/test/Transforms/InstCombine/intrinsics.ll
+++ b/test/Transforms/InstCombine/intrinsics.ll
@@ -213,5 +213,4 @@ define i32 @cttz_simplify1(i32 %x) nounwind readnone ssp {
; CHECK-NEXT: ret i32
}
-declare i32 @llvm.ctlz.i32(i32) nounwind readnone
diff --git a/test/Transforms/InstCombine/memcpy-to-load.ll b/test/Transforms/InstCombine/memcpy-to-load.ll
index ebb8711..04aac98 100644
--- a/test/Transforms/InstCombine/memcpy-to-load.ll
+++ b/test/Transforms/InstCombine/memcpy-to-load.ll
@@ -4,11 +4,10 @@ target triple = "i686-apple-darwin8"
define void @foo(double* %X, double* %Y) {
entry:
- %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %tmp2 = bitcast double* %X to i8* ; <i8*> [#uses=1]
- %tmp13 = bitcast double* %Y to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %tmp2, i8* %tmp13, i32 8, i32 1 )
- ret void
+ %tmp2 = bitcast double* %X to i8*
+ %tmp13 = bitcast double* %Y to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp2, i8* %tmp13, i32 8, i32 1, i1 false)
+ ret void
}
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/InstCombine/memmove.ll b/test/Transforms/InstCombine/memmove.ll
index 1806cfc..4602c12 100644
--- a/test/Transforms/InstCombine/memmove.ll
+++ b/test/Transforms/InstCombine/memmove.ll
@@ -1,24 +1,20 @@
; This test makes sure that memmove instructions are properly eliminated.
;
-; RUN: opt < %s -instcombine -S | \
-; RUN: not grep {call void @llvm.memmove}
+; RUN: opt < %s -instcombine -S | not grep {call void @llvm.memmove}
@S = internal constant [33 x i8] c"panic: restorelist inconsistency\00" ; <[33 x i8]*> [#uses=1]
@h = constant [2 x i8] c"h\00" ; <[2 x i8]*> [#uses=1]
@hel = constant [4 x i8] c"hel\00" ; <[4 x i8]*> [#uses=1]
@hello_u = constant [8 x i8] c"hello_u\00" ; <[8 x i8]*> [#uses=1]
-
-declare void @llvm.memmove.i32(i8*, i8*, i32, i32)
-
define void @test1(i8* %A, i8* %B, i32 %N) {
- call void @llvm.memmove.i32( i8* %A, i8* %B, i32 0, i32 1 )
+ call void @llvm.memmove.p0i8.p0i8.i32(i8* %A, i8* %B, i32 0, i32 1, i1 false)
ret void
}
define void @test2(i8* %A, i32 %N) {
;; dest can't alias source since we can't write to source!
- call void @llvm.memmove.i32( i8* %A, i8* getelementptr ([33 x i8]* @S, i32 0, i32 0), i32 %N, i32 1 )
+ call void @llvm.memmove.p0i8.p0i8.i32(i8* %A, i8* getelementptr inbounds ([33 x i8]* @S, i32 0, i32 0), i32 %N, i32 1, i1 false)
ret void
}
@@ -28,15 +24,16 @@ define i32 @test3() {
%hello_u_p = getelementptr [8 x i8]* @hello_u, i32 0, i32 0 ; <i8*> [#uses=1]
%target = alloca [1024 x i8] ; <[1024 x i8]*> [#uses=1]
%target_p = getelementptr [1024 x i8]* %target, i32 0, i32 0 ; <i8*> [#uses=3]
- call void @llvm.memmove.i32( i8* %target_p, i8* %h_p, i32 2, i32 2 )
- call void @llvm.memmove.i32( i8* %target_p, i8* %hel_p, i32 4, i32 4 )
- call void @llvm.memmove.i32( i8* %target_p, i8* %hello_u_p, i32 8, i32 8 )
+ call void @llvm.memmove.p0i8.p0i8.i32(i8* %target_p, i8* %h_p, i32 2, i32 2, i1 false)
+ call void @llvm.memmove.p0i8.p0i8.i32(i8* %target_p, i8* %hel_p, i32 4, i32 4, i1 false)
+ call void @llvm.memmove.p0i8.p0i8.i32(i8* %target_p, i8* %hello_u_p, i32 8, i32 8, i1 false)
ret i32 0
}
; PR2370
define void @test4(i8* %a) {
- tail call void @llvm.memmove.i32( i8* %a, i8* %a, i32 100, i32 1 )
- ret void
+ tail call void @llvm.memmove.p0i8.p0i8.i32(i8* %a, i8* %a, i32 100, i32 1, i1 false)
+ ret void
}
+declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/InstCombine/memset.ll b/test/Transforms/InstCombine/memset.ll
index 8e85694..7f7bc9f 100644
--- a/test/Transforms/InstCombine/memset.ll
+++ b/test/Transforms/InstCombine/memset.ll
@@ -1,15 +1,14 @@
; RUN: opt < %s -instcombine -S | not grep {call.*llvm.memset}
-declare void @llvm.memset.i32(i8*, i8, i32, i32)
-
define i32 @main() {
- %target = alloca [1024 x i8] ; <[1024 x i8]*> [#uses=1]
- %target_p = getelementptr [1024 x i8]* %target, i32 0, i32 0 ; <i8*> [#uses=5]
- call void @llvm.memset.i32( i8* %target_p, i8 1, i32 0, i32 1 )
- call void @llvm.memset.i32( i8* %target_p, i8 1, i32 1, i32 1 )
- call void @llvm.memset.i32( i8* %target_p, i8 1, i32 2, i32 2 )
- call void @llvm.memset.i32( i8* %target_p, i8 1, i32 4, i32 4 )
- call void @llvm.memset.i32( i8* %target_p, i8 1, i32 8, i32 8 )
- ret i32 0
+ %target = alloca [1024 x i8]
+ %target_p = getelementptr [1024 x i8]* %target, i32 0, i32 0
+ call void @llvm.memset.p0i8.i32(i8* %target_p, i8 1, i32 0, i32 1, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* %target_p, i8 1, i32 1, i32 1, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* %target_p, i8 1, i32 2, i32 2, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* %target_p, i8 1, i32 4, i32 4, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* %target_p, i8 1, i32 8, i32 8, i1 false)
+ ret i32 0
}
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
diff --git a/test/Transforms/InstCombine/objsize.ll b/test/Transforms/InstCombine/objsize.ll
index 043525b..28ceb68 100644
--- a/test/Transforms/InstCombine/objsize.ll
+++ b/test/Transforms/InstCombine/objsize.ll
@@ -149,8 +149,6 @@ declare i8* @__memset_chk(i8*, i32, i32, i32) nounwind
declare noalias i8* @malloc(i32) nounwind
-declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly
-
define i32 @test7() {
; CHECK: @test7
%alloc = call noalias i8* @malloc(i32 48) nounwind
diff --git a/test/Transforms/InstCombine/stack-overalign.ll b/test/Transforms/InstCombine/stack-overalign.ll
index 88b4114..2fc8414 100644
--- a/test/Transforms/InstCombine/stack-overalign.ll
+++ b/test/Transforms/InstCombine/stack-overalign.ll
@@ -17,13 +17,13 @@
define void @foo() nounwind {
entry:
- %src = alloca [1024 x i8], align 1
- %src1 = getelementptr [1024 x i8]* %src, i32 0, i32 0
- call void @llvm.memcpy.i32(i8* getelementptr ([1024 x i8]* @dst, i32 0, i32 0), i8* %src1, i32 1024, i32 1)
- call void @frob(i8* %src1) nounwind
- ret void
+ %src = alloca [1024 x i8], align 1
+ %src1 = getelementptr [1024 x i8]* %src, i32 0, i32 0
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([1024 x i8]* @dst, i32 0, i32 0), i8* %src1, i32 1024, i32 1, i1 false)
+ call void @frob(i8* %src1) nounwind
+ ret void
}
-declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind
-
declare void @frob(i8*)
+
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/JumpThreading/crash.ll b/test/Transforms/JumpThreading/crash.ll
index aed51a1..2115dd3 100644
--- a/test/Transforms/JumpThreading/crash.ll
+++ b/test/Transforms/JumpThreading/crash.ll
@@ -18,7 +18,7 @@ bb13: ; preds = %bb
br label %bb
bb110: ; preds = %bb
- %mrv_gr124 = getresult %struct.system__secondary_stack__mark_id %tmp120, 1 ; <i64> [#uses=0]
+ %mrv_gr124 = extractvalue %struct.system__secondary_stack__mark_id %tmp120, 1 ; <i64> [#uses=0]
unreachable
}
diff --git a/test/Transforms/LoopDeletion/2011-06-21-phioperands.ll b/test/Transforms/LoopDeletion/2011-06-21-phioperands.ll
new file mode 100644
index 0000000..40c6629
--- /dev/null
+++ b/test/Transforms/LoopDeletion/2011-06-21-phioperands.ll
@@ -0,0 +1,182 @@
+; RUN: opt %s -loop-deletion -disable-output
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+
+%0 = type { %"class.llvm::SmallVectorImpl", [1 x %"union.llvm::SmallVectorBase::U"] }
+%"class.clang::SourceLocation" = type { i32 }
+%"class.clang::driver::Arg" = type { %"class.clang::driver::Option"*, %"class.clang::driver::Arg"*, i32, i8, %0 }
+%"class.clang::driver::Option" = type { i32 (...)**, i32, %"class.clang::SourceLocation", i8*, %"class.clang::driver::OptionGroup"*, %"class.clang::driver::Option"*, i8 }
+%"class.clang::driver::OptionGroup" = type { %"class.clang::driver::Option" }
+%"class.llvm::SmallVectorBase" = type { i8*, i8*, i8*, %"union.llvm::SmallVectorBase::U" }
+%"class.llvm::SmallVectorImpl" = type { %"class.llvm::SmallVectorTemplateBase" }
+%"class.llvm::SmallVectorTemplateBase" = type { %"class.llvm::SmallVectorTemplateCommon" }
+%"class.llvm::SmallVectorTemplateCommon" = type { %"class.llvm::SmallVectorBase" }
+%"union.llvm::SmallVectorBase::U" = type { x86_fp80 }
+
+define void @_ZNK5clang6driver7ArgList20AddAllArgsTranslatedERN4llvm11SmallVectorIPKcLj16EEENS0_12OptSpecifierES5_b(i1 zeroext %Joined) nounwind align 2 {
+entry:
+ br i1 undef, label %entry.split.us, label %entry.entry.split_crit_edge
+
+entry.entry.split_crit_edge: ; preds = %entry
+ br label %entry.split
+
+entry.split.us: ; preds = %entry
+ br label %for.cond.i14.us
+
+for.cond.i14.us: ; preds = %for.inc.i38.us, %entry.split.us
+ br i1 true, label %for.cond.i50.us-lcssa.us, label %if.end.i23.us
+
+for.inc.i38.us: ; preds = %if.end.i23.us
+ br label %for.cond.i14.us
+
+if.end.i23.us: ; preds = %for.cond.i14.us
+ br i1 true, label %for.cond.i50.us-lcssa.us, label %for.inc.i38.us
+
+for.cond.i50.us-lcssa.us: ; preds = %if.end.i23.us, %for.cond.i14.us
+ br label %for.cond.i50
+
+entry.split: ; preds = %entry.entry.split_crit_edge
+ br label %for.cond.i14
+
+for.cond.i14: ; preds = %for.inc.i38, %entry.split
+ br i1 undef, label %for.cond.i50.us-lcssa, label %if.end.i23
+
+if.end.i23: ; preds = %for.cond.i14
+ br i1 undef, label %for.cond.i50.us-lcssa, label %for.inc.i38
+
+for.inc.i38: ; preds = %if.end.i23
+ br label %for.cond.i14
+
+for.cond.i50.us-lcssa: ; preds = %if.end.i23, %for.cond.i14
+ br label %for.cond.i50
+
+for.cond.i50: ; preds = %for.cond.i50.us-lcssa, %for.cond.i50.us-lcssa.us
+ br label %for.cond
+
+for.cond.loopexit.us-lcssa: ; preds = %if.end.i, %for.cond.i
+ br label %for.cond.loopexit
+
+for.cond.loopexit: ; preds = %for.cond.loopexit.us-lcssa.us, %for.cond.loopexit.us-lcssa
+ br label %for.cond
+
+for.cond: ; preds = %for.cond.loopexit, %for.cond.i50
+ br i1 undef, label %for.end, label %for.body
+
+for.body: ; preds = %for.cond
+ br i1 %Joined, label %if.then, label %if.else
+
+if.then: ; preds = %for.body
+ br i1 undef, label %cond.false.i.i, label %_ZN4llvm9StringRefC1EPKc.exit
+
+cond.false.i.i: ; preds = %if.then
+ unreachable
+
+_ZN4llvm9StringRefC1EPKc.exit: ; preds = %if.then
+ br i1 undef, label %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit, label %cond.false.i.i91
+
+cond.false.i.i91: ; preds = %_ZN4llvm9StringRefC1EPKc.exit
+ unreachable
+
+_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit: ; preds = %_ZN4llvm9StringRefC1EPKc.exit
+ br i1 undef, label %cond.false.i.i.i, label %if.end13.i.i.i.i
+
+if.end13.i.i.i.i: ; preds = %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit
+ br i1 undef, label %land.lhs.true16.i.i.i.i, label %if.end19.i.i.i.i
+
+land.lhs.true16.i.i.i.i: ; preds = %if.end13.i.i.i.i
+ br i1 undef, label %cond.false.i.i.i, label %_ZNK4llvm5Twine8isBinaryEv.exit8.i.i.i.i
+
+_ZNK4llvm5Twine8isBinaryEv.exit8.i.i.i.i: ; preds = %land.lhs.true16.i.i.i.i
+ br i1 undef, label %cond.false.i.i.i, label %if.end19.i.i.i.i
+
+if.end19.i.i.i.i: ; preds = %_ZNK4llvm5Twine8isBinaryEv.exit8.i.i.i.i, %if.end13.i.i.i.i
+ br i1 undef, label %land.lhs.true22.i.i.i.i, label %_ZN4llvmplERKNS_9StringRefEPKc.exit
+
+land.lhs.true22.i.i.i.i: ; preds = %if.end19.i.i.i.i
+ br i1 undef, label %cond.false.i.i.i, label %_ZNK4llvm5Twine8isBinaryEv.exit.i.i.i.i
+
+_ZNK4llvm5Twine8isBinaryEv.exit.i.i.i.i: ; preds = %land.lhs.true22.i.i.i.i
+ br i1 undef, label %cond.false.i.i.i, label %_ZN4llvmplERKNS_9StringRefEPKc.exit
+
+cond.false.i.i.i: ; preds = %_ZNK4llvm5Twine8isBinaryEv.exit.i.i.i.i, %land.lhs.true22.i.i.i.i, %_ZNK4llvm5Twine8isBinaryEv.exit8.i.i.i.i, %land.lhs.true16.i.i.i.i, %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit
+ unreachable
+
+_ZN4llvmplERKNS_9StringRefEPKc.exit: ; preds = %_ZNK4llvm5Twine8isBinaryEv.exit.i.i.i.i, %if.end19.i.i.i.i
+ br i1 undef, label %Retry.i, label %if.end.i99
+
+Retry.i: ; preds = %if.end.i99, %_ZN4llvmplERKNS_9StringRefEPKc.exit
+ br i1 undef, label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit, label %new.notnull.i
+
+new.notnull.i: ; preds = %Retry.i
+ br label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit
+
+if.end.i99: ; preds = %_ZN4llvmplERKNS_9StringRefEPKc.exit
+ br label %Retry.i
+
+_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit: ; preds = %new.notnull.i, %Retry.i
+ br label %for.cond.i.preheader
+
+if.else: ; preds = %for.body
+ br i1 undef, label %Retry.i108, label %if.end.i113
+
+Retry.i108: ; preds = %if.end.i113, %if.else
+ br i1 undef, label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit114, label %new.notnull.i110
+
+new.notnull.i110: ; preds = %Retry.i108
+ br label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit114
+
+if.end.i113: ; preds = %if.else
+ br label %Retry.i108
+
+_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit114: ; preds = %new.notnull.i110, %Retry.i108
+ br i1 undef, label %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit125, label %cond.false.i.i123
+
+cond.false.i.i123: ; preds = %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit114
+ unreachable
+
+_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit125: ; preds = %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit114
+ br i1 undef, label %Retry.i134, label %if.end.i139
+
+Retry.i134: ; preds = %if.end.i139, %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit125
+ br i1 undef, label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit140, label %new.notnull.i136
+
+new.notnull.i136: ; preds = %Retry.i134
+ br label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit140
+
+if.end.i139: ; preds = %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit125
+ br label %Retry.i134
+
+_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit140: ; preds = %new.notnull.i136, %Retry.i134
+ br label %for.cond.i.preheader
+
+for.cond.i.preheader: ; preds = %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit140, %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit
+ br i1 undef, label %for.cond.i.preheader.split.us, label %for.cond.i.preheader.for.cond.i.preheader.split_crit_edge
+
+for.cond.i.preheader.for.cond.i.preheader.split_crit_edge: ; preds = %for.cond.i.preheader
+ br label %for.cond.i.preheader.split
+
+for.cond.i.preheader.split.us: ; preds = %for.cond.i.preheader
+ br label %for.cond.i.us
+
+for.cond.i.us: ; preds = %if.end.i.us, %for.cond.i.preheader.split.us
+ br i1 true, label %for.cond.loopexit.us-lcssa.us, label %if.end.i.us
+
+if.end.i.us: ; preds = %for.cond.i.us
+ br i1 true, label %for.cond.loopexit.us-lcssa.us, label %for.cond.i.us
+
+for.cond.loopexit.us-lcssa.us: ; preds = %if.end.i.us, %for.cond.i.us
+ %tmp178218.us.lcssa = phi %"class.clang::driver::Arg"** [ undef, %if.end.i.us ], [ undef, %for.cond.i.us ]
+ br label %for.cond.loopexit
+
+for.cond.i.preheader.split: ; preds = %for.cond.i.preheader.for.cond.i.preheader.split_crit_edge
+ br label %for.cond.i
+
+for.cond.i: ; preds = %if.end.i, %for.cond.i.preheader.split
+ br i1 undef, label %for.cond.loopexit.us-lcssa, label %if.end.i
+
+if.end.i: ; preds = %for.cond.i
+ br i1 undef, label %for.cond.loopexit.us-lcssa, label %for.cond.i
+
+for.end: ; preds = %for.cond
+ ret void
+}
diff --git a/test/Transforms/LoopRotate/PhiRename-1.ll b/test/Transforms/LoopRotate/PhiRename-1.ll
index 74426a8..9cb55b4 100644
--- a/test/Transforms/LoopRotate/PhiRename-1.ll
+++ b/test/Transforms/LoopRotate/PhiRename-1.ll
@@ -33,7 +33,6 @@ entry:
%c = alloca i32, align 4 ; <i32*> [#uses=4]
%l = alloca %struct.list*, align 4 ; <%struct.list**> [#uses=5]
%op = alloca %struct.operator*, align 4 ; <%struct.operator**> [#uses=3]
- "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 %arity, i32* %arity_addr
store i32 0, i32* %c
%tmp1 = load %struct.list** @operators ; <%struct.list*> [#uses=1]
diff --git a/test/Transforms/LoopRotate/crash.ll b/test/Transforms/LoopRotate/crash.ll
index 16a6868..954b834 100644
--- a/test/Transforms/LoopRotate/crash.ll
+++ b/test/Transforms/LoopRotate/crash.ll
@@ -113,7 +113,7 @@ bb116: ; preds = %bb131, %entry
br i1 false, label %bb141, label %bb131
bb131: ; preds = %bb116
- %mrv_gr125 = getresult %struct.NSRange %tmp123, 1 ; <i64> [#uses=0]
+ %mrv_gr125 = extractvalue %struct.NSRange %tmp123, 1 ; <i64> [#uses=0]
br label %bb116
bb141: ; preds = %bb116
diff --git a/test/Transforms/Mem2Reg/ignore-lifetime.ll b/test/Transforms/Mem2Reg/ignore-lifetime.ll
new file mode 100644
index 0000000..5e4f9bf
--- /dev/null
+++ b/test/Transforms/Mem2Reg/ignore-lifetime.ll
@@ -0,0 +1,26 @@
+; RUN: opt -mem2reg -S -o - < %s | FileCheck %s
+
+declare void @llvm.lifetime.start(i64 %size, i8* nocapture %ptr)
+declare void @llvm.lifetime.end(i64 %size, i8* nocapture %ptr)
+
+define void @test1() {
+; CHECK: test1
+; CHECK-NOT: alloca
+ %A = alloca i32
+ %B = bitcast i32* %A to i8*
+ call void @llvm.lifetime.start(i64 2, i8* %B)
+ store i32 1, i32* %A
+ call void @llvm.lifetime.end(i64 2, i8* %B)
+ ret void
+}
+
+define void @test2() {
+; CHECK: test2
+; CHECK-NOT: alloca
+ %A = alloca {i8, i16}
+ %B = getelementptr {i8, i16}* %A, i32 0, i32 0
+ call void @llvm.lifetime.start(i64 2, i8* %B)
+ store {i8, i16} zeroinitializer, {i8, i16}* %A
+ call void @llvm.lifetime.end(i64 2, i8* %B)
+ ret void
+}
diff --git a/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll b/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll
index 9f1e280..b95ad91 100644
--- a/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll
+++ b/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll
@@ -4,31 +4,33 @@
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i386-pc-linux-gnu"
-define internal fastcc void @initialize({ x86_fp80, x86_fp80 }* noalias sret %agg.result) nounwind {
+%0 = type { x86_fp80, x86_fp80 }
+
+define internal fastcc void @initialize(%0* noalias sret %agg.result) nounwind {
entry:
- %agg.result.03 = getelementptr { x86_fp80, x86_fp80 }* %agg.result, i32 0, i32 0 ; <x86_fp80*> [#uses=1]
- store x86_fp80 0xK00000000000000000000, x86_fp80* %agg.result.03
- %agg.result.15 = getelementptr { x86_fp80, x86_fp80 }* %agg.result, i32 0, i32 1 ; <x86_fp80*> [#uses=1]
- store x86_fp80 0xK00000000000000000000, x86_fp80* %agg.result.15
- ret void
+ %agg.result.03 = getelementptr %0* %agg.result, i32 0, i32 0
+ store x86_fp80 0xK00000000000000000000, x86_fp80* %agg.result.03
+ %agg.result.15 = getelementptr %0* %agg.result, i32 0, i32 1
+ store x86_fp80 0xK00000000000000000000, x86_fp80* %agg.result.15
+ ret void
}
-declare fastcc x86_fp80 @passed_uninitialized({ x86_fp80, x86_fp80 }* %x) nounwind
+declare fastcc x86_fp80 @passed_uninitialized(%0*) nounwind
-define fastcc void @badly_optimized() nounwind {
+define fastcc void @badly_optimized() nounwind {
entry:
- %z = alloca { x86_fp80, x86_fp80 } ; <{ x86_fp80, x86_fp80 }*> [#uses=2]
- %tmp = alloca { x86_fp80, x86_fp80 } ; <{ x86_fp80, x86_fp80 }*> [#uses=2]
- %memtmp = alloca { x86_fp80, x86_fp80 }, align 8 ; <{ x86_fp80, x86_fp80 }*> [#uses=2]
- call fastcc void @initialize( { x86_fp80, x86_fp80 }* noalias sret %memtmp )
- %tmp1 = bitcast { x86_fp80, x86_fp80 }* %tmp to i8* ; <i8*> [#uses=1]
- %memtmp2 = bitcast { x86_fp80, x86_fp80 }* %memtmp to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %tmp1, i8* %memtmp2, i32 24, i32 8 )
- %z3 = bitcast { x86_fp80, x86_fp80 }* %z to i8* ; <i8*> [#uses=1]
- %tmp4 = bitcast { x86_fp80, x86_fp80 }* %tmp to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %z3, i8* %tmp4, i32 24, i32 8 )
- %tmp5 = call fastcc x86_fp80 @passed_uninitialized( { x86_fp80, x86_fp80 }* %z ) ; <x86_fp80> [#uses=0]
- ret void
+ %z = alloca %0
+ %tmp = alloca %0
+ %memtmp = alloca %0, align 8
+ call fastcc void @initialize(%0* noalias sret %memtmp)
+ %tmp1 = bitcast %0* %tmp to i8*
+ %memtmp2 = bitcast %0* %memtmp to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp1, i8* %memtmp2, i32 24, i32 8, i1 false)
+ %z3 = bitcast %0* %z to i8*
+ %tmp4 = bitcast %0* %tmp to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %z3, i8* %tmp4, i32 24, i32 8, i1 false)
+ %tmp5 = call fastcc x86_fp80 @passed_uninitialized(%0* %z)
+ ret void
}
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll b/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll
index 418761e..24cf576 100644
--- a/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll
+++ b/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll
@@ -1,20 +1,22 @@
; RUN: opt < %s -basicaa -memcpyopt -S | not grep {call.*memcpy.}
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
- %a = type { i32 }
- %b = type { float }
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
+%a = type { i32 }
+%b = type { float }
+
declare void @g(%a*)
define float @f() {
entry:
- %a_var = alloca %a
- %b_var = alloca %b
- call void @g(%a *%a_var)
- %a_i8 = bitcast %a* %a_var to i8*
- %b_i8 = bitcast %b* %b_var to i8*
- call void @llvm.memcpy.i32(i8* %b_i8, i8* %a_i8, i32 4, i32 4)
- %tmp1 = getelementptr %b* %b_var, i32 0, i32 0
- %tmp2 = load float* %tmp1
- ret float %tmp2
+ %a_var = alloca %a
+ %b_var = alloca %b
+ call void @g(%a* %a_var)
+ %a_i8 = bitcast %a* %a_var to i8*
+ %b_i8 = bitcast %b* %b_var to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %b_i8, i8* %a_i8, i32 4, i32 4, i1 false)
+ %tmp1 = getelementptr %b* %b_var, i32 0, i32 0
+ %tmp2 = load float* %tmp1
+ ret float %tmp2
}
+
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/MemCpyOpt/memcpy.ll b/test/Transforms/MemCpyOpt/memcpy.ll
index 5c6a94c..12519ef 100644
--- a/test/Transforms/MemCpyOpt/memcpy.ll
+++ b/test/Transforms/MemCpyOpt/memcpy.ll
@@ -3,17 +3,21 @@
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i686-apple-darwin9"
+%0 = type { x86_fp80, x86_fp80 }
+%1 = type { i32, i32 }
+
define void @test1({ x86_fp80, x86_fp80 }* sret %agg.result, x86_fp80 %z.0, x86_fp80 %z.1) nounwind {
entry:
- %tmp2 = alloca { x86_fp80, x86_fp80 } ; <{ x86_fp80, x86_fp80 }*> [#uses=1]
- %memtmp = alloca { x86_fp80, x86_fp80 }, align 16 ; <{ x86_fp80, x86_fp80 }*> [#uses=2]
- %tmp5 = fsub x86_fp80 0xK80000000000000000000, %z.1 ; <x86_fp80> [#uses=1]
- call void @ccoshl( { x86_fp80, x86_fp80 }* sret %memtmp, x86_fp80 %tmp5, x86_fp80 %z.0 ) nounwind
- %tmp219 = bitcast { x86_fp80, x86_fp80 }* %tmp2 to i8* ; <i8*> [#uses=2]
- %memtmp20 = bitcast { x86_fp80, x86_fp80 }* %memtmp to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %tmp219, i8* %memtmp20, i32 32, i32 16 )
- %agg.result21 = bitcast { x86_fp80, x86_fp80 }* %agg.result to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %agg.result21, i8* %tmp219, i32 32, i32 16 )
+ %tmp2 = alloca %0
+ %memtmp = alloca %0, align 16
+ %tmp5 = fsub x86_fp80 0xK80000000000000000000, %z.1
+ call void @ccoshl(%0* sret %memtmp, x86_fp80 %tmp5, x86_fp80 %z.0) nounwind
+ %tmp219 = bitcast %0* %tmp2 to i8*
+ %memtmp20 = bitcast %0* %memtmp to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp219, i8* %memtmp20, i32 32, i32 16, i1 false)
+ %agg.result21 = bitcast %0* %agg.result to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %agg.result21, i8* %tmp219, i32 32, i32 16, i1 false)
+ ret void
; Check that one of the memcpy's are removed.
;; FIXME: PR 8643 We should be able to eliminate the last memcpy here.
@@ -23,22 +27,19 @@ entry:
; CHECK: call void @llvm.memcpy
; CHECK-NOT: llvm.memcpy
; CHECK: ret void
- ret void
}
declare void @ccoshl({ x86_fp80, x86_fp80 }* sret , x86_fp80, x86_fp80) nounwind
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
-
; The intermediate alloca and one of the memcpy's should be eliminated, the
; other should be related with a memmove.
define void @test2(i8* %P, i8* %Q) nounwind {
- %memtmp = alloca { x86_fp80, x86_fp80 }, align 16
- %R = bitcast { x86_fp80, x86_fp80 }* %memtmp to i8*
- call void @llvm.memcpy.i32( i8* %R, i8* %P, i32 32, i32 16 )
- call void @llvm.memcpy.i32( i8* %Q, i8* %R, i32 32, i32 16 )
- ret void
+ %memtmp = alloca %0, align 16
+ %R = bitcast %0* %memtmp to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %R, i8* %P, i32 32, i32 16, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %Q, i8* %R, i32 32, i32 16, i1 false)
+ ret void
; CHECK: @test2
; CHECK-NEXT: call void @llvm.memmove{{.*}}(i8* %Q, i8* %P
@@ -51,12 +52,12 @@ define void @test2(i8* %P, i8* %Q) nounwind {
@x = external global { x86_fp80, x86_fp80 }
define void @test3({ x86_fp80, x86_fp80 }* noalias sret %agg.result) nounwind {
- %x.0 = alloca { x86_fp80, x86_fp80 }
- %x.01 = bitcast { x86_fp80, x86_fp80 }* %x.0 to i8*
- call void @llvm.memcpy.i32( i8* %x.01, i8* bitcast ({ x86_fp80, x86_fp80 }* @x to i8*), i32 32, i32 16 )
- %agg.result2 = bitcast { x86_fp80, x86_fp80 }* %agg.result to i8*
- call void @llvm.memcpy.i32( i8* %agg.result2, i8* %x.01, i32 32, i32 16 )
- ret void
+ %x.0 = alloca %0
+ %x.01 = bitcast %0* %x.0 to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %x.01, i8* bitcast (%0* @x to i8*), i32 32, i32 16, i1 false)
+ %agg.result2 = bitcast %0* %agg.result to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %agg.result2, i8* %x.01, i32 32, i32 16, i1 false)
+ ret void
; CHECK: @test3
; CHECK-NEXT: %agg.result2 = bitcast
; CHECK-NEXT: call void @llvm.memcpy
@@ -66,10 +67,10 @@ define void @test3({ x86_fp80, x86_fp80 }* noalias sret %agg.result) nounwind {
; PR8644
define void @test4(i8 *%P) {
- %A = alloca {i32, i32}
- %a = bitcast {i32, i32}* %A to i8*
+ %A = alloca %1
+ %a = bitcast %1* %A to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %P, i64 8, i32 4, i1 false)
- call void @test4a(i8* byval align 1 %a)
+ call void @test4a(i8* byval align 1 %a)
ret void
; CHECK: @test4
; CHECK-NEXT: call void @test4a(
@@ -84,7 +85,6 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32,
declare void @test5a(%struct.S* byval align 16) nounwind ssp
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
; rdar://8713376 - This memcpy can't be eliminated.
define i32 @test5(i32 %x) nounwind ssp {
@@ -128,4 +128,5 @@ entry:
declare i32 @g(%struct.p* byval align 8)
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/MemCpyOpt/memmove.ll b/test/Transforms/MemCpyOpt/memmove.ll
index 8d3fbd2..7f1667a 100644
--- a/test/Transforms/MemCpyOpt/memmove.ll
+++ b/test/Transforms/MemCpyOpt/memmove.ll
@@ -4,7 +4,7 @@
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-apple-darwin9.0"
-declare void @llvm.memmove.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
+declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
define i8* @test1(i8* nocapture %src) nounwind {
entry:
@@ -13,8 +13,8 @@ entry:
%malloccall = tail call i8* @malloc(i32 trunc (i64 mul nuw (i64 ptrtoint (i8* getelementptr (i8* null, i32 1) to i64), i64 13) to i32))
%call3 = bitcast i8* %malloccall to [13 x i8]*
- %call3.sub = getelementptr inbounds [13 x i8]* %call3, i64 0, i64 0 ; <i8*> [#uses=2]
- tail call void @llvm.memmove.i64(i8* %call3.sub, i8* %src, i64 13, i32 1)
+ %call3.sub = getelementptr inbounds [13 x i8]* %call3, i64 0, i64 0
+ tail call void @llvm.memmove.p0i8.p0i8.i64(i8* %call3.sub, i8* %src, i64 13, i32 1, i1 false)
ret i8* %call3.sub
}
declare noalias i8* @malloc(i32)
@@ -24,8 +24,8 @@ define void @test2(i8* %P) nounwind {
entry:
; CHECK: @test2
; CHECK: call void @llvm.memcpy
- %add.ptr = getelementptr i8* %P, i64 16 ; <i8*> [#uses=1]
- tail call void @llvm.memmove.i64(i8* %P, i8* %add.ptr, i64 16, i32 1)
+ %add.ptr = getelementptr i8* %P, i64 16
+ tail call void @llvm.memmove.p0i8.p0i8.i64(i8* %P, i8* %add.ptr, i64 16, i32 1, i1 false)
ret void
}
@@ -34,7 +34,7 @@ define void @test3(i8* %P) nounwind {
entry:
; CHECK: @test3
; CHECK: call void @llvm.memmove
- %add.ptr = getelementptr i8* %P, i64 16 ; <i8*> [#uses=1]
- tail call void @llvm.memmove.i64(i8* %P, i8* %add.ptr, i64 17, i32 1)
+ %add.ptr = getelementptr i8* %P, i64 16
+ tail call void @llvm.memmove.p0i8.p0i8.i64(i8* %P, i8* %add.ptr, i64 17, i32 1, i1 false)
ret void
}
diff --git a/test/Transforms/MemCpyOpt/sret.ll b/test/Transforms/MemCpyOpt/sret.ll
index ddfd0fd..8eac7da 100644
--- a/test/Transforms/MemCpyOpt/sret.ll
+++ b/test/Transforms/MemCpyOpt/sret.ll
@@ -3,26 +3,28 @@
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i686-apple-darwin9"
-define void @ccosl({ x86_fp80, x86_fp80 }* noalias sret %agg.result, { x86_fp80, x86_fp80 }* byval align 8 %z) nounwind {
+%0 = type { x86_fp80, x86_fp80 }
+
+define void @ccosl(%0* noalias sret %agg.result, %0* byval align 8 %z) nounwind {
entry:
- %iz = alloca { x86_fp80, x86_fp80 } ; <{ x86_fp80, x86_fp80 }*> [#uses=3]
- %memtmp = alloca { x86_fp80, x86_fp80 }, align 16 ; <{ x86_fp80, x86_fp80 }*> [#uses=2]
- %tmp1 = getelementptr { x86_fp80, x86_fp80 }* %z, i32 0, i32 1 ; <x86_fp80*> [#uses=1]
- %tmp2 = load x86_fp80* %tmp1, align 16 ; <x86_fp80> [#uses=1]
- %tmp3 = fsub x86_fp80 0xK80000000000000000000, %tmp2 ; <x86_fp80> [#uses=1]
- %tmp4 = getelementptr { x86_fp80, x86_fp80 }* %iz, i32 0, i32 1 ; <x86_fp80*> [#uses=1]
- %real = getelementptr { x86_fp80, x86_fp80 }* %iz, i32 0, i32 0 ; <x86_fp80*> [#uses=1]
- %tmp7 = getelementptr { x86_fp80, x86_fp80 }* %z, i32 0, i32 0 ; <x86_fp80*> [#uses=1]
- %tmp8 = load x86_fp80* %tmp7, align 16 ; <x86_fp80> [#uses=1]
- store x86_fp80 %tmp3, x86_fp80* %real, align 16
- store x86_fp80 %tmp8, x86_fp80* %tmp4, align 16
- call void @ccoshl( { x86_fp80, x86_fp80 }* noalias sret %memtmp, { x86_fp80, x86_fp80 }* byval align 8 %iz ) nounwind
- %memtmp14 = bitcast { x86_fp80, x86_fp80 }* %memtmp to i8* ; <i8*> [#uses=1]
- %agg.result15 = bitcast { x86_fp80, x86_fp80 }* %agg.result to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %agg.result15, i8* %memtmp14, i32 32, i32 16 )
- ret void
+ %iz = alloca %0
+ %memtmp = alloca %0, align 16
+ %tmp1 = getelementptr %0* %z, i32 0, i32 1
+ %tmp2 = load x86_fp80* %tmp1, align 16
+ %tmp3 = fsub x86_fp80 0xK80000000000000000000, %tmp2
+ %tmp4 = getelementptr %0* %iz, i32 0, i32 1
+ %real = getelementptr %0* %iz, i32 0, i32 0
+ %tmp7 = getelementptr %0* %z, i32 0, i32 0
+ %tmp8 = load x86_fp80* %tmp7, align 16
+ store x86_fp80 %tmp3, x86_fp80* %real, align 16
+ store x86_fp80 %tmp8, x86_fp80* %tmp4, align 16
+ call void @ccoshl(%0* noalias sret %memtmp, %0* byval align 8 %iz) nounwind
+ %memtmp14 = bitcast %0* %memtmp to i8*
+ %agg.result15 = bitcast %0* %agg.result to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %agg.result15, i8* %memtmp14, i32 32, i32 16, i1 false)
+ ret void
}
-declare void @ccoshl({ x86_fp80, x86_fp80 }* noalias sret , { x86_fp80, x86_fp80 }* byval ) nounwind
+declare void @ccoshl(%0* noalias sret, %0* byval) nounwind
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll b/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll
index 1b26ca9..a40455c 100644
--- a/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll
+++ b/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll
@@ -5,7 +5,7 @@ declare {i32, i32} @bar(i32 %A)
define i32 @foo() {
%X = call {i32, i32} @bar(i32 17)
- %Y = getresult {i32, i32} %X, 0
+ %Y = extractvalue {i32, i32} %X, 0
%Z = add i32 %Y, %Y
ret i32 %Z
}
diff --git a/test/Transforms/ScalarRepl/2007-05-24-LargeAggregate.ll b/test/Transforms/ScalarRepl/2007-05-24-LargeAggregate.ll
deleted file mode 100644
index e67b610..0000000
--- a/test/Transforms/ScalarRepl/2007-05-24-LargeAggregate.ll
+++ /dev/null
@@ -1,27 +0,0 @@
-; RUN: opt < %s -scalarrepl -S | grep {alloca.*client_t}
-; PR1446
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "i686-pc-linux-gnu"
-
- %struct.clientSnapshot_t = type { i32, [32 x i8], %struct.playerState_t, i32, i32, i32, i32, i32 }
- %struct.client_t = type { i32, [1024 x i8], [64 x [1024 x i8]], i32, i32, i32, i32, i32, i32, %struct.usercmd_t, i32, i32, [1024 x i8], %struct.sharedEntity_t*, [32 x i8], [64 x i8], i32, i32, i32, i32, i32, i32, [8 x i8*], [8 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, [32 x %struct.clientSnapshot_t], i32, i32, i32, i32, i32, %struct.netchan_t, %struct.netchan_buffer_t*, %struct.netchan_buffer_t**, i32, [1025 x i32] }
- %struct.entityShared_t = type { %struct.entityState_t, i32, i32, i32, i32, i32, [3 x float], [3 x float], i32, [3 x float], [3 x float], [3 x float], [3 x float], i32 }
- %struct.entityState_t = type { i32, i32, i32, %struct.trajectory_t, %struct.trajectory_t, i32, i32, [3 x float], [3 x float], [3 x float], [3 x float], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
- %struct.msg_t = type { i32, i32, i32, i8*, i32, i32, i32, i32 }
- %struct.netadr_t = type { i32, [4 x i8], [10 x i8], i16 }
- %struct.netchan_buffer_t = type { %struct.msg_t, [16384 x i8], %struct.netchan_buffer_t* }
- %struct.netchan_t = type { i32, i32, %struct.netadr_t, i32, i32, i32, i32, i32, [16384 x i8], i32, i32, i32, [16384 x i8] }
- %struct.playerState_t = type { i32, i32, i32, i32, i32, [3 x float], [3 x float], i32, i32, i32, [3 x i32], i32, i32, i32, i32, i32, i32, [3 x float], i32, i32, [2 x i32], [2 x i32], i32, i32, i32, i32, i32, i32, [3 x float], i32, i32, i32, i32, i32, [16 x i32], [16 x i32], [16 x i32], [16 x i32], i32, i32, i32, i32, i32, i32, i32 }
- %struct.sharedEntity_t = type { %struct.entityState_t, %struct.entityShared_t }
- %struct.trajectory_t = type { i32, i32, i32, [3 x float], [3 x float] }
- %struct.usercmd_t = type { i32, [3 x i32], i32, i8, i8, i8, i8 }
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
-define void @SV_DirectConnect(i64 %from.0.0, i64 %from.0.1, i32 %from.1) {
-entry:
- %temp = alloca %struct.client_t, align 16 ; <%struct.client_t*> [#uses=1]
- %temp586 = bitcast %struct.client_t* %temp to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* null, i8* %temp586, i32 121596, i32 0 )
- unreachable
-}
diff --git a/test/Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll b/test/Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll
index f1b8b80..cf96c4c 100644
--- a/test/Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll
+++ b/test/Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll
@@ -3,21 +3,22 @@
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "i686-apple-darwin8"
- %struct.LongestMember = type { i8, i32 }
- %struct.MyString = type { i32 }
- %struct.UnionType = type { %struct.LongestMember }
+
+%struct.LongestMember = type { i8, i32 }
+%struct.MyString = type { i32 }
+%struct.UnionType = type { %struct.LongestMember }
define void @_Z4testP9UnionTypePS0_(%struct.UnionType* %p, %struct.UnionType** %pointerToUnion) {
entry:
- %tmp = alloca %struct.UnionType, align 8 ; <%struct.UnionType*> [#uses=2]
- %tmp2 = getelementptr %struct.UnionType* %tmp, i32 0, i32 0, i32 0 ; <i8*> [#uses=1]
- %tmp13 = getelementptr %struct.UnionType* %p, i32 0, i32 0, i32 0 ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %tmp2, i8* %tmp13, i32 8, i32 0 )
- %tmp5 = load %struct.UnionType** %pointerToUnion ; <%struct.UnionType*> [#uses=1]
- %tmp56 = getelementptr %struct.UnionType* %tmp5, i32 0, i32 0, i32 0 ; <i8*> [#uses=1]
- %tmp7 = getelementptr %struct.UnionType* %tmp, i32 0, i32 0, i32 0 ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %tmp56, i8* %tmp7, i32 8, i32 0 )
- ret void
+ %tmp = alloca %struct.UnionType, align 8
+ %tmp2 = getelementptr %struct.UnionType* %tmp, i32 0, i32 0, i32 0
+ %tmp13 = getelementptr %struct.UnionType* %p, i32 0, i32 0, i32 0
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp2, i8* %tmp13, i32 8, i32 0, i1 false)
+ %tmp5 = load %struct.UnionType** %pointerToUnion
+ %tmp56 = getelementptr %struct.UnionType* %tmp5, i32 0, i32 0, i32 0
+ %tmp7 = getelementptr %struct.UnionType* %tmp, i32 0, i32 0, i32 0
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp56, i8* %tmp7, i32 8, i32 0, i1 false)
+ ret void
}
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll b/test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll
index b704727..71ba601 100644
--- a/test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll
+++ b/test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll
@@ -4,14 +4,14 @@
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin8"
-define void @memtest1(i8* %dst, i8* %src) nounwind {
+define void @memtest1(i8* %dst, i8* %src) nounwind {
entry:
- %temp = alloca [200 x i8] ; <[100 x i8]*> [#uses=2]
- %temp1 = bitcast [200 x i8]* %temp to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %temp1, i8* %src, i32 200, i32 1 )
- %temp3 = bitcast [200 x i8]* %temp to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %dst, i8* %temp3, i32 200, i32 1 )
- ret void
+ %temp = alloca [200 x i8]
+ %temp1 = bitcast [200 x i8]* %temp to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %temp1, i8* %src, i32 200, i32 1, i1 false)
+ %temp3 = bitcast [200 x i8]* %temp to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %temp3, i32 200, i32 1, i1 false)
+ ret void
}
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll b/test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll
index 1df01c1..7cccb19 100644
--- a/test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll
+++ b/test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll
@@ -2,21 +2,22 @@
; PR2423
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin8"
- %struct.x = type { [1 x i32], i32, i32 }
+
+%struct.x = type { [1 x i32], i32, i32 }
define i32 @b() nounwind {
entry:
- %s = alloca %struct.x ; <%struct.x*> [#uses=2]
- %r = alloca %struct.x ; <%struct.x*> [#uses=2]
- call i32 @a( %struct.x* %s ) nounwind ; <i32>:0 [#uses=0]
- %r1 = bitcast %struct.x* %r to i8* ; <i8*> [#uses=1]
- %s2 = bitcast %struct.x* %s to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %r1, i8* %s2, i32 12, i32 8 )
- getelementptr %struct.x* %r, i32 0, i32 0, i32 1 ; <i32*>:1 [#uses=1]
- load i32* %1, align 4 ; <i32>:2 [#uses=1]
- ret i32 %2
+ %s = alloca %struct.x
+ %r = alloca %struct.x
+ %0 = call i32 @a(%struct.x* %s) nounwind
+ %r1 = bitcast %struct.x* %r to i8*
+ %s2 = bitcast %struct.x* %s to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %r1, i8* %s2, i32 12, i32 8, i1 false)
+ %1 = getelementptr %struct.x* %r, i32 0, i32 0, i32 1
+ %2 = load i32* %1, align 4
+ ret i32 %2
}
declare i32 @a(%struct.x*)
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll b/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll
index e32e683..e7a58f1 100644
--- a/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll
+++ b/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll
@@ -18,8 +18,8 @@ entry:
; because the type of the first element in %struct.two is i8.
%tmpS = getelementptr %struct.two* %S, i32 0, i32 0, i32 0
%tmpD = bitcast %struct.two* %D to i8*
- call void @llvm.memmove.i32(i8* %tmpD, i8* %tmpS, i32 4, i32 1)
+ call void @llvm.memmove.p0i8.p0i8.i32(i8* %tmpD, i8* %tmpS, i32 4, i32 1, i1 false)
ret void
}
-declare void @llvm.memmove.i32(i8*, i8*, i32, i32) nounwind
+declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind \ No newline at end of file
diff --git a/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll b/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll
index 526457b..3218d59 100644
--- a/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll
+++ b/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll
@@ -12,9 +12,8 @@ entry:
%0 = getelementptr %struct.st* %s, i32 0, i32 0 ; <i16*> [#uses=1]
store i16 1, i16* %0, align 4
%s1 = bitcast %struct.st* %s to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32(i8* %p, i8* %s1, i32 2, i32 1)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %p, i8* %s1, i32 2, i32 1, i1 false)
ret void
}
-declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind
-
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/ScalarRepl/2009-03-05-Aggre2Scalar-dbg.ll b/test/Transforms/ScalarRepl/2009-03-05-Aggre2Scalar-dbg.ll
index 50e7f9a..d71bcb9 100644
--- a/test/Transforms/ScalarRepl/2009-03-05-Aggre2Scalar-dbg.ll
+++ b/test/Transforms/ScalarRepl/2009-03-05-Aggre2Scalar-dbg.ll
@@ -1,11 +1,11 @@
; RUN: opt < %s -scalarrepl -disable-output -stats |& grep "Number of aggregates converted to scalar"
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin9.6"
- type { } ; type %0
- type { i8*, i32, i32, i16, i16, %2, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %2, %3*, i32, [3 x i8], [1 x i8], %2, i32, i64 } ; type %1
- type { i8*, i32 } ; type %2
- type opaque ; type %3
- type { i32 } ; type %4
+ %0 = type { } ; type %0
+ %1 = type { i8*, i32, i32, i16, i16, %2, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %2, %3*, i32, [3 x i8], [1 x i8], %2, i32, i64 } ; type %1
+ %2 = type { i8*, i32 } ; type %2
+ %3 = type opaque ; type %3
+ %4 = type { i32 } ; type %4
%llvm.dbg.anchor.type = type { i32, i32 }
%llvm.dbg.basictype.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, i32 }
%llvm.dbg.compile_unit.type = type { i32, %0*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 }
diff --git a/test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll b/test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll
index 31d9bae..1993e4f 100644
--- a/test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll
+++ b/test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll
@@ -13,54 +13,54 @@ define void @test(<8 x i16> %tmp.0, %struct.int16x8x2_t* %dst) nounwind {
; CHECK: @test
; CHECK-NOT: alloca
; CHECK: "alloca point"
+; CHECK: store <8 x i16>
+; CHECK: store <8 x i16>
+
entry:
- %tmp_addr = alloca %struct.int16x8_t ; <%struct.int16x8_t*> [#uses=3]
- %dst_addr = alloca %struct.int16x8x2_t* ; <%struct.int16x8x2_t**> [#uses=2]
- %__rv = alloca %union..0anon ; <%union..0anon*> [#uses=2]
- %__bx = alloca %struct.int16x8_t ; <%struct.int16x8_t*> [#uses=2]
- %__ax = alloca %struct.int16x8_t ; <%struct.int16x8_t*> [#uses=2]
- %tmp2 = alloca %struct.int16x8x2_t ; <%struct.int16x8x2_t*> [#uses=2]
- %0 = alloca %struct.int16x8x2_t ; <%struct.int16x8x2_t*> [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %1 = getelementptr inbounds %struct.int16x8_t* %tmp_addr, i32 0, i32 0 ; <<8 x i16>*> [#uses=1]
+ %tmp_addr = alloca %struct.int16x8_t
+ %dst_addr = alloca %struct.int16x8x2_t*
+ %__rv = alloca %union..0anon
+ %__bx = alloca %struct.int16x8_t
+ %__ax = alloca %struct.int16x8_t
+ %tmp2 = alloca %struct.int16x8x2_t
+ %0 = alloca %struct.int16x8x2_t
+ %"alloca point" = bitcast i32 0 to i32
+ %1 = getelementptr inbounds %struct.int16x8_t* %tmp_addr, i32 0, i32 0
store <8 x i16> %tmp.0, <8 x i16>* %1
store %struct.int16x8x2_t* %dst, %struct.int16x8x2_t** %dst_addr
- %2 = getelementptr inbounds %struct.int16x8_t* %__ax, i32 0, i32 0 ; <<8 x i16>*> [#uses=1]
- %3 = getelementptr inbounds %struct.int16x8_t* %tmp_addr, i32 0, i32 0 ; <<8 x i16>*> [#uses=1]
- %4 = load <8 x i16>* %3, align 16 ; <<8 x i16>> [#uses=1]
+ %2 = getelementptr inbounds %struct.int16x8_t* %__ax, i32 0, i32 0
+ %3 = getelementptr inbounds %struct.int16x8_t* %tmp_addr, i32 0, i32 0
+ %4 = load <8 x i16>* %3, align 16
store <8 x i16> %4, <8 x i16>* %2, align 16
- %5 = getelementptr inbounds %struct.int16x8_t* %__bx, i32 0, i32 0 ; <<8 x i16>*> [#uses=1]
- %6 = getelementptr inbounds %struct.int16x8_t* %tmp_addr, i32 0, i32 0 ; <<8 x i16>*> [#uses=1]
- %7 = load <8 x i16>* %6, align 16 ; <<8 x i16>> [#uses=1]
+ %5 = getelementptr inbounds %struct.int16x8_t* %__bx, i32 0, i32 0
+ %6 = getelementptr inbounds %struct.int16x8_t* %tmp_addr, i32 0, i32 0
+ %7 = load <8 x i16>* %6, align 16
store <8 x i16> %7, <8 x i16>* %5, align 16
- %8 = getelementptr inbounds %struct.int16x8_t* %__ax, i32 0, i32 0 ; <<8 x i16>*> [#uses=1]
- %9 = load <8 x i16>* %8, align 16 ; <<8 x i16>> [#uses=2]
- %10 = getelementptr inbounds %struct.int16x8_t* %__bx, i32 0, i32 0 ; <<8 x i16>*> [#uses=1]
- %11 = load <8 x i16>* %10, align 16 ; <<8 x i16>> [#uses=2]
- %12 = getelementptr inbounds %union..0anon* %__rv, i32 0, i32 0 ; <%struct.int16x8x2_t*> [#uses=1]
- %13 = bitcast %struct.int16x8x2_t* %12 to %struct.__neon_int16x8x2_t* ; <%struct.__neon_int16x8x2_t*> [#uses=2]
- %14 = shufflevector <8 x i16> %9, <8 x i16> %11, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14> ; <<8 x i16>> [#uses=1]
- %15 = getelementptr inbounds %struct.__neon_int16x8x2_t* %13, i32 0, i32 0 ; <<8 x i16>*> [#uses=1]
+ %8 = getelementptr inbounds %struct.int16x8_t* %__ax, i32 0, i32 0
+ %9 = load <8 x i16>* %8, align 16
+ %10 = getelementptr inbounds %struct.int16x8_t* %__bx, i32 0, i32 0
+ %11 = load <8 x i16>* %10, align 16
+ %12 = getelementptr inbounds %union..0anon* %__rv, i32 0, i32 0
+ %13 = bitcast %struct.int16x8x2_t* %12 to %struct.__neon_int16x8x2_t*
+ %14 = shufflevector <8 x i16> %9, <8 x i16> %11, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
+ %15 = getelementptr inbounds %struct.__neon_int16x8x2_t* %13, i32 0, i32 0
store <8 x i16> %14, <8 x i16>* %15
- %16 = shufflevector <8 x i16> %9, <8 x i16> %11, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15> ; <<8 x i16>> [#uses=1]
- %17 = getelementptr inbounds %struct.__neon_int16x8x2_t* %13, i32 0, i32 1 ; <<8 x i16>*> [#uses=1]
+ %16 = shufflevector <8 x i16> %9, <8 x i16> %11, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
+ %17 = getelementptr inbounds %struct.__neon_int16x8x2_t* %13, i32 0, i32 1
store <8 x i16> %16, <8 x i16>* %17
- %18 = getelementptr inbounds %union..0anon* %__rv, i32 0, i32 0 ; <%struct.int16x8x2_t*> [#uses=1]
- %19 = bitcast %struct.int16x8x2_t* %0 to i8* ; <i8*> [#uses=1]
- %20 = bitcast %struct.int16x8x2_t* %18 to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32(i8* %19, i8* %20, i32 32, i32 16)
- %tmp21 = bitcast %struct.int16x8x2_t* %tmp2 to i8* ; <i8*> [#uses=1]
- %21 = bitcast %struct.int16x8x2_t* %0 to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32(i8* %tmp21, i8* %21, i32 32, i32 16)
- %22 = load %struct.int16x8x2_t** %dst_addr, align 4 ; <%struct.int16x8x2_t*> [#uses=1]
- %23 = bitcast %struct.int16x8x2_t* %22 to i8* ; <i8*> [#uses=1]
- %tmp22 = bitcast %struct.int16x8x2_t* %tmp2 to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32(i8* %23, i8* %tmp22, i32 32, i32 16)
+ %18 = getelementptr inbounds %union..0anon* %__rv, i32 0, i32 0
+ %19 = bitcast %struct.int16x8x2_t* %0 to i8*
+ %20 = bitcast %struct.int16x8x2_t* %18 to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %19, i8* %20, i32 32, i32 16, i1 false)
+ %tmp21 = bitcast %struct.int16x8x2_t* %tmp2 to i8*
+ %21 = bitcast %struct.int16x8x2_t* %0 to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp21, i8* %21, i32 32, i32 16, i1 false)
+ %22 = load %struct.int16x8x2_t** %dst_addr, align 4
+ %23 = bitcast %struct.int16x8x2_t* %22 to i8*
+ %tmp22 = bitcast %struct.int16x8x2_t* %tmp2 to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %23, i8* %tmp22, i32 32, i32 16, i1 false)
br label %return
-; CHECK: store <8 x i16>
-; CHECK: store <8 x i16>
-
return: ; preds = %entry
ret void
}
@@ -69,21 +69,22 @@ return: ; preds = %entry
%struct._NSRange = type { i64 }
define void @test_memcpy_self() nounwind {
-; CHECK: @test_memcpy_self
-; CHECK-NOT: alloca
-; CHECK: br i1
entry:
- %range = alloca %struct._NSRange ; <%struct._NSRange*> [#uses=2]
+ %range = alloca %struct._NSRange
br i1 undef, label %cond.true, label %cond.false
cond.true: ; preds = %entry
- %tmp3 = bitcast %struct._NSRange* %range to i8* ; <i8*> [#uses=1]
- %tmp4 = bitcast %struct._NSRange* %range to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32(i8* %tmp3, i8* %tmp4, i32 8, i32 8)
+ %tmp3 = bitcast %struct._NSRange* %range to i8*
+ %tmp4 = bitcast %struct._NSRange* %range to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp3, i8* %tmp4, i32 8, i32 8, i1 false)
ret void
cond.false: ; preds = %entry
ret void
+
+; CHECK: @test_memcpy_self
+; CHECK-NOT: alloca
+; CHECK: br i1
}
-declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll b/test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll
index 3aee399..52df6d5 100644
--- a/test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll
+++ b/test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll
@@ -3,7 +3,7 @@
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32"
-%struct.test = type { [3 x double ] }
+%struct.test = type { [3 x double] }
define void @test_memcpy_self() nounwind {
; CHECK: @test_memcpy_self
@@ -11,8 +11,8 @@ define void @test_memcpy_self() nounwind {
; CHECK: ret void
%1 = alloca %struct.test
%2 = bitcast %struct.test* %1 to i8*
- call void @llvm.memcpy.i32(i8* %2, i8* %2, i32 24, i32 4)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %2, i8* %2, i32 24, i32 4, i1 false)
ret void
}
-declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/ScalarRepl/2011-06-08-VectorExtractValue.ll b/test/Transforms/ScalarRepl/2011-06-08-VectorExtractValue.ll
index 32e67fb..98fa1c6 100644
--- a/test/Transforms/ScalarRepl/2011-06-08-VectorExtractValue.ll
+++ b/test/Transforms/ScalarRepl/2011-06-08-VectorExtractValue.ll
@@ -10,7 +10,8 @@ target triple = "x86_64-apple-macosx10.7.0"
; CHECK: main
; CHECK-NOT: alloca
-; CHECK: extractelement <2 x float> zeroinitializer
+; CHECK: %[[A:[a-z0-9]*]] = and i128
+; CHECK: %[[B:[a-z0-9]*]] = trunc i128 %[[A]] to i32
define void @main() uwtable ssp {
entry:
@@ -27,7 +28,8 @@ entry:
; CHECK: test1
; CHECK-NOT: alloca
-; CHECK: extractelement <2 x float> zeroinitializer
+; CHECK: %[[A:[a-z0-9]*]] = and i128
+; CHECK: %[[B:[a-z0-9]*]] = trunc i128 %[[A]] to i32
define void @test1() uwtable ssp {
entry:
diff --git a/test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll b/test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll
new file mode 100644
index 0000000..f8530d6
--- /dev/null
+++ b/test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll
@@ -0,0 +1,37 @@
+; RUN: opt < %s -scalarrepl -S | FileCheck %s
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
+target triple = "thumbv7-apple-darwin10"
+
+; CHECK: f
+; CHECK-NOT: alloca
+; CHECK: %[[A:[a-z0-9]*]] = and i128 undef, -16777216
+; CHECK: %[[B:[a-z0-9]*]] = bitcast i128 %[[A]] to <4 x float>
+; CHECK: %[[C:[a-z0-9]*]] = extractelement <4 x float> %[[B]], i32 0
+; CHECK: ret float %[[C]]
+
+define float @f() nounwind ssp {
+entry:
+ %a = alloca <4 x float>, align 16
+ %p = bitcast <4 x float>* %a to i8*
+ call void @llvm.memset.p0i8.i32(i8* %p, i8 0, i32 3, i32 16, i1 false)
+ %vec = load <4 x float>* %a, align 8
+ %val = extractelement <4 x float> %vec, i32 0
+ ret float %val
+}
+
+; CHECK: g
+; CHECK-NOT: alloca
+; CHECK: and i128
+
+define void @g() nounwind ssp {
+entry:
+ %a = alloca { <4 x float> }, align 16
+ %p = bitcast { <4 x float> }* %a to i8*
+ call void @llvm.memset.p0i8.i32(i8* %p, i8 0, i32 16, i32 16, i1 false)
+ %q = bitcast { <4 x float> }* %a to [2 x <2 x float>]*
+ %arrayidx = getelementptr inbounds [2 x <2 x float>]* %q, i32 0, i32 0
+ store <2 x float> undef, <2 x float>* %arrayidx, align 8
+ ret void
+}
+
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
diff --git a/test/Transforms/ScalarRepl/badarray.ll b/test/Transforms/ScalarRepl/badarray.ll
index 3ec3c01..768fec6 100644
--- a/test/Transforms/ScalarRepl/badarray.ll
+++ b/test/Transforms/ScalarRepl/badarray.ll
@@ -48,10 +48,10 @@ entry:
%callret = call %padded *@test3f() ; <i32> [#uses=2]
%callretcast = bitcast %padded* %callret to i8* ; <i8*> [#uses=1]
%var_11 = bitcast %padded* %var_1 to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32(i8* %callretcast, i8* %var_11, i32 8, i32 4)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %callretcast, i8* %var_11, i32 8, i32 4, i1 false)
ret void
}
-declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
declare %padded* @test3f()
diff --git a/test/Transforms/ScalarRepl/crash.ll b/test/Transforms/ScalarRepl/crash.ll
index 83daaaf..cd4dc32 100644
--- a/test/Transforms/ScalarRepl/crash.ll
+++ b/test/Transforms/ScalarRepl/crash.ll
@@ -143,7 +143,6 @@ entry:
%struct.anon = type { %struct.aal_spanarray_t }
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
define fastcc void @test7() {
entry:
@@ -158,7 +157,7 @@ cond_next114.i: ; preds = %cond_true
cond_next: ; preds = %cond_true
%SB19 = bitcast %struct.aal_spanbucket_t* %SB to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %SB19, i8* null, i32 12, i32 0 )
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %SB19, i8* null, i32 12, i32 0, i1 false)
br i1 false, label %cond_next34, label %cond_next79
cond_next34: ; preds = %cond_next
@@ -189,14 +188,14 @@ entry:
; rdar://6808691 - ZeroLengthMemSet
- type <{ i32, i16, i8, i8, i64, i64, i16, [0 x i16] }>
+ %0 = type <{ i32, i16, i8, i8, i64, i64, i16, [0 x i16] }>
define i32 @test9() {
entry:
%.compoundliteral = alloca %0
%tmp228 = getelementptr %0* %.compoundliteral, i32 0, i32 7
%tmp229 = bitcast [0 x i16]* %tmp228 to i8*
- call void @llvm.memset.i64(i8* %tmp229, i8 0, i64 0, i32 2)
+ call void @llvm.memset.p0i8.i64(i8* %tmp229, i8 0, i64 0, i32 2, i1 false)
unreachable
}
@@ -260,3 +259,6 @@ entry:
call void %0() nounwind
ret void
}
+
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
diff --git a/test/Transforms/ScalarRepl/memset-aggregate.ll b/test/Transforms/ScalarRepl/memset-aggregate.ll
index 5aeefcd..42e7a0f 100644
--- a/test/Transforms/ScalarRepl/memset-aggregate.ll
+++ b/test/Transforms/ScalarRepl/memset-aggregate.ll
@@ -14,31 +14,29 @@ entry:
%L = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
%L2 = bitcast %struct.foo* %L to i8* ; <i8*> [#uses=1]
%tmp13 = bitcast %struct.foo* %P to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.i32( i8* %L2, i8* %tmp13, i32 8, i32 4 )
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %L2, i8* %tmp13, i32 8, i32 4, i1 false)
%tmp4 = getelementptr %struct.foo* %L, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp5 = load i32* %tmp4 ; <i32> [#uses=1]
ret i32 %tmp5
}
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
define i32 @test2() {
entry:
%L = alloca [4 x %struct.foo], align 16 ; <[4 x %struct.foo]*> [#uses=2]
%L12 = bitcast [4 x %struct.foo]* %L to i8* ; <i8*> [#uses=1]
- call void @llvm.memset.i32( i8* %L12, i8 0, i32 32, i32 16 )
+ call void @llvm.memset.p0i8.i32(i8* %L12, i8 0, i32 32, i32 16, i1 false)
%tmp4 = getelementptr [4 x %struct.foo]* %L, i32 0, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp5 = load i32* %tmp4 ; <i32> [#uses=1]
ret i32 %tmp5
}
-declare void @llvm.memset.i32(i8*, i8, i32, i32)
define i32 @test3() {
entry:
%B = alloca %struct.bar, align 16 ; <%struct.bar*> [#uses=4]
%B1 = bitcast %struct.bar* %B to i8* ; <i8*> [#uses=1]
- call void @llvm.memset.i32( i8* %B1, i8 1, i32 24, i32 16 )
+ call void @llvm.memset.p0i8.i32(i8* %B1, i8 1, i32 24, i32 16, i1 false)
%tmp3 = getelementptr %struct.bar* %B, i32 0, i32 0, i32 0 ; <i32*> [#uses=1]
store i32 1, i32* %tmp3
%tmp4 = getelementptr %struct.bar* %B, i32 0, i32 2 ; <double*> [#uses=1]
@@ -58,9 +56,12 @@ entry:
store i32 1, i32* %0, align 8
%1 = getelementptr %struct.f* %A, i32 0, i32 1 ; <i32*> [#uses=1]
%2 = bitcast i32* %1 to i8* ; <i8*> [#uses=1]
- call void @llvm.memset.i32(i8* %2, i8 2, i32 12, i32 4)
+ call void @llvm.memset.p0i8.i32(i8* %2, i8 2, i32 12, i32 4, i1 false)
%3 = getelementptr %struct.f* %A, i32 0, i32 2 ; <i32*> [#uses=1]
%4 = load i32* %3, align 8 ; <i32> [#uses=1]
%retval12 = trunc i32 %4 to i16 ; <i16> [#uses=1]
ret i16 %retval12
}
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind \ No newline at end of file
diff --git a/test/Transforms/SimplifyCFG/2008-04-23-MergeMultipleResultRet.ll b/test/Transforms/SimplifyCFG/2008-04-23-MergeMultipleResultRet.ll
deleted file mode 100644
index 8e05a3c..0000000
--- a/test/Transforms/SimplifyCFG/2008-04-23-MergeMultipleResultRet.ll
+++ /dev/null
@@ -1,43 +0,0 @@
-; RUN: opt < %s -simplifycfg -disable-output
-; rdar://5882392
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
-target triple = "x86_64-apple-darwin9"
- %struct.Py_complex = type { double, double }
-
-define %struct.Py_complex @_Py_c_pow(double %a.0, double %a.1, double %b.0, double %b.1) nounwind {
-entry:
- %tmp7 = fcmp une double %b.0, 0.000000e+00 ; <i1> [#uses=1]
- %tmp11 = fcmp une double %b.1, 0.000000e+00 ; <i1> [#uses=1]
- %bothcond = or i1 %tmp7, %tmp11 ; <i1> [#uses=1]
- br i1 %bothcond, label %bb15, label %bb53
-
-bb15: ; preds = %entry
- %tmp18 = fcmp une double %a.0, 0.000000e+00 ; <i1> [#uses=1]
- %tmp24 = fcmp une double %a.1, 0.000000e+00 ; <i1> [#uses=1]
- %bothcond1 = or i1 %tmp18, %tmp24 ; <i1> [#uses=1]
- br i1 %bothcond1, label %bb29, label %bb27
-
-bb27: ; preds = %bb15
- %tmp28 = call i32* @__error( ) nounwind ; <i32*> [#uses=1]
- store i32 33, i32* %tmp28, align 4
- ret double undef, double undef
-
-bb29: ; preds = %bb15
- %tmp36 = fcmp une double %b.1, 0.000000e+00 ; <i1> [#uses=1]
- br i1 %tmp36, label %bb39, label %bb47
-
-bb39: ; preds = %bb29
- br label %bb47
-
-bb47: ; preds = %bb39, %bb29
- ret double undef, double undef
-
-bb53: ; preds = %entry
- ret double undef, double undef
-}
-
-declare i32* @__error()
-
-declare double @pow(double, double) nounwind readonly
-
-declare double @cos(double) nounwind readonly
diff --git a/test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll b/test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll
deleted file mode 100644
index 9c15efc..0000000
--- a/test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll
+++ /dev/null
@@ -1,30 +0,0 @@
-; RUN: opt < %s -simplifycfg -disable-output
-; PR2256
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
-target triple = "x86_64-pc-mingw32"
-
-define { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval %Z, i1 %cond) nounwind {
-bb: ; preds = %entry
- br i1 %cond, label %bb48, label %bb40
-
-bb40: ; preds = %bb
- store i32 34, i32* null, align 4
- br label %bb196
-
-bb48: ; preds = %bb.bb48_crit_edge, %entry.bb48_crit_edge
- %tmp53 = icmp eq i32 0, 1280 ; <i1> [#uses=1]
- br i1 %tmp53, label %bb56, label %bb174
-
-bb56: ; preds = %bb48
- %iftmp.0.0 = select i1 false, x86_fp80 0xK3FFFC90FDAA22168C235, x86_fp80 0xKBFFFC90FDAA22168C235 ; <x86_fp80> [#uses=0]
- br label %bb196
-
-
-bb174: ; preds = %bb144, %bb114
- %tmp191 = fmul x86_fp80 0xK00000000000000000000, 0xK3FFE8000000000000000 ; <x86_fp80> [#uses=1]
- br label %bb196
-
-bb196: ; preds = %bb174, %bb56, %bb40
- %Res.1.0 = phi x86_fp80 [ 0xK7FFF8000000000000000, %bb40 ], [ %tmp191, %bb174 ], [ 0xK00000000000000000000, %bb56 ] ; <x86_fp80> [#uses=1]
- ret x86_fp80 0xK00000000000000000000, x86_fp80 %Res.1.0
-}
diff --git a/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll b/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll
new file mode 100644
index 0000000..1b70c06
--- /dev/null
+++ b/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll
@@ -0,0 +1,36 @@
+; RUN: opt < %s -simplifycfg -S | \
+; RUN: not grep " switch"
+; PR10131
+
+; ModuleID = '<stdin>'
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
+target triple = "i386-pc-linux-gnu"
+
+define i32 @t(i32 %m) nounwind readnone {
+entry:
+ switch i32 %m, label %sw.bb4 [
+ i32 0, label %sw.bb0
+ i32 1, label %sw.bb1
+ i32 2, label %sw.bb2
+ i32 3, label %sw.bb3
+ ]
+
+sw.bb0: ; preds = %entry
+ br label %return
+
+sw.bb1: ; preds = %entry
+ br label %return
+
+sw.bb2: ; preds = %entry
+ br label %return
+
+sw.bb3: ; preds = %entry
+ br label %return
+
+sw.bb4: ; preds = %entry
+ br label %return
+
+return: ; preds = %entry, %sw.bb4, %sw.bb3, %sw.bb2, %sw.bb1
+ %retval.0 = phi i32 [ 4, %sw.bb4 ], [ 3, %sw.bb3 ], [ 2, %sw.bb2 ], [ 1, %sw.bb1 ], [ 0, %sw.bb0 ]
+ ret i32 %retval.0
+}
diff --git a/test/Transforms/SimplifyCFG/switch_switch_fold_dbginfo.ll b/test/Transforms/SimplifyCFG/switch_switch_fold_dbginfo.ll
index 7d7391a..343e169 100644
--- a/test/Transforms/SimplifyCFG/switch_switch_fold_dbginfo.ll
+++ b/test/Transforms/SimplifyCFG/switch_switch_fold_dbginfo.ll
@@ -1,5 +1,5 @@
; RUN: opt < %s -simplifycfg -S | \
-; RUN: grep switch | count 1
+; RUN: not grep " switch"
; ModuleID = '<stdin>'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
diff --git a/test/Transforms/SimplifyLibCalls/MemCpy.ll b/test/Transforms/SimplifyLibCalls/MemCpy.ll
index 39662b1..c711178 100644
--- a/test/Transforms/SimplifyLibCalls/MemCpy.ll
+++ b/test/Transforms/SimplifyLibCalls/MemCpy.ll
@@ -4,17 +4,16 @@
@hel = constant [4 x i8] c"hel\00" ; <[4 x i8]*> [#uses=1]
@hello_u = constant [8 x i8] c"hello_u\00" ; <[8 x i8]*> [#uses=1]
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
define i32 @main() {
- %h_p = getelementptr [2 x i8]* @h, i32 0, i32 0 ; <i8*> [#uses=1]
- %hel_p = getelementptr [4 x i8]* @hel, i32 0, i32 0 ; <i8*> [#uses=1]
- %hello_u_p = getelementptr [8 x i8]* @hello_u, i32 0, i32 0 ; <i8*> [#uses=1]
- %target = alloca [1024 x i8] ; <[1024 x i8]*> [#uses=1]
- %target_p = getelementptr [1024 x i8]* %target, i32 0, i32 0 ; <i8*> [#uses=3]
- call void @llvm.memcpy.i32( i8* %target_p, i8* %h_p, i32 2, i32 2 )
- call void @llvm.memcpy.i32( i8* %target_p, i8* %hel_p, i32 4, i32 4 )
- call void @llvm.memcpy.i32( i8* %target_p, i8* %hello_u_p, i32 8, i32 8 )
- ret i32 0
+ %h_p = getelementptr [2 x i8]* @h, i32 0, i32 0
+ %hel_p = getelementptr [4 x i8]* @hel, i32 0, i32 0
+ %hello_u_p = getelementptr [8 x i8]* @hello_u, i32 0, i32 0
+ %target = alloca [1024 x i8]
+ %target_p = getelementptr [1024 x i8]* %target, i32 0, i32 0
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %target_p, i8* %h_p, i32 2, i32 2, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %target_p, i8* %hel_p, i32 4, i32 4, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %target_p, i8* %hello_u_p, i32 8, i32 8, i1 false)
+ ret i32 0
}
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
diff --git a/test/Transforms/TailCallElim/inf-recursion.ll b/test/Transforms/TailCallElim/inf-recursion.ll
index e4ac928..c427869 100644
--- a/test/Transforms/TailCallElim/inf-recursion.ll
+++ b/test/Transforms/TailCallElim/inf-recursion.ll
@@ -30,5 +30,4 @@ define float @fabsf(float %f) {
ret float %t
}
-declare float @fabsf(float %f)
declare x86_fp80 @fabsl(x86_fp80 %f)
diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg
index 3509296..ba4cbc5 100644
--- a/test/Unit/lit.cfg
+++ b/test/Unit/lit.cfg
@@ -30,14 +30,6 @@ if 'TEMP' in os.environ:
###
-# If necessary, point the dynamic loader at libLLVM.so.
-if config.enable_shared:
- shlibpath = config.environment.get(config.shlibpath_var,'')
- if shlibpath:
- shlibpath = os.pathsep + shlibpath
- shlibpath = config.shlibdir + shlibpath
- config.environment[config.shlibpath_var] = shlibpath
-
# Check that the object root is known.
if config.test_exec_root is None:
# Otherwise, we haven't loaded the site specific configuration (the user is
@@ -81,3 +73,11 @@ if config.test_exec_root is None:
lit.note('using out-of-tree build at %r' % llvm_obj_root)
lit.load_config(config, site_cfg)
raise SystemExit
+
+# If necessary, point the dynamic loader at libLLVM.so.
+if config.enable_shared:
+ shlibpath = config.environment.get(config.shlibpath_var,'')
+ if shlibpath:
+ shlibpath = os.pathsep + shlibpath
+ shlibpath = config.shlibdir + shlibpath
+ config.environment[config.shlibpath_var] = shlibpath
diff --git a/test/Verifier/2002-04-13-RetTypes.ll b/test/Verifier/2002-04-13-RetTypes.ll
index 197f5c2..d6e1a54 100644
--- a/test/Verifier/2002-04-13-RetTypes.ll
+++ b/test/Verifier/2002-04-13-RetTypes.ll
@@ -4,7 +4,6 @@
; delcared return type of the function they live in.
;
-define i32 @testfunc()
-begin
+define i32 @testfunc() {
ret i32* null
-end
+}
diff --git a/test/lit.cfg b/test/lit.cfg
index 9a2f74c..ef56473 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -306,3 +306,6 @@ else:
if loadable_module:
config.available_features.add('loadable_module')
+
+if config.enable_assertions:
+ config.available_features.add('asserts')
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index a61920f..6c33831 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -5,9 +5,9 @@ config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.llvmgcc_dir = "@LLVMGCCDIR@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
-config.llvm_build_modes = "@LLVM_BUILD_MODE@".split('+')
config.python_executable = "@PYTHON_EXECUTABLE@"
config.enable_shared = @ENABLE_SHARED@
+config.enable_assertions = @LLVM_ENABLE_ASSERTIONS@
# Support substitution of the tools_dir with user parameters. This is
# used when we can't determine the tool dir at configuration time.