From f8af5cf600354830d4ccf59732403f0f073eccb9 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 22 Dec 2013 00:04:03 +0000 Subject: Vendor import of llvm release_34 branch r197841 (effectively, 3.4 RC3): https://llvm.org/svn/llvm-project/llvm/branches/release_34@197841 --- test/Transforms/ADCE/lit.local.cfg | 1 - test/Transforms/ArgumentPromotion/lit.local.cfg | 1 - test/Transforms/ArgumentPromotion/reserve-tbaa.ll | 52 + test/Transforms/BBVectorize/X86/cmp-types.ll | 2 +- test/Transforms/BBVectorize/X86/loop1.ll | 4 +- test/Transforms/BBVectorize/X86/pr15289.ll | 23 +- test/Transforms/BBVectorize/X86/sh-rec.ll | 2 +- test/Transforms/BBVectorize/X86/sh-rec2.ll | 2 +- test/Transforms/BBVectorize/X86/sh-rec3.ll | 2 +- test/Transforms/BBVectorize/X86/sh-types.ll | 2 +- test/Transforms/BBVectorize/X86/simple-int.ll | 10 +- test/Transforms/BBVectorize/X86/simple-ldstr.ll | 2 +- test/Transforms/BBVectorize/X86/simple.ll | 10 +- test/Transforms/BBVectorize/X86/vs-cast.ll | 2 +- test/Transforms/BBVectorize/X86/wr-aliases.ll | 144 ++ test/Transforms/BBVectorize/cycle.ll | 2 +- test/Transforms/BBVectorize/ld1.ll | 2 +- test/Transforms/BBVectorize/lit.local.cfg | 2 - test/Transforms/BBVectorize/loop1.ll | 4 +- test/Transforms/BBVectorize/mem-op-depth.ll | 2 +- test/Transforms/BBVectorize/metadata.ll | 4 +- test/Transforms/BBVectorize/no-ldstr-conn.ll | 2 +- test/Transforms/BBVectorize/req-depth.ll | 4 +- test/Transforms/BBVectorize/search-limit.ll | 4 +- test/Transforms/BBVectorize/simple-int.ll | 10 +- test/Transforms/BBVectorize/simple-ldstr-ptrs.ll | 12 +- test/Transforms/BBVectorize/simple-ldstr.ll | 20 +- test/Transforms/BBVectorize/simple-sel.ll | 6 +- test/Transforms/BBVectorize/simple-tst.ll | 2 +- test/Transforms/BBVectorize/simple.ll | 16 +- test/Transforms/BBVectorize/simple3.ll | 2 +- .../BBVectorize/xcore/no-vector-registers.ll | 18 + test/Transforms/BlockPlacement/basictest.ll | 15 - test/Transforms/BlockPlacement/lit.local.cfg | 1 - test/Transforms/CodeExtractor/lit.local.cfg | 1 - test/Transforms/CodeGenPrepare/basic.ll | 2 +- test/Transforms/CodeGenPrepare/lit.local.cfg | 1 - test/Transforms/ConstProp/basictest.ll | 10 +- test/Transforms/ConstProp/bitcast.ll | 2 +- test/Transforms/ConstProp/bswap.ll | 8 +- test/Transforms/ConstProp/calls.ll | 24 +- test/Transforms/ConstProp/extractvalue.ll | 6 +- test/Transforms/ConstProp/insertvalue.ll | 6 +- test/Transforms/ConstProp/lit.local.cfg | 1 - test/Transforms/ConstProp/loads.ll | 76 +- test/Transforms/ConstProp/overflow-ops.ll | 38 +- test/Transforms/ConstantMerge/align.ll | 28 + test/Transforms/ConstantMerge/lit.local.cfg | 1 - .../CorrelatedValuePropagation/2010-09-02-Trunc.ll | 4 +- .../Transforms/CorrelatedValuePropagation/basic.ll | 18 +- .../CorrelatedValuePropagation/lit.local.cfg | 1 - .../Transforms/CorrelatedValuePropagation/range.ll | 14 +- test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll | 33 +- .../2013-05-17-VarargsAndBlockAddress.ll | 25 + test/Transforms/DeadArgElim/dbginfo.ll | 18 +- test/Transforms/DeadArgElim/deadexternal.ll | 2 +- test/Transforms/DeadArgElim/keepalive.ll | 2 +- test/Transforms/DeadArgElim/linkage.ll | 21 + test/Transforms/DeadArgElim/lit.local.cfg | 1 - test/Transforms/DeadArgElim/returned.ll | 55 + test/Transforms/DeadArgElim/variadic_safety.ll | 38 + .../2011-09-06-EndOfFunction.ll | 2 +- .../DeadStoreElimination/OverwriteStoreEnd.ll | 14 +- .../DeadStoreElimination/PartialStore.ll | 10 +- .../DeadStoreElimination/const-pointers.ll | 6 +- test/Transforms/DeadStoreElimination/free.ll | 10 +- .../Transforms/DeadStoreElimination/inst-limits.ll | 261 +++ test/Transforms/DeadStoreElimination/libcalls.ll | 12 +- test/Transforms/DeadStoreElimination/lifetime.ll | 2 +- test/Transforms/DeadStoreElimination/lit.local.cfg | 1 - .../DeadStoreElimination/memintrinsics.ll | 6 +- .../DeadStoreElimination/no-targetdata.ll | 2 +- test/Transforms/DeadStoreElimination/simple.ll | 50 +- test/Transforms/DebugIR/crash.ll | 42 + test/Transforms/DebugIR/exception.ll | 127 ++ test/Transforms/DebugIR/function.ll | 51 + test/Transforms/DebugIR/simple-addrspace.ll | 13 + test/Transforms/DebugIR/simple.ll | 25 + test/Transforms/DebugIR/struct.ll | 24 + test/Transforms/DebugIR/vector.ll | 93 + test/Transforms/EarlyCSE/basic.ll | 16 +- test/Transforms/EarlyCSE/commute.ll | 10 +- test/Transforms/EarlyCSE/instsimplify-dom.ll | 2 +- test/Transforms/EarlyCSE/lit.local.cfg | 1 - .../FunctionAttrs/2009-01-02-LocalStores.ll | 13 +- .../FunctionAttrs/2009-01-04-Annotate.ll | 2 +- test/Transforms/FunctionAttrs/annotate-1.ll | 7 +- test/Transforms/FunctionAttrs/atomic.ll | 2 +- test/Transforms/FunctionAttrs/lit.local.cfg | 1 - test/Transforms/FunctionAttrs/nocapture.ll | 20 +- test/Transforms/FunctionAttrs/noreturn.ll | 2 +- test/Transforms/FunctionAttrs/readattrs.ll | 47 + test/Transforms/GCOVProfiling/linkagename.ll | 6 +- test/Transforms/GCOVProfiling/lit.local.cfg | 1 - test/Transforms/GCOVProfiling/version.ll | 15 +- .../Transforms/GVN/2007-07-26-InterlockingLoops.ll | 8 +- test/Transforms/GVN/2008-07-02-Unreachable.ll | 8 +- test/Transforms/GVN/2010-11-13-Simplify.ll | 2 +- .../GVN/2011-06-01-NonLocalMemdepMiscompile.ll | 6 +- .../GVN/2011-07-07-MatchIntrinsicExtract.ll | 12 +- test/Transforms/GVN/commute.ll | 4 +- test/Transforms/GVN/cond_br.ll | 55 + test/Transforms/GVN/cond_br2.ll | 140 ++ test/Transforms/GVN/condprop.ll | 22 +- test/Transforms/GVN/edge.ll | 8 +- test/Transforms/GVN/lit.local.cfg | 1 - test/Transforms/GVN/load-pre-align.ll | 2 +- test/Transforms/GVN/local-pre.ll | 6 +- test/Transforms/GVN/malloc-load-removal.ll | 31 +- test/Transforms/GVN/non-local-offset.ll | 4 +- test/Transforms/GVN/phi-translate.ll | 2 +- test/Transforms/GVN/pr14166.ll | 2 +- test/Transforms/GVN/pr17732.ll | 30 + test/Transforms/GVN/pr17852.ll | 66 + test/Transforms/GVN/pre-load.ll | 16 +- test/Transforms/GVN/preserve-tbaa.ll | 5 +- test/Transforms/GVN/readattrs.ll | 17 + test/Transforms/GVN/rle-nonlocal.ll | 5 +- test/Transforms/GVN/rle-phi-translate.ll | 10 +- test/Transforms/GVN/rle-semidominated.ll | 5 +- test/Transforms/GVN/rle.ll | 92 +- test/Transforms/GVN/tbaa.ll | 28 +- test/Transforms/GlobalDCE/lit.local.cfg | 1 - test/Transforms/GlobalOpt/2008-07-17-addrspace.ll | 2 +- .../GlobalOpt/2009-02-15-ResolveAlias.ll | 2 +- test/Transforms/GlobalOpt/2009-03-05-dbg.ll | 18 +- .../GlobalOpt/2012-05-11-blockaddress.ll | 2 +- test/Transforms/GlobalOpt/alias-resolve.ll | 35 +- test/Transforms/GlobalOpt/alias-used.ll | 13 +- test/Transforms/GlobalOpt/array-elem-refs.ll | 32 + test/Transforms/GlobalOpt/atexit.ll | 6 + test/Transforms/GlobalOpt/atomic.ll | 15 + test/Transforms/GlobalOpt/blockaddress.ll | 4 +- .../GlobalOpt/cleanup-pointer-root-users.ll | 8 +- test/Transforms/GlobalOpt/compiler-used.ll | 16 + .../GlobalOpt/ctor-list-opt-constexpr.ll | 4 +- test/Transforms/GlobalOpt/deadglobal.ll | 2 +- test/Transforms/GlobalOpt/integer-bool.ll | 2 +- .../Transforms/GlobalOpt/invariant-nodatalayout.ll | 17 + test/Transforms/GlobalOpt/lit.local.cfg | 1 - test/Transforms/GlobalOpt/load-store-global.ll | 6 +- test/Transforms/GlobalOpt/malloc-promote-3.ll | 18 + test/Transforms/GlobalOpt/metadata.ll | 2 +- test/Transforms/GlobalOpt/tls.ll | 4 +- .../GlobalOpt/zeroinitializer-gep-load.ll | 2 +- test/Transforms/IPConstantProp/lit.local.cfg | 1 - .../IndVarSimplify/2011-10-27-lftrnull.ll | 2 +- .../IndVarSimplify/2011-11-01-lftrptr.ll | 8 +- .../IndVarSimplify/2011-11-17-selfphi.ll | 2 +- .../IndVarSimplify/2012-07-17-lftr-undef.ll | 2 +- .../2012-10-19-congruent-constant.ll | 2 +- test/Transforms/IndVarSimplify/dont-recompute.ll | 4 +- .../IndVarSimplify/eliminate-comparison.ll | 10 +- test/Transforms/IndVarSimplify/eliminate-rem.ll | 4 +- .../Transforms/IndVarSimplify/floating-point-iv.ll | 10 +- test/Transforms/IndVarSimplify/iv-fold.ll | 4 +- .../IndVarSimplify/lftr-address-space-pointers.ll | 69 + .../Transforms/IndVarSimplify/lftr-extend-const.ll | 44 + test/Transforms/IndVarSimplify/lftr-reuse.ll | 4 +- test/Transforms/IndVarSimplify/lftr-zext.ll | 26 + test/Transforms/IndVarSimplify/lit.local.cfg | 1 - test/Transforms/IndVarSimplify/loop_evaluate_1.ll | 34 +- test/Transforms/IndVarSimplify/loop_evaluate_6.ll | 5 - test/Transforms/IndVarSimplify/no-iv-rewrite.ll | 9 +- .../Transforms/IndVarSimplify/tripcount_compute.ll | 14 +- .../IndVarSimplify/udiv-invariant-but-traps.ll | 32 + test/Transforms/IndVarSimplify/udiv.ll | 4 +- test/Transforms/IndVarSimplify/ult-sub-to-eq.ll | 2 +- test/Transforms/IndVarSimplify/widen-nsw.ll | 29 + test/Transforms/Inline/2010-05-31-ByvalTailcall.ll | 2 +- test/Transforms/Inline/alloca-bonus.ll | 10 +- test/Transforms/Inline/alloca-merge-align-nodl.ll | 88 + test/Transforms/Inline/alloca-merge-align.ll | 122 ++ test/Transforms/Inline/always-inline.ll | 14 +- test/Transforms/Inline/attributes.ll | 112 ++ test/Transforms/Inline/basictest.ll | 8 +- test/Transforms/Inline/byval.ll | 23 + test/Transforms/Inline/delete-call.ll | 2 +- test/Transforms/Inline/devirtualize-2.ll | 2 +- test/Transforms/Inline/devirtualize.ll | 2 +- test/Transforms/Inline/dynamic_alloca_test.ll | 2 +- test/Transforms/Inline/gvn-inline-iteration.ll | 4 +- test/Transforms/Inline/inline-byval-bonus.ll | 2 +- .../Inline/inline-invoke-with-asm-call.ll | 32 + test/Transforms/Inline/inline-optnone.ll | 52 + test/Transforms/Inline/inline_cleanup.ll | 8 +- test/Transforms/Inline/inline_constprop.ll | 41 +- test/Transforms/Inline/inline_minisize.ll | 4 +- test/Transforms/Inline/inline_returns_twice.ll | 71 +- test/Transforms/Inline/invoke-cost.ll | 45 + test/Transforms/Inline/lifetime-no-datalayout.ll | 2 +- test/Transforms/Inline/lifetime.ll | 8 +- test/Transforms/Inline/lit.local.cfg | 1 - test/Transforms/Inline/nested-inline.ll | 6 +- test/Transforms/Inline/noinline-recursive-fn.ll | 6 +- test/Transforms/Inline/ptr-diff.ll | 49 +- test/Transforms/Inline/recursive.ll | 4 +- .../InstCombine/2002-05-14-SubFailure.ll | 5 +- .../InstCombine/2002-12-05-MissedConstProp.ll | 4 +- .../InstCombine/2003-08-12-AllocaNonNull.ll | 5 +- test/Transforms/InstCombine/2006-10-20-mask.ll | 4 +- .../InstCombine/2006-10-26-VectorReassoc.ll | 5 +- .../InstCombine/2006-12-08-Select-ICmp.ll | 3 +- test/Transforms/InstCombine/2007-01-27-AndICmp.ll | 4 +- .../InstCombine/2008-01-06-BitCastAttributes.ll | 25 +- test/Transforms/InstCombine/2008-01-06-VoidCast.ll | 10 +- .../InstCombine/2008-01-27-FloatSelect.ll | 3 +- test/Transforms/InstCombine/2008-02-13-MulURem.ll | 4 +- test/Transforms/InstCombine/2008-05-31-AddBool.ll | 4 +- .../Transforms/InstCombine/2008-11-20-DivMulRem.ll | 12 +- .../InstCombine/2009-01-16-PointerAddrSpace.ll | 2 +- test/Transforms/InstCombine/2010-03-03-ExtElim.ll | 20 +- .../Transforms/InstCombine/2010-11-01-lshr-mask.ll | 4 +- .../InstCombine/2010-11-21-SizeZeroTypeGEP.ll | 4 +- .../InstCombine/2010-11-23-Distributed.ll | 4 +- .../InstCombine/2011-06-13-nsw-alloca.ll | 4 +- .../InstCombine/2012-03-10-InstCombine.ll | 2 +- test/Transforms/InstCombine/2012-04-24-vselect.ll | 2 +- .../InstCombine/2012-05-28-select-hang.ll | 2 +- .../InstCombine/2012-07-30-addrsp-bitcast.ll | 4 +- .../Transforms/InstCombine/2012-08-28-udiv_ashl.ll | 8 +- .../InstCombine/2012-09-17-ZeroSizedAlloca.ll | 2 +- .../2012-09-24-MemcpyFromGlobalCrash.ll | 2 +- .../InstCombine/2012-3-15-or-xor-constant.ll | 2 +- .../2013-03-05-Combine-BitcastTy-Into-Alloca.ll | 2 +- test/Transforms/InstCombine/ExtractCast.ll | 4 +- test/Transforms/InstCombine/LandingPadClauses.ll | 6 +- test/Transforms/InstCombine/PR7357.ll | 17 + test/Transforms/InstCombine/abs-1.ll | 6 +- test/Transforms/InstCombine/add2.ll | 8 +- test/Transforms/InstCombine/add4.ll | 45 +- test/Transforms/InstCombine/addrspacecast.ll | 69 + test/Transforms/InstCombine/align-addr.ll | 31 +- test/Transforms/InstCombine/align-external.ll | 2 +- test/Transforms/InstCombine/alloca.ll | 37 +- test/Transforms/InstCombine/and-xor-or.ll | 4 +- test/Transforms/InstCombine/and.ll | 6 +- test/Transforms/InstCombine/and2.ll | 18 +- .../InstCombine/apint-call-cast-target.ll | 7 +- test/Transforms/InstCombine/apint-select.ll | 5 +- .../Transforms/InstCombine/apint-shift-simplify.ll | 6 +- test/Transforms/InstCombine/apint-shift.ll | 60 +- test/Transforms/InstCombine/apint-shl-trunc.ll | 4 +- test/Transforms/InstCombine/atomic.ll | 4 +- test/Transforms/InstCombine/badmalloc.ll | 4 +- .../InstCombine/bitcast-alias-function.ll | 229 +++ test/Transforms/InstCombine/bitcast-bigendian.ll | 45 +- test/Transforms/InstCombine/bitcast-vec-uniform.ll | 16 +- test/Transforms/InstCombine/bitcast-vector-fold.ll | 2 +- test/Transforms/InstCombine/bitcast.ll | 32 +- test/Transforms/InstCombine/call-cast-target.ll | 9 +- test/Transforms/InstCombine/call.ll | 222 ++- test/Transforms/InstCombine/canonicalize_branch.ll | 8 +- test/Transforms/InstCombine/cast.ll | 147 +- test/Transforms/InstCombine/cast_ptr.ll | 55 +- test/Transforms/InstCombine/compare-signs.ll | 12 +- .../constant-fold-address-space-pointer.ll | 232 +++ test/Transforms/InstCombine/constant-fold-gep.ll | 22 +- test/Transforms/InstCombine/cos-1.ll | 6 +- test/Transforms/InstCombine/cos-2.ll | 2 +- test/Transforms/InstCombine/debug-line.ll | 16 +- test/Transforms/InstCombine/debuginfo.ll | 27 +- .../InstCombine/disable-simplify-libcalls.ll | 74 +- test/Transforms/InstCombine/div-shift-crash.ll | 101 ++ test/Transforms/InstCombine/div-shift.ll | 38 + test/Transforms/InstCombine/div.ll | 30 +- .../InstCombine/double-float-shrink-1.ll | 13 + .../InstCombine/enforce-known-alignment.ll | 26 +- test/Transforms/InstCombine/err-rep-cold.ll | 77 + test/Transforms/InstCombine/exact.ll | 36 +- test/Transforms/InstCombine/exp2-1.ll | 16 +- test/Transforms/InstCombine/exp2-2.ll | 2 +- test/Transforms/InstCombine/extractvalue.ll | 6 +- test/Transforms/InstCombine/fast-math.ll | 84 +- test/Transforms/InstCombine/fcmp.ll | 32 +- test/Transforms/InstCombine/fdiv.ll | 6 +- test/Transforms/InstCombine/ffs-1.ll | 32 +- .../Transforms/InstCombine/float-shrink-compare.ll | 179 ++ test/Transforms/InstCombine/fmul.ll | 37 +- test/Transforms/InstCombine/fneg-ext.ll | 23 + test/Transforms/InstCombine/fold-bin-operand.ll | 4 +- test/Transforms/InstCombine/fold-calls.ll | 4 +- .../InstCombine/fold-fops-into-selects.ll | 71 + test/Transforms/InstCombine/fold-vector-select.ll | 4 +- test/Transforms/InstCombine/fpcast.ll | 12 + test/Transforms/InstCombine/fprintf-1.ll | 16 +- test/Transforms/InstCombine/fputs-1.ll | 6 +- test/Transforms/InstCombine/fwrite-1.ll | 10 +- test/Transforms/InstCombine/gep-addrspace.ll | 2 +- test/Transforms/InstCombine/getelementptr.ll | 438 ++++- test/Transforms/InstCombine/icmp-logical.ll | 152 ++ test/Transforms/InstCombine/icmp.ll | 604 +++++-- test/Transforms/InstCombine/idioms.ll | 2 +- test/Transforms/InstCombine/intrinsics.ll | 40 +- test/Transforms/InstCombine/invoke.ll | 6 +- test/Transforms/InstCombine/isascii-1.ll | 6 +- test/Transforms/InstCombine/isdigit-1.ll | 10 +- test/Transforms/InstCombine/lit.local.cfg | 1 - test/Transforms/InstCombine/load-cmp.ll | 334 +++- test/Transforms/InstCombine/load-select.ll | 2 +- test/Transforms/InstCombine/load3.ll | 6 +- test/Transforms/InstCombine/malloc-free-delete.ll | 36 +- test/Transforms/InstCombine/memcmp-1.ll | 12 +- test/Transforms/InstCombine/memcmp-2.ll | 2 +- test/Transforms/InstCombine/memcpy-1.ll | 2 +- test/Transforms/InstCombine/memcpy-2.ll | 2 +- test/Transforms/InstCombine/memcpy-from-global.ll | 18 +- test/Transforms/InstCombine/memcpy.ll | 6 +- test/Transforms/InstCombine/memcpy_chk-1.ll | 8 +- test/Transforms/InstCombine/memcpy_chk-2.ll | 2 +- test/Transforms/InstCombine/memmove-1.ll | 2 +- test/Transforms/InstCombine/memmove-2.ll | 2 +- test/Transforms/InstCombine/memmove_chk-1.ll | 8 +- test/Transforms/InstCombine/memmove_chk-2.ll | 2 +- test/Transforms/InstCombine/memset-1.ll | 2 +- test/Transforms/InstCombine/memset-2.ll | 2 +- test/Transforms/InstCombine/memset_chk-1.ll | 10 +- test/Transforms/InstCombine/memset_chk-2.ll | 2 +- test/Transforms/InstCombine/merge-icmp.ll | 4 +- test/Transforms/InstCombine/mul.ll | 38 +- .../multi-size-address-space-pointer.ll | 112 ++ test/Transforms/InstCombine/no-negzero.ll | 2 +- test/Transforms/InstCombine/nsw.ll | 18 +- test/Transforms/InstCombine/objsize-64.ll | 4 +- .../InstCombine/objsize-address-space.ll | 80 + test/Transforms/InstCombine/objsize.ll | 92 +- test/Transforms/InstCombine/onehot_merge.ll | 35 + test/Transforms/InstCombine/or-fcmp.ll | 10 +- test/Transforms/InstCombine/or-xor.ll | 18 +- test/Transforms/InstCombine/or.ll | 78 +- test/Transforms/InstCombine/osx-names.ll | 4 +- test/Transforms/InstCombine/overflow.ll | 14 +- .../Transforms/InstCombine/phi-select-constexpr.ll | 19 + test/Transforms/InstCombine/phi.ll | 54 +- test/Transforms/InstCombine/pow-1.ll | 45 +- test/Transforms/InstCombine/pow-2.ll | 2 +- test/Transforms/InstCombine/pow-3.ll | 12 + test/Transforms/InstCombine/pr17827.ll | 74 + test/Transforms/InstCombine/pr8547.ll | 2 +- test/Transforms/InstCombine/printf-1.ll | 22 +- test/Transforms/InstCombine/printf-2.ll | 6 +- test/Transforms/InstCombine/ptr-int-cast.ll | 8 +- test/Transforms/InstCombine/puts-1.ll | 4 +- test/Transforms/InstCombine/rem.ll | 122 +- test/Transforms/InstCombine/select-2.ll | 5 +- test/Transforms/InstCombine/select-crash.ll | 4 +- .../InstCombine/select-extractelement.ll | 102 ++ test/Transforms/InstCombine/select.ll | 220 ++- test/Transforms/InstCombine/sext.ll | 34 +- test/Transforms/InstCombine/shift-sra.ll | 10 +- test/Transforms/InstCombine/shift.ll | 187 +- test/Transforms/InstCombine/sign-test-and-or.ll | 18 +- test/Transforms/InstCombine/signext.ll | 16 +- test/Transforms/InstCombine/simplify-libcalls.ll | 144 ++ test/Transforms/InstCombine/sincospi.ll | 91 + test/Transforms/InstCombine/sink_instruction.ll | 4 +- test/Transforms/InstCombine/sprintf-1.ll | 18 +- test/Transforms/InstCombine/sqrt.ll | 6 +- test/Transforms/InstCombine/store.ll | 15 +- test/Transforms/InstCombine/stpcpy-1.ll | 6 +- test/Transforms/InstCombine/stpcpy-2.ll | 2 +- test/Transforms/InstCombine/stpcpy_chk-1.ll | 20 +- test/Transforms/InstCombine/stpcpy_chk-2.ll | 2 +- test/Transforms/InstCombine/strcat-1.ll | 2 +- test/Transforms/InstCombine/strcat-2.ll | 4 +- test/Transforms/InstCombine/strcat-3.ll | 2 +- test/Transforms/InstCombine/strchr-1.ll | 11 + test/Transforms/InstCombine/strcmp-1.ll | 12 +- test/Transforms/InstCombine/strcmp-2.ll | 2 +- test/Transforms/InstCombine/strcpy-1.ll | 6 +- test/Transforms/InstCombine/strcpy-2.ll | 2 +- test/Transforms/InstCombine/strcpy_chk-1.ll | 20 +- test/Transforms/InstCombine/strcpy_chk-2.ll | 2 +- test/Transforms/InstCombine/strcpy_chk-64.ll | 2 +- test/Transforms/InstCombine/strcspn-1.ll | 8 +- test/Transforms/InstCombine/strcspn-2.ll | 2 +- test/Transforms/InstCombine/strlen-1.ll | 18 +- test/Transforms/InstCombine/strlen-2.ll | 2 +- test/Transforms/InstCombine/strncat-1.ll | 2 +- test/Transforms/InstCombine/strncat-2.ll | 8 +- test/Transforms/InstCombine/strncat-3.ll | 2 +- test/Transforms/InstCombine/strncmp-1.ll | 16 +- test/Transforms/InstCombine/strncmp-2.ll | 2 +- test/Transforms/InstCombine/strncpy-1.ll | 12 +- test/Transforms/InstCombine/strncpy-2.ll | 2 +- test/Transforms/InstCombine/strncpy_chk-1.ll | 10 +- test/Transforms/InstCombine/strncpy_chk-2.ll | 2 +- test/Transforms/InstCombine/strpbrk-1.ll | 10 +- test/Transforms/InstCombine/strpbrk-2.ll | 2 +- test/Transforms/InstCombine/strrchr-1.ll | 13 +- test/Transforms/InstCombine/strspn-1.ll | 8 +- test/Transforms/InstCombine/strstr-1.ll | 10 +- test/Transforms/InstCombine/strstr-2.ll | 2 +- test/Transforms/InstCombine/strto-1.ll | 30 +- test/Transforms/InstCombine/struct-assign-tbaa.ll | 8 +- test/Transforms/InstCombine/sub-xor.ll | 8 +- test/Transforms/InstCombine/sub.ll | 237 ++- test/Transforms/InstCombine/toascii-1.ll | 14 +- test/Transforms/InstCombine/trunc.ll | 20 +- .../Transforms/InstCombine/udivrem-change-width.ll | 12 +- test/Transforms/InstCombine/vec_demanded_elts.ll | 18 +- test/Transforms/InstCombine/vec_extract_elt.ll | 3 +- test/Transforms/InstCombine/vec_insertelt.ll | 3 +- test/Transforms/InstCombine/vec_phi_extract.ll | 25 + test/Transforms/InstCombine/vec_shuffle.ll | 105 +- test/Transforms/InstCombine/vector-casts.ll | 12 +- test/Transforms/InstCombine/vector-mul.ll | 408 +++++ test/Transforms/InstCombine/vector_gep2.ll | 2 +- test/Transforms/InstCombine/weak-symbols.ll | 4 +- test/Transforms/InstCombine/win-math.ll | 295 +++ test/Transforms/InstCombine/xor2.ll | 14 +- test/Transforms/InstCombine/zext-bool-add-sub.ll | 2 +- test/Transforms/InstSimplify/2010-12-20-Boolean.ll | 8 +- .../InstSimplify/2010-12-20-Distribute.ll | 12 +- test/Transforms/InstSimplify/2011-01-14-Thread.ll | 2 +- test/Transforms/InstSimplify/2011-02-01-Vector.ll | 2 +- .../InstSimplify/2011-09-05-InsertExtractValue.ll | 4 +- test/Transforms/InstSimplify/AndOrXor.ll | 4 +- test/Transforms/InstSimplify/call.ll | 75 +- test/Transforms/InstSimplify/compare.ll | 180 +- test/Transforms/InstSimplify/exact-nsw-nuw.ll | 10 +- test/Transforms/InstSimplify/fast-math.ll | 4 +- test/Transforms/InstSimplify/fdiv.ll | 4 +- .../InstSimplify/floating-point-arithmetic.ll | 8 +- test/Transforms/InstSimplify/lit.local.cfg | 1 - test/Transforms/InstSimplify/maxmin.ll | 56 +- test/Transforms/InstSimplify/phi.ll | 2 +- test/Transforms/InstSimplify/ptr_diff.ll | 10 +- test/Transforms/InstSimplify/reassociate.ll | 42 +- test/Transforms/InstSimplify/rem.ll | 4 +- .../Internalize/2008-05-09-AllButMain.ll | 55 - .../Internalize/2008-05-09-AllButMain.ll.apifile | 2 - test/Transforms/Internalize/apifile | 2 + .../Transforms/Internalize/available_externally.ll | 16 - test/Transforms/Internalize/lists.ll | 50 + test/Transforms/Internalize/lit.local.cfg | 1 - test/Transforms/Internalize/used.ll | 20 + test/Transforms/JumpThreading/basic.ll | 30 +- test/Transforms/JumpThreading/indirectbr.ll | 2 +- test/Transforms/JumpThreading/landing-pad.ll | 203 +++ test/Transforms/JumpThreading/lit.local.cfg | 1 - test/Transforms/JumpThreading/select.ll | 71 +- test/Transforms/JumpThreading/thread-loads.ll | 8 +- test/Transforms/LCSSA/lit.local.cfg | 1 - .../LICM/2011-04-06-PromoteResultOfPromotion.ll | 6 +- test/Transforms/LICM/atomics.ll | 8 +- test/Transforms/LICM/debug-value.ll | 33 +- test/Transforms/LICM/hoisting.ll | 10 +- test/Transforms/LICM/lit.local.cfg | 1 - test/Transforms/LICM/promote-order.ll | 6 +- test/Transforms/LICM/scalar_promote.ll | 16 +- test/Transforms/LICM/sinking.ll | 22 +- test/Transforms/LICM/speculate.ll | 10 +- test/Transforms/LICM/volatile-alias.ll | 54 + test/Transforms/LoopDeletion/lit.local.cfg | 1 - test/Transforms/LoopIdiom/X86/lit.local.cfg | 2 - test/Transforms/LoopIdiom/basic-address-space.ll | 91 + test/Transforms/LoopIdiom/basic.ll | 32 +- test/Transforms/LoopIdiom/debug-line.ll | 21 +- test/Transforms/LoopIdiom/lit.local.cfg | 1 - test/Transforms/LoopIdiom/memset_noidiom.ll | 2 +- test/Transforms/LoopReroll/basic.ll | 327 ++++ test/Transforms/LoopReroll/reduction.ll | 96 + test/Transforms/LoopRotate/basic.ll | 4 +- test/Transforms/LoopRotate/dbgvalue.ll | 24 +- test/Transforms/LoopRotate/lit.local.cfg | 1 - test/Transforms/LoopRotate/multiple-exits.ll | 4 +- test/Transforms/LoopRotate/phi-duplicate.ll | 2 +- test/Transforms/LoopRotate/simplifylatch.ll | 2 +- test/Transforms/LoopSimplify/dup-preds.ll | 46 + test/Transforms/LoopSimplify/lit.local.cfg | 1 - test/Transforms/LoopSimplify/preserve-scev.ll | 2 +- .../LoopStrengthReduce/2011-10-03-CritEdgeMerge.ll | 4 +- .../LoopStrengthReduce/2011-10-06-ReusePhi.ll | 2 +- .../LoopStrengthReduce/2011-10-13-SCEVChain.ll | 2 +- .../LoopStrengthReduce/2011-10-14-IntPtr.ll | 2 +- .../2011-12-19-PostincQuadratic.ll | 2 +- .../LoopStrengthReduce/2012-01-02-nopreheader.ll | 4 +- .../LoopStrengthReduce/2012-01-16-nopreheader.ll | 2 +- .../LoopStrengthReduce/2012-03-15-nopreheader.ll | 2 +- .../LoopStrengthReduce/2012-07-13-ExpandUDiv.ll | 2 +- .../LoopStrengthReduce/2013-01-05-IndBr.ll | 2 +- .../LoopStrengthReduce/2013-01-14-ReuseCast.ll | 12 +- .../LoopStrengthReduce/ARM/ivchain-ARM.ll | 2 +- .../LoopStrengthReduce/ARM/lit.local.cfg | 2 - .../LoopStrengthReduce/X86/2011-07-20-DoubleIV.ll | 4 +- .../X86/2011-11-29-postincphi.ll | 4 +- .../LoopStrengthReduce/X86/2011-12-04-loserreg.ll | 4 +- .../LoopStrengthReduce/X86/lit.local.cfg | 2 - .../LoopStrengthReduce/addrec-gep-address-space.ll | 88 + .../LoopStrengthReduce/address-space-loop.ll | 56 + .../LoopStrengthReduce/dominate-assert.ll | 43 + test/Transforms/LoopStrengthReduce/ivchain.ll | 2 +- test/Transforms/LoopStrengthReduce/lit.local.cfg | 1 - .../LoopStrengthReduce/lsr-expand-quadratic.ll | 42 + .../LoopStrengthReduce/quadradic-exit-value.ll | 44 +- .../scaling_factor_cost_crash.ll | 68 + .../LoopStrengthReduce/uglygep-address-space.ll | 56 + test/Transforms/LoopStrengthReduce/uglygep.ll | 58 +- test/Transforms/LoopUnroll/2011-08-08-PhiUpdate.ll | 4 +- test/Transforms/LoopUnroll/2011-08-09-PhiUpdate.ll | 4 +- test/Transforms/LoopUnroll/2011-10-01-NoopTrunc.ll | 2 +- test/Transforms/LoopUnroll/PowerPC/a2-unrolling.ll | 48 + test/Transforms/LoopUnroll/PowerPC/lit.local.cfg | 4 + test/Transforms/LoopUnroll/basic.ll | 4 +- test/Transforms/LoopUnroll/lit.local.cfg | 1 - test/Transforms/LoopUnroll/pr14167.ll | 2 +- test/Transforms/LoopUnroll/scevunroll.ll | 12 +- test/Transforms/LoopUnroll/unloop.ll | 12 +- test/Transforms/LoopUnswitch/basictest.ll | 2 +- test/Transforms/LoopUnswitch/infinite-loop.ll | 2 +- test/Transforms/LoopUnswitch/lit.local.cfg | 1 - test/Transforms/LoopVectorize/12-12-11-if-conv.ll | 4 +- test/Transforms/LoopVectorize/ARM/arm-unroll.ll | 4 +- test/Transforms/LoopVectorize/ARM/gather-cost.ll | 88 + test/Transforms/LoopVectorize/ARM/gcc-examples.ll | 4 +- test/Transforms/LoopVectorize/ARM/lit.local.cfg | 2 - test/Transforms/LoopVectorize/ARM/width-detect.ll | 18 +- .../LoopVectorize/X86/already-vectorized.ll | 46 + test/Transforms/LoopVectorize/X86/avx1.ll | 4 +- .../LoopVectorize/X86/conversion-cost.ll | 4 +- test/Transforms/LoopVectorize/X86/cost-model.ll | 2 +- test/Transforms/LoopVectorize/X86/gather-cost.ll | 86 + test/Transforms/LoopVectorize/X86/gcc-examples.ll | 8 +- .../X86/illegal-parallel-loop-uniform-write.ll | 6 +- test/Transforms/LoopVectorize/X86/lit.local.cfg | 2 - .../X86/parallel-loops-after-reg2mem.ll | 2 +- .../Transforms/LoopVectorize/X86/parallel-loops.ll | 10 +- test/Transforms/LoopVectorize/X86/rauw-bug.ll | 33 + .../LoopVectorize/X86/reduction-crash.ll | 2 +- test/Transforms/LoopVectorize/X86/small-size.ll | 10 +- test/Transforms/LoopVectorize/X86/tripcount.ll | 39 + test/Transforms/LoopVectorize/X86/unroll-pm.ll | 31 + .../LoopVectorize/X86/unroll-small-loops.ll | 4 +- .../LoopVectorize/X86/x86_fp80-vector-store.ll | 2 +- test/Transforms/LoopVectorize/XCore/lit.local.cfg | 3 + .../LoopVectorize/XCore/no-vector-registers.ll | 23 + test/Transforms/LoopVectorize/align.ll | 33 + test/Transforms/LoopVectorize/bsd_regex.ll | 2 +- test/Transforms/LoopVectorize/cast-induction.ll | 2 +- test/Transforms/LoopVectorize/cpp-new-array.ll | 2 +- test/Transforms/LoopVectorize/dbg.value.ll | 23 +- test/Transforms/LoopVectorize/debugloc.ll | 90 + test/Transforms/LoopVectorize/ee-crash.ll | 35 + test/Transforms/LoopVectorize/flags.ll | 4 +- test/Transforms/LoopVectorize/float-reduction.ll | 2 +- test/Transforms/LoopVectorize/funcall.ll | 32 + test/Transforms/LoopVectorize/gcc-examples.ll | 42 +- test/Transforms/LoopVectorize/global_alias.ll | 49 +- test/Transforms/LoopVectorize/hoist-loads.ll | 69 + test/Transforms/LoopVectorize/if-conv-crash.ll | 22 + .../LoopVectorize/if-conversion-edgemasks.ll | 243 +++ .../Transforms/LoopVectorize/if-conversion-nest.ll | 2 +- .../LoopVectorize/if-conversion-reduction.ll | 2 +- test/Transforms/LoopVectorize/if-conversion.ll | 67 +- test/Transforms/LoopVectorize/increment.ll | 4 +- test/Transforms/LoopVectorize/induction.ll | 110 ++ test/Transforms/LoopVectorize/induction_plus.ll | 4 +- test/Transforms/LoopVectorize/infiniteloop.ll | 34 + test/Transforms/LoopVectorize/intrinsic.ll | 229 ++- test/Transforms/LoopVectorize/lifetime.ll | 96 + test/Transforms/LoopVectorize/lit.local.cfg | 1 - test/Transforms/LoopVectorize/memdep.ll | 222 +++ test/Transforms/LoopVectorize/metadata-unroll.ll | 41 + test/Transforms/LoopVectorize/metadata-width.ll | 31 + test/Transforms/LoopVectorize/minmax_reduction.ll | 124 +- .../LoopVectorize/multiple-address-spaces.ll | 44 + test/Transforms/LoopVectorize/no_idiv_reduction.ll | 2 +- test/Transforms/LoopVectorize/no_int_induction.ll | 33 +- test/Transforms/LoopVectorize/no_outside_user.ll | 30 + test/Transforms/LoopVectorize/nofloat.ll | 2 +- test/Transforms/LoopVectorize/non-const-n.ll | 2 +- test/Transforms/LoopVectorize/opt.ll | 28 + test/Transforms/LoopVectorize/ptr_loops.ll | 4 +- test/Transforms/LoopVectorize/read-only.ll | 2 +- test/Transforms/LoopVectorize/reduction.ll | 191 +- test/Transforms/LoopVectorize/reverse_induction.ll | 75 +- test/Transforms/LoopVectorize/reverse_iter.ll | 45 + .../LoopVectorize/runtime-check-address-space.ll | 235 +++ .../runtime-check-readonly-address-space.ll | 142 ++ .../LoopVectorize/runtime-check-readonly.ll | 2 +- test/Transforms/LoopVectorize/runtime-check.ll | 30 +- test/Transforms/LoopVectorize/runtime-limit.ll | 4 +- test/Transforms/LoopVectorize/safegep.ll | 61 + test/Transforms/LoopVectorize/same-base-access.ll | 4 +- test/Transforms/LoopVectorize/scalar-select.ll | 2 +- .../Transforms/LoopVectorize/scev-exitlim-crash.ll | 114 ++ test/Transforms/LoopVectorize/simple-unroll.ll | 2 +- test/Transforms/LoopVectorize/small-loop.ll | 2 +- test/Transforms/LoopVectorize/start-non-zero.ll | 2 +- test/Transforms/LoopVectorize/store-shuffle-bug.ll | 55 + test/Transforms/LoopVectorize/struct_access.ll | 44 +- test/Transforms/LoopVectorize/undef-inst-bug.ll | 36 + test/Transforms/LoopVectorize/unroll_novec.ll | 39 + test/Transforms/LoopVectorize/value-ptr-bug.ll | 2 +- test/Transforms/LoopVectorize/vectorize-once.ll | 19 +- test/Transforms/LoopVectorize/write-only.ll | 2 +- test/Transforms/LowerAtomic/atomic-load.ll | 6 +- test/Transforms/LowerAtomic/atomic-swap.ll | 4 +- test/Transforms/LowerAtomic/barrier.ll | 2 +- test/Transforms/LowerAtomic/lit.local.cfg | 1 - test/Transforms/LowerExpectIntrinsic/basic.ll | 16 +- test/Transforms/LowerExpectIntrinsic/lit.local.cfg | 1 - test/Transforms/LowerInvoke/lit.local.cfg | 1 - test/Transforms/LowerSwitch/feature.ll | 64 +- test/Transforms/LowerSwitch/lit.local.cfg | 1 - test/Transforms/Mem2Reg/ConvertDebugInfo.ll | 15 +- test/Transforms/Mem2Reg/ConvertDebugInfo2.ll | 20 +- test/Transforms/Mem2Reg/atomic.ll | 2 +- test/Transforms/Mem2Reg/lit.local.cfg | 1 - test/Transforms/MemCpyOpt/align.ll | 4 +- test/Transforms/MemCpyOpt/form-memset.ll | 18 +- test/Transforms/MemCpyOpt/lit.local.cfg | 1 - test/Transforms/MemCpyOpt/loadstore-sret.ll | 2 +- test/Transforms/MemCpyOpt/memcpy-to-memset.ll | 2 +- test/Transforms/MemCpyOpt/memcpy.ll | 31 +- test/Transforms/MemCpyOpt/memmove.ll | 6 +- test/Transforms/MergeFunc/address-spaces.ll | 35 + .../Transforms/MergeFunc/inttoptr-address-space.ll | 29 + test/Transforms/MergeFunc/inttoptr.ll | 1 + test/Transforms/MergeFunc/lit.local.cfg | 1 - test/Transforms/MergeFunc/merge-ptr-and-int.ll | 27 + .../Transforms/MergeFunc/ptr-int-transitivity-1.ll | 21 + .../Transforms/MergeFunc/ptr-int-transitivity-2.ll | 25 + .../Transforms/MergeFunc/ptr-int-transitivity-3.ll | 21 + test/Transforms/MergeFunc/too-small.ll | 14 + test/Transforms/MetaRenamer/lit.local.cfg | 1 - test/Transforms/ObjCARC/allocas.ll | 500 ++++++ test/Transforms/ObjCARC/arc-annotations.ll | 2 +- test/Transforms/ObjCARC/basic.ll | 294 ++- test/Transforms/ObjCARC/cfg-hazards.ll | 6 +- test/Transforms/ObjCARC/contract-storestrong.ll | 6 +- test/Transforms/ObjCARC/contract-testcases.ll | 4 +- test/Transforms/ObjCARC/contract.ll | 26 +- test/Transforms/ObjCARC/empty-block.ll | 4 +- ...ensure-that-exception-unwind-path-is-visited.ll | 58 +- test/Transforms/ObjCARC/escape.ll | 4 +- test/Transforms/ObjCARC/gvn.ll | 25 +- test/Transforms/ObjCARC/intrinsic-use-isolated.ll | 2 +- test/Transforms/ObjCARC/intrinsic-use.ll | 4 +- test/Transforms/ObjCARC/invoke.ll | 12 +- test/Transforms/ObjCARC/lit.local.cfg | 1 - test/Transforms/ObjCARC/nested.ll | 24 +- test/Transforms/ObjCARC/no-objc-arc-exceptions.ll | 123 -- test/Transforms/ObjCARC/path-overflow.ll | 1876 +++++++++++++++++++- test/Transforms/ObjCARC/pointer-types.ll | 2 +- test/Transforms/ObjCARC/post-inlining.ll | 6 +- test/Transforms/ObjCARC/retain-block-alloca.ll | 94 - .../ObjCARC/retain-block-escape-analysis.ll | 215 --- test/Transforms/ObjCARC/retain-block-load.ll | 51 - test/Transforms/ObjCARC/retain-block.ll | 140 -- test/Transforms/ObjCARC/retain-not-declared.ll | 2 +- test/Transforms/ObjCARC/rv.ll | 22 +- test/Transforms/ObjCARC/split-backedge.ll | 2 +- test/Transforms/ObjCARC/weak.ll | 2 +- test/Transforms/PhaseOrdering/PR6627.ll | 4 +- test/Transforms/PhaseOrdering/basic.ll | 4 +- test/Transforms/PhaseOrdering/lit.local.cfg | 1 - test/Transforms/PruneEH/lit.local.cfg | 1 - .../Transforms/Reassociate/2012-05-08-UndefLeak.ll | 2 +- test/Transforms/Reassociate/absorption.ll | 2 +- test/Transforms/Reassociate/basictest.ll | 30 +- test/Transforms/Reassociate/inverses.ll | 6 +- test/Transforms/Reassociate/lit.local.cfg | 1 - test/Transforms/Reassociate/mulfactor.ll | 14 +- test/Transforms/Reassociate/multistep.ll | 4 +- test/Transforms/Reassociate/no-op.ll | 4 +- test/Transforms/Reassociate/optional-flags.ll | 4 +- test/Transforms/Reassociate/repeats.ll | 32 +- test/Transforms/Reassociate/xor_reassoc.ll | 22 +- test/Transforms/Reg2Mem/lit.local.cfg | 1 - test/Transforms/SCCP/atomic-load-store.ll | 4 +- test/Transforms/SCCP/ipsccp-addr-taken.ll | 2 +- test/Transforms/SCCP/ipsccp-basic.ll | 28 +- test/Transforms/SCCP/lit.local.cfg | 1 - test/Transforms/SCCP/sccptest.ll | 4 +- test/Transforms/SCCP/switch.ll | 2 +- test/Transforms/SCCP/undef-resolve.ll | 20 +- test/Transforms/SLPVectorizer/ARM/lit.local.cfg | 3 + test/Transforms/SLPVectorizer/ARM/memory.ll | 20 + test/Transforms/SLPVectorizer/ARM/sroa.ll | 52 + test/Transforms/SLPVectorizer/R600/lit.local.cfg | 4 + test/Transforms/SLPVectorizer/R600/simplebb.ll | 65 + test/Transforms/SLPVectorizer/X86/barriercall.ll | 2 +- test/Transforms/SLPVectorizer/X86/cast.ll | 2 +- test/Transforms/SLPVectorizer/X86/cmp_sel.ll | 32 + .../Transforms/SLPVectorizer/X86/compare-reduce.ll | 2 +- test/Transforms/SLPVectorizer/X86/crash_7zip.ll | 38 + test/Transforms/SLPVectorizer/X86/crash_bullet.ll | 128 ++ test/Transforms/SLPVectorizer/X86/crash_bullet3.ll | 84 + test/Transforms/SLPVectorizer/X86/crash_dequeue.ll | 40 + test/Transforms/SLPVectorizer/X86/crash_flop7.ll | 46 + test/Transforms/SLPVectorizer/X86/crash_lencod.ll | 91 + .../SLPVectorizer/X86/crash_mandeltext.ll | 107 ++ .../SLPVectorizer/X86/crash_netbsd_decompress.ll | 41 + test/Transforms/SLPVectorizer/X86/crash_sim4b1.ll | 113 ++ test/Transforms/SLPVectorizer/X86/crash_smallpt.ll | 105 ++ .../SLPVectorizer/X86/cross_block_slp.ll | 54 + test/Transforms/SLPVectorizer/X86/cse.ll | 219 +++ test/Transforms/SLPVectorizer/X86/cycle_dup.ll | 64 + test/Transforms/SLPVectorizer/X86/debug_info.ll | 89 + test/Transforms/SLPVectorizer/X86/diamond.ll | 47 +- test/Transforms/SLPVectorizer/X86/external_user.ll | 96 + test/Transforms/SLPVectorizer/X86/extract.ll | 59 + test/Transforms/SLPVectorizer/X86/horizontal.ll | 417 +++++ test/Transforms/SLPVectorizer/X86/implicitfloat.ll | 25 + test/Transforms/SLPVectorizer/X86/in-tree-user.ll | 50 + .../X86/insert-element-build-vector.ll | 197 ++ test/Transforms/SLPVectorizer/X86/lit.local.cfg | 2 - test/Transforms/SLPVectorizer/X86/long_chains.ll | 47 + test/Transforms/SLPVectorizer/X86/loopinvariant.ll | 2 +- test/Transforms/SLPVectorizer/X86/multi_block.ll | 55 + test/Transforms/SLPVectorizer/X86/multi_user.ll | 2 +- test/Transforms/SLPVectorizer/X86/odd_store.ll | 46 + test/Transforms/SLPVectorizer/X86/operandorder.ll | 234 +++ test/Transforms/SLPVectorizer/X86/opt.ll | 30 + test/Transforms/SLPVectorizer/X86/ordering.ll | 81 + test/Transforms/SLPVectorizer/X86/phi.ll | 248 +++ test/Transforms/SLPVectorizer/X86/phi3.ll | 35 + .../Transforms/SLPVectorizer/X86/phi_landingpad.ll | 31 + .../SLPVectorizer/X86/phi_overalignedtype.ll | 45 + test/Transforms/SLPVectorizer/X86/pr16571.ll | 22 + test/Transforms/SLPVectorizer/X86/pr16628.ll | 27 + test/Transforms/SLPVectorizer/X86/pr16899.ll | 31 + test/Transforms/SLPVectorizer/X86/pr18060.ll | 47 + test/Transforms/SLPVectorizer/X86/reduction2.ll | 6 +- test/Transforms/SLPVectorizer/X86/rgb_phi.ll | 76 + test/Transforms/SLPVectorizer/X86/saxpy.ll | 16 + test/Transforms/SLPVectorizer/X86/simplebb.ll | 64 + test/Transforms/SLPVectorizer/X86/tiny-tree.ll | 140 ++ test/Transforms/SLPVectorizer/XCore/lit.local.cfg | 3 + .../SLPVectorizer/XCore/no-vector-registers.ll | 24 + test/Transforms/SLPVectorizer/lit.local.cfg | 1 - test/Transforms/SROA/alignment.ll | 14 +- test/Transforms/SROA/basictest.ll | 107 +- test/Transforms/SROA/big-endian.ll | 4 +- test/Transforms/SROA/fca.ll | 4 +- test/Transforms/SROA/lit.local.cfg | 1 - test/Transforms/SROA/phi-and-select.ll | 106 +- test/Transforms/SROA/vector-conversion.ll | 53 + test/Transforms/SROA/vector-promotion.ll | 22 +- test/Transforms/SampleProfile/Inputs/branch.prof | 11 + test/Transforms/SampleProfile/branch.ll | 143 ++ .../Transforms/ScalarRepl/2008-09-22-vector-gep.ll | 2 +- test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll | 4 +- test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll | 2 +- .../ScalarRepl/2011-09-22-PHISpeculateInvoke.ll | 2 +- .../ScalarRepl/2011-10-22-VectorCrash.ll | 2 +- test/Transforms/ScalarRepl/address-space.ll | 2 +- test/Transforms/ScalarRepl/badarray.ll | 6 +- test/Transforms/ScalarRepl/basictest.ll | 4 +- test/Transforms/ScalarRepl/debuginfo-preserved.ll | 13 +- test/Transforms/ScalarRepl/inline-vector.ll | 2 +- test/Transforms/ScalarRepl/lifetime.ll | 12 +- test/Transforms/ScalarRepl/lit.local.cfg | 1 - test/Transforms/ScalarRepl/memset-aggregate.ll | 2 +- test/Transforms/ScalarRepl/nonzero-first-index.ll | 8 +- test/Transforms/ScalarRepl/only-memcpy-uses.ll | 2 +- test/Transforms/ScalarRepl/phi-select.ll | 16 +- test/Transforms/ScalarRepl/union-pointer.ll | 43 +- test/Transforms/ScalarRepl/vector_promote.ll | 38 +- ...2009-01-19-UnconditionalTrappingConstantExpr.ll | 4 +- test/Transforms/SimplifyCFG/CoveredLookupTable.ll | 48 + .../SimplifyCFG/EqualPHIEdgeBlockMerge.ll | 240 ++- test/Transforms/SimplifyCFG/MagicPointer.ll | 94 +- test/Transforms/SimplifyCFG/PR16069.ll | 28 + test/Transforms/SimplifyCFG/SPARC/lit.local.cfg | 2 - .../SimplifyCFG/SPARC/switch_to_lookup_table.ll | 2 +- test/Transforms/SimplifyCFG/SpeculativeExec.ll | 6 +- .../Transforms/SimplifyCFG/UnreachableEliminate.ll | 6 +- test/Transforms/SimplifyCFG/X86/lit.local.cfg | 2 - .../SimplifyCFG/X86/switch_to_lookup_table.ll | 29 +- test/Transforms/SimplifyCFG/attr-noduplicate.ll | 37 + test/Transforms/SimplifyCFG/basictest.ll | 8 +- test/Transforms/SimplifyCFG/branch-fold-dbg.ll | 17 +- test/Transforms/SimplifyCFG/common-dest-folding.ll | 57 + .../dce-cond-after-folding-terminator.ll | 6 +- test/Transforms/SimplifyCFG/hoist-dbgvalue.ll | 19 +- test/Transforms/SimplifyCFG/indirectbr.ll | 8 +- test/Transforms/SimplifyCFG/invoke.ll | 12 +- test/Transforms/SimplifyCFG/invoke_unwind.ll | 2 +- test/Transforms/SimplifyCFG/lit.local.cfg | 1 - test/Transforms/SimplifyCFG/phi-undef-loadstore.ll | 8 +- .../SimplifyCFG/preserve-branchweights-partial.ll | 2 +- .../SimplifyCFG/preserve-branchweights.ll | 16 +- test/Transforms/SimplifyCFG/select-gep.ll | 4 +- test/Transforms/SimplifyCFG/speculate-store.ll | 8 +- .../SimplifyCFG/speculate-with-offset.ll | 8 +- test/Transforms/SimplifyCFG/switch-masked-bits.ll | 4 +- .../SimplifyCFG/switch-on-const-select.ll | 10 +- test/Transforms/SimplifyCFG/switch-to-icmp.ll | 6 +- test/Transforms/SimplifyCFG/switch_create.ll | 121 +- test/Transforms/SimplifyCFG/trap-debugloc.ll | 15 +- .../SimplifyCFG/trapping-load-unreachable.ll | 12 +- test/Transforms/SimplifyCFG/volatile-phioper.ll | 6 +- .../SimplifyLibCalls/2005-05-20-sprintf-crash.ll | 11 - .../2007-04-06-strchr-miscompile.ll | 29 - .../SimplifyLibCalls/2008-05-19-memcmp.ll | 14 - .../SimplifyLibCalls/2009-05-30-memcmp-byte.ll | 14 - .../Transforms/SimplifyLibCalls/2009-07-28-Exit.ll | 22 - .../SimplifyLibCalls/2009-07-29-Exit2.ll | 24 - test/Transforms/SimplifyLibCalls/MemCpy.ll | 19 - test/Transforms/SimplifyLibCalls/PR7357.ll | 16 - .../SimplifyLibCalls/float-shrink-compare.ll | 179 -- test/Transforms/SimplifyLibCalls/lit.local.cfg | 1 - test/Transforms/SimplifyLibCalls/win-math.ll | 275 --- test/Transforms/Sink/basic.ll | 6 +- test/Transforms/Sink/lit.local.cfg | 1 - .../StripSymbols/2007-01-15-llvm.used.ll | 9 +- .../StripSymbols/2010-06-30-StripDebug.ll | 20 +- .../StripSymbols/2010-07-01-DeadDbgInfo.ll | 47 - test/Transforms/StripSymbols/2010-08-25-crash.ll | 25 +- test/Transforms/StripSymbols/lit.local.cfg | 1 - .../StripSymbols/strip-dead-debug-info.ll | 58 + .../StructurizeCFG/branch-on-argument.ll | 47 + .../StructurizeCFG/loop-multiple-exits.ll | 50 + .../StructurizeCFG/no-branch-to-entry.ll | 31 + test/Transforms/StructurizeCFG/switch.ll | 23 + .../2010-06-26-MultipleReturnValues.ll | 2 +- test/Transforms/TailCallElim/accum_recursion.ll | 6 +- test/Transforms/TailCallElim/basic.ll | 145 ++ .../TailCallElim/dont-tce-tail-marked-call.ll | 13 - test/Transforms/TailCallElim/inf-recursion.ll | 4 +- test/Transforms/TailCallElim/intervening-inst.ll | 18 - test/Transforms/TailCallElim/lit.local.cfg | 1 - .../TailCallElim/move_alloca_for_tail_call.ll | 15 - test/Transforms/TailCallElim/nocapture.ll | 25 - test/Transforms/TailCallElim/return_constant.ll | 18 - .../TailCallElim/trivial_codegen_tailcall.ll | 11 - test/Transforms/TailDup/X86/lit.local.cfg | 2 - test/Transforms/TailDup/lit.local.cfg | 2 - 831 files changed, 22032 insertions(+), 4938 deletions(-) delete mode 100644 test/Transforms/ADCE/lit.local.cfg delete mode 100644 test/Transforms/ArgumentPromotion/lit.local.cfg create mode 100644 test/Transforms/ArgumentPromotion/reserve-tbaa.ll create mode 100644 test/Transforms/BBVectorize/X86/wr-aliases.ll create mode 100644 test/Transforms/BBVectorize/xcore/no-vector-registers.ll delete mode 100644 test/Transforms/BlockPlacement/basictest.ll delete mode 100644 test/Transforms/BlockPlacement/lit.local.cfg delete mode 100644 test/Transforms/CodeExtractor/lit.local.cfg delete mode 100644 test/Transforms/CodeGenPrepare/lit.local.cfg delete mode 100644 test/Transforms/ConstProp/lit.local.cfg create mode 100644 test/Transforms/ConstantMerge/align.ll delete mode 100644 test/Transforms/ConstantMerge/lit.local.cfg delete mode 100644 test/Transforms/CorrelatedValuePropagation/lit.local.cfg create mode 100644 test/Transforms/DeadArgElim/2013-05-17-VarargsAndBlockAddress.ll create mode 100644 test/Transforms/DeadArgElim/linkage.ll delete mode 100644 test/Transforms/DeadArgElim/lit.local.cfg create mode 100644 test/Transforms/DeadArgElim/returned.ll create mode 100644 test/Transforms/DeadArgElim/variadic_safety.ll create mode 100644 test/Transforms/DeadStoreElimination/inst-limits.ll delete mode 100644 test/Transforms/DeadStoreElimination/lit.local.cfg create mode 100644 test/Transforms/DebugIR/crash.ll create mode 100644 test/Transforms/DebugIR/exception.ll create mode 100644 test/Transforms/DebugIR/function.ll create mode 100644 test/Transforms/DebugIR/simple-addrspace.ll create mode 100644 test/Transforms/DebugIR/simple.ll create mode 100644 test/Transforms/DebugIR/struct.ll create mode 100644 test/Transforms/DebugIR/vector.ll delete mode 100644 test/Transforms/EarlyCSE/lit.local.cfg delete mode 100644 test/Transforms/FunctionAttrs/lit.local.cfg create mode 100644 test/Transforms/FunctionAttrs/readattrs.ll delete mode 100644 test/Transforms/GCOVProfiling/lit.local.cfg create mode 100644 test/Transforms/GVN/cond_br.ll create mode 100644 test/Transforms/GVN/cond_br2.ll delete mode 100644 test/Transforms/GVN/lit.local.cfg create mode 100644 test/Transforms/GVN/pr17732.ll create mode 100644 test/Transforms/GVN/pr17852.ll create mode 100644 test/Transforms/GVN/readattrs.ll delete mode 100644 test/Transforms/GlobalDCE/lit.local.cfg create mode 100644 test/Transforms/GlobalOpt/array-elem-refs.ll create mode 100644 test/Transforms/GlobalOpt/atexit.ll create mode 100644 test/Transforms/GlobalOpt/compiler-used.ll create mode 100644 test/Transforms/GlobalOpt/invariant-nodatalayout.ll delete mode 100644 test/Transforms/GlobalOpt/lit.local.cfg create mode 100644 test/Transforms/GlobalOpt/malloc-promote-3.ll delete mode 100644 test/Transforms/IPConstantProp/lit.local.cfg create mode 100644 test/Transforms/IndVarSimplify/lftr-address-space-pointers.ll create mode 100644 test/Transforms/IndVarSimplify/lftr-extend-const.ll create mode 100644 test/Transforms/IndVarSimplify/lftr-zext.ll delete mode 100644 test/Transforms/IndVarSimplify/lit.local.cfg create mode 100644 test/Transforms/IndVarSimplify/udiv-invariant-but-traps.ll create mode 100644 test/Transforms/IndVarSimplify/widen-nsw.ll create mode 100644 test/Transforms/Inline/alloca-merge-align-nodl.ll create mode 100644 test/Transforms/Inline/alloca-merge-align.ll create mode 100644 test/Transforms/Inline/attributes.ll create mode 100644 test/Transforms/Inline/inline-invoke-with-asm-call.ll create mode 100644 test/Transforms/Inline/inline-optnone.ll create mode 100644 test/Transforms/Inline/invoke-cost.ll delete mode 100644 test/Transforms/Inline/lit.local.cfg create mode 100644 test/Transforms/InstCombine/PR7357.ll create mode 100644 test/Transforms/InstCombine/addrspacecast.ll create mode 100644 test/Transforms/InstCombine/bitcast-alias-function.ll create mode 100644 test/Transforms/InstCombine/constant-fold-address-space-pointer.ll create mode 100644 test/Transforms/InstCombine/div-shift-crash.ll create mode 100644 test/Transforms/InstCombine/err-rep-cold.ll create mode 100644 test/Transforms/InstCombine/float-shrink-compare.ll create mode 100644 test/Transforms/InstCombine/fneg-ext.ll create mode 100644 test/Transforms/InstCombine/fold-fops-into-selects.ll create mode 100644 test/Transforms/InstCombine/icmp-logical.ll delete mode 100644 test/Transforms/InstCombine/lit.local.cfg create mode 100644 test/Transforms/InstCombine/multi-size-address-space-pointer.ll create mode 100644 test/Transforms/InstCombine/objsize-address-space.ll create mode 100644 test/Transforms/InstCombine/onehot_merge.ll create mode 100644 test/Transforms/InstCombine/phi-select-constexpr.ll create mode 100644 test/Transforms/InstCombine/pow-3.ll create mode 100644 test/Transforms/InstCombine/pr17827.ll create mode 100644 test/Transforms/InstCombine/select-extractelement.ll create mode 100644 test/Transforms/InstCombine/simplify-libcalls.ll create mode 100644 test/Transforms/InstCombine/sincospi.ll create mode 100644 test/Transforms/InstCombine/vector-mul.ll create mode 100644 test/Transforms/InstCombine/win-math.ll delete mode 100644 test/Transforms/InstSimplify/lit.local.cfg delete mode 100644 test/Transforms/Internalize/2008-05-09-AllButMain.ll delete mode 100644 test/Transforms/Internalize/2008-05-09-AllButMain.ll.apifile create mode 100644 test/Transforms/Internalize/apifile delete mode 100644 test/Transforms/Internalize/available_externally.ll create mode 100644 test/Transforms/Internalize/lists.ll delete mode 100644 test/Transforms/Internalize/lit.local.cfg create mode 100644 test/Transforms/Internalize/used.ll create mode 100644 test/Transforms/JumpThreading/landing-pad.ll delete mode 100644 test/Transforms/JumpThreading/lit.local.cfg delete mode 100644 test/Transforms/LCSSA/lit.local.cfg delete mode 100644 test/Transforms/LICM/lit.local.cfg create mode 100644 test/Transforms/LICM/volatile-alias.ll delete mode 100644 test/Transforms/LoopDeletion/lit.local.cfg create mode 100644 test/Transforms/LoopIdiom/basic-address-space.ll delete mode 100644 test/Transforms/LoopIdiom/lit.local.cfg create mode 100644 test/Transforms/LoopReroll/basic.ll create mode 100644 test/Transforms/LoopReroll/reduction.ll delete mode 100644 test/Transforms/LoopRotate/lit.local.cfg create mode 100644 test/Transforms/LoopSimplify/dup-preds.ll delete mode 100644 test/Transforms/LoopSimplify/lit.local.cfg create mode 100644 test/Transforms/LoopStrengthReduce/addrec-gep-address-space.ll create mode 100644 test/Transforms/LoopStrengthReduce/address-space-loop.ll delete mode 100644 test/Transforms/LoopStrengthReduce/lit.local.cfg create mode 100644 test/Transforms/LoopStrengthReduce/lsr-expand-quadratic.ll create mode 100644 test/Transforms/LoopStrengthReduce/scaling_factor_cost_crash.ll create mode 100644 test/Transforms/LoopStrengthReduce/uglygep-address-space.ll create mode 100644 test/Transforms/LoopUnroll/PowerPC/a2-unrolling.ll create mode 100644 test/Transforms/LoopUnroll/PowerPC/lit.local.cfg delete mode 100644 test/Transforms/LoopUnroll/lit.local.cfg delete mode 100644 test/Transforms/LoopUnswitch/lit.local.cfg create mode 100644 test/Transforms/LoopVectorize/ARM/gather-cost.ll create mode 100644 test/Transforms/LoopVectorize/X86/already-vectorized.ll create mode 100644 test/Transforms/LoopVectorize/X86/gather-cost.ll create mode 100644 test/Transforms/LoopVectorize/X86/rauw-bug.ll create mode 100644 test/Transforms/LoopVectorize/X86/tripcount.ll create mode 100644 test/Transforms/LoopVectorize/X86/unroll-pm.ll create mode 100644 test/Transforms/LoopVectorize/XCore/lit.local.cfg create mode 100644 test/Transforms/LoopVectorize/XCore/no-vector-registers.ll create mode 100644 test/Transforms/LoopVectorize/align.ll create mode 100644 test/Transforms/LoopVectorize/debugloc.ll create mode 100644 test/Transforms/LoopVectorize/ee-crash.ll create mode 100644 test/Transforms/LoopVectorize/funcall.ll create mode 100644 test/Transforms/LoopVectorize/hoist-loads.ll create mode 100644 test/Transforms/LoopVectorize/if-conversion-edgemasks.ll create mode 100644 test/Transforms/LoopVectorize/induction.ll create mode 100644 test/Transforms/LoopVectorize/infiniteloop.ll create mode 100644 test/Transforms/LoopVectorize/lifetime.ll delete mode 100644 test/Transforms/LoopVectorize/lit.local.cfg create mode 100644 test/Transforms/LoopVectorize/memdep.ll create mode 100644 test/Transforms/LoopVectorize/metadata-unroll.ll create mode 100644 test/Transforms/LoopVectorize/metadata-width.ll create mode 100644 test/Transforms/LoopVectorize/multiple-address-spaces.ll create mode 100644 test/Transforms/LoopVectorize/opt.ll create mode 100644 test/Transforms/LoopVectorize/reverse_iter.ll create mode 100644 test/Transforms/LoopVectorize/runtime-check-address-space.ll create mode 100644 test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll create mode 100644 test/Transforms/LoopVectorize/safegep.ll create mode 100644 test/Transforms/LoopVectorize/scev-exitlim-crash.ll create mode 100644 test/Transforms/LoopVectorize/store-shuffle-bug.ll create mode 100644 test/Transforms/LoopVectorize/undef-inst-bug.ll create mode 100644 test/Transforms/LoopVectorize/unroll_novec.ll delete mode 100644 test/Transforms/LowerAtomic/lit.local.cfg delete mode 100644 test/Transforms/LowerExpectIntrinsic/lit.local.cfg delete mode 100644 test/Transforms/LowerInvoke/lit.local.cfg delete mode 100644 test/Transforms/LowerSwitch/lit.local.cfg delete mode 100644 test/Transforms/Mem2Reg/lit.local.cfg delete mode 100644 test/Transforms/MemCpyOpt/lit.local.cfg create mode 100644 test/Transforms/MergeFunc/address-spaces.ll create mode 100644 test/Transforms/MergeFunc/inttoptr-address-space.ll delete mode 100644 test/Transforms/MergeFunc/lit.local.cfg create mode 100644 test/Transforms/MergeFunc/merge-ptr-and-int.ll create mode 100644 test/Transforms/MergeFunc/ptr-int-transitivity-1.ll create mode 100644 test/Transforms/MergeFunc/ptr-int-transitivity-2.ll create mode 100644 test/Transforms/MergeFunc/ptr-int-transitivity-3.ll create mode 100644 test/Transforms/MergeFunc/too-small.ll delete mode 100644 test/Transforms/MetaRenamer/lit.local.cfg create mode 100644 test/Transforms/ObjCARC/allocas.ll delete mode 100644 test/Transforms/ObjCARC/lit.local.cfg delete mode 100644 test/Transforms/ObjCARC/no-objc-arc-exceptions.ll delete mode 100644 test/Transforms/ObjCARC/retain-block-alloca.ll delete mode 100644 test/Transforms/ObjCARC/retain-block-escape-analysis.ll delete mode 100644 test/Transforms/ObjCARC/retain-block-load.ll delete mode 100644 test/Transforms/ObjCARC/retain-block.ll delete mode 100644 test/Transforms/PhaseOrdering/lit.local.cfg delete mode 100644 test/Transforms/PruneEH/lit.local.cfg delete mode 100644 test/Transforms/Reassociate/lit.local.cfg delete mode 100644 test/Transforms/Reg2Mem/lit.local.cfg delete mode 100644 test/Transforms/SCCP/lit.local.cfg create mode 100644 test/Transforms/SLPVectorizer/ARM/lit.local.cfg create mode 100644 test/Transforms/SLPVectorizer/ARM/memory.ll create mode 100644 test/Transforms/SLPVectorizer/ARM/sroa.ll create mode 100644 test/Transforms/SLPVectorizer/R600/lit.local.cfg create mode 100644 test/Transforms/SLPVectorizer/R600/simplebb.ll create mode 100644 test/Transforms/SLPVectorizer/X86/cmp_sel.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_7zip.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_bullet.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_bullet3.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_dequeue.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_flop7.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_lencod.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_mandeltext.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_netbsd_decompress.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_sim4b1.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_smallpt.ll create mode 100644 test/Transforms/SLPVectorizer/X86/cross_block_slp.ll create mode 100644 test/Transforms/SLPVectorizer/X86/cse.ll create mode 100644 test/Transforms/SLPVectorizer/X86/cycle_dup.ll create mode 100644 test/Transforms/SLPVectorizer/X86/debug_info.ll create mode 100644 test/Transforms/SLPVectorizer/X86/external_user.ll create mode 100644 test/Transforms/SLPVectorizer/X86/extract.ll create mode 100644 test/Transforms/SLPVectorizer/X86/horizontal.ll create mode 100644 test/Transforms/SLPVectorizer/X86/implicitfloat.ll create mode 100644 test/Transforms/SLPVectorizer/X86/in-tree-user.ll create mode 100644 test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll create mode 100644 test/Transforms/SLPVectorizer/X86/long_chains.ll create mode 100644 test/Transforms/SLPVectorizer/X86/multi_block.ll create mode 100644 test/Transforms/SLPVectorizer/X86/odd_store.ll create mode 100644 test/Transforms/SLPVectorizer/X86/operandorder.ll create mode 100644 test/Transforms/SLPVectorizer/X86/opt.ll create mode 100644 test/Transforms/SLPVectorizer/X86/ordering.ll create mode 100644 test/Transforms/SLPVectorizer/X86/phi.ll create mode 100644 test/Transforms/SLPVectorizer/X86/phi3.ll create mode 100644 test/Transforms/SLPVectorizer/X86/phi_landingpad.ll create mode 100644 test/Transforms/SLPVectorizer/X86/phi_overalignedtype.ll create mode 100644 test/Transforms/SLPVectorizer/X86/pr16571.ll create mode 100644 test/Transforms/SLPVectorizer/X86/pr16628.ll create mode 100644 test/Transforms/SLPVectorizer/X86/pr16899.ll create mode 100644 test/Transforms/SLPVectorizer/X86/pr18060.ll create mode 100644 test/Transforms/SLPVectorizer/X86/rgb_phi.ll create mode 100644 test/Transforms/SLPVectorizer/X86/tiny-tree.ll create mode 100644 test/Transforms/SLPVectorizer/XCore/lit.local.cfg create mode 100644 test/Transforms/SLPVectorizer/XCore/no-vector-registers.ll delete mode 100644 test/Transforms/SLPVectorizer/lit.local.cfg delete mode 100644 test/Transforms/SROA/lit.local.cfg create mode 100644 test/Transforms/SROA/vector-conversion.ll create mode 100644 test/Transforms/SampleProfile/Inputs/branch.prof create mode 100644 test/Transforms/SampleProfile/branch.ll delete mode 100644 test/Transforms/ScalarRepl/lit.local.cfg create mode 100644 test/Transforms/SimplifyCFG/CoveredLookupTable.ll create mode 100644 test/Transforms/SimplifyCFG/PR16069.ll create mode 100644 test/Transforms/SimplifyCFG/attr-noduplicate.ll create mode 100644 test/Transforms/SimplifyCFG/common-dest-folding.ll delete mode 100644 test/Transforms/SimplifyCFG/lit.local.cfg delete mode 100644 test/Transforms/SimplifyLibCalls/2005-05-20-sprintf-crash.ll delete mode 100644 test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll delete mode 100644 test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll delete mode 100644 test/Transforms/SimplifyLibCalls/2009-05-30-memcmp-byte.ll delete mode 100644 test/Transforms/SimplifyLibCalls/2009-07-28-Exit.ll delete mode 100644 test/Transforms/SimplifyLibCalls/2009-07-29-Exit2.ll delete mode 100644 test/Transforms/SimplifyLibCalls/MemCpy.ll delete mode 100644 test/Transforms/SimplifyLibCalls/PR7357.ll delete mode 100644 test/Transforms/SimplifyLibCalls/float-shrink-compare.ll delete mode 100644 test/Transforms/SimplifyLibCalls/lit.local.cfg delete mode 100644 test/Transforms/SimplifyLibCalls/win-math.ll delete mode 100644 test/Transforms/Sink/lit.local.cfg delete mode 100644 test/Transforms/StripSymbols/2010-07-01-DeadDbgInfo.ll delete mode 100644 test/Transforms/StripSymbols/lit.local.cfg create mode 100644 test/Transforms/StripSymbols/strip-dead-debug-info.ll create mode 100644 test/Transforms/StructurizeCFG/branch-on-argument.ll create mode 100644 test/Transforms/StructurizeCFG/loop-multiple-exits.ll create mode 100644 test/Transforms/StructurizeCFG/no-branch-to-entry.ll create mode 100644 test/Transforms/StructurizeCFG/switch.ll create mode 100644 test/Transforms/TailCallElim/basic.ll delete mode 100644 test/Transforms/TailCallElim/dont-tce-tail-marked-call.ll delete mode 100644 test/Transforms/TailCallElim/intervening-inst.ll delete mode 100644 test/Transforms/TailCallElim/lit.local.cfg delete mode 100644 test/Transforms/TailCallElim/move_alloca_for_tail_call.ll delete mode 100644 test/Transforms/TailCallElim/nocapture.ll delete mode 100644 test/Transforms/TailCallElim/return_constant.ll delete mode 100644 test/Transforms/TailCallElim/trivial_codegen_tailcall.ll (limited to 'test/Transforms') diff --git a/test/Transforms/ADCE/lit.local.cfg b/test/Transforms/ADCE/lit.local.cfg deleted file mode 100644 index 19eebc0ac7ac..000000000000 --- a/test/Transforms/ADCE/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.ll', '.c', '.cpp'] diff --git a/test/Transforms/ArgumentPromotion/lit.local.cfg b/test/Transforms/ArgumentPromotion/lit.local.cfg deleted file mode 100644 index 19eebc0ac7ac..000000000000 --- a/test/Transforms/ArgumentPromotion/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.ll', '.c', '.cpp'] diff --git a/test/Transforms/ArgumentPromotion/reserve-tbaa.ll b/test/Transforms/ArgumentPromotion/reserve-tbaa.ll new file mode 100644 index 000000000000..4688a83f2425 --- /dev/null +++ b/test/Transforms/ArgumentPromotion/reserve-tbaa.ll @@ -0,0 +1,52 @@ +; RUN: opt < %s -argpromotion -S + +; PR17906 +; When we promote two arguments in a single function with different types, +; before the fix, we used the same tag for the newly-created two loads. +; This testing case makes sure that we correctly transfer the tbaa tags from the +; original loads to the newly-created loads when promoting pointer arguments. + +@a = global i32* null, align 8 +@e = global i32** @a, align 8 +@g = global i32 0, align 4 +@c = global i64 0, align 8 +@d = global i8 0, align 1 + +define internal fastcc void @fn(i32* nocapture readonly %p1, i64* nocapture readonly %p2) { +entry: + %0 = load i64* %p2, align 8, !tbaa !1 + %conv = trunc i64 %0 to i32 + %1 = load i32* %p1, align 4, !tbaa !5 + %conv1 = trunc i32 %1 to i8 + store i8 %conv1, i8* @d, align 1, !tbaa !7 + ret void +} + +define i32 @main() { +entry: +; CHECK-LABEL: main +; CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa ![[I32:[0-9]+]] +; CHECK: %g.val = load i32* @g, align 4, !tbaa ![[I32]] +; CHECK: %c.val = load i64* @c, align 8, !tbaa ![[LONG:[0-9]+]] + %0 = load i32*** @e, align 8, !tbaa !8 + store i32* @g, i32** %0, align 8, !tbaa !8 + %1 = load i32** @a, align 8, !tbaa !8 + store i32 1, i32* %1, align 4, !tbaa !5 + call fastcc void @fn(i32* @g, i64* @c) + + ret i32 0 +} + +!1 = metadata !{metadata !2, metadata !2, i64 0} +!2 = metadata !{metadata !"long", metadata !3, i64 0} +!3 = metadata !{metadata !"omnipotent char", metadata !4, i64 0} +!4 = metadata !{metadata !"Simple C/C++ TBAA"} +!5 = metadata !{metadata !6, metadata !6, i64 0} +!6 = metadata !{metadata !"int", metadata !3, i64 0} +!7 = metadata !{metadata !3, metadata !3, i64 0} +!8 = metadata !{metadata !9, metadata !9, i64 0} +!9 = metadata !{metadata !"any pointer", metadata !3, i64 0} +; CHECK: ![[I32]] = metadata !{metadata ![[I32_TYPE:[0-9]+]], metadata ![[I32_TYPE]], i64 0} +; CHECK: ![[I32_TYPE]] = metadata !{metadata !"int", metadata !{{.*}}, i64 0} +; CHECK: ![[LONG]] = metadata !{metadata ![[LONG_TYPE:[0-9]+]], metadata ![[LONG_TYPE]], i64 0} +; CHECK: ![[LONG_TYPE]] = metadata !{metadata !"long", metadata !{{.*}}, i64 0} diff --git a/test/Transforms/BBVectorize/X86/cmp-types.ll b/test/Transforms/BBVectorize/X86/cmp-types.ll index a4fcbb6048f5..fc1da1b0c609 100644 --- a/test/Transforms/BBVectorize/X86/cmp-types.ll +++ b/test/Transforms/BBVectorize/X86/cmp-types.ll @@ -11,6 +11,6 @@ entry: %tobool21 = icmp ne %"struct.btSoftBody"* %n2, null %cond22 = zext i1 %tobool21 to i32 ret void -; CHECK: @test1 +; CHECK-LABEL: @test1( } diff --git a/test/Transforms/BBVectorize/X86/loop1.ll b/test/Transforms/BBVectorize/X86/loop1.ll index bbf565d1cc7f..401808441c26 100644 --- a/test/Transforms/BBVectorize/X86/loop1.ll +++ b/test/Transforms/BBVectorize/X86/loop1.ll @@ -7,8 +7,8 @@ target triple = "x86_64-unknown-linux-gnu" define void @test1(double* noalias %out, double* noalias %in1, double* noalias %in2) nounwind uwtable { entry: br label %for.body -; CHECK: @test1 -; CHECK-UNRL: @test1 +; CHECK-LABEL: @test1( +; CHECK-UNRL-LABEL: @test1( for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] diff --git a/test/Transforms/BBVectorize/X86/pr15289.ll b/test/Transforms/BBVectorize/X86/pr15289.ll index 07cc5d8b96b7..42bd0ff14032 100644 --- a/test/Transforms/BBVectorize/X86/pr15289.ll +++ b/test/Transforms/BBVectorize/X86/pr15289.ll @@ -45,7 +45,7 @@ entry: %13 = fmul double %3, %12 %14 = fmul double %3, undef %15 = getelementptr inbounds [5 x { double, double }]* %c2ten, i64 0, i64 0, i32 0 - store double %13, double* %15, align 8, !tbaa !0 + store double %13, double* %15, align 8 %16 = getelementptr inbounds [5 x { double, double }]* %c2ten, i64 0, i64 0, i32 1 %17 = fmul double undef, %8 %18 = fmul double %17, undef @@ -54,7 +54,7 @@ entry: %21 = fmul double %3, %19 %22 = fsub double -0.000000e+00, %21 %23 = getelementptr inbounds [5 x { double, double }]* %c2ten, i64 0, i64 1, i32 0 - store double %22, double* %23, align 8, !tbaa !0 + store double %22, double* %23, align 8 %24 = getelementptr inbounds [5 x { double, double }]* %c2ten, i64 0, i64 1, i32 1 %25 = fmul double undef, 0x3FE42F601A8C6794 %26 = fmul double undef, 2.000000e+00 @@ -62,7 +62,7 @@ entry: %28 = fmul double %6, undef %29 = fsub double undef, %28 %30 = getelementptr inbounds [5 x { double, double }]* %c2ten, i64 0, i64 2, i32 0 - store double undef, double* %30, align 8, !tbaa !0 + store double undef, double* %30, align 8 %31 = getelementptr inbounds [5 x { double, double }]* %c2ten, i64 0, i64 2, i32 1 %32 = fmul double undef, %17 %33 = fmul double undef, %17 @@ -71,7 +71,7 @@ entry: %36 = fsub double undef, %35 %37 = fmul double %3, %34 %38 = getelementptr inbounds [5 x { double, double }]* %c2ten, i64 0, i64 3, i32 0 - store double %37, double* %38, align 8, !tbaa !0 + store double %37, double* %38, align 8 %39 = getelementptr inbounds [5 x { double, double }]* %c2ten, i64 0, i64 3, i32 1 %40 = fmul double undef, %8 %41 = fmul double undef, %40 @@ -79,20 +79,17 @@ entry: %43 = fsub double undef, %42 %44 = fmul double %3, %43 %45 = getelementptr inbounds [5 x { double, double }]* %c2ten, i64 0, i64 4, i32 0 - store double %13, double* %45, align 8, !tbaa !0 + store double %13, double* %45, align 8 %46 = getelementptr inbounds [5 x { double, double }]* %c2ten, i64 0, i64 4, i32 1 %47 = fsub double -0.000000e+00, %14 - store double %47, double* %16, align 8, !tbaa !0 - store double undef, double* %24, align 8, !tbaa !0 - store double -0.000000e+00, double* %31, align 8, !tbaa !0 - store double undef, double* %39, align 8, !tbaa !0 - store double undef, double* %46, align 8, !tbaa !0 + store double %47, double* %16, align 8 + store double undef, double* %24, align 8 + store double -0.000000e+00, double* %31, align 8 + store double undef, double* %39, align 8 + store double undef, double* %46, align 8 ret void } attributes #0 = { nounwind uwtable } attributes #1 = { nounwind readnone } attributes #2 = { nounwind } - -!0 = metadata !{metadata !"alias set 17: real(kind=8)", metadata !1} -!1 = metadata !{metadata !1} diff --git a/test/Transforms/BBVectorize/X86/sh-rec.ll b/test/Transforms/BBVectorize/X86/sh-rec.ll index 1e0492c2a8c2..ad75fc96d9f2 100644 --- a/test/Transforms/BBVectorize/X86/sh-rec.ll +++ b/test/Transforms/BBVectorize/X86/sh-rec.ll @@ -46,7 +46,7 @@ if.end10: ; preds = %entry return: ; preds = %entry ret void -; CHECK: @ptoa +; CHECK-LABEL: @ptoa( } declare noalias i8* @malloc() nounwind diff --git a/test/Transforms/BBVectorize/X86/sh-rec2.ll b/test/Transforms/BBVectorize/X86/sh-rec2.ll index ef2239932fa1..d65ac1cc12f1 100644 --- a/test/Transforms/BBVectorize/X86/sh-rec2.ll +++ b/test/Transforms/BBVectorize/X86/sh-rec2.ll @@ -77,7 +77,7 @@ entry: %and390 = shl i8 %conv3898, 6 store i8 %and390, i8* %incdec.ptr387, align 1 unreachable -; CHECK: @gsm_encode +; CHECK-LABEL: @gsm_encode( } declare void @Gsm_Coder(%struct.gsm_state.2.8.14.15.16.17.19.22.23.25.26.28.29.31.32.33.35.36.37.38.40.41.42.44.45.47.48.50.52.53.54.56.57.58.59.60.61.62.63.66.73.83.84.89.90.91.92.93.94.95.96.99.100.101.102.103.104.106.107.114.116.121.122.129.130.135.136.137.138.139.140.141.142.143.144.147.148.149.158.159.160.161.164.165.166.167.168.169.172.179.181.182.183.188.195.200.201.202.203.204.205.208.209.210.212.213.214.215.222.223.225.226.230.231.232.233.234.235.236.237.238.239.240.241.242.243.244.352*, i16*, i16*, i16*, i16*, i16*, i16*, i16*) diff --git a/test/Transforms/BBVectorize/X86/sh-rec3.ll b/test/Transforms/BBVectorize/X86/sh-rec3.ll index fd2cc8bdd91c..ad880ed8895a 100644 --- a/test/Transforms/BBVectorize/X86/sh-rec3.ll +++ b/test/Transforms/BBVectorize/X86/sh-rec3.ll @@ -162,7 +162,7 @@ entry: %conv365 = trunc i32 %or364 to i8 store i8 %conv365, i8* %incdec.ptr350, align 1 unreachable -; CHECK: @gsm_encode +; CHECK-LABEL: @gsm_encode( } declare void @Gsm_Coder(%struct.gsm_state.2.8.39.44.45.55.56.57.58.59.62.63.64.65.74.75.76.77.80.87.92.93.94.95.96.97.110.111.112.113.114.128.130.135.136.137.138.139.140.141.142.143.144.145.148.149.150.151.152.169.170.177.178.179.184.185.186.187.188.201.208.209.219.220.221.223.224.225.230.231.232.233.235.236.237.238.245.246.248.249.272.274.279.280.281.282.283.286.293.298.299.314.315.316.317.318.319.320.321.322.323.324.325.326.327.328.329.330.331.332.333.334.335.336.337.338.339.340.341.342.343.344.345.346.347.348.349.350.351.352.353.565*, i16*, i16*, i16*, i16*, i16*, i16*, i16*) diff --git a/test/Transforms/BBVectorize/X86/sh-types.ll b/test/Transforms/BBVectorize/X86/sh-types.ll index 0bcb714d5e65..fbff2fb86eb0 100644 --- a/test/Transforms/BBVectorize/X86/sh-types.ll +++ b/test/Transforms/BBVectorize/X86/sh-types.ll @@ -18,7 +18,7 @@ define <4 x float> @test7(<4 x float> %A1, <4 x float> %B1, double %C1, double % %R = fmul <4 x float> %Y1, %Y2 ret <4 x float> %R -; CHECK: @test7 +; CHECK-LABEL: @test7( ; CHECK-NOT: <8 x float> ; CHECK: ret <4 x float> } diff --git a/test/Transforms/BBVectorize/X86/simple-int.ll b/test/Transforms/BBVectorize/X86/simple-int.ll index f5dbe46b1480..7842ec85b6c8 100644 --- a/test/Transforms/BBVectorize/X86/simple-int.ll +++ b/test/Transforms/BBVectorize/X86/simple-int.ll @@ -16,7 +16,7 @@ define double @test1(double %A1, double %A2, double %B1, double %B2, double %C1, %Z2 = fadd double %Y2, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: ret double %R } @@ -30,7 +30,7 @@ define double @test1a(double %A1, double %A2, double %B1, double %B2, double %C1 %Z2 = fadd double %Y2, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test1a +; CHECK-LABEL: @test1a( ; CHECK: ret double %R } @@ -44,7 +44,7 @@ define double @test2(double %A1, double %A2, double %B1, double %B2) { %Z2 = fadd double %Y2, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK: ret double %R } @@ -58,7 +58,7 @@ define double @test3(double %A1, double %A2, double %B1, double %B2, i32 %P) { %Z2 = fadd double %Y2, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test3 +; CHECK-LABEL: @test3( ; CHECK: ret double %R } @@ -73,7 +73,7 @@ define double @test4(double %A1, double %A2, double %B1, double %B2, i32 %P) { %Z2 = fadd double %Y2, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test4 +; CHECK-LABEL: @test4( ; CHECK: ret double %R } diff --git a/test/Transforms/BBVectorize/X86/simple-ldstr.ll b/test/Transforms/BBVectorize/X86/simple-ldstr.ll index 0124399bad9d..1abbc34b68ec 100644 --- a/test/Transforms/BBVectorize/X86/simple-ldstr.ll +++ b/test/Transforms/BBVectorize/X86/simple-ldstr.ll @@ -16,7 +16,7 @@ entry: %arrayidx5 = getelementptr inbounds double* %c, i64 1 store double %mul5, double* %arrayidx5, align 8 ret void -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: %i0.v.i0 = bitcast double* %a to <2 x double>* ; CHECK: %i1.v.i0 = bitcast double* %b to <2 x double>* ; CHECK: %i0 = load <2 x double>* %i0.v.i0, align 8 diff --git a/test/Transforms/BBVectorize/X86/simple.ll b/test/Transforms/BBVectorize/X86/simple.ll index 8abfa5f8bd29..a11e3090f205 100644 --- a/test/Transforms/BBVectorize/X86/simple.ll +++ b/test/Transforms/BBVectorize/X86/simple.ll @@ -11,7 +11,7 @@ define double @test1(double %A1, double %A2, double %B1, double %B2) { %Z2 = fadd double %Y2, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: fsub <2 x double> ; CHECK: fmul <2 x double> ; CHECK: fadd <2 x double> @@ -38,7 +38,7 @@ define double @test1a(double %A1, double %A2, double %B1, double %B2) { %S2 = fadd double %W2, %Q2 %R = fmul double %S1, %S2 ret double %R -; CHECK: @test1a +; CHECK-LABEL: @test1a( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 @@ -66,7 +66,7 @@ define double @test2(double %A1, double %A2, double %B1, double %B2) { %Z2 = fadd double %Y1, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK: insertelement ; CHECK: insertelement ; CHECK: insertelement @@ -88,7 +88,7 @@ define double @test4(double %A1, double %A2, double %B1, double %B2) { %W2 = fadd double %Y1, %Z2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test4 +; CHECK-LABEL: @test4( ; CHECK: insertelement ; CHECK: insertelement ; CHECK: insertelement @@ -113,7 +113,7 @@ define <8 x i8> @test6(<8 x i8> %A1, <8 x i8> %A2, <8 x i8> %B1, <8 x i8> %B2) { %Q2 = shufflevector <8 x i8> %Z2, <8 x i8> %Z2, <8 x i32> %R = mul <8 x i8> %Q1, %Q2 ret <8 x i8> %R -; CHECK: @test6 +; CHECK-LABEL: @test6( ; CHECK-NOT: sub <16 x i8> ; CHECK: ret <8 x i8> } diff --git a/test/Transforms/BBVectorize/X86/vs-cast.ll b/test/Transforms/BBVectorize/X86/vs-cast.ll index be3efca925b8..0c666b11976c 100644 --- a/test/Transforms/BBVectorize/X86/vs-cast.ll +++ b/test/Transforms/BBVectorize/X86/vs-cast.ll @@ -7,6 +7,6 @@ entry: %0 = bitcast <2 x i64> undef to i128 %1 = bitcast <2 x i64> undef to i128 ret void -; CHECK: @main +; CHECK-LABEL: @main( } diff --git a/test/Transforms/BBVectorize/X86/wr-aliases.ll b/test/Transforms/BBVectorize/X86/wr-aliases.ll new file mode 100644 index 000000000000..34b1d4e9cae3 --- /dev/null +++ b/test/Transforms/BBVectorize/X86/wr-aliases.ll @@ -0,0 +1,144 @@ +; RUN: opt -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7-avx -bb-vectorize -S < %s | FileCheck %s +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-S128" +target triple = "x86_64-unknown-linux-gnu" + +%class.QBezier.15 = type { double, double, double, double, double, double, double, double } + +; Function Attrs: nounwind +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #0 + +; Function Attrs: uwtable +declare fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval nocapture readonly align 8) #1 + +; Function Attrs: nounwind +declare void @llvm.lifetime.start(i64, i8* nocapture) #0 + +; Function Attrs: nounwind +declare void @llvm.lifetime.end(i64, i8* nocapture) #0 + +define void @main_arrayctor.cont([10 x %class.QBezier.15]* %beziers, %class.QBezier.15* %agg.tmp.i, %class.QBezier.15* %agg.tmp55.i, %class.QBezier.15* %agg.tmp56.i) { +newFuncRoot: + br label %arrayctor.cont + +arrayctor.cont.ret.exitStub: ; preds = %arrayctor.cont + ret void + +; CHECK-LABEL: @main_arrayctor.cont +; CHECK: <2 x double> +; CHECK: @_ZL12printQBezier7QBezier +; CHECK: store double %mul8.i, double* %x3.i, align 16 +; CHECK: load double* %x3.i, align 16 +; CHECK: ret + +arrayctor.cont: ; preds = %newFuncRoot + %ref.tmp.sroa.0.0.idx = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 0 + store double 1.000000e+01, double* %ref.tmp.sroa.0.0.idx, align 16 + %ref.tmp.sroa.2.0.idx1 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 1 + store double 2.000000e+01, double* %ref.tmp.sroa.2.0.idx1, align 8 + %ref.tmp.sroa.3.0.idx2 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 2 + store double 3.000000e+01, double* %ref.tmp.sroa.3.0.idx2, align 16 + %ref.tmp.sroa.4.0.idx3 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 3 + store double 4.000000e+01, double* %ref.tmp.sroa.4.0.idx3, align 8 + %ref.tmp.sroa.5.0.idx4 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 4 + store double 5.000000e+01, double* %ref.tmp.sroa.5.0.idx4, align 16 + %ref.tmp.sroa.6.0.idx5 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 5 + store double 6.000000e+01, double* %ref.tmp.sroa.6.0.idx5, align 8 + %ref.tmp.sroa.7.0.idx6 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 6 + store double 7.000000e+01, double* %ref.tmp.sroa.7.0.idx6, align 16 + %ref.tmp.sroa.8.0.idx7 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 7 + store double 8.000000e+01, double* %ref.tmp.sroa.8.0.idx7, align 8 + %add.ptr = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1 + %v0 = bitcast %class.QBezier.15* %agg.tmp.i to i8* + call void @llvm.lifetime.start(i64 64, i8* %v0) + %v1 = bitcast %class.QBezier.15* %agg.tmp55.i to i8* + call void @llvm.lifetime.start(i64 64, i8* %v1) + %v2 = bitcast %class.QBezier.15* %agg.tmp56.i to i8* + call void @llvm.lifetime.start(i64 64, i8* %v2) + %v3 = bitcast [10 x %class.QBezier.15]* %beziers to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %v0, i8* %v3, i64 64, i32 8, i1 false) + call fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval align 8 %agg.tmp.i) + %x2.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 2 + %v4 = load double* %x2.i, align 16 + %x3.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 4 + %v5 = load double* %x3.i, align 16 + %add.i = fadd double %v4, %v5 + %mul.i = fmul double 5.000000e-01, %add.i + %x1.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 0 + %v6 = load double* %x1.i, align 16 + %add3.i = fadd double %v4, %v6 + %mul4.i = fmul double 5.000000e-01, %add3.i + %x25.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 2 + store double %mul4.i, double* %x25.i, align 16 + %v7 = load double* %x3.i, align 16 + %x4.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 6 + %v8 = load double* %x4.i, align 16 + %add7.i = fadd double %v7, %v8 + %mul8.i = fmul double 5.000000e-01, %add7.i + store double %mul8.i, double* %x3.i, align 16 + %v9 = load double* %x1.i, align 16 + %x111.i = getelementptr inbounds %class.QBezier.15* %add.ptr, i64 0, i32 0 + store double %v9, double* %x111.i, align 16 + %v10 = load double* %x25.i, align 16 + %add15.i = fadd double %mul.i, %v10 + %mul16.i = fmul double 5.000000e-01, %add15.i + %x317.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 4 + store double %mul16.i, double* %x317.i, align 16 + %v11 = load double* %x3.i, align 16 + %add19.i = fadd double %mul.i, %v11 + %mul20.i = fmul double 5.000000e-01, %add19.i + store double %mul20.i, double* %x2.i, align 16 + %v12 = load double* %x317.i, align 16 + %add24.i = fadd double %v12, %mul20.i + %mul25.i = fmul double 5.000000e-01, %add24.i + store double %mul25.i, double* %x1.i, align 16 + %x427.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 6 + store double %mul25.i, double* %x427.i, align 16 + %y2.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 3 + %v13 = load double* %y2.i, align 8 + %y3.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 5 + %v14 = load double* %y3.i, align 8 + %add28.i = fadd double %v13, %v14 + %div.i = fmul double 5.000000e-01, %add28.i + %y1.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 1 + %v15 = load double* %y1.i, align 8 + %add30.i = fadd double %v13, %v15 + %mul31.i = fmul double 5.000000e-01, %add30.i + %y232.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 3 + store double %mul31.i, double* %y232.i, align 8 + %v16 = load double* %y3.i, align 8 + %y4.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 7 + %v17 = load double* %y4.i, align 8 + %add34.i = fadd double %v16, %v17 + %mul35.i = fmul double 5.000000e-01, %add34.i + store double %mul35.i, double* %y3.i, align 8 + %v18 = load double* %y1.i, align 8 + %y138.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 1 + store double %v18, double* %y138.i, align 8 + %v19 = load double* %y232.i, align 8 + %add42.i = fadd double %div.i, %v19 + %mul43.i = fmul double 5.000000e-01, %add42.i + %y344.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 5 + store double %mul43.i, double* %y344.i, align 8 + %v20 = load double* %y3.i, align 8 + %add46.i = fadd double %div.i, %v20 + %mul47.i = fmul double 5.000000e-01, %add46.i + store double %mul47.i, double* %y2.i, align 8 + %v21 = load double* %y344.i, align 8 + %add51.i = fadd double %v21, %mul47.i + %mul52.i = fmul double 5.000000e-01, %add51.i + store double %mul52.i, double* %y1.i, align 8 + %y454.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 7 + store double %mul52.i, double* %y454.i, align 8 + %v22 = bitcast %class.QBezier.15* %add.ptr to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %v1, i8* %v22, i64 64, i32 8, i1 false) + call fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval align 8 %agg.tmp55.i) + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %v2, i8* %v3, i64 64, i32 8, i1 false) + call fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval align 8 %agg.tmp56.i) + call void @llvm.lifetime.end(i64 64, i8* %v0) + call void @llvm.lifetime.end(i64 64, i8* %v1) + call void @llvm.lifetime.end(i64 64, i8* %v2) + br label %arrayctor.cont.ret.exitStub +} + +attributes #0 = { nounwind } +attributes #1 = { uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } diff --git a/test/Transforms/BBVectorize/cycle.ll b/test/Transforms/BBVectorize/cycle.ll index bdcb30da887f..6bfa625ea5f0 100644 --- a/test/Transforms/BBVectorize/cycle.ll +++ b/test/Transforms/BBVectorize/cycle.ll @@ -105,7 +105,7 @@ go: br i1 %or.cond, label %done, label %go done: ret void -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: go: ; CHECK: %conv.v.i0.1 = insertelement <2 x i32> undef, i32 %n.0, i32 0 ; FIXME: When tree pruning is deterministic, include the entire output. diff --git a/test/Transforms/BBVectorize/ld1.ll b/test/Transforms/BBVectorize/ld1.ll index ea5cb5dd93f7..9c79eef05f7b 100644 --- a/test/Transforms/BBVectorize/ld1.ll +++ b/test/Transforms/BBVectorize/ld1.ll @@ -22,7 +22,7 @@ entry: %add15 = fadd double %mul13, %i5 %mul16 = fmul double %add11, %add15 ret double %mul16 -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: %i0.v.i0 = bitcast double* %a to <2 x double>* ; CHECK: %i1.v.i0 = bitcast double* %b to <2 x double>* ; CHECK: %i2.v.i0 = bitcast double* %c to <2 x double>* diff --git a/test/Transforms/BBVectorize/lit.local.cfg b/test/Transforms/BBVectorize/lit.local.cfg index a8ad0f1a28b2..ba763cf03ffc 100644 --- a/test/Transforms/BBVectorize/lit.local.cfg +++ b/test/Transforms/BBVectorize/lit.local.cfg @@ -1,5 +1,3 @@ -config.suffixes = ['.ll', '.c', '.cpp'] - targets = set(config.root.targets_to_build.split()) if not 'X86' in targets: config.unsupported = True diff --git a/test/Transforms/BBVectorize/loop1.ll b/test/Transforms/BBVectorize/loop1.ll index e592edb44a02..ed7be15f7adf 100644 --- a/test/Transforms/BBVectorize/loop1.ll +++ b/test/Transforms/BBVectorize/loop1.ll @@ -7,8 +7,8 @@ target triple = "x86_64-unknown-linux-gnu" define void @test1(double* noalias %out, double* noalias %in1, double* noalias %in2) nounwind uwtable { entry: br label %for.body -; CHECK: @test1 -; CHECK-UNRL: @test1 +; CHECK-LABEL: @test1( +; CHECK-UNRL-LABEL: @test1( for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] diff --git a/test/Transforms/BBVectorize/mem-op-depth.ll b/test/Transforms/BBVectorize/mem-op-depth.ll index 84f16bd2f47d..c31d4521183f 100644 --- a/test/Transforms/BBVectorize/mem-op-depth.ll +++ b/test/Transforms/BBVectorize/mem-op-depth.ll @@ -6,7 +6,7 @@ target triple = "x86_64-unknown-linux-gnu" @B = common global [1024 x float] zeroinitializer, align 16 define i32 @test1() nounwind { -; CHECK: @test1 +; CHECK-LABEL: @test1( %V1 = load float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 0), align 16 %V2 = load float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 1), align 4 %V3= load float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 2), align 8 diff --git a/test/Transforms/BBVectorize/metadata.ll b/test/Transforms/BBVectorize/metadata.ll index 1e3aaa127a0e..ac7297dd5417 100644 --- a/test/Transforms/BBVectorize/metadata.ll +++ b/test/Transforms/BBVectorize/metadata.ll @@ -16,7 +16,7 @@ entry: %arrayidx5 = getelementptr inbounds double* %c, i64 1 store double %mul5, double* %arrayidx5, align 8 ret void -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: !fpmath ; CHECK: ret void } @@ -36,7 +36,7 @@ entry: %arrayidx5 = getelementptr inbounds i64* %c, i64 1 store i64 %mul5, i64* %arrayidx5, align 8 ret void -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK-NOT: !range ; CHECK: ret void } diff --git a/test/Transforms/BBVectorize/no-ldstr-conn.ll b/test/Transforms/BBVectorize/no-ldstr-conn.ll index ada2a71e36ec..bcc5ce7531bd 100644 --- a/test/Transforms/BBVectorize/no-ldstr-conn.ll +++ b/test/Transforms/BBVectorize/no-ldstr-conn.ll @@ -17,7 +17,7 @@ entry: store i64 %v3a, i64* %a3, align 8 %r = add i64 %v2, %v3 ret i64 %r -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK-NOT: getelementptr <2 x i64*> } diff --git a/test/Transforms/BBVectorize/req-depth.ll b/test/Transforms/BBVectorize/req-depth.ll index e0120059b952..2675354183a6 100644 --- a/test/Transforms/BBVectorize/req-depth.ll +++ b/test/Transforms/BBVectorize/req-depth.ll @@ -9,8 +9,8 @@ define double @test1(double %A1, double %A2, double %B1, double %B2) { %Y2 = fmul double %X2, %A2 %R = fmul double %Y1, %Y2 ret double %R -; CHECK-RD3: @test1 -; CHECK-RD2: @test1 +; CHECK-RD3-LABEL: @test1( +; CHECK-RD2-LABEL: @test1( ; CHECK-RD3-NOT: <2 x double> ; CHECK-RD2: <2 x double> } diff --git a/test/Transforms/BBVectorize/search-limit.ll b/test/Transforms/BBVectorize/search-limit.ll index a694e45bc181..be38d3402603 100644 --- a/test/Transforms/BBVectorize/search-limit.ll +++ b/test/Transforms/BBVectorize/search-limit.ll @@ -3,8 +3,8 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 ; RUN: opt < %s -bb-vectorize -bb-vectorize-req-chain-depth=3 -bb-vectorize-search-limit=4 -bb-vectorize-ignore-target-info -instcombine -gvn -S | FileCheck %s -check-prefix=CHECK-SL4 define double @test1(double %A1, double %A2, double %B1, double %B2) { -; CHECK: @test1 -; CHECK-SL4: @test1 +; CHECK-LABEL: @test1( +; CHECK-SL4-LABEL: @test1( ; CHECK-SL4-NOT: <2 x double> ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 diff --git a/test/Transforms/BBVectorize/simple-int.ll b/test/Transforms/BBVectorize/simple-int.ll index e4d51526ca11..e33ac612edc2 100644 --- a/test/Transforms/BBVectorize/simple-int.ll +++ b/test/Transforms/BBVectorize/simple-int.ll @@ -16,7 +16,7 @@ define double @test1(double %A1, double %A2, double %B1, double %B2, double %C1, %Z2 = fadd double %Y2, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 @@ -42,7 +42,7 @@ define double @test1a(double %A1, double %A2, double %B1, double %B2, double %C1 %Z2 = fadd double %Y2, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test1a +; CHECK-LABEL: @test1a( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 @@ -68,7 +68,7 @@ define double @test2(double %A1, double %A2, double %B1, double %B2) { %Z2 = fadd double %Y2, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 @@ -93,7 +93,7 @@ define double @test3(double %A1, double %A2, double %B1, double %B2, i32 %P) { %Z2 = fadd double %Y2, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test3 +; CHECK-LABEL: @test3( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 @@ -119,7 +119,7 @@ define double @test4(double %A1, double %A2, double %B1, double %B2, i32 %P) { %Z2 = fadd double %Y2, %B2 %R = fmul double %Z1, %Z2 ret double %R -; CHECK: @test4 +; CHECK-LABEL: @test4( ; CHECK-NOT: <2 x double> ; CHECK: ret double %R } diff --git a/test/Transforms/BBVectorize/simple-ldstr-ptrs.ll b/test/Transforms/BBVectorize/simple-ldstr-ptrs.ll index d46f7692b6d3..4d2298c1a11d 100644 --- a/test/Transforms/BBVectorize/simple-ldstr-ptrs.ll +++ b/test/Transforms/BBVectorize/simple-ldstr-ptrs.ll @@ -27,7 +27,7 @@ entry: %arrayidx5 = getelementptr inbounds i64* %c, i64 1 store i64 %mul5, i64* %arrayidx5, align 8 ret double %r -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: %i0.v.i0 = bitcast i64* %a to <2 x i64>* ; CHECK: %i1.v.i0 = bitcast i64* %b to <2 x i64>* ; CHECK: %i0 = load <2 x i64>* %i0.v.i0, align 8 @@ -43,7 +43,7 @@ entry: ; CHECK: %0 = bitcast i64* %c to <2 x i64>* ; CHECK: store <2 x i64> %mul, <2 x i64>* %0, align 8 ; CHECK: ret double %r -; CHECK-AO: @test1 +; CHECK-AO-LABEL: @test1( ; CHECK-AO-NOT: load <2 x } @@ -64,7 +64,7 @@ entry: %arrayidx5 = getelementptr inbounds i64** %c, i64 1 store i64* %ptr3, i64** %arrayidx5, align 8 ret void -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK: %i0.v.i0 = bitcast i64** %a to <2 x i64*>* ; CHECK: %i1 = load i64** %b, align 8 ; CHECK: %i0 = load <2 x i64*>* %i0.v.i0, align 8 @@ -78,7 +78,7 @@ entry: ; CHECK: %0 = bitcast i64** %c to <2 x i64*>* ; CHECK: store <2 x i64*> %ptr0, <2 x i64*>* %0, align 8 ; CHECK: ret void -; CHECK-AO: @test2 +; CHECK-AO-LABEL: @test2( ; CHECK-AO-NOT: <2 x } @@ -108,7 +108,7 @@ entry: %arrayidx5 = getelementptr inbounds <2 x i64*>* %c, i64 1 store <2 x i64*> %rtr3, <2 x i64*>* %arrayidx5, align 8 ret void -; CHECK: @test3 +; CHECK-LABEL: @test3( ; CHECK: %i0.v.i0 = bitcast <2 x i64*>* %a to <4 x i64*>* ; CHECK: %i1 = load <2 x i64*>* %b, align 8 ; CHECK: %i0 = load <4 x i64*>* %i0.v.i0, align 8 @@ -128,7 +128,7 @@ entry: ; CHECK: %1 = shufflevector <2 x i64*> %rtr0, <2 x i64*> %rtr3, <4 x i32> ; CHECK: store <4 x i64*> %1, <4 x i64*>* %0, align 8 ; CHECK: ret void -; CHECK-AO: @test3 +; CHECK-AO-LABEL: @test3( ; CHECK-AO-NOT: <4 x } diff --git a/test/Transforms/BBVectorize/simple-ldstr.ll b/test/Transforms/BBVectorize/simple-ldstr.ll index 8e51d297e8ec..558f8b38d794 100644 --- a/test/Transforms/BBVectorize/simple-ldstr.ll +++ b/test/Transforms/BBVectorize/simple-ldstr.ll @@ -17,7 +17,7 @@ entry: %arrayidx5 = getelementptr inbounds double* %c, i64 1 store double %mul5, double* %arrayidx5, align 8 ret void -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: %i0.v.i0 = bitcast double* %a to <2 x double>* ; CHECK: %i1.v.i0 = bitcast double* %b to <2 x double>* ; CHECK: %i0 = load <2 x double>* %i0.v.i0, align 8 @@ -26,7 +26,7 @@ entry: ; CHECK: %0 = bitcast double* %c to <2 x double>* ; CHECK: store <2 x double> %mul, <2 x double>* %0, align 8 ; CHECK: ret void -; CHECK-AO: @test1 +; CHECK-AO-LABEL: @test1( ; CHECK-AO-NOT: <2 x double> } @@ -49,7 +49,7 @@ entry: %arrayidx5 = getelementptr inbounds double* %c, i64 1 store double %mul5, double* %arrayidx5, align 8 ret void -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK: %i0f.v.i0 = bitcast float* %a to <2 x float>* ; CHECK: %i1f.v.i0 = bitcast float* %b to <2 x float>* ; CHECK: %i0f = load <2 x float>* %i0f.v.i0, align 4 @@ -60,7 +60,7 @@ entry: ; CHECK: %0 = bitcast double* %c to <2 x double>* ; CHECK: store <2 x double> %mul, <2 x double>* %0, align 8 ; CHECK: ret void -; CHECK-AO: @test2 +; CHECK-AO-LABEL: @test2( ; CHECK-AO-NOT: <2 x double> } @@ -81,7 +81,7 @@ entry: %arrayidx5 = getelementptr inbounds float* %c, i64 1 store float %mul5f, float* %arrayidx5, align 4 ret void -; CHECK: @test3 +; CHECK-LABEL: @test3( ; CHECK: %i0.v.i0 = bitcast double* %a to <2 x double>* ; CHECK: %i1.v.i0 = bitcast double* %b to <2 x double>* ; CHECK: %i0 = load <2 x double>* %i0.v.i0, align 8 @@ -91,7 +91,7 @@ entry: ; CHECK: %0 = bitcast float* %c to <2 x float>* ; CHECK: store <2 x float> %mulf, <2 x float>* %0, align 8 ; CHECK: ret void -; CHECK-AO: @test3 +; CHECK-AO-LABEL: @test3( ; CHECK-AO: %i0 = load double* %a, align 8 ; CHECK-AO: %i1 = load double* %b, align 8 ; CHECK-AO: %arrayidx3 = getelementptr inbounds double* %a, i64 1 @@ -134,9 +134,9 @@ if.then: if.end: ret void -; CHECK: @test4 +; CHECK-LABEL: @test4( ; CHECK-NOT: <2 x double> -; CHECK-AO: @test4 +; CHECK-AO-LABEL: @test4( ; CHECK-AO-NOT: <2 x double> } @@ -155,7 +155,7 @@ entry: store double %mul5, double* %arrayidx5, align 8 store double %mul, double* %c, align 4 ret void -; CHECK: @test5 +; CHECK-LABEL: @test5( ; CHECK: %i0.v.i0 = bitcast double* %a to <2 x double>* ; CHECK: %i1.v.i0 = bitcast double* %b to <2 x double>* ; CHECK: %i0 = load <2 x double>* %i0.v.i0, align 8 @@ -164,7 +164,7 @@ entry: ; CHECK: %0 = bitcast double* %c to <2 x double>* ; CHECK: store <2 x double> %mul, <2 x double>* %0, align 4 ; CHECK: ret void -; CHECK-AO: @test5 +; CHECK-AO-LABEL: @test5( ; CHECK-AO-NOT: <2 x double> } diff --git a/test/Transforms/BBVectorize/simple-sel.ll b/test/Transforms/BBVectorize/simple-sel.ll index 8caccfd32c34..269b07f82d19 100644 --- a/test/Transforms/BBVectorize/simple-sel.ll +++ b/test/Transforms/BBVectorize/simple-sel.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-f3 ; Basic depth-3 chain with select define double @test1(double %A1, double %A2, double %B1, double %B2, i1 %C1, i1 %C2) { -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 @@ -30,8 +30,8 @@ define double @test1(double %A1, double %A2, double %B1, double %B2, i1 %C1, i1 ; Basic depth-3 chain with select (and vect. compare) define double @test2(double %A1, double %A2, double %B1, double %B2) { -; CHECK: @test2 -; CHECK-NB: @test2 +; CHECK-LABEL: @test2( +; CHECK-NB-LABEL: @test2( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 diff --git a/test/Transforms/BBVectorize/simple-tst.ll b/test/Transforms/BBVectorize/simple-tst.ll index 42146c6d14a2..6a88e1b09c1b 100644 --- a/test/Transforms/BBVectorize/simple-tst.ll +++ b/test/Transforms/BBVectorize/simple-tst.ll @@ -4,7 +4,7 @@ target triple = "powerpc64-unknown-linux" ; Basic depth-3 chain (target-specific type should not vectorize) define ppc_fp128 @test7(ppc_fp128 %A1, ppc_fp128 %A2, ppc_fp128 %B1, ppc_fp128 %B2) { -; CHECK: @test7 +; CHECK-LABEL: @test7( ; CHECK-NOT: <2 x ppc_fp128> %X1 = fsub ppc_fp128 %A1, %B1 %X2 = fsub ppc_fp128 %A2, %B2 diff --git a/test/Transforms/BBVectorize/simple.ll b/test/Transforms/BBVectorize/simple.ll index a447908d16cc..0fe33f17a646 100644 --- a/test/Transforms/BBVectorize/simple.ll +++ b/test/Transforms/BBVectorize/simple.ll @@ -3,7 +3,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 ; Basic depth-3 chain define double @test1(double %A1, double %A2, double %B1, double %B2) { -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 @@ -27,7 +27,7 @@ define double @test1(double %A1, double %A2, double %B1, double %B2) { ; Basic depth-3 chain (last pair permuted) define double @test2(double %A1, double %A2, double %B1, double %B2) { -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 @@ -53,7 +53,7 @@ define double @test2(double %A1, double %A2, double %B1, double %B2) { ; Basic depth-3 chain (last pair first splat) define double @test3(double %A1, double %A2, double %B1, double %B2) { -; CHECK: @test3 +; CHECK-LABEL: @test3( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 @@ -78,7 +78,7 @@ define double @test3(double %A1, double %A2, double %B1, double %B2) { ; Basic depth-3 chain (last pair second splat) define double @test4(double %A1, double %A2, double %B1, double %B2) { -; CHECK: @test4 +; CHECK-LABEL: @test4( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 @@ -103,7 +103,7 @@ define double @test4(double %A1, double %A2, double %B1, double %B2) { ; Basic depth-3 chain define <2 x float> @test5(<2 x float> %A1, <2 x float> %A2, <2 x float> %B1, <2 x float> %B2) { -; CHECK: @test5 +; CHECK-LABEL: @test5( ; CHECK: %X1.v.i1 = shufflevector <2 x float> %B1, <2 x float> %B2, <4 x i32> ; CHECK: %X1.v.i0 = shufflevector <2 x float> %A1, <2 x float> %A2, <4 x i32> %X1 = fsub <2 x float> %A1, %B1 @@ -125,7 +125,7 @@ define <2 x float> @test5(<2 x float> %A1, <2 x float> %A2, <2 x float> %B1, <2 ; Basic chain with shuffles define <8 x i8> @test6(<8 x i8> %A1, <8 x i8> %A2, <8 x i8> %B1, <8 x i8> %B2) { -; CHECK: @test6 +; CHECK-LABEL: @test6( ; CHECK: %X1.v.i1 = shufflevector <8 x i8> %B1, <8 x i8> %B2, <16 x i32> ; CHECK: %X1.v.i0 = shufflevector <8 x i8> %A1, <8 x i8> %A2, <16 x i32> %X1 = sub <8 x i8> %A1, %B1 @@ -151,7 +151,7 @@ define <8 x i8> @test6(<8 x i8> %A1, <8 x i8> %A2, <8 x i8> %B1, <8 x i8> %B2) { ; Basic depth-3 chain (flipped order) define double @test7(double %A1, double %A2, double %B1, double %B2) { -; CHECK: @test7 +; CHECK-LABEL: @test7( ; CHECK: %X1.v.i1.1 = insertelement <2 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x double> %X1.v.i1.1, double %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x double> undef, double %A1, i32 0 @@ -175,7 +175,7 @@ define double @test7(double %A1, double %A2, double %B1, double %B2) { ; Basic depth-3 chain (subclass data) define i64 @test8(i64 %A1, i64 %A2, i64 %B1, i64 %B2) { -; CHECK: @test8 +; CHECK-LABEL: @test8( ; CHECK: %X1.v.i1.1 = insertelement <2 x i64> undef, i64 %B1, i32 0 ; CHECK: %X1.v.i1.2 = insertelement <2 x i64> %X1.v.i1.1, i64 %B2, i32 1 ; CHECK: %X1.v.i0.1 = insertelement <2 x i64> undef, i64 %A1, i32 0 diff --git a/test/Transforms/BBVectorize/simple3.ll b/test/Transforms/BBVectorize/simple3.ll index 78bcc9f83080..6edf7f07ac1d 100644 --- a/test/Transforms/BBVectorize/simple3.ll +++ b/test/Transforms/BBVectorize/simple3.ll @@ -3,7 +3,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 ; Basic depth-3 chain define double @test1(double %A1, double %A2, double %A3, double %B1, double %B2, double %B3) { -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: %X1.v.i1.11 = insertelement <3 x double> undef, double %B1, i32 0 ; CHECK: %X1.v.i1.22 = insertelement <3 x double> %X1.v.i1.11, double %B2, i32 1 ; CHECK: %X1.v.i1 = insertelement <3 x double> %X1.v.i1.22, double %B3, i32 2 diff --git a/test/Transforms/BBVectorize/xcore/no-vector-registers.ll b/test/Transforms/BBVectorize/xcore/no-vector-registers.ll new file mode 100644 index 000000000000..9ebdb7368a35 --- /dev/null +++ b/test/Transforms/BBVectorize/xcore/no-vector-registers.ll @@ -0,0 +1,18 @@ +; RUN: opt < %s -bb-vectorize -bb-vectorize-req-chain-depth=3 -instcombine -gvn -S -mtriple=xcore | FileCheck %s + +target datalayout = "e-p:32:32:32-a0:0:32-n32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f16:16:32-f32:32:32-f64:32:32" +target triple = "xcore" + +; Basic depth-3 chain +define double @test1(double %A1, double %A2, double %B1, double %B2) { +; CHECK-LABEL: @test1( +; CHECK-NOT: <2 x double> + %X1 = fsub double %A1, %B1 + %X2 = fsub double %A2, %B2 + %Y1 = fmul double %X1, %A1 + %Y2 = fmul double %X2, %A2 + %Z1 = fadd double %Y1, %B1 + %Z2 = fadd double %Y2, %B2 + %R = fmul double %Z1, %Z2 + ret double %R +} diff --git a/test/Transforms/BlockPlacement/basictest.ll b/test/Transforms/BlockPlacement/basictest.ll deleted file mode 100644 index 47b507903bce..000000000000 --- a/test/Transforms/BlockPlacement/basictest.ll +++ /dev/null @@ -1,15 +0,0 @@ -; RUN: opt < %s -block-placement -disable-output -print-function 2> /dev/null - -define i32 @test() { - br i1 true, label %X, label %Y - -A: ; preds = %Y, %X - ret i32 0 - -X: ; preds = %0 - br label %A - -Y: ; preds = %0 - br label %A -} - diff --git a/test/Transforms/BlockPlacement/lit.local.cfg b/test/Transforms/BlockPlacement/lit.local.cfg deleted file mode 100644 index 19eebc0ac7ac..000000000000 --- a/test/Transforms/BlockPlacement/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.ll', '.c', '.cpp'] diff --git a/test/Transforms/CodeExtractor/lit.local.cfg b/test/Transforms/CodeExtractor/lit.local.cfg deleted file mode 100644 index 19eebc0ac7ac..000000000000 --- a/test/Transforms/CodeExtractor/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.ll', '.c', '.cpp'] diff --git a/test/Transforms/CodeGenPrepare/basic.ll b/test/Transforms/CodeGenPrepare/basic.ll index d617e43be865..495d910b5cd6 100644 --- a/test/Transforms/CodeGenPrepare/basic.ll +++ b/test/Transforms/CodeGenPrepare/basic.ll @@ -3,7 +3,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-n8:16:32:64" target triple = "x86_64-apple-darwin10.0.0" -; CHECK: @test1 +; CHECK-LABEL: @test1( ; objectsize should fold to a constant, which causes the branch to fold to an ; uncond branch. Next, we fold the control flow alltogether. ; rdar://8785296 diff --git a/test/Transforms/CodeGenPrepare/lit.local.cfg b/test/Transforms/CodeGenPrepare/lit.local.cfg deleted file mode 100644 index c6106e4746f2..000000000000 --- a/test/Transforms/CodeGenPrepare/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.ll'] diff --git a/test/Transforms/ConstProp/basictest.ll b/test/Transforms/ConstProp/basictest.ll index 09e6e7db437a..afe6ef91240d 100644 --- a/test/Transforms/ConstProp/basictest.ll +++ b/test/Transforms/ConstProp/basictest.ll @@ -16,7 +16,7 @@ BB2: br label %BB3 BB3: -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: %Ret = phi i32 [ 0, %BB1 ], [ 1, %BB2 ] %Ret = phi i32 [ %Val, %BB1 ], [ 1, %BB2 ] ret i32 %Ret @@ -31,12 +31,12 @@ entry: bb: ret i1 %V -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK: ret i1 true } define i1 @TNAN() { -; CHECK: @TNAN +; CHECK-LABEL: @TNAN( ; CHECK: ret i1 true %A = fcmp uno double 0x7FF8000000000000, 1.000000e+00 %B = fcmp uno double 1.230000e+02, 1.000000e+00 @@ -47,7 +47,7 @@ define i1 @TNAN() { define i128 @vector_to_int_cast() { %A = bitcast <4 x i32> to i128 ret i128 %A -; CHECK: @vector_to_int_cast +; CHECK-LABEL: @vector_to_int_cast( ; CHECK: ret i128 85070591750041656499021422275829170176 } - \ No newline at end of file + diff --git a/test/Transforms/ConstProp/bitcast.ll b/test/Transforms/ConstProp/bitcast.ll index 53239c7e4fe0..5e1581d801c7 100644 --- a/test/Transforms/ConstProp/bitcast.ll +++ b/test/Transforms/ConstProp/bitcast.ll @@ -4,7 +4,7 @@ define <1 x i64> @test1() { %A = bitcast i64 63 to <1 x i64> ret <1 x i64> %A -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: ret <1 x i64> } diff --git a/test/Transforms/ConstProp/bswap.ll b/test/Transforms/ConstProp/bswap.ll index a68fdcd4581e..f601deb73db2 100644 --- a/test/Transforms/ConstProp/bswap.ll +++ b/test/Transforms/ConstProp/bswap.ll @@ -10,28 +10,28 @@ declare i64 @llvm.bswap.i64(i64) declare i80 @llvm.bswap.i80(i80) -; CHECK: define i16 @W +; CHECK-LABEL: define i16 @W( define i16 @W() { ; CHECK: ret i16 256 %Z = call i16 @llvm.bswap.i16( i16 1 ) ; [#uses=1] ret i16 %Z } -; CHECK: define i32 @X +; CHECK-LABEL: define i32 @X( define i32 @X() { ; CHECK: ret i32 16777216 %Z = call i32 @llvm.bswap.i32( i32 1 ) ; [#uses=1] ret i32 %Z } -; CHECK: define i64 @Y +; CHECK-LABEL: define i64 @Y( define i64 @Y() { ; CHECK: ret i64 72057594037927936 %Z = call i64 @llvm.bswap.i64( i64 1 ) ; [#uses=1] ret i64 %Z } -; CHECK: define i80 @Z +; CHECK-LABEL: define i80 @Z( define i80 @Z() { ; CHECK: ret i80 -450681596205739728166896 ; 0xA0908070605040302010 diff --git a/test/Transforms/ConstProp/calls.ll b/test/Transforms/ConstProp/calls.ll index 7a405a539c51..7541418b06ec 100644 --- a/test/Transforms/ConstProp/calls.ll +++ b/test/Transforms/ConstProp/calls.ll @@ -11,7 +11,7 @@ declare double @sqrt(double) declare double @exp2(double) define double @T() { -; CHECK: @T +; CHECK-LABEL: @T( ; CHECK-NOT: call ; CHECK: ret %A = call double @cos(double 0.000000e+00) @@ -29,7 +29,7 @@ define double @T() { } define i1 @test_sse_cvt() nounwind readnone { -; CHECK: @test_sse_cvt +; CHECK-LABEL: @test_sse_cvt( ; CHECK-NOT: call ; CHECK: ret i1 true entry: @@ -63,7 +63,7 @@ declare i64 @llvm.x86.sse2.cvttsd2si64(<2 x double>) nounwind readnone define double @test_intrinsic_pow() nounwind uwtable ssp { entry: -; CHECK: @test_intrinsic_pow +; CHECK-LABEL: @test_intrinsic_pow( ; CHECK-NOT: call %0 = call double @llvm.pow.f64(double 1.500000e+00, double 3.000000e+00) ret double %0 @@ -72,7 +72,7 @@ declare double @llvm.pow.f64(double, double) nounwind readonly ; Shouldn't fold because of -fno-builtin define double @sin_() nounwind uwtable ssp { -; FNOBUILTIN: @sin_ +; FNOBUILTIN-LABEL: @sin_( ; FNOBUILTIN: %1 = call double @sin(double 3.000000e+00) %1 = call double @sin(double 3.000000e+00) ret double %1 @@ -80,7 +80,7 @@ define double @sin_() nounwind uwtable ssp { ; Shouldn't fold because of -fno-builtin define double @sqrt_() nounwind uwtable ssp { -; FNOBUILTIN: @sqrt_ +; FNOBUILTIN-LABEL: @sqrt_( ; FNOBUILTIN: %1 = call double @sqrt(double 3.000000e+00) %1 = call double @sqrt(double 3.000000e+00) ret double %1 @@ -88,7 +88,7 @@ define double @sqrt_() nounwind uwtable ssp { ; Shouldn't fold because of -fno-builtin define float @sqrtf_() nounwind uwtable ssp { -; FNOBUILTIN: @sqrtf_ +; FNOBUILTIN-LABEL: @sqrtf_( ; FNOBUILTIN: %1 = call float @sqrtf(float 3.000000e+00) %1 = call float @sqrtf(float 3.000000e+00) ret float %1 @@ -97,7 +97,7 @@ declare float @sqrtf(float) ; Shouldn't fold because of -fno-builtin define float @sinf_() nounwind uwtable ssp { -; FNOBUILTIN: @sinf_ +; FNOBUILTIN-LABEL: @sinf_( ; FNOBUILTIN: %1 = call float @sinf(float 3.000000e+00) %1 = call float @sinf(float 3.000000e+00) ret float %1 @@ -106,7 +106,7 @@ declare float @sinf(float) ; Shouldn't fold because of -fno-builtin define double @tan_() nounwind uwtable ssp { -; FNOBUILTIN: @tan_ +; FNOBUILTIN-LABEL: @tan_( ; FNOBUILTIN: %1 = call double @tan(double 3.000000e+00) %1 = call double @tan(double 3.000000e+00) ret double %1 @@ -114,7 +114,7 @@ define double @tan_() nounwind uwtable ssp { ; Shouldn't fold because of -fno-builtin define double @tanh_() nounwind uwtable ssp { -; FNOBUILTIN: @tanh_ +; FNOBUILTIN-LABEL: @tanh_( ; FNOBUILTIN: %1 = call double @tanh(double 3.000000e+00) %1 = call double @tanh(double 3.000000e+00) ret double %1 @@ -123,7 +123,7 @@ declare double @tanh(double) ; Shouldn't fold because of -fno-builtin define double @pow_() nounwind uwtable ssp { -; FNOBUILTIN: @pow_ +; FNOBUILTIN-LABEL: @pow_( ; FNOBUILTIN: %1 = call double @pow(double 3.000000e+00, double 3.000000e+00) %1 = call double @pow(double 3.000000e+00, double 3.000000e+00) ret double %1 @@ -132,7 +132,7 @@ declare double @pow(double, double) ; Shouldn't fold because of -fno-builtin define double @fmod_() nounwind uwtable ssp { -; FNOBUILTIN: @fmod_ +; FNOBUILTIN-LABEL: @fmod_( ; FNOBUILTIN: %1 = call double @fmod(double 3.000000e+00, double 3.000000e+00) %1 = call double @fmod(double 3.000000e+00, double 3.000000e+00) ret double %1 @@ -141,7 +141,7 @@ declare double @fmod(double, double) ; Shouldn't fold because of -fno-builtin define double @atan2_() nounwind uwtable ssp { -; FNOBUILTIN: @atan2_ +; FNOBUILTIN-LABEL: @atan2_( ; FNOBUILTIN: %1 = call double @atan2(double 3.000000e+00, double 3.000000e+00) %1 = call double @atan2(double 3.000000e+00, double 3.000000e+00) ret double %1 diff --git a/test/Transforms/ConstProp/extractvalue.ll b/test/Transforms/ConstProp/extractvalue.ll index f947b22f23ae..72d6cb714a54 100644 --- a/test/Transforms/ConstProp/extractvalue.ll +++ b/test/Transforms/ConstProp/extractvalue.ll @@ -5,21 +5,21 @@ define i32 @test1() { %A = extractvalue %struct { i32 2, [4 x i8] c"foo\00" }, 0 ret i32 %A -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: ret i32 2 } define i8 @test2() { %A = extractvalue %struct { i32 2, [4 x i8] c"foo\00" }, 1, 2 ret i8 %A -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK: ret i8 111 } define i32 @test3() { %A = extractvalue [3 x %struct] [ %struct { i32 0, [4 x i8] c"aaaa" }, %struct { i32 1, [4 x i8] c"bbbb" }, %struct { i32 2, [4 x i8] c"cccc" } ], 1, 0 ret i32 %A -; CHECK: @test3 +; CHECK-LABEL: @test3( ; CHECK: ret i32 1 } diff --git a/test/Transforms/ConstProp/insertvalue.ll b/test/Transforms/ConstProp/insertvalue.ll index a4b7bb1019c2..0d288b3841df 100644 --- a/test/Transforms/ConstProp/insertvalue.ll +++ b/test/Transforms/ConstProp/insertvalue.ll @@ -5,21 +5,21 @@ define %struct @test1() { %A = insertvalue %struct { i32 2, [4 x i8] c"foo\00" }, i32 1, 0 ret %struct %A -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: ret %struct { i32 1, [4 x i8] c"foo\00" } } define %struct @test2() { %A = insertvalue %struct { i32 2, [4 x i8] c"foo\00" }, i8 1, 1, 2 ret %struct %A -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK: ret %struct { i32 2, [4 x i8] c"fo\01\00" } } define [3 x %struct] @test3() { %A = insertvalue [3 x %struct] [ %struct { i32 0, [4 x i8] c"aaaa" }, %struct { i32 1, [4 x i8] c"bbbb" }, %struct { i32 2, [4 x i8] c"cccc" } ], i32 -1, 1, 0 ret [3 x %struct] %A -; CHECK: @test3 +; CHECK-LABEL: @test3( ; CHECK:ret [3 x %struct] [%struct { i32 0, [4 x i8] c"aaaa" }, %struct { i32 -1, [4 x i8] c"bbbb" }, %struct { i32 2, [4 x i8] c"cccc" }] } diff --git a/test/Transforms/ConstProp/lit.local.cfg b/test/Transforms/ConstProp/lit.local.cfg deleted file mode 100644 index 19eebc0ac7ac..000000000000 --- a/test/Transforms/ConstProp/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.ll', '.c', '.cpp'] diff --git a/test/Transforms/ConstProp/loads.ll b/test/Transforms/ConstProp/loads.ll index 6794288a0ef2..d05db47dcaaa 100644 --- a/test/Transforms/ConstProp/loads.ll +++ b/test/Transforms/ConstProp/loads.ll @@ -1,5 +1,5 @@ -; RUN: opt < %s -default-data-layout="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" -instcombine -S | FileCheck %s --check-prefix=LE -; RUN: opt < %s -default-data-layout="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" -instcombine -S | FileCheck %s --check-prefix=BE +; RUN: opt < %s -default-data-layout="e-p:64:64:64-p1:16:16:16-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" -instcombine -S | FileCheck %s --check-prefix=LE +; RUN: opt < %s -default-data-layout="E-p:64:64:64-p1:16:16:16-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" -instcombine -S | FileCheck %s --check-prefix=BE ; {{ 0xDEADBEEF, 0xBA }, 0xCAFEBABE} @g1 = constant {{i32,i8},i32} {{i32,i8} { i32 -559038737, i8 186 }, i32 -889275714 } @@ -13,11 +13,11 @@ define i32 @test1() { ret i32 %r ; 0xDEADBEEF -; LE: @test1 +; LE-LABEL: @test1( ; LE: ret i32 -559038737 ; 0xDEADBEEF -; BE: @test1 +; BE-LABEL: @test1( ; BE: ret i32 -559038737 } @@ -28,11 +28,11 @@ define i16 @test2() { ret i16 %r ; 0xBEEF -; LE: @test2 +; LE-LABEL: @test2( ; LE: ret i16 -16657 ; 0xDEAD -; BE: @test2 +; BE-LABEL: @test2( ; BE: ret i16 -8531 } @@ -42,11 +42,11 @@ define i16 @test3() { ret i16 %r ; 0xDEAD -; LE: @test3 +; LE-LABEL: @test3( ; LE: ret i16 -8531 ; 0xBEEF -; BE: @test3 +; BE-LABEL: @test3( ; BE: ret i16 -16657 } @@ -56,11 +56,11 @@ define i16 @test4() { ret i16 %r ; 0x00BA -; LE: @test4 +; LE-LABEL: @test4( ; LE: ret i16 186 ; 0xBA00 -; BE: @test4 +; BE-LABEL: @test4( ; BE: ret i16 -17920 } @@ -70,11 +70,11 @@ define i64 @test6() { ret i64 %r ; 0x3FF_0000000000000 -; LE: @test6 +; LE-LABEL: @test6( ; LE: ret i64 4607182418800017408 ; 0x3FF_0000000000000 -; BE: @test6 +; BE-LABEL: @test6( ; BE: ret i64 4607182418800017408 } @@ -84,11 +84,11 @@ define i16 @test7() { ret i16 %r ; 0x0000 -; LE: @test7 +; LE-LABEL: @test7( ; LE: ret i16 0 ; 0x3FF0 -; BE: @test7 +; BE-LABEL: @test7( ; BE: ret i16 16368 } @@ -97,10 +97,10 @@ define double @test8() { %r = load double* bitcast({{i32,i8},i32}* @g1 to double*) ret double %r -; LE: @test8 +; LE-LABEL: @test8( ; LE: ret double 0xBADEADBEEF -; BE: @test8 +; BE-LABEL: @test8( ; BE: ret double 0xDEADBEEFBA000000 } @@ -111,11 +111,11 @@ define i128 @test9() { ret i128 %r ; 0x00000000_06B1BFF8_00000000_0000007B -; LE: @test9 +; LE-LABEL: @test9( ; LE: ret i128 2071796475790618158476296315 ; 0x00000000_0000007B_00000000_06B1BFF8 -; BE: @test9 +; BE-LABEL: @test9( ; BE: ret i128 2268949521066387161080 } @@ -124,10 +124,10 @@ define <2 x i64> @test10() { %r = load <2 x i64>* bitcast({i64, i64}* @g3 to <2 x i64>*) ret <2 x i64> %r -; LE: @test10 +; LE-LABEL: @test10( ; LE: ret <2 x i64> -; BE: @test10 +; BE-LABEL: @test10( ; BE: ret <2 x i64> } @@ -142,11 +142,11 @@ entry: ret i16 %a ; 0x08A1 -; LE: @test11 +; LE-LABEL: @test11( ; LE: ret i16 2209 ; 0xA108 -; BE: @test11 +; BE-LABEL: @test11( ; BE: ret i16 -24312 } @@ -155,15 +155,15 @@ entry: @test12g = private constant [6 x i8] c"a\00b\00\00\00" define i16 @test12() { - %a = load i16* getelementptr inbounds ([3 x i16]* bitcast ([6 x i8]* @test12g to [3 x i16]*), i32 0, i64 1) + %a = load i16* getelementptr inbounds ([3 x i16]* bitcast ([6 x i8]* @test12g to [3 x i16]*), i32 0, i64 1) ret i16 %a ; 0x0062 -; LE: @test12 +; LE-LABEL: @test12( ; LE: ret i16 98 ; 0x6200 -; BE: @test12 +; BE-LABEL: @test12( ; BE: ret i16 25088 } @@ -174,10 +174,10 @@ define i1 @test13() { %A = load i1* bitcast (i8* @g5 to i1*) ret i1 %A -; LE: @test13 +; LE-LABEL: @test13( ; LE: ret i1 false -; BE: @test13 +; BE-LABEL: @test13( ; BE: ret i1 false } @@ -187,21 +187,35 @@ entry: %tmp = load i64* bitcast ([2 x i8*]* @g6 to i64*) ret i64 %tmp -; LE: @test14 +; LE-LABEL: @test14( ; LE: ret i64 1 -; BE: @test14 +; BE-LABEL: @test14( ; BE: ret i64 1 } +; Check with address space pointers +@g6_as1 = constant [2 x i8 addrspace(1)*] [i8 addrspace(1)* inttoptr (i16 1 to i8 addrspace(1)*), i8 addrspace(1)* inttoptr (i16 2 to i8 addrspace(1)*)] +define i16 @test14_as1() nounwind { +entry: + %tmp = load i16* bitcast ([2 x i8 addrspace(1)*]* @g6_as1 to i16*) + ret i16 %tmp + +; LE: @test14_as1 +; LE: ret i16 1 + +; BE: @test14_as1 +; BE: ret i16 1 +} + define i64 @test15() nounwind { entry: %tmp = load i64* bitcast (i8** getelementptr inbounds ([2 x i8*]* @g6, i32 0, i64 1) to i64*) ret i64 %tmp -; LE: @test15 +; LE-LABEL: @test15( ; LE: ret i64 2 -; BE: @test15 +; BE-LABEL: @test15( ; BE: ret i64 2 } diff --git a/test/Transforms/ConstProp/overflow-ops.ll b/test/Transforms/ConstProp/overflow-ops.ll index 849bf9ef75b2..1ae3e562e7e9 100644 --- a/test/Transforms/ConstProp/overflow-ops.ll +++ b/test/Transforms/ConstProp/overflow-ops.ll @@ -18,7 +18,7 @@ entry: %t = call {i8, i1} @llvm.uadd.with.overflow.i8(i8 42, i8 100) ret {i8, i1} %t -; CHECK: @uadd_1 +; CHECK-LABEL: @uadd_1( ; CHECK: ret { i8, i1 } { i8 -114, i1 false } } @@ -27,7 +27,7 @@ entry: %t = call {i8, i1} @llvm.uadd.with.overflow.i8(i8 142, i8 120) ret {i8, i1} %t -; CHECK: @uadd_2 +; CHECK-LABEL: @uadd_2( ; CHECK: ret { i8, i1 } { i8 6, i1 true } } @@ -40,7 +40,7 @@ entry: %t = call {i8, i1} @llvm.usub.with.overflow.i8(i8 4, i8 2) ret {i8, i1} %t -; CHECK: @usub_1 +; CHECK-LABEL: @usub_1( ; CHECK: ret { i8, i1 } { i8 2, i1 false } } @@ -49,7 +49,7 @@ entry: %t = call {i8, i1} @llvm.usub.with.overflow.i8(i8 4, i8 6) ret {i8, i1} %t -; CHECK: @usub_2 +; CHECK-LABEL: @usub_2( ; CHECK: ret { i8, i1 } { i8 -2, i1 true } } @@ -62,7 +62,7 @@ entry: %t = call {i8, i1} @llvm.umul.with.overflow.i8(i8 100, i8 3) ret {i8, i1} %t -; CHECK: @umul_1 +; CHECK-LABEL: @umul_1( ; CHECK: ret { i8, i1 } { i8 44, i1 true } } @@ -71,7 +71,7 @@ entry: %t = call {i8, i1} @llvm.umul.with.overflow.i8(i8 100, i8 2) ret {i8, i1} %t -; CHECK: @umul_2 +; CHECK-LABEL: @umul_2( ; CHECK: ret { i8, i1 } { i8 -56, i1 false } } @@ -84,7 +84,7 @@ entry: %t = call {i8, i1} @llvm.sadd.with.overflow.i8(i8 42, i8 2) ret {i8, i1} %t -; CHECK: @sadd_1 +; CHECK-LABEL: @sadd_1( ; CHECK: ret { i8, i1 } { i8 44, i1 false } } @@ -93,7 +93,7 @@ entry: %t = call {i8, i1} @llvm.sadd.with.overflow.i8(i8 120, i8 10) ret {i8, i1} %t -; CHECK: @sadd_2 +; CHECK-LABEL: @sadd_2( ; CHECK: ret { i8, i1 } { i8 -126, i1 true } } @@ -102,7 +102,7 @@ entry: %t = call {i8, i1} @llvm.sadd.with.overflow.i8(i8 -120, i8 10) ret {i8, i1} %t -; CHECK: @sadd_3 +; CHECK-LABEL: @sadd_3( ; CHECK: ret { i8, i1 } { i8 -110, i1 false } } @@ -111,7 +111,7 @@ entry: %t = call {i8, i1} @llvm.sadd.with.overflow.i8(i8 -120, i8 -10) ret {i8, i1} %t -; CHECK: @sadd_4 +; CHECK-LABEL: @sadd_4( ; CHECK: ret { i8, i1 } { i8 126, i1 true } } @@ -120,7 +120,7 @@ entry: %t = call {i8, i1} @llvm.sadd.with.overflow.i8(i8 2, i8 -10) ret {i8, i1} %t -; CHECK: @sadd_5 +; CHECK-LABEL: @sadd_5( ; CHECK: ret { i8, i1 } { i8 -8, i1 false } } @@ -134,7 +134,7 @@ entry: %t = call {i8, i1} @llvm.ssub.with.overflow.i8(i8 4, i8 2) ret {i8, i1} %t -; CHECK: @ssub_1 +; CHECK-LABEL: @ssub_1( ; CHECK: ret { i8, i1 } { i8 2, i1 false } } @@ -143,7 +143,7 @@ entry: %t = call {i8, i1} @llvm.ssub.with.overflow.i8(i8 4, i8 6) ret {i8, i1} %t -; CHECK: @ssub_2 +; CHECK-LABEL: @ssub_2( ; CHECK: ret { i8, i1 } { i8 -2, i1 false } } @@ -152,7 +152,7 @@ entry: %t = call {i8, i1} @llvm.ssub.with.overflow.i8(i8 -10, i8 120) ret {i8, i1} %t -; CHECK: @ssub_3 +; CHECK-LABEL: @ssub_3( ; CHECK: ret { i8, i1 } { i8 126, i1 true } } @@ -161,7 +161,7 @@ entry: %t = call {i8, i1} @llvm.ssub.with.overflow.i8(i8 -10, i8 10) ret {i8, i1} %t -; CHECK: @ssub_3b +; CHECK-LABEL: @ssub_3b( ; CHECK: ret { i8, i1 } { i8 -20, i1 false } } @@ -170,7 +170,7 @@ entry: %t = call {i8, i1} @llvm.ssub.with.overflow.i8(i8 120, i8 -10) ret {i8, i1} %t -; CHECK: @ssub_4 +; CHECK-LABEL: @ssub_4( ; CHECK: ret { i8, i1 } { i8 -126, i1 true } } @@ -179,7 +179,7 @@ entry: %t = call {i8, i1} @llvm.ssub.with.overflow.i8(i8 20, i8 -10) ret {i8, i1} %t -; CHECK: @ssub_4b +; CHECK-LABEL: @ssub_4b( ; CHECK: ret { i8, i1 } { i8 30, i1 false } } @@ -188,7 +188,7 @@ entry: %t = call {i8, i1} @llvm.ssub.with.overflow.i8(i8 -20, i8 -10) ret {i8, i1} %t -; CHECK: @ssub_5 +; CHECK-LABEL: @ssub_5( ; CHECK: ret { i8, i1 } { i8 -10, i1 false } } @@ -202,6 +202,6 @@ entry: %t = call {i8, i1} @llvm.smul.with.overflow.i8(i8 -20, i8 -10) ret {i8, i1} %t -; CHECK: @smul_1 +; CHECK-LABEL: @smul_1( ; CHECK: ret { i8, i1 } { i8 -56, i1 true } } diff --git a/test/Transforms/ConstantMerge/align.ll b/test/Transforms/ConstantMerge/align.ll new file mode 100644 index 000000000000..c1cbcb3c652d --- /dev/null +++ b/test/Transforms/ConstantMerge/align.ll @@ -0,0 +1,28 @@ +; RUN: opt -constmerge -S < %s | FileCheck %s + +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-S128" + + +; Test that with a TD we do merge and mark the alignment as 4 +@T1A = internal unnamed_addr constant i32 1 +@T1B = internal unnamed_addr constant i32 1, align 2 +; CHECK: @T1B = internal unnamed_addr constant i32 1, align 4 + +define void @test1(i32** %P1, i32** %P2) { + store i32* @T1A, i32** %P1 + store i32* @T1B, i32** %P2 + ret void +} + + +; Test that even with a TD we set the alignment to the maximum if both constants +; have explicit alignments. +@T2A = internal unnamed_addr constant i32 2, align 1 +@T2B = internal unnamed_addr constant i32 2, align 2 +; CHECK: @T2B = internal unnamed_addr constant i32 2, align 2 + +define void @test2(i32** %P1, i32** %P2) { + store i32* @T2A, i32** %P1 + store i32* @T2B, i32** %P2 + ret void +} diff --git a/test/Transforms/ConstantMerge/lit.local.cfg b/test/Transforms/ConstantMerge/lit.local.cfg deleted file mode 100644 index 19eebc0ac7ac..000000000000 --- a/test/Transforms/ConstantMerge/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.ll', '.c', '.cpp'] diff --git a/test/Transforms/CorrelatedValuePropagation/2010-09-02-Trunc.ll b/test/Transforms/CorrelatedValuePropagation/2010-09-02-Trunc.ll index fef5b8579eb5..0754f868d249 100644 --- a/test/Transforms/CorrelatedValuePropagation/2010-09-02-Trunc.ll +++ b/test/Transforms/CorrelatedValuePropagation/2010-09-02-Trunc.ll @@ -1,6 +1,6 @@ ; RUN: opt -S < %s -correlated-propagation | FileCheck %s -; CHECK: @test +; CHECK-LABEL: @test( define i16 @test(i32 %a, i1 %b) { entry: %c = icmp eq i32 %a, 0 @@ -22,4 +22,4 @@ merge: %h = select i1 %f, i16 1, i16 0 ; CHECK: ret i16 %h ret i16 %h -} \ No newline at end of file +} diff --git a/test/Transforms/CorrelatedValuePropagation/basic.ll b/test/Transforms/CorrelatedValuePropagation/basic.ll index 39c437ccfae9..9a2264793c50 100644 --- a/test/Transforms/CorrelatedValuePropagation/basic.ll +++ b/test/Transforms/CorrelatedValuePropagation/basic.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -correlated-propagation -S | FileCheck %s ; PR2581 -; CHECK: @test1 +; CHECK-LABEL: @test1( define i32 @test1(i1 %C) nounwind { br i1 %C, label %exit, label %body @@ -18,7 +18,7 @@ exit: ; preds = %0 ; PR4420 declare i1 @ext() -; CHECK: @test2 +; CHECK-LABEL: @test2( define i1 @test2() { entry: %cond = tail call i1 @ext() ; [#uses=2] @@ -42,7 +42,7 @@ bb3: ; preds = %bb1 ; PR4855 @gv = internal constant i8 7 -; CHECK: @test3 +; CHECK-LABEL: @test3( define i8 @test3(i8* %a) nounwind { entry: %cond = icmp eq i8* %a, @gv @@ -58,7 +58,7 @@ bb2: ; preds = %entry } ; PR1757 -; CHECK: @test4 +; CHECK-LABEL: @test4( define i32 @test4(i32) { EntryBlock: ; CHECK: icmp sgt i32 %0, 2 @@ -83,7 +83,7 @@ LessThanOrEqualToTwo: declare i32* @f(i32*) define void @test5(i32* %x, i32* %y) { -; CHECK: @test5 +; CHECK-LABEL: @test5( entry: %pre = icmp eq i32* %x, null br i1 %pre, label %return, label %loop @@ -102,7 +102,7 @@ return: } define i32 @switch1(i32 %s) { -; CHECK: @switch1 +; CHECK-LABEL: @switch1( entry: %cmp = icmp slt i32 %s, 0 br i1 %cmp, label %negative, label %out @@ -134,7 +134,7 @@ next: } define i32 @switch2(i32 %s) { -; CHECK: @switch2 +; CHECK-LABEL: @switch2( entry: %cmp = icmp sgt i32 %s, 0 br i1 %cmp, label %positive, label %out @@ -157,7 +157,7 @@ next: } define i32 @switch3(i32 %s) { -; CHECK: @switch3 +; CHECK-LABEL: @switch3( entry: %cmp = icmp sgt i32 %s, 0 br i1 %cmp, label %positive, label %out @@ -180,7 +180,7 @@ next: } define void @switch4(i32 %s) { -; CHECK: @switch4 +; CHECK-LABEL: @switch4( entry: %cmp = icmp eq i32 %s, 0 br i1 %cmp, label %zero, label %out diff --git a/test/Transforms/CorrelatedValuePropagation/lit.local.cfg b/test/Transforms/CorrelatedValuePropagation/lit.local.cfg deleted file mode 100644 index c6106e4746f2..000000000000 --- a/test/Transforms/CorrelatedValuePropagation/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.ll'] diff --git a/test/Transforms/CorrelatedValuePropagation/range.ll b/test/Transforms/CorrelatedValuePropagation/range.ll index 6750546ba187..e40c63919078 100644 --- a/test/Transforms/CorrelatedValuePropagation/range.ll +++ b/test/Transforms/CorrelatedValuePropagation/range.ll @@ -17,7 +17,7 @@ else: end: ret i32 2 -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK: then: ; CHECK-NEXT: br i1 false, label %end, label %else } @@ -37,12 +37,12 @@ else: end: ret i32 2 -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK: then: ; CHECK-NEXT: br i1 false, label %end, label %else } -; CHECK: @test3 +; CHECK-LABEL: @test3( define i32 @test3(i32 %c) nounwind { %cmp = icmp slt i32 %c, 2 br i1 %cmp, label %if.then, label %if.end @@ -71,7 +71,7 @@ if.end8: ret i32 4 } -; CHECK: @test4 +; CHECK-LABEL: @test4( define i32 @test4(i32 %c) nounwind { switch i32 %c, label %sw.default [ i32 1, label %sw.bb @@ -99,7 +99,7 @@ return: ret i32 %retval.0 } -; CHECK: @test5 +; CHECK-LABEL: @test5( define i1 @test5(i32 %c) nounwind { %cmp = icmp slt i32 %c, 5 br i1 %cmp, label %if.then, label %if.end @@ -121,7 +121,7 @@ if.end8: ret i1 %cmp2 } -; CHECK: @test6 +; CHECK-LABEL: @test6( define i1 @test6(i32 %c) nounwind { %cmp = icmp ule i32 %c, 7 br i1 %cmp, label %if.then, label %if.end @@ -143,7 +143,7 @@ sw.bb: ret i1 %cmp2 } -; CHECK: @test7 +; CHECK-LABEL: @test7( define i1 @test7(i32 %c) nounwind { entry: switch i32 %c, label %sw.default [ diff --git a/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll b/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll index f5d2588dd059..26982db8322d 100644 --- a/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll +++ b/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll @@ -8,7 +8,7 @@ entry: call void @llvm.dbg.value(metadata !{i32 %len}, i64 0, metadata !10) call void @llvm.dbg.value(metadata !{i32 %hash}, i64 0, metadata !11) call void @llvm.dbg.value(metadata !{i32 %flags}, i64 0, metadata !12) -; CHECK: call fastcc i8* @add_name_internal(i8* %name, i32 %hash) [[NUW:#[0-9]+]], !dbg !13 +; CHECK: call fastcc i8* @add_name_internal(i8* %name, i32 %hash) [[NUW:#[0-9]+]], !dbg !{{[0-9]+}} %0 = call fastcc i8* @add_name_internal(i8* %name, i32 %len, i32 %hash, i8 zeroext 0, i32 %flags) nounwind, !dbg !13 ; [#uses=1] ret i8* %0, !dbg !13 } @@ -43,31 +43,36 @@ declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone ; CHECK: attributes #2 = { noinline nounwind ssp } ; CHECK: attributes [[NUW]] = { nounwind } +!llvm.dbg.cu = !{!3} +!llvm.module.flags = !{!30} !0 = metadata !{i32 524545, metadata !1, metadata !"name", metadata !2, i32 8, metadata !6} ; [ DW_TAG_arg_variable ] -!1 = metadata !{i32 524334, i32 0, metadata !2, metadata !"vfs_addname", metadata !"vfs_addname", metadata !"vfs_addname", metadata !2, i32 12, metadata !4, i1 false, i1 true, i32 0, i32 0, null, i1 false} ; [ DW_TAG_subprogram ] -!2 = metadata !{i32 524329, metadata !"tail.c", metadata !"/Users/echeng/LLVM/radars/r7927803/", metadata !3} ; [ DW_TAG_file_type ] -!3 = metadata !{i32 524305, i32 0, i32 1, metadata !"tail.c", metadata !"/Users/echeng/LLVM/radars/r7927803/", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build 9999)", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ] -!4 = metadata !{i32 524309, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !5, i32 0, null} ; [ DW_TAG_subroutine_type ] +!1 = metadata !{i32 524334, metadata !28, metadata !2, metadata !"vfs_addname", metadata !"vfs_addname", metadata !"vfs_addname", i32 12, metadata !4, i1 false, i1 true, i32 0, i32 0, null, i1 false, i32 0, null, null, null, null, i32 0} ; [ DW_TAG_subprogram ] +!2 = metadata !{i32 524329, metadata !28} ; [ DW_TAG_file_type ] +!3 = metadata !{i32 524305, metadata !28, i32 1, metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build 9999)", i1 true, metadata !"", i32 0, metadata !29, metadata !29, null, null, null, metadata !""} ; [ DW_TAG_compile_unit ] +!4 = metadata !{i32 524309, metadata !28, metadata !2, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !5, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] !5 = metadata !{metadata !6, metadata !6, metadata !9, metadata !9, metadata !9} -!6 = metadata !{i32 524303, metadata !2, metadata !"", metadata !2, i32 0, i64 64, i64 64, i64 0, i32 0, metadata !7} ; [ DW_TAG_pointer_type ] -!7 = metadata !{i32 524326, metadata !2, metadata !"", metadata !2, i32 0, i64 8, i64 8, i64 0, i32 0, metadata !8} ; [ DW_TAG_const_type ] -!8 = metadata !{i32 524324, metadata !2, metadata !"char", metadata !2, i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ] -!9 = metadata !{i32 524324, metadata !2, metadata !"unsigned int", metadata !2, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ] +!6 = metadata !{i32 524303, metadata !28, metadata !2, metadata !"", i32 0, i64 64, i64 64, i64 0, i32 0, metadata !7} ; [ DW_TAG_pointer_type ] +!7 = metadata !{i32 524326, metadata !28, metadata !2, metadata !"", i32 0, i64 8, i64 8, i64 0, i32 0, metadata !8} ; [ DW_TAG_const_type ] +!8 = metadata !{i32 524324, metadata !28, metadata !2, metadata !"char", i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ] +!9 = metadata !{i32 524324, metadata !28, metadata !2, metadata !"unsigned int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ] !10 = metadata !{i32 524545, metadata !1, metadata !"len", metadata !2, i32 9, metadata !9} ; [ DW_TAG_arg_variable ] !11 = metadata !{i32 524545, metadata !1, metadata !"hash", metadata !2, i32 10, metadata !9} ; [ DW_TAG_arg_variable ] !12 = metadata !{i32 524545, metadata !1, metadata !"flags", metadata !2, i32 11, metadata !9} ; [ DW_TAG_arg_variable ] !13 = metadata !{i32 13, i32 0, metadata !14, null} -!14 = metadata !{i32 524299, metadata !1, i32 12, i32 0} ; [ DW_TAG_lexical_block ] +!14 = metadata !{i32 524299, metadata !28, metadata !1, i32 12, i32 0, i32 0} ; [ DW_TAG_lexical_block ] !15 = metadata !{i32 524545, metadata !16, metadata !"name", metadata !2, i32 17, metadata !6} ; [ DW_TAG_arg_variable ] -!16 = metadata !{i32 524334, i32 0, metadata !2, metadata !"add_name_internal", metadata !"add_name_internal", metadata !"add_name_internal", metadata !2, i32 22, metadata !17, i1 true, i1 true, i32 0, i32 0, null, i1 false} ; [ DW_TAG_subprogram ] -!17 = metadata !{i32 524309, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !18, i32 0, null} ; [ DW_TAG_subroutine_type ] +!16 = metadata !{i32 524334, metadata !28, metadata !2, metadata !"add_name_internal", metadata !"add_name_internal", metadata !"add_name_internal", i32 22, metadata !17, i1 true, i1 true, i32 0, i32 0, null, i1 false, i32 0, null, null, null, null, i32 0} ; [ DW_TAG_subprogram ] +!17 = metadata !{i32 524309, metadata !28, metadata !2, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !18, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] !18 = metadata !{metadata !6, metadata !6, metadata !9, metadata !9, metadata !19, metadata !9} -!19 = metadata !{i32 524324, metadata !2, metadata !"unsigned char", metadata !2, i32 0, i64 8, i64 8, i64 0, i32 0, i32 8} ; [ DW_TAG_base_type ] +!19 = metadata !{i32 524324, metadata !28, metadata !2, metadata !"unsigned char", i32 0, i64 8, i64 8, i64 0, i32 0, i32 8} ; [ DW_TAG_base_type ] !20 = metadata !{i32 524545, metadata !16, metadata !"len", metadata !2, i32 18, metadata !9} ; [ DW_TAG_arg_variable ] !21 = metadata !{i32 524545, metadata !16, metadata !"hash", metadata !2, i32 19, metadata !9} ; [ DW_TAG_arg_variable ] !22 = metadata !{i32 524545, metadata !16, metadata !"extra", metadata !2, i32 20, metadata !19} ; [ DW_TAG_arg_variable ] !23 = metadata !{i32 524545, metadata !16, metadata !"flags", metadata !2, i32 21, metadata !9} ; [ DW_TAG_arg_variable ] !24 = metadata !{i32 23, i32 0, metadata !25, null} -!25 = metadata !{i32 524299, metadata !16, i32 22, i32 0} ; [ DW_TAG_lexical_block ] +!25 = metadata !{i32 524299, metadata !28, metadata !16, i32 22, i32 0, i32 0} ; [ DW_TAG_lexical_block ] !26 = metadata !{i32 24, i32 0, metadata !25, null} !27 = metadata !{i32 26, i32 0, metadata !25, null} +!28 = metadata !{metadata !"tail.c", metadata !"/Users/echeng/LLVM/radars/r7927803/"} +!29 = metadata !{i32 0} +!30 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} diff --git a/test/Transforms/DeadArgElim/2013-05-17-VarargsAndBlockAddress.ll b/test/Transforms/DeadArgElim/2013-05-17-VarargsAndBlockAddress.ll new file mode 100644 index 000000000000..23216031b58a --- /dev/null +++ b/test/Transforms/DeadArgElim/2013-05-17-VarargsAndBlockAddress.ll @@ -0,0 +1,25 @@ +; RUN: opt %s -deadargelim -S | FileCheck %s + + +@block_addr = global i8* blockaddress(@varargs_func, %l1) +; CHECK: @block_addr = global i8* blockaddress(@varargs_func, %l1) + + +; This function is referenced by a "blockaddress" constant but it is +; not address-taken, so the pass should be able to remove its unused +; varargs. + +define internal i32 @varargs_func(i8* %addr, ...) { + indirectbr i8* %addr, [ label %l1, label %l2 ] +l1: + ret i32 1 +l2: + ret i32 2 +} +; CHECK: define internal i32 @varargs_func(i8* %addr) { + +define i32 @caller(i8* %addr) { + %r = call i32 (i8*, ...)* @varargs_func(i8* %addr) + ret i32 %r +} +; CHECK: %r = call i32 @varargs_func(i8* %addr) diff --git a/test/Transforms/DeadArgElim/dbginfo.ll b/test/Transforms/DeadArgElim/dbginfo.ll index d53c19c8ef58..7bdcbf5c0623 100644 --- a/test/Transforms/DeadArgElim/dbginfo.ll +++ b/test/Transforms/DeadArgElim/dbginfo.ll @@ -35,29 +35,31 @@ entry: } !llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!21} -!0 = metadata !{i32 786449, i32 4, metadata !6, metadata !"clang version 3.2 (trunk 165305)", i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1, metadata !1, metadata !""} ; [ DW_TAG_compile_unit ] [/home/samsonov/tmp/clang-di/test.cc] [DW_LANG_C_plus_plus] +!0 = metadata !{i32 786449, metadata !20, i32 4, metadata !"clang version 3.2 (trunk 165305)", i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1, metadata !1, metadata !""} ; [ DW_TAG_compile_unit ] [/home/samsonov/tmp/clang-di/test.cc] [DW_LANG_C_plus_plus] !1 = metadata !{i32 0} !3 = metadata !{metadata !5, metadata !8, metadata !9} -!5 = metadata !{i32 786478, metadata !6, metadata !"run", metadata !"run", metadata !"", metadata !6, i32 8, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @_Z3runv, null, null, metadata !1, i32 8} ; [ DW_TAG_subprogram ] [line 8] [def] [run] +!5 = metadata !{i32 786478, metadata !20, metadata !6, metadata !"run", metadata !"run", metadata !"", i32 8, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @_Z3runv, null, null, metadata !1, i32 8} ; [ DW_TAG_subprogram ] [line 8] [def] [run] !6 = metadata !{i32 786473, metadata !20} ; [ DW_TAG_file_type ] -!7 = metadata !{i32 786453, i32 0, metadata !"", i32 0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !1, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!8 = metadata !{i32 786478, metadata !6, metadata !"dead_vararg", metadata !"dead_vararg", metadata !"", metadata !6, i32 5, metadata !7, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (...)* @_ZN12_GLOBAL__N_111dead_varargEz, null, null, metadata !1, i32 5} ; [ DW_TAG_subprogram ] [line 5] [local] [def] [dead_vararg] +!7 = metadata !{i32 786453, i32 0, null, i32 0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !1, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!8 = metadata !{i32 786478, metadata !20, metadata !6, metadata !"dead_vararg", metadata !"dead_vararg", metadata !"", i32 5, metadata !7, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (...)* @_ZN12_GLOBAL__N_111dead_varargEz, null, null, metadata !1, i32 5} ; [ DW_TAG_subprogram ] [line 5] [local] [def] [dead_vararg] ; CHECK: metadata !"dead_vararg"{{.*}}void ()* @_ZN12_GLOBAL__N_111dead_varargEz -!9 = metadata !{i32 786478, metadata !6, metadata !"dead_arg", metadata !"dead_arg", metadata !"", metadata !6, i32 4, metadata !7, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (i8*)* @_ZN12_GLOBAL__N_18dead_argEPv, null, null, metadata !1, i32 4} ; [ DW_TAG_subprogram ] [line 4] [local] [def] [dead_arg] +!9 = metadata !{i32 786478, metadata !20, metadata !6, metadata !"dead_arg", metadata !"dead_arg", metadata !"", i32 4, metadata !7, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (i8*)* @_ZN12_GLOBAL__N_18dead_argEPv, null, null, metadata !1, i32 4} ; [ DW_TAG_subprogram ] [line 4] [local] [def] [dead_arg] ; CHECK: metadata !"dead_arg"{{.*}}void ()* @_ZN12_GLOBAL__N_18dead_argEPv !10 = metadata !{i32 8, i32 14, metadata !11, null} -!11 = metadata !{i32 786443, metadata !5, i32 8, i32 12, metadata !6, i32 0} ; [ DW_TAG_lexical_block ] [/home/samsonov/tmp/clang-di/test.cc] +!11 = metadata !{i32 786443, metadata !20, metadata !5, i32 8, i32 12, i32 0} ; [ DW_TAG_lexical_block ] [/home/samsonov/tmp/clang-di/test.cc] !12 = metadata !{i32 8, i32 27, metadata !11, null} !13 = metadata !{i32 8, i32 42, metadata !11, null} !14 = metadata !{i32 4, i32 28, metadata !15, null} -!15 = metadata !{i32 786443, metadata !9, i32 4, i32 26, metadata !6, i32 2} ; [ DW_TAG_lexical_block ] [/home/samsonov/tmp/clang-di/test.cc] +!15 = metadata !{i32 786443, metadata !20, metadata !9, i32 4, i32 26, i32 2} ; [ DW_TAG_lexical_block ] [/home/samsonov/tmp/clang-di/test.cc] !16 = metadata !{i32 4, i32 33, metadata !15, null} !17 = metadata !{i32 5, i32 25, metadata !18, null} -!18 = metadata !{i32 786443, metadata !8, i32 5, i32 23, metadata !6, i32 1} ; [ DW_TAG_lexical_block ] [/home/samsonov/tmp/clang-di/test.cc] +!18 = metadata !{i32 786443, metadata !20, metadata !8, i32 5, i32 23, i32 1} ; [ DW_TAG_lexical_block ] [/home/samsonov/tmp/clang-di/test.cc] !19 = metadata !{i32 5, i32 30, metadata !18, null} !20 = metadata !{metadata !"test.cc", metadata !"/home/samsonov/tmp/clang-di"} +!21 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} diff --git a/test/Transforms/DeadArgElim/deadexternal.ll b/test/Transforms/DeadArgElim/deadexternal.ll index cca58721e532..acbcf75ee495 100644 --- a/test/Transforms/DeadArgElim/deadexternal.ll +++ b/test/Transforms/DeadArgElim/deadexternal.ll @@ -7,7 +7,7 @@ define void @test(i32) { define void @foo() { call void @test(i32 0) ret void -; CHECK: @foo +; CHECK-LABEL: @foo( ; CHECK: i32 undef } diff --git a/test/Transforms/DeadArgElim/keepalive.ll b/test/Transforms/DeadArgElim/keepalive.ll index e41110c96ef4..82e01f225843 100644 --- a/test/Transforms/DeadArgElim/keepalive.ll +++ b/test/Transforms/DeadArgElim/keepalive.ll @@ -13,7 +13,7 @@ define internal zeroext i32 @test1(i32 %DEADARG1) nounwind { } ; This checks if the struct doesn't get non-packed -; CHECK: define internal <{ i32, i32 }> @test2 +; CHECK-LABEL: define internal <{ i32, i32 }> @test2( define internal <{ i32, i32 }> @test2(i32 %DEADARG1) { ret <{ i32, i32 }> <{ i32 1, i32 2 }> } diff --git a/test/Transforms/DeadArgElim/linkage.ll b/test/Transforms/DeadArgElim/linkage.ll new file mode 100644 index 000000000000..f47548489eef --- /dev/null +++ b/test/Transforms/DeadArgElim/linkage.ll @@ -0,0 +1,21 @@ +; RUN: opt < %s -deadargelim -S | FileCheck %s + +; rdar://11546243 +%struct.A = type { i8 } + +define available_externally void @_Z17externallyDefinedP1A(%struct.A* %a) { +entry: + call void @_Z3foov() + ret void +} + +declare void @_Z3foov() + +define void @_Z4testP1A(%struct.A* %a) { +; CHECK: @_Z4testP1A +; CHECK: @_Z17externallyDefinedP1A(%struct.A* %a) + +entry: + call void @_Z17externallyDefinedP1A(%struct.A* %a) + ret void +} diff --git a/test/Transforms/DeadArgElim/lit.local.cfg b/test/Transforms/DeadArgElim/lit.local.cfg deleted file mode 100644 index 19eebc0ac7ac..000000000000 --- a/test/Transforms/DeadArgElim/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.ll', '.c', '.cpp'] diff --git a/test/Transforms/DeadArgElim/returned.ll b/test/Transforms/DeadArgElim/returned.ll new file mode 100644 index 000000000000..cbee026f9a37 --- /dev/null +++ b/test/Transforms/DeadArgElim/returned.ll @@ -0,0 +1,55 @@ +; RUN: opt < %s -deadargelim -S | FileCheck %s + +%Ty = type { i32, i32 } + +; sanity check that the argument and return value are both dead +; CHECK-LABEL: define internal void @test1() + +define internal %Ty* @test1(%Ty* %this) { + ret %Ty* %this +} + +; do not keep alive the return value of a function with a dead 'returned' argument +; CHECK-LABEL: define internal void @test2() + +define internal %Ty* @test2(%Ty* returned %this) { + ret %Ty* %this +} + +; dummy to keep 'this' alive +@dummy = global %Ty* null + +; sanity check that return value is dead +; CHECK-LABEL: define internal void @test3(%Ty* %this) + +define internal %Ty* @test3(%Ty* %this) { + store volatile %Ty* %this, %Ty** @dummy + ret %Ty* %this +} + +; keep alive return value of a function if the 'returned' argument is live +; CHECK-LABEL: define internal %Ty* @test4(%Ty* returned %this) + +define internal %Ty* @test4(%Ty* returned %this) { + store volatile %Ty* %this, %Ty** @dummy + ret %Ty* %this +} + +; don't do this if 'returned' is on the call site... +; CHECK-LABEL: define internal void @test5(%Ty* %this) + +define internal %Ty* @test5(%Ty* %this) { + store volatile %Ty* %this, %Ty** @dummy + ret %Ty* %this +} + +define %Ty* @caller(%Ty* %this) { + %1 = call %Ty* @test1(%Ty* %this) + %2 = call %Ty* @test2(%Ty* %this) + %3 = call %Ty* @test3(%Ty* %this) + %4 = call %Ty* @test4(%Ty* %this) +; ...instead, drop 'returned' form the call site +; CHECK: call void @test5(%Ty* %this) + %5 = call %Ty* @test5(%Ty* returned %this) + ret %Ty* %this +} diff --git a/test/Transforms/DeadArgElim/variadic_safety.ll b/test/Transforms/DeadArgElim/variadic_safety.ll new file mode 100644 index 000000000000..15f57bcfdcb8 --- /dev/null +++ b/test/Transforms/DeadArgElim/variadic_safety.ll @@ -0,0 +1,38 @@ +; RUN: opt < %s -deadargelim -S | FileCheck %s + +declare void @llvm.va_start(i8*) + +define internal i32 @va_func(i32 %a, i32 %b, ...) { + %valist = alloca i8 + call void @llvm.va_start(i8* %valist) + + ret i32 %b +} + +; Function derived from AArch64 ABI, where 8 integer arguments go in +; registers but the 9th goes on the stack. We really don't want to put +; just 7 args in registers and then start on the stack since any +; va_arg implementation already present in va_func won't be expecting +; it. +define i32 @call_va(i32 %in) { + %stacked = alloca i32 + store i32 42, i32* %stacked + %res = call i32(i32, i32, ...)* @va_func(i32 %in, i32 %in, [6 x i32] undef, i32* byval %stacked) + ret i32 %res +; CHECK: call i32 (i32, i32, ...)* @va_func(i32 undef, i32 %in, [6 x i32] undef, i32* byval %stacked) +} + +define internal i32 @va_deadret_func(i32 %a, i32 %b, ...) { + %valist = alloca i8 + call void @llvm.va_start(i8* %valist) + + ret i32 %a +} + +define void @call_deadret(i32 %in) { + %stacked = alloca i32 + store i32 42, i32* %stacked + call i32 (i32, i32, ...)* @va_deadret_func(i32 undef, i32 %in, [6 x i32] undef, i32* byval %stacked) + ret void +; CHECK: call void (i32, i32, ...)* @va_deadret_func(i32 undef, i32 undef, [6 x i32] undef, i32* byval %stacked) +} diff --git a/test/Transforms/DeadStoreElimination/2011-09-06-EndOfFunction.ll b/test/Transforms/DeadStoreElimination/2011-09-06-EndOfFunction.ll index d114e513ed2b..95253f6570b5 100644 --- a/test/Transforms/DeadStoreElimination/2011-09-06-EndOfFunction.ll +++ b/test/Transforms/DeadStoreElimination/2011-09-06-EndOfFunction.ll @@ -5,7 +5,7 @@ target triple = "x86_64-apple-darwin" %"class.std::auto_ptr" = type { i32* } -; CHECK: @_Z3foov +; CHECK-LABEL: @_Z3foov( define void @_Z3foov(%"class.std::auto_ptr"* noalias nocapture sret %agg.result) uwtable ssp { _ZNSt8auto_ptrIiED1Ev.exit: %temp.lvalue = alloca %"class.std::auto_ptr", align 8 diff --git a/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll b/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll index ed53eb524c20..968d608c67ed 100644 --- a/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll +++ b/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll @@ -8,7 +8,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 @glob2 = global %struct.vec2plusi zeroinitializer, align 16 define void @write24to28(i32* nocapture %p) nounwind uwtable ssp { -; CHECK: @write24to28 +; CHECK-LABEL: @write24to28( entry: %arrayidx0 = getelementptr inbounds i32* %p, i64 1 %p3 = bitcast i32* %arrayidx0 to i8* @@ -20,7 +20,7 @@ entry: } define void @write28to32(i32* nocapture %p) nounwind uwtable ssp { -; CHECK: @write28to32 +; CHECK-LABEL: @write28to32( entry: %p3 = bitcast i32* %p to i8* ; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false) @@ -31,7 +31,7 @@ entry: } define void @dontwrite28to32memset(i32* nocapture %p) nounwind uwtable ssp { -; CHECK: @dontwrite28to32memset +; CHECK-LABEL: @dontwrite28to32memset( entry: %p3 = bitcast i32* %p to i8* ; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false) @@ -42,7 +42,7 @@ entry: } define void @write32to36(%struct.vec2plusi* nocapture %p) nounwind uwtable ssp { -; CHECK: @write32to36 +; CHECK-LABEL: @write32to36( entry: %0 = bitcast %struct.vec2plusi* %p to i8* ; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 32, i32 16, i1 false) @@ -53,7 +53,7 @@ entry: } define void @write16to32(%struct.vec2* nocapture %p) nounwind uwtable ssp { -; CHECK: @write16to32 +; CHECK-LABEL: @write16to32( entry: %0 = bitcast %struct.vec2* %p to i8* ; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 16, i32 16, i1 false) @@ -64,7 +64,7 @@ entry: } define void @dontwrite28to32memcpy(%struct.vec2* nocapture %p) nounwind uwtable ssp { -; CHECK: @dontwrite28to32memcpy +; CHECK-LABEL: @dontwrite28to32memcpy( entry: %0 = bitcast %struct.vec2* %p to i8* ; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) @@ -80,7 +80,7 @@ declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind %struct.trapframe = type { i64, i64, i64 } ; bugzilla 11455 - make sure negative GEP's don't break this optimisation -; CHECK: @cpu_lwp_fork +; CHECK-LABEL: @cpu_lwp_fork( define void @cpu_lwp_fork(%struct.trapframe* %md_regs, i64 %pcb_rsp0) nounwind uwtable noinline ssp { entry: %0 = inttoptr i64 %pcb_rsp0 to %struct.trapframe* diff --git a/test/Transforms/DeadStoreElimination/PartialStore.ll b/test/Transforms/DeadStoreElimination/PartialStore.ll index 7ac1e0844ed4..4799ef3383bc 100644 --- a/test/Transforms/DeadStoreElimination/PartialStore.ll +++ b/test/Transforms/DeadStoreElimination/PartialStore.ll @@ -8,13 +8,13 @@ define void @test1(i32 *%V) { store i8 0, i8* %V2 store i32 1234567, i32* %V ret void -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK-NEXT: store i32 1234567 } ; Note that we could do better by merging the two stores into one. define void @test2(i32* %P) { -; CHECK: @test2 +; CHECK-LABEL: @test2( store i32 0, i32* %P ; CHECK: store i32 %Q = bitcast i32* %P to i16* @@ -25,7 +25,7 @@ define void @test2(i32* %P) { define i32 @test3(double %__x) { -; CHECK: @test3 +; CHECK-LABEL: @test3( ; CHECK: store double %__u = alloca { [3 x i32] } %tmp.1 = bitcast { [3 x i32] }* %__u to double* @@ -39,7 +39,7 @@ define i32 @test3(double %__x) { ; PR6043 define void @test4(i8* %P) { -; CHECK: @test4 +; CHECK-LABEL: @test4( ; CHECK-NEXT: bitcast ; CHECK-NEXT: store double @@ -64,7 +64,7 @@ define void @test5(i32 %i) nounwind ssp { call void @test5a(i32* %A) ret void -; CHECK: @test5( +; CHECK-LABEL: @test5( ; CHECK-NEXT: alloca ; CHECK-NEXT: store i32 20 ; CHECK-NEXT: call void @test5a diff --git a/test/Transforms/DeadStoreElimination/const-pointers.ll b/test/Transforms/DeadStoreElimination/const-pointers.ll index 15976f9f10d4..c90d824b34c1 100644 --- a/test/Transforms/DeadStoreElimination/const-pointers.ll +++ b/test/Transforms/DeadStoreElimination/const-pointers.ll @@ -11,7 +11,7 @@ define void @test1(%t* noalias %pp) { %x = load i32* inttoptr (i32 12345 to i32*) store i32 %x, i32* %p ret void -; CHECK: define void @test1 +; CHECK-LABEL: define void @test1( ; CHECK: store ; CHECK-NOT: store ; CHECK: ret void @@ -21,7 +21,7 @@ define void @test3() { store i32 1, i32* @g; <-- This is dead. store i32 42, i32* @g ret void -; CHECK: define void @test3 +; CHECK-LABEL: define void @test3( ; CHECK: store ; CHECK-NOT: store ; CHECK: ret void @@ -32,7 +32,7 @@ define void @test4(i32* %p) { %x = load i32* @g; <-- %p and @g could alias store i32 %x, i32* %p ret void -; CHECK: define void @test4 +; CHECK-LABEL: define void @test4( ; CHECK: store ; CHECK: store ; CHECK: ret void diff --git a/test/Transforms/DeadStoreElimination/free.ll b/test/Transforms/DeadStoreElimination/free.ll index a5fbdc76387e..1d273d67a501 100644 --- a/test/Transforms/DeadStoreElimination/free.ll +++ b/test/Transforms/DeadStoreElimination/free.ll @@ -5,7 +5,7 @@ target datalayout = "e-p:64:64:64" declare void @free(i8* nocapture) declare noalias i8* @malloc(i64) -; CHECK: @test +; CHECK-LABEL: @test( ; CHECK-NEXT: bitcast ; CHECK-NEXT: @free ; CHECK-NEXT: ret void @@ -17,7 +17,7 @@ define void @test(i32* %Q, i32* %P) { ret void } -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK-NEXT: bitcast ; CHECK-NEXT: @free ; CHECK-NEXT: ret void @@ -29,7 +29,7 @@ define void @test2({i32, i32}* %P) { ret void } -; CHECK: @test3 +; CHECK-LABEL: @test3( ; CHECK-NOT: store ; CHECK: ret void define void @test3() { @@ -42,7 +42,7 @@ define void @test3() { } ; PR11240 -; CHECK: @test4 +; CHECK-LABEL: @test4( ; CHECK-NOT: store ; CHECK: ret void define void @test4(i1 %x) nounwind { @@ -59,7 +59,7 @@ skipinit1: ret void } -; CHECK: @test5 +; CHECK-LABEL: @test5( define void @test5() { br label %bb diff --git a/test/Transforms/DeadStoreElimination/inst-limits.ll b/test/Transforms/DeadStoreElimination/inst-limits.ll new file mode 100644 index 000000000000..9df88014e5c6 --- /dev/null +++ b/test/Transforms/DeadStoreElimination/inst-limits.ll @@ -0,0 +1,261 @@ +; RUN: opt -S -dse < %s | FileCheck %s + +; If there are two stores to the same location, DSE should be able to remove +; the first store if the two stores are separated by no more than 98 +; instructions. The existence of debug intrinsics between the stores should +; not affect this instruction limit. + +@x = global i32 0, align 4 + +; Function Attrs: nounwind +define i32 @test_within_limit() { +entry: + ; The first store; later there is a second store to the same location, + ; so this store should be optimized away by DSE. + ; CHECK-NOT: store i32 1, i32* @x, align 4 + store i32 1, i32* @x, align 4 + + ; Insert 98 dummy instructions between the two stores + %0 = bitcast i32 0 to i32 + %1 = bitcast i32 0 to i32 + %2 = bitcast i32 0 to i32 + %3 = bitcast i32 0 to i32 + %4 = bitcast i32 0 to i32 + %5 = bitcast i32 0 to i32 + %6 = bitcast i32 0 to i32 + %7 = bitcast i32 0 to i32 + %8 = bitcast i32 0 to i32 + %9 = bitcast i32 0 to i32 + %10 = bitcast i32 0 to i32 + %11 = bitcast i32 0 to i32 + %12 = bitcast i32 0 to i32 + %13 = bitcast i32 0 to i32 + %14 = bitcast i32 0 to i32 + %15 = bitcast i32 0 to i32 + %16 = bitcast i32 0 to i32 + %17 = bitcast i32 0 to i32 + %18 = bitcast i32 0 to i32 + %19 = bitcast i32 0 to i32 + %20 = bitcast i32 0 to i32 + %21 = bitcast i32 0 to i32 + %22 = bitcast i32 0 to i32 + %23 = bitcast i32 0 to i32 + %24 = bitcast i32 0 to i32 + %25 = bitcast i32 0 to i32 + %26 = bitcast i32 0 to i32 + %27 = bitcast i32 0 to i32 + %28 = bitcast i32 0 to i32 + %29 = bitcast i32 0 to i32 + %30 = bitcast i32 0 to i32 + %31 = bitcast i32 0 to i32 + %32 = bitcast i32 0 to i32 + %33 = bitcast i32 0 to i32 + %34 = bitcast i32 0 to i32 + %35 = bitcast i32 0 to i32 + %36 = bitcast i32 0 to i32 + %37 = bitcast i32 0 to i32 + %38 = bitcast i32 0 to i32 + %39 = bitcast i32 0 to i32 + %40 = bitcast i32 0 to i32 + %41 = bitcast i32 0 to i32 + %42 = bitcast i32 0 to i32 + %43 = bitcast i32 0 to i32 + %44 = bitcast i32 0 to i32 + %45 = bitcast i32 0 to i32 + %46 = bitcast i32 0 to i32 + %47 = bitcast i32 0 to i32 + %48 = bitcast i32 0 to i32 + %49 = bitcast i32 0 to i32 + %50 = bitcast i32 0 to i32 + %51 = bitcast i32 0 to i32 + %52 = bitcast i32 0 to i32 + %53 = bitcast i32 0 to i32 + %54 = bitcast i32 0 to i32 + %55 = bitcast i32 0 to i32 + %56 = bitcast i32 0 to i32 + %57 = bitcast i32 0 to i32 + %58 = bitcast i32 0 to i32 + %59 = bitcast i32 0 to i32 + %60 = bitcast i32 0 to i32 + %61 = bitcast i32 0 to i32 + %62 = bitcast i32 0 to i32 + %63 = bitcast i32 0 to i32 + %64 = bitcast i32 0 to i32 + %65 = bitcast i32 0 to i32 + %66 = bitcast i32 0 to i32 + %67 = bitcast i32 0 to i32 + %68 = bitcast i32 0 to i32 + %69 = bitcast i32 0 to i32 + %70 = bitcast i32 0 to i32 + %71 = bitcast i32 0 to i32 + %72 = bitcast i32 0 to i32 + %73 = bitcast i32 0 to i32 + %74 = bitcast i32 0 to i32 + %75 = bitcast i32 0 to i32 + %76 = bitcast i32 0 to i32 + %77 = bitcast i32 0 to i32 + %78 = bitcast i32 0 to i32 + %79 = bitcast i32 0 to i32 + %80 = bitcast i32 0 to i32 + %81 = bitcast i32 0 to i32 + %82 = bitcast i32 0 to i32 + %83 = bitcast i32 0 to i32 + %84 = bitcast i32 0 to i32 + %85 = bitcast i32 0 to i32 + %86 = bitcast i32 0 to i32 + %87 = bitcast i32 0 to i32 + %88 = bitcast i32 0 to i32 + %89 = bitcast i32 0 to i32 + %90 = bitcast i32 0 to i32 + %91 = bitcast i32 0 to i32 + %92 = bitcast i32 0 to i32 + %93 = bitcast i32 0 to i32 + %94 = bitcast i32 0 to i32 + %95 = bitcast i32 0 to i32 + %96 = bitcast i32 0 to i32 + %97 = bitcast i32 0 to i32 + + ; Insert a meaningless dbg.value intrinsic; it should have no + ; effect on the working of DSE in any way. + call void @llvm.dbg.value(metadata !12, i64 0, metadata !10) + + ; CHECK: store i32 -1, i32* @x, align 4 + store i32 -1, i32* @x, align 4 + ret i32 0 +} + +; Function Attrs: nounwind +define i32 @test_outside_limit() { +entry: + ; The first store; later there is a second store to the same location + ; CHECK: store i32 1, i32* @x, align 4 + store i32 1, i32* @x, align 4 + + ; Insert 99 dummy instructions between the two stores; this is + ; one too many instruction for the DSE to take place. + %0 = bitcast i32 0 to i32 + %1 = bitcast i32 0 to i32 + %2 = bitcast i32 0 to i32 + %3 = bitcast i32 0 to i32 + %4 = bitcast i32 0 to i32 + %5 = bitcast i32 0 to i32 + %6 = bitcast i32 0 to i32 + %7 = bitcast i32 0 to i32 + %8 = bitcast i32 0 to i32 + %9 = bitcast i32 0 to i32 + %10 = bitcast i32 0 to i32 + %11 = bitcast i32 0 to i32 + %12 = bitcast i32 0 to i32 + %13 = bitcast i32 0 to i32 + %14 = bitcast i32 0 to i32 + %15 = bitcast i32 0 to i32 + %16 = bitcast i32 0 to i32 + %17 = bitcast i32 0 to i32 + %18 = bitcast i32 0 to i32 + %19 = bitcast i32 0 to i32 + %20 = bitcast i32 0 to i32 + %21 = bitcast i32 0 to i32 + %22 = bitcast i32 0 to i32 + %23 = bitcast i32 0 to i32 + %24 = bitcast i32 0 to i32 + %25 = bitcast i32 0 to i32 + %26 = bitcast i32 0 to i32 + %27 = bitcast i32 0 to i32 + %28 = bitcast i32 0 to i32 + %29 = bitcast i32 0 to i32 + %30 = bitcast i32 0 to i32 + %31 = bitcast i32 0 to i32 + %32 = bitcast i32 0 to i32 + %33 = bitcast i32 0 to i32 + %34 = bitcast i32 0 to i32 + %35 = bitcast i32 0 to i32 + %36 = bitcast i32 0 to i32 + %37 = bitcast i32 0 to i32 + %38 = bitcast i32 0 to i32 + %39 = bitcast i32 0 to i32 + %40 = bitcast i32 0 to i32 + %41 = bitcast i32 0 to i32 + %42 = bitcast i32 0 to i32 + %43 = bitcast i32 0 to i32 + %44 = bitcast i32 0 to i32 + %45 = bitcast i32 0 to i32 + %46 = bitcast i32 0 to i32 + %47 = bitcast i32 0 to i32 + %48 = bitcast i32 0 to i32 + %49 = bitcast i32 0 to i32 + %50 = bitcast i32 0 to i32 + %51 = bitcast i32 0 to i32 + %52 = bitcast i32 0 to i32 + %53 = bitcast i32 0 to i32 + %54 = bitcast i32 0 to i32 + %55 = bitcast i32 0 to i32 + %56 = bitcast i32 0 to i32 + %57 = bitcast i32 0 to i32 + %58 = bitcast i32 0 to i32 + %59 = bitcast i32 0 to i32 + %60 = bitcast i32 0 to i32 + %61 = bitcast i32 0 to i32 + %62 = bitcast i32 0 to i32 + %63 = bitcast i32 0 to i32 + %64 = bitcast i32 0 to i32 + %65 = bitcast i32 0 to i32 + %66 = bitcast i32 0 to i32 + %67 = bitcast i32 0 to i32 + %68 = bitcast i32 0 to i32 + %69 = bitcast i32 0 to i32 + %70 = bitcast i32 0 to i32 + %71 = bitcast i32 0 to i32 + %72 = bitcast i32 0 to i32 + %73 = bitcast i32 0 to i32 + %74 = bitcast i32 0 to i32 + %75 = bitcast i32 0 to i32 + %76 = bitcast i32 0 to i32 + %77 = bitcast i32 0 to i32 + %78 = bitcast i32 0 to i32 + %79 = bitcast i32 0 to i32 + %80 = bitcast i32 0 to i32 + %81 = bitcast i32 0 to i32 + %82 = bitcast i32 0 to i32 + %83 = bitcast i32 0 to i32 + %84 = bitcast i32 0 to i32 + %85 = bitcast i32 0 to i32 + %86 = bitcast i32 0 to i32 + %87 = bitcast i32 0 to i32 + %88 = bitcast i32 0 to i32 + %89 = bitcast i32 0 to i32 + %90 = bitcast i32 0 to i32 + %91 = bitcast i32 0 to i32 + %92 = bitcast i32 0 to i32 + %93 = bitcast i32 0 to i32 + %94 = bitcast i32 0 to i32 + %95 = bitcast i32 0 to i32 + %96 = bitcast i32 0 to i32 + %97 = bitcast i32 0 to i32 + %98 = bitcast i32 0 to i32 + + ; CHECK: store i32 -1, i32* @x, align 4 + store i32 -1, i32* @x, align 4 + ret i32 0 +} + +; Function Attrs: nounwind readnone +declare void @llvm.dbg.value(metadata, i64, metadata) + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!11, !13} + +!0 = metadata !{i32 786449, metadata !1, i32 4, metadata !"clang version 3.4", i1 true, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !9, metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] [/home/tmp/test.c] [DW_LANG_C99] +!1 = metadata !{metadata !"test.c", metadata !"/home/tmp"} +!2 = metadata !{i32 0} +!3 = metadata !{metadata !4} +!4 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"test_within_limit", metadata !"test_within_limit", metadata !"", i32 3, metadata !6, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 ()* @test_within_limit, null, null, metadata !2, i32 4} ; [ DW_TAG_subprogram ] [line 3] [def] [scope 4] [test] +!5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] [/home/tmp/test.c] +!6 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !7, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = metadata !{metadata !8} +!8 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] +!9 = metadata !{metadata !10} +!10 = metadata !{i32 786484, i32 0, null, metadata !"x", metadata !"x", metadata !"", metadata !5, i32 1, metadata !8, i32 0, i32 1, i32* @x, null} ; [ DW_TAG_variable ] [x] [line 1] [def] +!11 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} +!12 = metadata !{i32* undef} + +!13 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} diff --git a/test/Transforms/DeadStoreElimination/libcalls.ll b/test/Transforms/DeadStoreElimination/libcalls.ll index 4639c0bc9628..65396945bf65 100644 --- a/test/Transforms/DeadStoreElimination/libcalls.ll +++ b/test/Transforms/DeadStoreElimination/libcalls.ll @@ -2,7 +2,7 @@ declare i8* @strcpy(i8* %dest, i8* %src) nounwind define void @test1(i8* %src) { -; CHECK: @test1 +; CHECK-LABEL: @test1( %B = alloca [16 x i8] %dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0 ; CHECK-NOT: @strcpy @@ -13,7 +13,7 @@ define void @test1(i8* %src) { declare i8* @strncpy(i8* %dest, i8* %src, i32 %n) nounwind define void @test2(i8* %src) { -; CHECK: @test2 +; CHECK-LABEL: @test2( %B = alloca [16 x i8] %dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0 ; CHECK-NOT: @strncpy @@ -24,7 +24,7 @@ define void @test2(i8* %src) { declare i8* @strcat(i8* %dest, i8* %src) nounwind define void @test3(i8* %src) { -; CHECK: @test3 +; CHECK-LABEL: @test3( %B = alloca [16 x i8] %dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0 ; CHECK-NOT: @strcat @@ -35,7 +35,7 @@ define void @test3(i8* %src) { declare i8* @strncat(i8* %dest, i8* %src, i32 %n) nounwind define void @test4(i8* %src) { -; CHECK: @test4 +; CHECK-LABEL: @test4( %B = alloca [16 x i8] %dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0 ; CHECK-NOT: @strncat @@ -45,7 +45,7 @@ define void @test4(i8* %src) { } define void @test5(i8* nocapture %src) { -; CHECK: @test5 +; CHECK-LABEL: @test5( %dest = alloca [100 x i8], align 16 %arraydecay = getelementptr inbounds [100 x i8]* %dest, i64 0, i64 0 %call = call i8* @strcpy(i8* %arraydecay, i8* %src) @@ -57,7 +57,7 @@ define void @test5(i8* nocapture %src) { declare void @user(i8* %p) define void @test6(i8* %src) { -; CHECK: @test6 +; CHECK-LABEL: @test6( %B = alloca [16 x i8] %dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0 ; CHECK: @strcpy diff --git a/test/Transforms/DeadStoreElimination/lifetime.ll b/test/Transforms/DeadStoreElimination/lifetime.ll index 678565315e37..7fe7fbfa7478 100644 --- a/test/Transforms/DeadStoreElimination/lifetime.ll +++ b/test/Transforms/DeadStoreElimination/lifetime.ll @@ -7,7 +7,7 @@ declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind declare void @llvm.memset.p0i8.i8(i8* nocapture, i8, i8, i32, i1) nounwind define void @test1() { -; CHECK: @test1 +; CHECK-LABEL: @test1( %A = alloca i8 store i8 0, i8* %A ;; Written to by memset diff --git a/test/Transforms/DeadStoreElimination/lit.local.cfg b/test/Transforms/DeadStoreElimination/lit.local.cfg deleted file mode 100644 index 19eebc0ac7ac..000000000000 --- a/test/Transforms/DeadStoreElimination/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.ll', '.c', '.cpp'] diff --git a/test/Transforms/DeadStoreElimination/memintrinsics.ll b/test/Transforms/DeadStoreElimination/memintrinsics.ll index d5c5365771d5..5bbb8e099c41 100644 --- a/test/Transforms/DeadStoreElimination/memintrinsics.ll +++ b/test/Transforms/DeadStoreElimination/memintrinsics.ll @@ -5,7 +5,7 @@ declare void @llvm.memmove.p0i8.p0i8.i8(i8* nocapture, i8* nocapture, i8, i32, i declare void @llvm.memset.p0i8.i8(i8* nocapture, i8, i8, i32, i1) nounwind define void @test1() { -; CHECK: @test1 +; CHECK-LABEL: @test1( %A = alloca i8 %B = alloca i8 @@ -19,7 +19,7 @@ define void @test1() { } define void @test2() { -; CHECK: @test2 +; CHECK-LABEL: @test2( %A = alloca i8 %B = alloca i8 @@ -33,7 +33,7 @@ define void @test2() { } define void @test3() { -; CHECK: @test3 +; CHECK-LABEL: @test3( %A = alloca i8 %B = alloca i8 diff --git a/test/Transforms/DeadStoreElimination/no-targetdata.ll b/test/Transforms/DeadStoreElimination/no-targetdata.ll index 4022d76dcb52..c0c7c58d4ead 100644 --- a/test/Transforms/DeadStoreElimination/no-targetdata.ll +++ b/test/Transforms/DeadStoreElimination/no-targetdata.ll @@ -7,7 +7,7 @@ define void @test1(i32* noalias %p) { call void @test1f() store i32 2, i32 *%p ret void -; CHECK: define void @test1 +; CHECK-LABEL: define void @test1( ; CHECK-NOT: store ; CHECK-NEXT: call void ; CHECK-NEXT: store i32 2 diff --git a/test/Transforms/DeadStoreElimination/simple.ll b/test/Transforms/DeadStoreElimination/simple.ll index e0eb90af9437..ec98466d33b9 100644 --- a/test/Transforms/DeadStoreElimination/simple.ll +++ b/test/Transforms/DeadStoreElimination/simple.ll @@ -10,7 +10,7 @@ define void @test1(i32* %Q, i32* %P) { store i32 %DEAD, i32* %P store i32 0, i32* %P ret void -; CHECK: @test1 +; CHECK-LABEL: @test1( ; CHECK-NEXT: store i32 0, i32* %P ; CHECK-NEXT: ret void } @@ -21,7 +21,7 @@ define void @test2(i32 *%p, i32 *%q) { store i32 20, i32* %q, align 4 store i32 30, i32* %p, align 4 ret void -; CHECK: @test2 +; CHECK-LABEL: @test2( ; CHECK-NEXT: store i32 20 } @@ -30,7 +30,7 @@ define void @test2(i32 *%p, i32 *%q) { @g = global i32 1 define i32 @test3(i32* %g_addr) nounwind { -; CHECK: @test3 +; CHECK-LABEL: @test3( ; CHECK: load i32* %g_addr %g_value = load i32* %g_addr, align 4 store i32 -1, i32* @g, align 4 @@ -44,7 +44,7 @@ define void @test4(i32* %Q) { %a = load i32* %Q store volatile i32 %a, i32* %Q ret void -; CHECK: @test4 +; CHECK-LABEL: @test4( ; CHECK-NEXT: load i32 ; CHECK-NEXT: store volatile ; CHECK-NEXT: ret void @@ -54,7 +54,7 @@ define void @test5(i32* %Q) { %a = load volatile i32* %Q store i32 %a, i32* %Q ret void -; CHECK: @test5 +; CHECK-LABEL: @test5( ; CHECK-NEXT: load volatile ; CHECK-NEXT: ret void } @@ -66,7 +66,7 @@ define void @test6(i32 *%p, i8 *%q) { 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 +; CHECK-LABEL: @test6( ; CHECK-NEXT: call void @llvm.memset } @@ -77,7 +77,7 @@ define void @test7(i32 *%p, i8 *%q, i8* noalias %r) { 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 +; CHECK-LABEL: @test7( ; CHECK-NEXT: call void @llvm.memcpy } @@ -90,7 +90,7 @@ define i32 @test8() { %X = load i32* %V ret i32 %X -; CHECK: @test8 +; CHECK-LABEL: @test8( ; CHECK: store i32 1234567 } @@ -101,7 +101,7 @@ define void @test9(%struct.x* byval %a) nounwind { %tmp2 = getelementptr %struct.x* %a, i32 0, i32 0 store i32 1, i32* %tmp2, align 4 ret void -; CHECK: @test9 +; CHECK-LABEL: @test9( ; CHECK-NEXT: ret void } @@ -111,7 +111,7 @@ define double @test10(i8* %X) { store i8* %X, i8** %X_addr %tmp.0 = va_arg i8** %X_addr, double ret double %tmp.0 -; CHECK: @test10 +; CHECK-LABEL: @test10( ; CHECK: store } @@ -119,7 +119,7 @@ define double @test10(i8* %X) { ; DSE should delete the dead trampoline. declare void @test11f() define void @test11() { -; CHECK: @test11 +; CHECK-LABEL: @test11( %storage = alloca [10 x i8], align 16 ; <[10 x i8]*> [#uses=1] ; CHECK-NOT: alloca %cast = getelementptr [10 x i8]* %storage, i32 0, i32 0 ; [#uses=1] @@ -140,7 +140,7 @@ define void @test12({ i32, i32 }* %x) nounwind { store i32 %tmp5, i32* %tmp4, align 4 store i32 %tmp17, i32* %tmp7, align 4 ret void -; CHECK: @test12 +; CHECK-LABEL: @test12( ; CHECK-NOT: tmp5 ; CHECK: ret void } @@ -173,7 +173,7 @@ define void @test14(i32* %Q) { store i32 %DEAD, i32* %P ret void -; CHECK: @test14 +; CHECK-LABEL: @test14( ; CHECK-NEXT: ret void } @@ -185,7 +185,7 @@ define void @test15(i8* %P, i8* %Q) nounwind ssp { 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-LABEL: @test15( ; CHECK-NEXT: call void @llvm.memcpy ; CHECK-NEXT: ret } @@ -195,7 +195,7 @@ define void @test16(i8* %P, i8* %Q) nounwind ssp { 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-LABEL: @test16( ; CHECK-NEXT: call void @llvm.memcpy ; CHECK-NEXT: ret } @@ -205,7 +205,7 @@ define void @test17(i8* %P, i8* noalias %Q) nounwind ssp { 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-LABEL: @test17( ; CHECK-NEXT: call void @llvm.memcpy ; CHECK-NEXT: ret } @@ -215,7 +215,7 @@ define void @test17v(i8* %P, i8* %Q) nounwind ssp { tail call void @llvm.memset.p0i8.i64(i8* %P, i8 42, i64 8, i32 1, i1 true) tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false) ret void -; CHECK: @test17v +; CHECK-LABEL: @test17v( ; CHECK-NEXT: call void @llvm.memset ; CHECK-NEXT: call void @llvm.memcpy ; CHECK-NEXT: ret @@ -229,7 +229,7 @@ define void @test18(i8* %P, i8* %Q, i8* %R) nounwind ssp { 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-LABEL: @test18( ; CHECK-NEXT: call void @llvm.memcpy ; CHECK-NEXT: call void @llvm.memcpy ; CHECK-NEXT: ret @@ -246,7 +246,7 @@ bb: call void @test19f({i32}* byval align 4 %arg5) ret void -; CHECK: @test19( +; CHECK-LABEL: @test19( ; CHECK: store i32 912 ; CHECK: call void @test19f } @@ -256,10 +256,10 @@ define void @test20() { store i8 0, i8* %m ret void } -; CHECK: @test20 +; CHECK-LABEL: @test20( ; CHECK-NEXT: ret void -; CHECK: @test21 +; CHECK-LABEL: @test21( define void @test21() { %m = call i8* @calloc(i32 9, i32 7) store i8 0, i8* %m @@ -267,7 +267,7 @@ define void @test21() { ret void } -; CHECK: @test22( +; CHECK-LABEL: @test22( define void @test22(i1 %i, i32 %k, i32 %m) nounwind { %k.addr = alloca i32 %m.addr = alloca i32 @@ -278,7 +278,7 @@ define void @test22(i1 %i, i32 %k, i32 %m) nounwind { } ; PR13547 -; CHECK: @test23 +; CHECK-LABEL: @test23( ; CHECK: store i8 97 ; CHECK: store i8 0 declare noalias i8* @strdup(i8* nocapture) nounwind @@ -293,7 +293,7 @@ define noalias i8* @test23() nounwind uwtable ssp { } ; Make sure same sized store to later element is deleted -; CHECK: @test24 +; CHECK-LABEL: @test24( ; CHECK-NOT: store i32 0 ; CHECK-NOT: store i32 0 ; CHECK: store i32 %b @@ -312,7 +312,7 @@ define void @test24([2 x i32]* %a, i32 %b, i32 %c) nounwind { } ; Check another case like PR13547 where strdup is not like malloc. -; CHECK: @test25 +; CHECK-LABEL: @test25( ; CHECK: load i8 ; CHECK: store i8 0 ; CHECK: store i8 %tmp diff --git a/test/Transforms/DebugIR/crash.ll b/test/Transforms/DebugIR/crash.ll new file mode 100644 index 000000000000..f4a88d7234cb --- /dev/null +++ b/test/Transforms/DebugIR/crash.ll @@ -0,0 +1,42 @@ +; ModuleID = 'crash.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-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +@.str = private unnamed_addr constant [18 x i8] c"Hello, segfault!\0A\00", align 1 +@.str1 = private unnamed_addr constant [14 x i8] c"Now crash %d\0A\00", align 1 + +; Function Attrs: nounwind uwtable +define i32 @main(i32 %argc, i8** %argv) #0 { + %1 = alloca i32, align 4 ;CHECK: !dbg + %2 = alloca i32, align 4 ;CHECK-NEXT: !dbg + %3 = alloca i8**, align 8 ;CHECK-NEXT: !dbg + %null_ptr = alloca i32*, align 8 ;CHECK-NEXT: !dbg + store i32 0, i32* %1 ;CHECK-NEXT: !dbg + store i32 %argc, i32* %2, align 4 ;CHECK-NEXT: !dbg + store i8** %argv, i8*** %3, align 8 ;CHECK-NEXT: !dbg + store i32* null, i32** %null_ptr, align 8 ;CHECK-NEXT: !dbg + %4 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0)) ;CHECK-NEXT: !dbg + %5 = load i32** %null_ptr, align 8 ;CHECK-NEXT: !dbg + %6 = load i32* %5, align 4 ;CHECK-NEXT: !dbg + %7 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str1, i32 0, i32 0), i32 %6) ;CHECK-NEXT: !dbg + %8 = load i32* %2, align 4 ;CHECK-NEXT: !dbg + ret i32 %8 ;CHECK-NEXT: !dbg +} + +declare i32 @printf(i8*, ...) #1 + +attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" } + +; CHECK: = metadata !{i32 14, +; CHECK-NEXT: = metadata !{i32 15, +; CHECK-NEXT: = metadata !{i32 16, +; CHECK-NEXT: = metadata !{i32 17, +; CHECK-NEXT: = metadata !{i32 18, +; CHECK-NEXT: = metadata !{i32 19, +; CHECK-NEXT: = metadata !{i32 20, +; CHECK-NEXT: = metadata !{i32 21, +; CHECK-NEXT: = metadata !{i32 22, +; CHECK-NEXT: = metadata !{i32 23, + +; RUN: opt %s -debug-ir -S | FileCheck %s diff --git a/test/Transforms/DebugIR/exception.ll b/test/Transforms/DebugIR/exception.ll new file mode 100644 index 000000000000..2436d38968c9 --- /dev/null +++ b/test/Transforms/DebugIR/exception.ll @@ -0,0 +1,127 @@ +; ModuleID = 'exception.cpp' +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-S128" +target triple = "x86_64-pc-linux-gnu" + +@_ZTIi = external constant i8* + +; Function Attrs: uwtable +define i32 @main(i32 %argc, i8** %argv) #0 { + %1 = alloca i32, align 4 ; CHECK: !dbg + %2 = alloca i32, align 4 ; CHECK-NEXT: !dbg + %3 = alloca i8**, align 8 ; CHECK-NEXT: !dbg + %4 = alloca i8* ; CHECK-NEXT: !dbg + %5 = alloca i32 ; CHECK-NEXT: !dbg + %e = alloca i32, align 4 ; CHECK-NEXT: !dbg + %6 = alloca i32 ; CHECK-NEXT: !dbg + store i32 0, i32* %1 ; CHECK-NEXT: !dbg + store i32 %argc, i32* %2, align 4 ; CHECK-NEXT: !dbg + store i8** %argv, i8*** %3, align 8 ; CHECK-NEXT: !dbg + %7 = call i8* @__cxa_allocate_exception(i64 4) #2 ; CHECK-NEXT: !dbg + %8 = bitcast i8* %7 to i32* ; CHECK-NEXT: !dbg + %9 = load i32* %2, align 4 ; CHECK-NEXT: !dbg + store i32 %9, i32* %8 ; CHECK-NEXT: !dbg + invoke void @__cxa_throw(i8* %7, i8* bitcast (i8** @_ZTIi to i8*), i8* null) #3 + to label %31 unwind label %10 ; CHECK: !dbg + +;