From ebe69fe11e48d322045d5949c83283927a0d790b Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Mon, 23 Mar 2015 12:10:34 -0700 Subject: Update aosp/master LLVM for rebase to r230699. Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9 --- test/Transforms/AddDiscriminators/basic.ll | 34 +- test/Transforms/AddDiscriminators/first-only.ll | 58 +-- test/Transforms/AddDiscriminators/multiple.ll | 34 +- .../AddDiscriminators/no-discriminators.ll | 44 +- test/Transforms/ArgumentPromotion/control-flow2.ll | 5 +- test/Transforms/ArgumentPromotion/dbg.ll | 10 +- test/Transforms/ArgumentPromotion/reserve-tbaa.ll | 26 +- test/Transforms/BBVectorize/loop1.ll | 2 +- test/Transforms/BBVectorize/metadata.ll | 8 +- test/Transforms/BDCE/basic.ll | 348 ++++++++++++++ test/Transforms/BDCE/dce-pure.ll | 33 ++ test/Transforms/BDCE/order.ll | 37 ++ .../CodeGenPrepare/statepoint-relocate.ll | 88 ++++ test/Transforms/ConstProp/InsertElement.ll | 12 + test/Transforms/ConstProp/insertvalue.ll | 9 + test/Transforms/CorrelatedValuePropagation/icmp.ll | 63 +++ test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll | 80 ++-- test/Transforms/DeadArgElim/aggregates.ll | 162 +++++++ test/Transforms/DeadArgElim/dbginfo.ll | 44 +- .../2011-03-25-DSEMiscompile.ll | 6 +- .../Transforms/DeadStoreElimination/inst-limits.ll | 30 +- test/Transforms/DebugIR/crash.ll | 42 -- test/Transforms/DebugIR/exception.ll | 127 ------ test/Transforms/DebugIR/function.ll | 51 --- test/Transforms/DebugIR/simple-addrspace.ll | 11 - test/Transforms/DebugIR/simple.ll | 25 - test/Transforms/DebugIR/struct.ll | 24 - test/Transforms/DebugIR/vector.ll | 93 ---- test/Transforms/EarlyCSE/AArch64/intrinsics.ll | 232 ++++++++++ test/Transforms/EarlyCSE/AArch64/lit.local.cfg | 5 + test/Transforms/EarlyCSE/basic.ll | 12 +- .../Transforms/GCOVProfiling/function-numbering.ll | 30 +- test/Transforms/GCOVProfiling/global-ctor.ll | 34 +- test/Transforms/GCOVProfiling/linezero.ll | 100 ++-- test/Transforms/GCOVProfiling/linkagename.ll | 22 +- test/Transforms/GCOVProfiling/return-block.ll | 66 +++ test/Transforms/GCOVProfiling/version.ll | 24 +- test/Transforms/GVN/cond_br2.ll | 12 +- test/Transforms/GVN/condprop.ll | 48 ++ test/Transforms/GVN/edge.ll | 110 +++++ test/Transforms/GVN/fpmath.ll | 4 +- test/Transforms/GVN/invariant-load.ll | 40 +- .../GVN/load-from-unreachable-predecessor.ll | 20 + test/Transforms/GVN/load-pre-nonlocal.ll | 12 +- test/Transforms/GVN/noalias.ll | 6 +- test/Transforms/GVN/pre-gep-load.ll | 49 ++ test/Transforms/GVN/pre-no-cost-phi.ll | 31 ++ test/Transforms/GVN/preserve-tbaa.ll | 8 +- test/Transforms/GVN/range.ll | 32 +- test/Transforms/GVN/tbaa.ll | 69 ++- test/Transforms/GVN/volatile.ll | 157 +++++++ test/Transforms/GlobalDCE/pr20981.ll | 4 +- test/Transforms/GlobalOpt/2009-03-05-dbg.ll | 48 +- .../GlobalOpt/externally-initialized-global-ctr.ll | 2 +- test/Transforms/GlobalOpt/metadata.ll | 16 +- test/Transforms/GlobalOpt/pr21191.ll | 8 +- test/Transforms/GlobalOpt/preserve-comdats.ll | 6 +- test/Transforms/IRCE/bug-mismatched-types.ll | 66 +++ test/Transforms/IRCE/decrementing-loop.ll | 43 ++ test/Transforms/IRCE/low-becount.ll | 32 ++ test/Transforms/IRCE/multiple-access-no-preloop.ll | 66 +++ test/Transforms/IRCE/not-likely-taken.ll | 40 ++ test/Transforms/IRCE/single-access-no-preloop.ll | 116 +++++ test/Transforms/IRCE/single-access-with-preloop.ll | 71 +++ test/Transforms/IRCE/unhandled.ll | 37 ++ test/Transforms/IRCE/with-parent-loops.ll | 345 ++++++++++++++ .../IndVarSimplify/2011-09-10-widen-nsw.ll | 2 +- .../IndVarSimplify/backedge-on-min-max.ll | 453 +++++++++++++++++++ test/Transforms/IndVarSimplify/overflowcheck.ll | 2 +- test/Transforms/IndVarSimplify/pr20680.ll | 4 +- test/Transforms/IndVarSimplify/pr22222.ll | 46 ++ test/Transforms/IndVarSimplify/sharpen-range.ll | 2 +- .../IndVarSimplify/strengthen-overflow.ll | 108 +++++ .../IndVarSimplify/use-range-metadata.ll | 2 +- test/Transforms/Inline/alloca-dbgdeclare.ll | 141 ++++++ .../Inline/debug-info-duplicate-calls.ll | 121 +++++ test/Transforms/Inline/debug-invoke.ll | 14 +- test/Transforms/Inline/ignore-debug-info.ll | 12 +- test/Transforms/Inline/inline-fast-math-flags.ll | 34 ++ test/Transforms/Inline/inline-fp.ll | 136 ++++++ test/Transforms/Inline/inline-indirect.ll | 19 + test/Transforms/Inline/inline-vla.ll | 2 +- test/Transforms/Inline/inline_dbg_declare.ll | 97 ++++ test/Transforms/Inline/noalias-calls.ll | 12 +- test/Transforms/Inline/noalias-cs.ll | 68 +-- test/Transforms/Inline/noalias.ll | 18 +- test/Transforms/Inline/noalias2.ll | 42 +- test/Transforms/Inline/optimization-remarks.ll | 2 +- test/Transforms/Inline/pr21206.ll | 8 +- .../InstCombine/2008-05-23-CompareFold.ll | 5 +- test/Transforms/InstCombine/2008-11-08-FCmp.ll | 7 + .../InstCombine/2011-06-13-nsw-alloca.ll | 3 +- test/Transforms/InstCombine/AddOverFlow.ll | 4 +- test/Transforms/InstCombine/LandingPadClauses.ll | 52 +++ test/Transforms/InstCombine/add2.ll | 10 +- test/Transforms/InstCombine/addnegneg.ll | 1 - test/Transforms/InstCombine/alias-recursion.ll | 24 + test/Transforms/InstCombine/aligned-altivec.ll | 131 ++++++ test/Transforms/InstCombine/aligned-qpx.ll | 162 +++++++ test/Transforms/InstCombine/and-compare.ll | 8 +- test/Transforms/InstCombine/and-xor-merge.ll | 11 +- .../InstCombine/apint-call-cast-target.ll | 9 +- .../InstCombine/bitcast-alias-function.ll | 15 +- test/Transforms/InstCombine/bitcast-store.ll | 10 +- test/Transforms/InstCombine/bswap-fold.ll | 184 +++++++- test/Transforms/InstCombine/call-cast-target.ll | 49 +- test/Transforms/InstCombine/canonicalize_branch.ll | 8 +- test/Transforms/InstCombine/cast-int-fcmp-eq-0.ll | 454 +++++++++++++++++++ test/Transforms/InstCombine/cast.ll | 29 +- test/Transforms/InstCombine/cast_ptr.ll | 23 +- test/Transforms/InstCombine/debug-line.ll | 22 +- test/Transforms/InstCombine/debuginfo.ll | 58 +-- test/Transforms/InstCombine/div.ll | 43 +- test/Transforms/InstCombine/fast-math.ll | 10 +- test/Transforms/InstCombine/fcmp.ll | 82 ++++ .../Transforms/InstCombine/float-shrink-compare.ll | 38 ++ test/Transforms/InstCombine/fpcast.ll | 12 + test/Transforms/InstCombine/gc.relocate.ll | 20 + test/Transforms/InstCombine/gep-sext.ll | 61 +++ test/Transforms/InstCombine/gepphigep.ll | 44 ++ test/Transforms/InstCombine/getelementptr.ll | 4 +- test/Transforms/InstCombine/icmp-range.ll | 8 +- test/Transforms/InstCombine/icmp.ll | 51 +++ test/Transforms/InstCombine/intrinsics.ll | 122 ++++- test/Transforms/InstCombine/load-cmp.ll | 8 +- test/Transforms/InstCombine/load.ll | 53 ++- test/Transforms/InstCombine/loadstore-metadata.ll | 39 +- test/Transforms/InstCombine/malloc-free-delete.ll | 27 +- test/Transforms/InstCombine/max-of-nots.ll | 68 +++ test/Transforms/InstCombine/mem-gep-zidx.ll | 48 ++ test/Transforms/InstCombine/memcpy_chk-1.ll | 49 +- test/Transforms/InstCombine/memmove_chk-1.ll | 36 +- test/Transforms/InstCombine/memset_chk-1.ll | 45 +- test/Transforms/InstCombine/minnum.ll | 18 +- test/Transforms/InstCombine/mul.ll | 91 ++++ test/Transforms/InstCombine/narrow-switch.ll | 30 ++ test/Transforms/InstCombine/not-fcmp.ll | 7 +- test/Transforms/InstCombine/not.ll | 8 +- test/Transforms/InstCombine/or-xor.ll | 36 +- test/Transforms/InstCombine/or.ll | 10 + test/Transforms/InstCombine/pr12251.ll | 2 +- test/Transforms/InstCombine/pr12338.ll | 2 +- test/Transforms/InstCombine/pr21199.ll | 25 + test/Transforms/InstCombine/pr21210.ll | 50 ++ test/Transforms/InstCombine/pr21651.ll | 20 + test/Transforms/InstCombine/pr21891.ll | 18 + test/Transforms/InstCombine/range-check.ll | 159 +++++++ test/Transforms/InstCombine/select-cmp-br.ll | 155 +++++++ .../Transforms/InstCombine/select-cmp-cttz-ctlz.ll | 327 ++++++++++++++ test/Transforms/InstCombine/select.ll | 257 ++++++++--- test/Transforms/InstCombine/shift.ll | 58 +-- test/Transforms/InstCombine/signext.ll | 27 +- test/Transforms/InstCombine/sitofp.ll | 169 ++++++- test/Transforms/InstCombine/statepoint.ll | 52 +++ test/Transforms/InstCombine/store.ll | 10 +- test/Transforms/InstCombine/stpcpy_chk-1.ll | 55 ++- test/Transforms/InstCombine/strcpy_chk-1.ll | 59 ++- test/Transforms/InstCombine/strncpy_chk-1.ll | 45 +- test/Transforms/InstCombine/struct-assign-tbaa.ll | 20 +- test/Transforms/InstCombine/type_pun.ll | 137 ++++++ .../InstCombine/unordered-fcmp-select.ll | 125 +++++ test/Transforms/InstCombine/vec_demanded_elts.ll | 27 ++ test/Transforms/InstCombine/xor.ll | 86 +++- test/Transforms/InstMerge/st_sink_barrier_call.ll | 43 ++ test/Transforms/InstMerge/st_sink_bugfix_22613.ll | 106 +++++ .../InstMerge/st_sink_no_barrier_call.ll | 45 ++ .../InstMerge/st_sink_no_barrier_load.ll | 43 ++ .../InstMerge/st_sink_no_barrier_store.ll | 42 ++ test/Transforms/InstMerge/st_sink_two_stores.ll | 47 ++ test/Transforms/InstMerge/st_sink_with_barrier.ll | 42 ++ test/Transforms/InstSimplify/AndOrXor.ll | 55 +++ test/Transforms/InstSimplify/compare.ll | 64 +++ test/Transforms/InstSimplify/fast-math.ll | 9 + .../InstSimplify/floating-point-arithmetic.ll | 26 ++ .../InstSimplify/floating-point-compare.ll | 60 +++ test/Transforms/InstSimplify/load.ll | 19 + test/Transforms/InstSimplify/noalias-ptr.ll | 259 +++++++++++ test/Transforms/InstSimplify/select.ll | 161 +++++++ test/Transforms/InstSimplify/undef.ll | 105 +++++ test/Transforms/JumpThreading/conservative-lvi.ll | 58 +++ test/Transforms/JumpThreading/phi-eq.ll | 2 +- test/Transforms/JumpThreading/pr22086.ll | 28 ++ test/Transforms/JumpThreading/thread-loads.ll | 8 +- test/Transforms/LCSSA/indirectbr.ll | 40 +- test/Transforms/LCSSA/unreachable-use.ll | 4 +- .../LICM/2011-04-06-PromoteResultOfPromotion.ll | 14 +- test/Transforms/LICM/constexpr.ll | 46 ++ test/Transforms/LICM/debug-value.ll | 56 +-- test/Transforms/LICM/hoist-invariant-load.ll | 2 +- test/Transforms/LICM/preheader-safe.ll | 69 +++ test/Transforms/LICM/promote-order.ll | 10 +- test/Transforms/LICM/scalar_promote.ll | 12 +- test/Transforms/LICM/sinking.ll | 78 ++++ test/Transforms/LoopIdiom/debug-line.ll | 44 +- test/Transforms/LoopReroll/basic.ll | 254 +++++++++++ test/Transforms/LoopReroll/reduction.ll | 36 ++ test/Transforms/LoopRotate/crash.ll | 18 + test/Transforms/LoopRotate/dbgvalue.ll | 52 +-- test/Transforms/LoopRotate/pr22337.ll | 24 + .../LoopSimplify/2011-12-14-LandingpadHeader.ll | 2 +- .../LoopStrengthReduce/AArch64/lsr-memset.ll | 6 +- .../LoopStrengthReduce/ARM/ivchain-ARM.ll | 4 +- .../LoopStrengthReduce/X86/ivchain-X86.ll | 4 +- .../Transforms/LoopStrengthReduce/count-to-zero.ll | 2 +- test/Transforms/LoopStrengthReduce/pr12018.ll | 4 +- test/Transforms/LoopStrengthReduce/pr18165.ll | 18 +- test/Transforms/LoopStrengthReduce/uglygep.ll | 2 +- test/Transforms/LoopUnroll/PowerPC/p7-unrolling.ll | 99 ++++ .../LoopUnroll/full-unroll-heuristics.ll | 62 +++ .../LoopUnroll/partial-unroll-optsize.ll | 19 +- test/Transforms/LoopUnroll/runtime-loop.ll | 8 +- test/Transforms/LoopUnroll/runtime-loop1.ll | 2 +- test/Transforms/LoopUnroll/runtime-loop2.ll | 2 +- test/Transforms/LoopUnroll/tripcount-overflow.ll | 29 +- .../LoopUnroll/unroll-pragmas-disabled.ll | 42 +- test/Transforms/LoopUnroll/unroll-pragmas.ll | 26 +- .../AArch64/arbitrary-induction-step.ll | 150 ++++++ .../LoopVectorize/PowerPC/small-loop-rdx.ll | 47 ++ .../LoopVectorize/X86/already-vectorized.ll | 8 +- .../X86/illegal-parallel-loop-uniform-write.ll | 6 +- .../LoopVectorize/X86/masked_load_store.ll | 502 +++++++++++++++++++++ .../LoopVectorize/X86/metadata-enable.ll | 8 +- .../X86/parallel-loops-after-reg2mem.ll | 2 +- .../Transforms/LoopVectorize/X86/parallel-loops.ll | 10 +- test/Transforms/LoopVectorize/X86/small-size.ll | 2 +- .../Transforms/LoopVectorize/X86/vect.omp.force.ll | 6 +- .../LoopVectorize/X86/vect.omp.force.small-tc.ll | 6 +- .../LoopVectorize/X86/vector-scalar-select-cost.ll | 4 +- .../X86/vectorization-remarks-missed.ll | 74 +-- .../LoopVectorize/X86/vectorization-remarks.ll | 46 +- .../LoopVectorize/conditional-assignment.ll | 40 +- test/Transforms/LoopVectorize/control-flow.ll | 42 +- test/Transforms/LoopVectorize/dbg.value.ll | 50 +- test/Transforms/LoopVectorize/debugloc.ll | 60 +-- .../LoopVectorize/duplicated-metadata.ll | 6 +- test/Transforms/LoopVectorize/gcc-examples.ll | 3 +- .../LoopVectorize/if-conversion-edgemasks.ll | 5 +- test/Transforms/LoopVectorize/if-conversion.ll | 4 +- .../Transforms/LoopVectorize/incorrect-dom-info.ll | 2 +- test/Transforms/LoopVectorize/loop-form.ll | 31 ++ test/Transforms/LoopVectorize/loop-vect-memdep.ll | 26 ++ test/Transforms/LoopVectorize/metadata-unroll.ll | 4 +- test/Transforms/LoopVectorize/metadata-width.ll | 4 +- test/Transforms/LoopVectorize/metadata.ll | 20 +- test/Transforms/LoopVectorize/minmax_reduction.ll | 16 +- test/Transforms/LoopVectorize/no_array_bounds.ll | 54 +-- test/Transforms/LoopVectorize/no_switch.ll | 50 +- test/Transforms/LoopVectorize/reverse_induction.ll | 4 +- .../LoopVectorize/runtime-check-address-space.ll | 154 +++---- .../runtime-check-readonly-address-space.ll | 120 +++-- .../Transforms/LoopVectorize/scev-exitlim-crash.ll | 12 +- test/Transforms/LoopVectorize/tbaa-nodep.ll | 12 +- .../LoopVectorize/vect.omp.persistence.ll | 8 +- test/Transforms/LoopVectorize/vect.stats.ll | 58 ++- test/Transforms/LoopVectorize/vectorize-once.ll | 12 +- .../Transforms/LoopVectorize/version-mem-access.ll | 12 +- test/Transforms/LowerBitSets/constant.ll | 34 ++ test/Transforms/LowerBitSets/layout.ll | 35 ++ test/Transforms/LowerBitSets/simple.ll | 122 +++++ test/Transforms/LowerBitSets/single-offset.ll | 40 ++ test/Transforms/LowerExpectIntrinsic/basic.ll | 9 +- .../2014-06-11-SwitchDefaultUnreachableOpt.ll | 7 +- .../fold-popular-case-to-unreachable-default.ll | 110 +++++ test/Transforms/Mem2Reg/ConvertDebugInfo.ll | 38 +- test/Transforms/Mem2Reg/ConvertDebugInfo2.ll | 54 +-- test/Transforms/MemCpyOpt/callslot_aa.ll | 22 + test/Transforms/MemCpyOpt/form-memset.ll | 15 + .../MergeFunc/call-and-invoke-with-ranges.ll | 4 +- test/Transforms/MergeFunc/ranges.ll | 4 +- test/Transforms/ObjCARC/allocas.ll | 2 +- test/Transforms/ObjCARC/arc-annotations.ll | 12 +- test/Transforms/ObjCARC/basic.ll | 10 +- test/Transforms/ObjCARC/cfg-hazards.ll | 2 +- test/Transforms/ObjCARC/contract-marker.ll | 2 +- test/Transforms/ObjCARC/contract-storestrong.ll | 98 +++- test/Transforms/ObjCARC/contract-testcases.ll | 2 +- test/Transforms/ObjCARC/empty-block.ll | 2 +- ...ensure-that-exception-unwind-path-is-visited.ll | 126 +++--- test/Transforms/ObjCARC/escape.ll | 2 +- test/Transforms/ObjCARC/intrinsic-use.ll | 2 +- test/Transforms/ObjCARC/invoke.ll | 2 +- test/Transforms/ObjCARC/nested.ll | 2 +- test/Transforms/ObjCARC/path-overflow.ll | 2 +- test/Transforms/ObjCARC/retain-not-declared.ll | 2 +- test/Transforms/ObjCARC/split-backedge.ll | 2 +- test/Transforms/ObjCARC/weak-copies.ll | 2 +- test/Transforms/PlaceSafepoints/basic.ll | 94 ++++ test/Transforms/PlaceSafepoints/call-in-loop.ll | 31 ++ test/Transforms/PlaceSafepoints/finite-loops.ll | 80 ++++ test/Transforms/PlaceSafepoints/invokes.ll | 110 +++++ test/Transforms/PlaceSafepoints/split-backedge.ll | 46 ++ test/Transforms/PruneEH/2003-11-21-PHIUpdate.ll | 15 - test/Transforms/PruneEH/recursivetest.ll | 5 + test/Transforms/PruneEH/seh-nounwind.ll | 31 ++ test/Transforms/PruneEH/simpletest.ll | 4 + test/Transforms/Reassociate/crash2.ll | 25 + test/Transforms/Reassociate/min_int.ll | 13 + test/Transforms/RewriteStatepointsForGC/basics.ll | 88 ++++ test/Transforms/SLPVectorizer/X86/addsub.ll | 133 ++++++ test/Transforms/SLPVectorizer/X86/atomics.ll | 31 ++ test/Transforms/SLPVectorizer/X86/bad_types.ll | 50 ++ .../SLPVectorizer/X86/consecutive-access.ll | 2 +- test/Transforms/SLPVectorizer/X86/crash_cmpop.ll | 56 +++ .../SLPVectorizer/X86/crash_scheduling.ll | 4 +- test/Transforms/SLPVectorizer/X86/debug_info.ll | 74 +-- test/Transforms/SLPVectorizer/X86/metadata.ll | 16 +- test/Transforms/SLPVectorizer/X86/operandorder.ll | 110 +++++ test/Transforms/SLPVectorizer/X86/pr16899.ll | 12 +- test/Transforms/SROA/alignment.ll | 13 +- test/Transforms/SROA/basictest.ll | 155 +++++++ test/Transforms/SROA/vector-promotion.ll | 19 + test/Transforms/SampleProfile/branch.ll | 98 ++-- test/Transforms/SampleProfile/calls.ll | 52 +-- test/Transforms/SampleProfile/discriminator.ll | 44 +- test/Transforms/SampleProfile/fnptr.ll | 52 +-- test/Transforms/SampleProfile/propagate.ll | 86 ++-- test/Transforms/ScalarRepl/debuginfo-preserved.ll | 48 +- test/Transforms/Scalarizer/basic.ll | 12 +- test/Transforms/Scalarizer/dbginfo.ll | 66 +-- .../SimplifyCFG/2007-11-22-InvokeNoUnwind.ll | 4 + .../SimplifyCFG/2008-01-02-hoist-fp-add.ll | 16 +- test/Transforms/SimplifyCFG/AArch64/lit.local.cfg | 5 + test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll | 72 +++ test/Transforms/SimplifyCFG/PhiBlockMerge.ll | 4 +- .../SimplifyCFG/PowerPC/cttz-ctlz-spec.ll | 45 ++ test/Transforms/SimplifyCFG/PowerPC/lit.local.cfg | 2 + test/Transforms/SimplifyCFG/R600/cttz-ctlz.ll | 249 ++++++++++ test/Transforms/SimplifyCFG/R600/lit.local.cfg | 2 + test/Transforms/SimplifyCFG/SpeculativeExec.ll | 16 - .../Transforms/SimplifyCFG/UnreachableEliminate.ll | 26 -- .../SimplifyCFG/X86/speculate-cttz-ctlz.ll | 330 ++++++++++++++ .../SimplifyCFG/X86/switch_to_lookup_table.ll | 211 ++++++++- test/Transforms/SimplifyCFG/basictest.ll | 7 +- test/Transforms/SimplifyCFG/branch-fold-dbg.ll | 34 +- test/Transforms/SimplifyCFG/clamp.ll | 22 + test/Transforms/SimplifyCFG/hoist-dbgvalue.ll | 52 +-- test/Transforms/SimplifyCFG/hoist-with-range.ll | 6 +- .../SimplifyCFG/preserve-branchweights-partial.ll | 2 +- .../preserve-branchweights-switch-create.ll | 18 +- .../SimplifyCFG/preserve-branchweights.ll | 48 +- test/Transforms/SimplifyCFG/seh-nounwind.ll | 31 ++ test/Transforms/SimplifyCFG/select-gep.ll | 23 +- test/Transforms/SimplifyCFG/sink-common-code.ll | 34 +- .../Transforms/SimplifyCFG/switch-range-to-icmp.ll | 77 ++++ test/Transforms/SimplifyCFG/switch-to-br.ll | 64 +++ .../SimplifyCFG/switch-to-select-two-case.ll | 35 -- test/Transforms/SimplifyCFG/trap-debugloc.ll | 22 +- test/Transforms/SimplifyCFG/trivial-throw.ll | 77 ---- test/Transforms/SimplifyCFG/volatile-phioper.ll | 2 +- test/Transforms/StraightLineStrengthReduce/slsr.ll | 119 +++++ .../StripSymbols/2010-06-30-StripDebug.ll | 30 +- test/Transforms/StripSymbols/2010-08-25-crash.ll | 30 +- .../StripSymbols/strip-dead-debug-info.ll | 54 +-- .../Transforms/StructurizeCFG/nested-loop-order.ll | 79 ++++ .../StructurizeCFG/one-loop-multiple-backedges.ll | 42 ++ .../StructurizeCFG/post-order-traversal-bug.ll | 100 ++++ .../Util/combine-alias-scope-metadata.ll | 24 + test/Transforms/Util/lowerswitch.ll | 36 +- 358 files changed, 14814 insertions(+), 2775 deletions(-) create mode 100644 test/Transforms/BDCE/basic.ll create mode 100644 test/Transforms/BDCE/dce-pure.ll create mode 100644 test/Transforms/BDCE/order.ll create mode 100644 test/Transforms/CodeGenPrepare/statepoint-relocate.ll create mode 100644 test/Transforms/ConstProp/InsertElement.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/icmp.ll create mode 100644 test/Transforms/DeadArgElim/aggregates.ll delete mode 100644 test/Transforms/DebugIR/crash.ll delete mode 100644 test/Transforms/DebugIR/exception.ll delete mode 100644 test/Transforms/DebugIR/function.ll delete mode 100644 test/Transforms/DebugIR/simple-addrspace.ll delete mode 100644 test/Transforms/DebugIR/simple.ll delete mode 100644 test/Transforms/DebugIR/struct.ll delete mode 100644 test/Transforms/DebugIR/vector.ll create mode 100644 test/Transforms/EarlyCSE/AArch64/intrinsics.ll create mode 100644 test/Transforms/EarlyCSE/AArch64/lit.local.cfg create mode 100644 test/Transforms/GCOVProfiling/return-block.ll create mode 100644 test/Transforms/GVN/load-from-unreachable-predecessor.ll create mode 100644 test/Transforms/GVN/pre-gep-load.ll create mode 100644 test/Transforms/GVN/pre-no-cost-phi.ll create mode 100644 test/Transforms/GVN/volatile.ll create mode 100644 test/Transforms/IRCE/bug-mismatched-types.ll create mode 100644 test/Transforms/IRCE/decrementing-loop.ll create mode 100644 test/Transforms/IRCE/low-becount.ll create mode 100644 test/Transforms/IRCE/multiple-access-no-preloop.ll create mode 100644 test/Transforms/IRCE/not-likely-taken.ll create mode 100644 test/Transforms/IRCE/single-access-no-preloop.ll create mode 100644 test/Transforms/IRCE/single-access-with-preloop.ll create mode 100644 test/Transforms/IRCE/unhandled.ll create mode 100644 test/Transforms/IRCE/with-parent-loops.ll create mode 100644 test/Transforms/IndVarSimplify/backedge-on-min-max.ll create mode 100644 test/Transforms/IndVarSimplify/pr22222.ll create mode 100644 test/Transforms/IndVarSimplify/strengthen-overflow.ll create mode 100644 test/Transforms/Inline/alloca-dbgdeclare.ll create mode 100644 test/Transforms/Inline/debug-info-duplicate-calls.ll create mode 100644 test/Transforms/Inline/inline-fast-math-flags.ll create mode 100644 test/Transforms/Inline/inline-fp.ll create mode 100644 test/Transforms/Inline/inline-indirect.ll create mode 100644 test/Transforms/Inline/inline_dbg_declare.ll create mode 100644 test/Transforms/InstCombine/alias-recursion.ll create mode 100644 test/Transforms/InstCombine/aligned-altivec.ll create mode 100644 test/Transforms/InstCombine/aligned-qpx.ll create mode 100644 test/Transforms/InstCombine/cast-int-fcmp-eq-0.ll create mode 100644 test/Transforms/InstCombine/gc.relocate.ll create mode 100644 test/Transforms/InstCombine/gep-sext.ll create mode 100644 test/Transforms/InstCombine/max-of-nots.ll create mode 100644 test/Transforms/InstCombine/mem-gep-zidx.ll create mode 100644 test/Transforms/InstCombine/pr21199.ll create mode 100644 test/Transforms/InstCombine/pr21210.ll create mode 100644 test/Transforms/InstCombine/pr21651.ll create mode 100644 test/Transforms/InstCombine/pr21891.ll create mode 100644 test/Transforms/InstCombine/range-check.ll create mode 100644 test/Transforms/InstCombine/select-cmp-br.ll create mode 100644 test/Transforms/InstCombine/select-cmp-cttz-ctlz.ll create mode 100644 test/Transforms/InstCombine/statepoint.ll create mode 100644 test/Transforms/InstCombine/type_pun.ll create mode 100644 test/Transforms/InstCombine/unordered-fcmp-select.ll create mode 100644 test/Transforms/InstMerge/st_sink_barrier_call.ll create mode 100644 test/Transforms/InstMerge/st_sink_bugfix_22613.ll create mode 100644 test/Transforms/InstMerge/st_sink_no_barrier_call.ll create mode 100644 test/Transforms/InstMerge/st_sink_no_barrier_load.ll create mode 100644 test/Transforms/InstMerge/st_sink_no_barrier_store.ll create mode 100644 test/Transforms/InstMerge/st_sink_two_stores.ll create mode 100644 test/Transforms/InstMerge/st_sink_with_barrier.ll create mode 100644 test/Transforms/InstSimplify/floating-point-compare.ll create mode 100644 test/Transforms/InstSimplify/load.ll create mode 100644 test/Transforms/InstSimplify/noalias-ptr.ll create mode 100644 test/Transforms/InstSimplify/select.ll create mode 100644 test/Transforms/JumpThreading/conservative-lvi.ll create mode 100644 test/Transforms/JumpThreading/pr22086.ll create mode 100644 test/Transforms/LICM/constexpr.ll create mode 100644 test/Transforms/LICM/preheader-safe.ll create mode 100644 test/Transforms/LoopRotate/pr22337.ll create mode 100644 test/Transforms/LoopUnroll/PowerPC/p7-unrolling.ll create mode 100644 test/Transforms/LoopUnroll/full-unroll-heuristics.ll create mode 100644 test/Transforms/LoopVectorize/AArch64/arbitrary-induction-step.ll create mode 100644 test/Transforms/LoopVectorize/PowerPC/small-loop-rdx.ll create mode 100644 test/Transforms/LoopVectorize/X86/masked_load_store.ll create mode 100644 test/Transforms/LoopVectorize/loop-form.ll create mode 100644 test/Transforms/LoopVectorize/loop-vect-memdep.ll create mode 100644 test/Transforms/LowerBitSets/constant.ll create mode 100644 test/Transforms/LowerBitSets/layout.ll create mode 100644 test/Transforms/LowerBitSets/simple.ll create mode 100644 test/Transforms/LowerBitSets/single-offset.ll create mode 100644 test/Transforms/LowerSwitch/fold-popular-case-to-unreachable-default.ll create mode 100644 test/Transforms/MemCpyOpt/callslot_aa.ll create mode 100644 test/Transforms/PlaceSafepoints/basic.ll create mode 100644 test/Transforms/PlaceSafepoints/call-in-loop.ll create mode 100644 test/Transforms/PlaceSafepoints/finite-loops.ll create mode 100644 test/Transforms/PlaceSafepoints/invokes.ll create mode 100644 test/Transforms/PlaceSafepoints/split-backedge.ll delete mode 100644 test/Transforms/PruneEH/2003-11-21-PHIUpdate.ll create mode 100644 test/Transforms/PruneEH/seh-nounwind.ll create mode 100644 test/Transforms/Reassociate/crash2.ll create mode 100644 test/Transforms/Reassociate/min_int.ll create mode 100644 test/Transforms/RewriteStatepointsForGC/basics.ll create mode 100644 test/Transforms/SLPVectorizer/X86/atomics.ll create mode 100644 test/Transforms/SLPVectorizer/X86/bad_types.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_cmpop.ll create mode 100644 test/Transforms/SimplifyCFG/AArch64/lit.local.cfg create mode 100644 test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll create mode 100644 test/Transforms/SimplifyCFG/PowerPC/cttz-ctlz-spec.ll create mode 100644 test/Transforms/SimplifyCFG/PowerPC/lit.local.cfg create mode 100644 test/Transforms/SimplifyCFG/R600/cttz-ctlz.ll create mode 100644 test/Transforms/SimplifyCFG/R600/lit.local.cfg create mode 100644 test/Transforms/SimplifyCFG/X86/speculate-cttz-ctlz.ll create mode 100644 test/Transforms/SimplifyCFG/clamp.ll create mode 100644 test/Transforms/SimplifyCFG/seh-nounwind.ll create mode 100644 test/Transforms/SimplifyCFG/switch-range-to-icmp.ll create mode 100644 test/Transforms/SimplifyCFG/switch-to-br.ll delete mode 100644 test/Transforms/SimplifyCFG/trivial-throw.ll create mode 100644 test/Transforms/StraightLineStrengthReduce/slsr.ll create mode 100644 test/Transforms/StructurizeCFG/nested-loop-order.ll create mode 100644 test/Transforms/StructurizeCFG/one-loop-multiple-backedges.ll create mode 100644 test/Transforms/StructurizeCFG/post-order-traversal-bug.ll create mode 100644 test/Transforms/Util/combine-alias-scope-metadata.ll (limited to 'test/Transforms') diff --git a/test/Transforms/AddDiscriminators/basic.ll b/test/Transforms/AddDiscriminators/basic.ll index 6c1e532..7c8b3d3 100644 --- a/test/Transforms/AddDiscriminators/basic.ll +++ b/test/Transforms/AddDiscriminators/basic.ll @@ -40,20 +40,20 @@ attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointe !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = metadata !{metadata !"0x11\0012\00clang version 3.5 \000\00\000\00\000", metadata !1, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2} ; [ DW_TAG_compile_unit ] [basic.c] [DW_LANG_C99] -!1 = metadata !{metadata !"basic.c", metadata !"."} -!2 = metadata !{} -!3 = metadata !{metadata !4} -!4 = metadata !{metadata !"0x2e\00foo\00foo\00\001\000\001\000\006\00256\000\001", metadata !1, metadata !5, metadata !6, null, void (i32)* @foo, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] -!5 = metadata !{metadata !"0x29", metadata !1} ; [ DW_TAG_file_type ] [basic.c] -!6 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} -!8 = metadata !{i32 1, metadata !"Debug Info Version", i32 2} -!9 = metadata !{metadata !"clang version 3.5 "} -!10 = metadata !{i32 3, i32 0, metadata !11, null} -!11 = metadata !{metadata !"0xb\003\000\000", metadata !1, metadata !4} ; [ DW_TAG_lexical_block ] [basic.c] -!12 = metadata !{i32 4, i32 0, metadata !4, null} - -; CHECK: !12 = metadata !{i32 3, i32 0, metadata !13, null} -; CHECK: !13 = metadata !{metadata !"0xb\001", metadata !1, metadata !11} ; [ DW_TAG_lexical_block ] [./basic.c] -; CHECK: !14 = metadata !{i32 4, i32 0, metadata !4, null} +!0 = !{!"0x11\0012\00clang version 3.5 \000\00\000\00\000", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [basic.c] [DW_LANG_C99] +!1 = !{!"basic.c", !"."} +!2 = !{} +!3 = !{!4} +!4 = !{!"0x2e\00foo\00foo\00\001\000\001\000\006\00256\000\001", !1, !5, !6, null, void (i32)* @foo, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] +!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [basic.c] +!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = !{i32 2, !"Dwarf Version", i32 4} +!8 = !{i32 1, !"Debug Info Version", i32 2} +!9 = !{!"clang version 3.5 "} +!10 = !MDLocation(line: 3, scope: !11) +!11 = !{!"0xb\003\000\000", !1, !4} ; [ DW_TAG_lexical_block ] [basic.c] +!12 = !MDLocation(line: 4, scope: !4) + +; CHECK: !12 = !MDLocation(line: 3, scope: !13) +; CHECK: !13 = !{!"0xb\001", !1, !11} ; [ DW_TAG_lexical_block ] [./basic.c] +; CHECK: !14 = !MDLocation(line: 4, scope: !4) diff --git a/test/Transforms/AddDiscriminators/first-only.ll b/test/Transforms/AddDiscriminators/first-only.ll index e15a80a..153cfc8 100644 --- a/test/Transforms/AddDiscriminators/first-only.ll +++ b/test/Transforms/AddDiscriminators/first-only.ll @@ -50,33 +50,33 @@ attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointe !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = metadata !{metadata !"0x11\0012\00clang version 3.5 (trunk 199750) (llvm/trunk 199751)\000\00\000\00\000", metadata !1, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2} ; [ DW_TAG_compile_unit ] [first-only.c] [DW_LANG_C99] -!1 = metadata !{metadata !"first-only.c", metadata !"."} -!2 = metadata !{i32 0} -!3 = metadata !{metadata !4} -!4 = metadata !{metadata !"0x2e\00foo\00foo\00\001\000\001\000\006\00256\000\001", metadata !1, metadata !5, metadata !6, null, void (i32)* @foo, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] -!5 = metadata !{metadata !"0x29", metadata !1} ; [ DW_TAG_file_type ] [first-only.c] -!6 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} -!8 = metadata !{i32 1, metadata !"Debug Info Version", i32 2} -!9 = metadata !{metadata !"clang version 3.5 (trunk 199750) (llvm/trunk 199751)"} -!10 = metadata !{i32 3, i32 0, metadata !11, null} - -!11 = metadata !{metadata !"0xb\003\000\000", metadata !1, metadata !4} ; [ DW_TAG_lexical_block ] [first-only.c] -; CHECK: !11 = metadata !{metadata !"0xb\003\000\000", metadata !1, metadata !4} - -!12 = metadata !{i32 3, i32 0, metadata !13, null} - -!13 = metadata !{metadata !"0xb\003\000\001", metadata !1, metadata !11} ; [ DW_TAG_lexical_block ] [first-only.c] -; CHECK: !13 = metadata !{metadata !"0xb\001", metadata !1, metadata !14} ; [ DW_TAG_lexical_block ] [./first-only.c] - -!14 = metadata !{i32 4, i32 0, metadata !13, null} -; CHECK: !14 = metadata !{metadata !"0xb\003\000\001", metadata !1, metadata !11} - -!15 = metadata !{i32 5, i32 0, metadata !13, null} -; CHECK: !15 = metadata !{i32 4, i32 0, metadata !14, null} - -!16 = metadata !{i32 6, i32 0, metadata !4, null} -; CHECK: !16 = metadata !{i32 5, i32 0, metadata !14, null} -; CHECK: !17 = metadata !{i32 6, i32 0, metadata !4, null} +!0 = !{!"0x11\0012\00clang version 3.5 (trunk 199750) (llvm/trunk 199751)\000\00\000\00\000", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [first-only.c] [DW_LANG_C99] +!1 = !{!"first-only.c", !"."} +!2 = !{i32 0} +!3 = !{!4} +!4 = !{!"0x2e\00foo\00foo\00\001\000\001\000\006\00256\000\001", !1, !5, !6, null, void (i32)* @foo, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] +!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [first-only.c] +!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = !{i32 2, !"Dwarf Version", i32 4} +!8 = !{i32 1, !"Debug Info Version", i32 2} +!9 = !{!"clang version 3.5 (trunk 199750) (llvm/trunk 199751)"} +!10 = !MDLocation(line: 3, scope: !11) + +!11 = !{!"0xb\003\000\000", !1, !4} ; [ DW_TAG_lexical_block ] [first-only.c] +; CHECK: !11 = !{!"0xb\003\000\000", !1, !4} + +!12 = !MDLocation(line: 3, scope: !13) + +!13 = !{!"0xb\003\000\001", !1, !11} ; [ DW_TAG_lexical_block ] [first-only.c] +; CHECK: !13 = !{!"0xb\001", !1, !14} ; [ DW_TAG_lexical_block ] [./first-only.c] + +!14 = !MDLocation(line: 4, scope: !13) +; CHECK: !14 = !{!"0xb\003\000\001", !1, !11} + +!15 = !MDLocation(line: 5, scope: !13) +; CHECK: !15 = !MDLocation(line: 4, scope: !14) + +!16 = !MDLocation(line: 6, scope: !4) +; CHECK: !16 = !MDLocation(line: 5, scope: !14) +; CHECK: !17 = !MDLocation(line: 6, scope: !4) diff --git a/test/Transforms/AddDiscriminators/multiple.ll b/test/Transforms/AddDiscriminators/multiple.ll index 8418c9e..5e552a8 100644 --- a/test/Transforms/AddDiscriminators/multiple.ll +++ b/test/Transforms/AddDiscriminators/multiple.ll @@ -51,21 +51,21 @@ attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointe !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = metadata !{metadata !"0x11\0012\00clang version 3.5 (trunk 199750) (llvm/trunk 199751)\000\00\000\00\000", metadata !1, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2} ; [ DW_TAG_compile_unit ] [multiple.c] [DW_LANG_C99] -!1 = metadata !{metadata !"multiple.c", metadata !"."} -!2 = metadata !{i32 0} -!3 = metadata !{metadata !4} -!4 = metadata !{metadata !"0x2e\00foo\00foo\00\001\000\001\000\006\00256\000\001", metadata !1, metadata !5, metadata !6, null, void (i32)* @foo, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] -!5 = metadata !{metadata !"0x29", metadata !1} ; [ DW_TAG_file_type ] [multiple.c] -!6 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} -!8 = metadata !{i32 1, metadata !"Debug Info Version", i32 2} -!9 = metadata !{metadata !"clang version 3.5 (trunk 199750) (llvm/trunk 199751)"} -!10 = metadata !{i32 3, i32 0, metadata !11, null} -!11 = metadata !{metadata !"0xb\003\000\000", metadata !1, metadata !4} ; [ DW_TAG_lexical_block ] [multiple.c] -!12 = metadata !{i32 4, i32 0, metadata !4, null} +!0 = !{!"0x11\0012\00clang version 3.5 (trunk 199750) (llvm/trunk 199751)\000\00\000\00\000", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [multiple.c] [DW_LANG_C99] +!1 = !{!"multiple.c", !"."} +!2 = !{i32 0} +!3 = !{!4} +!4 = !{!"0x2e\00foo\00foo\00\001\000\001\000\006\00256\000\001", !1, !5, !6, null, void (i32)* @foo, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] +!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [multiple.c] +!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = !{i32 2, !"Dwarf Version", i32 4} +!8 = !{i32 1, !"Debug Info Version", i32 2} +!9 = !{!"clang version 3.5 (trunk 199750) (llvm/trunk 199751)"} +!10 = !MDLocation(line: 3, scope: !11) +!11 = !{!"0xb\003\000\000", !1, !4} ; [ DW_TAG_lexical_block ] [multiple.c] +!12 = !MDLocation(line: 4, scope: !4) -; CHECK: !12 = metadata !{i32 3, i32 0, metadata !13, null} -; CHECK: !13 = metadata !{metadata !"0xb\001", metadata !1, metadata !11} ; [ DW_TAG_lexical_block ] [./multiple.c] -; CHECK: !14 = metadata !{i32 3, i32 0, metadata !15, null} -; CHECK: !15 = metadata !{metadata !"0xb\002", metadata !1, metadata !11} ; [ DW_TAG_lexical_block ] [./multiple.c] +; CHECK: !12 = !MDLocation(line: 3, scope: !13) +; CHECK: !13 = !{!"0xb\001", !1, !11} ; [ DW_TAG_lexical_block ] [./multiple.c] +; CHECK: !14 = !MDLocation(line: 3, scope: !15) +; CHECK: !15 = !{!"0xb\002", !1, !11} ; [ DW_TAG_lexical_block ] [./multiple.c] diff --git a/test/Transforms/AddDiscriminators/no-discriminators.ll b/test/Transforms/AddDiscriminators/no-discriminators.ll index 66a2c4e..dd7faf0 100644 --- a/test/Transforms/AddDiscriminators/no-discriminators.ll +++ b/test/Transforms/AddDiscriminators/no-discriminators.ll @@ -17,7 +17,7 @@ entry: %retval = alloca i32, align 4 %i.addr = alloca i64, align 8 store i64 %i, i64* %i.addr, align 8 - call void @llvm.dbg.declare(metadata !{i64* %i.addr}, metadata !13, metadata !{}), !dbg !14 + call void @llvm.dbg.declare(metadata i64* %i.addr, metadata !13, metadata !{}), !dbg !14 %0 = load i64* %i.addr, align 8, !dbg !15 ; CHECK: %0 = load i64* %i.addr, align 8, !dbg !15 %cmp = icmp slt i64 %0, 5, !dbg !15 @@ -48,24 +48,24 @@ attributes #1 = { nounwind readnone } !llvm.module.flags = !{!10, !11} !llvm.ident = !{!12} -!0 = metadata !{metadata !"0x11\0012\00clang version 3.5.0 \000\00\000\00\001", metadata !1, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2} ; [ DW_TAG_compile_unit ] [./no-discriminators] [DW_LANG_C99] -!1 = metadata !{metadata !"no-discriminators", metadata !"."} -!2 = metadata !{} -!3 = metadata !{metadata !4} -!4 = metadata !{metadata !"0x2e\00foo\00foo\00\001\000\001\000\006\00256\000\001", metadata !1, metadata !5, metadata !6, null, i32 (i64)* @foo, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] -!5 = metadata !{metadata !"0x29", metadata !1} ; [ DW_TAG_file_type ] [./no-discriminators] -!6 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = metadata !{metadata !8, metadata !9} -!8 = metadata !{metadata !"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] -!9 = metadata !{metadata !"0x24\00long int\000\0064\0064\000\000\005", null, null} ; [ DW_TAG_base_type ] [long int] [line 0, size 64, align 64, offset 0, enc DW_ATE_signed] -!10 = metadata !{i32 2, metadata !"Dwarf Version", i32 2} -; CHECK: !10 = metadata !{i32 2, metadata !"Dwarf Version", i32 2} -!11 = metadata !{i32 1, metadata !"Debug Info Version", i32 2} -!12 = metadata !{metadata !"clang version 3.5.0 "} -!13 = metadata !{metadata !"0x101\00i\0016777217\000", metadata !4, metadata !5, metadata !9} ; [ DW_TAG_arg_variable ] [i] [line 1] -!14 = metadata !{i32 1, i32 0, metadata !4, null} -!15 = metadata !{i32 2, i32 0, metadata !16, null} -; CHECK: !15 = metadata !{i32 2, i32 0, metadata !16, null} -!16 = metadata !{metadata !"0xb\002\000\000", metadata !1, metadata !4} ; [ DW_TAG_lexical_block ] [./no-discriminators] -; CHECK: !16 = metadata !{metadata !"0xb\002\000\000", metadata !1, metadata !4} ; [ DW_TAG_lexical_block ] [./no-discriminators] -!17 = metadata !{i32 3, i32 0, metadata !4, null} +!0 = !{!"0x11\0012\00clang version 3.5.0 \000\00\000\00\001", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [./no-discriminators] [DW_LANG_C99] +!1 = !{!"no-discriminators", !"."} +!2 = !{} +!3 = !{!4} +!4 = !{!"0x2e\00foo\00foo\00\001\000\001\000\006\00256\000\001", !1, !5, !6, null, i32 (i64)* @foo, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] +!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [./no-discriminators] +!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = !{!8, !9} +!8 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] +!9 = !{!"0x24\00long int\000\0064\0064\000\000\005", null, null} ; [ DW_TAG_base_type ] [long int] [line 0, size 64, align 64, offset 0, enc DW_ATE_signed] +!10 = !{i32 2, !"Dwarf Version", i32 2} +; CHECK: !10 = !{i32 2, !"Dwarf Version", i32 2} +!11 = !{i32 1, !"Debug Info Version", i32 2} +!12 = !{!"clang version 3.5.0 "} +!13 = !{!"0x101\00i\0016777217\000", !4, !5, !9} ; [ DW_TAG_arg_variable ] [i] [line 1] +!14 = !MDLocation(line: 1, scope: !4) +!15 = !MDLocation(line: 2, scope: !16) +; CHECK: !15 = !MDLocation(line: 2, scope: !16) +!16 = !{!"0xb\002\000\000", !1, !4} ; [ DW_TAG_lexical_block ] [./no-discriminators] +; CHECK: !16 = !{!"0xb\002\000\000", !1, !4} ; [ DW_TAG_lexical_block ] [./no-discriminators] +!17 = !MDLocation(line: 3, scope: !4) diff --git a/test/Transforms/ArgumentPromotion/control-flow2.ll b/test/Transforms/ArgumentPromotion/control-flow2.ll index 2543218..db63584 100644 --- a/test/Transforms/ArgumentPromotion/control-flow2.ll +++ b/test/Transforms/ArgumentPromotion/control-flow2.ll @@ -1,5 +1,6 @@ -; RUN: opt < %s -argpromotion -S | \ -; RUN: grep "load i32\* %A" +; RUN: opt < %s -argpromotion -S | FileCheck %s + +; CHECK: load i32* %A target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define internal i32 @callee(i1 %C, i32* %P) { diff --git a/test/Transforms/ArgumentPromotion/dbg.ll b/test/Transforms/ArgumentPromotion/dbg.ll index d155750..65cf367 100644 --- a/test/Transforms/ArgumentPromotion/dbg.ll +++ b/test/Transforms/ArgumentPromotion/dbg.ll @@ -19,8 +19,8 @@ define void @caller(i32** %Y) { !llvm.module.flags = !{!0} !llvm.dbg.cu = !{!3} -!0 = metadata !{i32 2, metadata !"Debug Info Version", i32 2} -!1 = metadata !{i32 8, i32 0, metadata !2, null} -!2 = metadata !{metadata !"0x2e\00test\00test\00\003\001\001\000\006\00256\000\003", null, null, null, null, void (i32**)* @test, null, null, null} ; [ DW_TAG_subprogram ] -!3 = metadata !{metadata !"0x11\004\00clang version 3.5.0 \000\00\000\00\002", null, null, null, metadata !4, null, null} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/blaikie/dev/scratch/pr20038/reduce/] [DW_LANG_C_plus_plus] -!4 = metadata !{metadata !2} +!0 = !{i32 2, !"Debug Info Version", i32 2} +!1 = !MDLocation(line: 8, scope: !2) +!2 = !{!"0x2e\00test\00test\00\003\001\001\000\006\00256\000\003", null, null, null, null, void (i32**)* @test, null, null, null} ; [ DW_TAG_subprogram ] +!3 = !{!"0x11\004\00clang version 3.5.0 \000\00\000\00\002", null, null, null, !4, null, null} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/blaikie/dev/scratch/pr20038/reduce/] [DW_LANG_C_plus_plus] +!4 = !{!2} diff --git a/test/Transforms/ArgumentPromotion/reserve-tbaa.ll b/test/Transforms/ArgumentPromotion/reserve-tbaa.ll index 4688a83..db9d70d 100644 --- a/test/Transforms/ArgumentPromotion/reserve-tbaa.ll +++ b/test/Transforms/ArgumentPromotion/reserve-tbaa.ll @@ -37,16 +37,16 @@ entry: 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} +!1 = !{!2, !2, i64 0} +!2 = !{!"long", !3, i64 0} +!3 = !{!"omnipotent char", !4, i64 0} +!4 = !{!"Simple C/C++ TBAA"} +!5 = !{!6, !6, i64 0} +!6 = !{!"int", !3, i64 0} +!7 = !{!3, !3, i64 0} +!8 = !{!9, !9, i64 0} +!9 = !{!"any pointer", !3, i64 0} +; CHECK: ![[I32]] = !{![[I32_TYPE:[0-9]+]], ![[I32_TYPE]], i64 0} +; CHECK: ![[I32_TYPE]] = !{!"int", !{{.*}}, i64 0} +; CHECK: ![[LONG]] = !{![[LONG_TYPE:[0-9]+]], ![[LONG_TYPE]], i64 0} +; CHECK: ![[LONG_TYPE]] = !{!"long", !{{.*}}, i64 0} diff --git a/test/Transforms/BBVectorize/loop1.ll b/test/Transforms/BBVectorize/loop1.ll index ed7be15..ca36170 100644 --- a/test/Transforms/BBVectorize/loop1.ll +++ b/test/Transforms/BBVectorize/loop1.ll @@ -83,7 +83,7 @@ for.body: ; preds = %for.body, %entry ; CHECK-UNRL: %add12 = fadd <2 x double> %add7, %mul11 ; CHECK-UNRL: %4 = bitcast double* %arrayidx14 to <2 x double>* ; CHECK-UNRL: store <2 x double> %add12, <2 x double>* %4, align 8 -; CHECK-UNRL: %indvars.iv.next.1 = add i64 %indvars.iv, 2 +; CHECK-UNRL: %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2 ; CHECK-UNRL: %lftr.wideiv.1 = trunc i64 %indvars.iv.next.1 to i32 ; CHECK-UNRL: %exitcond.1 = icmp eq i32 %lftr.wideiv.1, 10 ; CHECK-UNRL: br i1 %exitcond.1, label %for.end, label %for.body diff --git a/test/Transforms/BBVectorize/metadata.ll b/test/Transforms/BBVectorize/metadata.ll index ac7297d..874fbb8 100644 --- a/test/Transforms/BBVectorize/metadata.ll +++ b/test/Transforms/BBVectorize/metadata.ll @@ -41,9 +41,9 @@ entry: ; CHECK: ret void } -!0 = metadata !{i64 0, i64 2} -!1 = metadata !{i64 3, i64 5} +!0 = !{i64 0, i64 2} +!1 = !{i64 3, i64 5} -!2 = metadata !{ float 5.0 } -!3 = metadata !{ float 2.5 } +!2 = !{ float 5.0 } +!3 = !{ float 2.5 } diff --git a/test/Transforms/BDCE/basic.ll b/test/Transforms/BDCE/basic.ll new file mode 100644 index 0000000..6e748c6 --- /dev/null +++ b/test/Transforms/BDCE/basic.ll @@ -0,0 +1,348 @@ +; RUN: opt -S -bdce -instsimplify < %s | FileCheck %s +; RUN: opt -S -instsimplify < %s | FileCheck %s -check-prefix=CHECK-IO +target datalayout = "E-m:e-i64:64-n32:64" +target triple = "powerpc64-unknown-linux-gnu" + +; Function Attrs: nounwind readnone +define signext i32 @bar(i32 signext %x) #0 { +entry: + %call = tail call signext i32 @foo(i32 signext 5) #0 + %and = and i32 %call, 4 + %or = or i32 %and, %x + %call1 = tail call signext i32 @foo(i32 signext 3) #0 + %and2 = and i32 %call1, 8 + %or3 = or i32 %or, %and2 + %call4 = tail call signext i32 @foo(i32 signext 2) #0 + %and5 = and i32 %call4, 16 + %or6 = or i32 %or3, %and5 + %call7 = tail call signext i32 @foo(i32 signext 1) #0 + %and8 = and i32 %call7, 32 + %or9 = or i32 %or6, %and8 + %call10 = tail call signext i32 @foo(i32 signext 0) #0 + %and11 = and i32 %call10, 64 + %or12 = or i32 %or9, %and11 + %call13 = tail call signext i32 @foo(i32 signext 4) #0 + %and14 = and i32 %call13, 128 + %or15 = or i32 %or12, %and14 + %shr = ashr i32 %or15, 4 + ret i32 %shr + +; CHECK-LABEL: @bar +; CHECK-NOT: tail call signext i32 @foo(i32 signext 5) +; CHECK-NOT: tail call signext i32 @foo(i32 signext 3) +; CHECK: tail call signext i32 @foo(i32 signext 2) +; CHECK: tail call signext i32 @foo(i32 signext 1) +; CHECK: tail call signext i32 @foo(i32 signext 0) +; CHECK: tail call signext i32 @foo(i32 signext 4) +; CHECK: ret i32 + +; Check that instsimplify is not doing this all on its own. +; CHECK-IO-LABEL: @bar +; CHECK-IO: tail call signext i32 @foo(i32 signext 5) +; CHECK-IO: tail call signext i32 @foo(i32 signext 3) +; CHECK-IO: tail call signext i32 @foo(i32 signext 2) +; CHECK-IO: tail call signext i32 @foo(i32 signext 1) +; CHECK-IO: tail call signext i32 @foo(i32 signext 0) +; CHECK-IO: tail call signext i32 @foo(i32 signext 4) +; CHECK-IO: ret i32 +} + +; Function Attrs: nounwind readnone +declare signext i32 @foo(i32 signext) #0 + +; Function Attrs: nounwind readnone +define signext i32 @far(i32 signext %x) #1 { +entry: + %call = tail call signext i32 @goo(i32 signext 5) #1 + %and = and i32 %call, 4 + %or = or i32 %and, %x + %call1 = tail call signext i32 @goo(i32 signext 3) #1 + %and2 = and i32 %call1, 8 + %or3 = or i32 %or, %and2 + %call4 = tail call signext i32 @goo(i32 signext 2) #1 + %and5 = and i32 %call4, 16 + %or6 = or i32 %or3, %and5 + %call7 = tail call signext i32 @goo(i32 signext 1) #1 + %and8 = and i32 %call7, 32 + %or9 = or i32 %or6, %and8 + %call10 = tail call signext i32 @goo(i32 signext 0) #1 + %and11 = and i32 %call10, 64 + %or12 = or i32 %or9, %and11 + %call13 = tail call signext i32 @goo(i32 signext 4) #1 + %and14 = and i32 %call13, 128 + %or15 = or i32 %or12, %and14 + %shr = ashr i32 %or15, 4 + ret i32 %shr + +; CHECK-LABEL: @far +; Calls to foo(5) and foo(3) are still there, but their results are not used. +; CHECK: tail call signext i32 @goo(i32 signext 5) +; CHECK-NEXT: tail call signext i32 @goo(i32 signext 3) +; CHECK-NEXT: tail call signext i32 @goo(i32 signext 2) +; CHECK: tail call signext i32 @goo(i32 signext 1) +; CHECK: tail call signext i32 @goo(i32 signext 0) +; CHECK: tail call signext i32 @goo(i32 signext 4) +; CHECK: ret i32 + +; Check that instsimplify is not doing this all on its own. +; CHECK-IO-LABEL: @far +; CHECK-IO: tail call signext i32 @goo(i32 signext 5) +; CHECK-IO: tail call signext i32 @goo(i32 signext 3) +; CHECK-IO: tail call signext i32 @goo(i32 signext 2) +; CHECK-IO: tail call signext i32 @goo(i32 signext 1) +; CHECK-IO: tail call signext i32 @goo(i32 signext 0) +; CHECK-IO: tail call signext i32 @goo(i32 signext 4) +; CHECK-IO: ret i32 +} + +declare signext i32 @goo(i32 signext) #1 + +; Function Attrs: nounwind readnone +define signext i32 @tar1(i32 signext %x) #0 { +entry: + %call = tail call signext i32 @foo(i32 signext 5) #0 + %and = and i32 %call, 33554432 + %or = or i32 %and, %x + %call1 = tail call signext i32 @foo(i32 signext 3) #0 + %and2 = and i32 %call1, 67108864 + %or3 = or i32 %or, %and2 + %call4 = tail call signext i32 @foo(i32 signext 2) #0 + %and5 = and i32 %call4, 16 + %or6 = or i32 %or3, %and5 + %call7 = tail call signext i32 @foo(i32 signext 1) #0 + %and8 = and i32 %call7, 32 + %or9 = or i32 %or6, %and8 + %call10 = tail call signext i32 @foo(i32 signext 0) #0 + %and11 = and i32 %call10, 64 + %or12 = or i32 %or9, %and11 + %call13 = tail call signext i32 @foo(i32 signext 4) #0 + %and14 = and i32 %call13, 128 + %or15 = or i32 %or12, %and14 + %bs = tail call i32 @llvm.bswap.i32(i32 %or15) #0 + %shr = ashr i32 %bs, 4 + ret i32 %shr + +; CHECK-LABEL: @tar1 +; CHECK-NOT: tail call signext i32 @foo(i32 signext 5) +; CHECK-NOT: tail call signext i32 @foo(i32 signext 3) +; CHECK: tail call signext i32 @foo(i32 signext 2) +; CHECK: tail call signext i32 @foo(i32 signext 1) +; CHECK: tail call signext i32 @foo(i32 signext 0) +; CHECK: tail call signext i32 @foo(i32 signext 4) +; CHECK: ret i32 +} + +; Function Attrs: nounwind readnone +declare i32 @llvm.bswap.i32(i32) #0 + +; Function Attrs: nounwind readnone +define signext i32 @tar2(i32 signext %x) #0 { +entry: + %call = tail call signext i32 @foo(i32 signext 5) #0 + %and = and i32 %call, 33554432 + %or = or i32 %and, %x + %call1 = tail call signext i32 @foo(i32 signext 3) #0 + %and2 = and i32 %call1, 67108864 + %or3 = or i32 %or, %and2 + %call4 = tail call signext i32 @foo(i32 signext 2) #0 + %and5 = and i32 %call4, 16 + %or6 = or i32 %or3, %and5 + %call7 = tail call signext i32 @foo(i32 signext 1) #0 + %and8 = and i32 %call7, 32 + %or9 = or i32 %or6, %and8 + %call10 = tail call signext i32 @foo(i32 signext 0) #0 + %and11 = and i32 %call10, 64 + %or12 = or i32 %or9, %and11 + %call13 = tail call signext i32 @foo(i32 signext 4) #0 + %and14 = and i32 %call13, 128 + %or15 = or i32 %or12, %and14 + %shl = shl i32 %or15, 10 + ret i32 %shl + +; CHECK-LABEL: @tar2 +; CHECK-NOT: tail call signext i32 @foo(i32 signext 5) +; CHECK-NOT: tail call signext i32 @foo(i32 signext 3) +; CHECK: tail call signext i32 @foo(i32 signext 2) +; CHECK: tail call signext i32 @foo(i32 signext 1) +; CHECK: tail call signext i32 @foo(i32 signext 0) +; CHECK: tail call signext i32 @foo(i32 signext 4) +; CHECK: ret i32 +} + +; Function Attrs: nounwind readnone +define signext i32 @tar3(i32 signext %x) #0 { +entry: + %call = tail call signext i32 @foo(i32 signext 5) #0 + %and = and i32 %call, 33554432 + %or = or i32 %and, %x + %call1 = tail call signext i32 @foo(i32 signext 3) #0 + %and2 = and i32 %call1, 67108864 + %or3 = or i32 %or, %and2 + %call4 = tail call signext i32 @foo(i32 signext 2) #0 + %and5 = and i32 %call4, 16 + %or6 = or i32 %or3, %and5 + %call7 = tail call signext i32 @foo(i32 signext 1) #0 + %and8 = and i32 %call7, 32 + %or9 = or i32 %or6, %and8 + %call10 = tail call signext i32 @foo(i32 signext 0) #0 + %and11 = and i32 %call10, 64 + %or12 = or i32 %or9, %and11 + %call13 = tail call signext i32 @foo(i32 signext 4) #0 + %and14 = and i32 %call13, 128 + %or15 = or i32 %or12, %and14 + %add = add i32 %or15, 5 + %shl = shl i32 %add, 10 + ret i32 %shl + +; CHECK-LABEL: @tar3 +; CHECK-NOT: tail call signext i32 @foo(i32 signext 5) +; CHECK-NOT: tail call signext i32 @foo(i32 signext 3) +; CHECK: tail call signext i32 @foo(i32 signext 2) +; CHECK: tail call signext i32 @foo(i32 signext 1) +; CHECK: tail call signext i32 @foo(i32 signext 0) +; CHECK: tail call signext i32 @foo(i32 signext 4) +; CHECK: ret i32 +} + +; Function Attrs: nounwind readnone +define signext i32 @tar4(i32 signext %x) #0 { +entry: + %call = tail call signext i32 @foo(i32 signext 5) #0 + %and = and i32 %call, 33554432 + %or = or i32 %and, %x + %call1 = tail call signext i32 @foo(i32 signext 3) #0 + %and2 = and i32 %call1, 67108864 + %or3 = or i32 %or, %and2 + %call4 = tail call signext i32 @foo(i32 signext 2) #0 + %and5 = and i32 %call4, 16 + %or6 = or i32 %or3, %and5 + %call7 = tail call signext i32 @foo(i32 signext 1) #0 + %and8 = and i32 %call7, 32 + %or9 = or i32 %or6, %and8 + %call10 = tail call signext i32 @foo(i32 signext 0) #0 + %and11 = and i32 %call10, 64 + %or12 = or i32 %or9, %and11 + %call13 = tail call signext i32 @foo(i32 signext 4) #0 + %and14 = and i32 %call13, 128 + %or15 = or i32 %or12, %and14 + %sub = sub i32 %or15, 5 + %shl = shl i32 %sub, 10 + ret i32 %shl + +; CHECK-LABEL: @tar4 +; CHECK-NOT: tail call signext i32 @foo(i32 signext 5) +; CHECK-NOT: tail call signext i32 @foo(i32 signext 3) +; CHECK: tail call signext i32 @foo(i32 signext 2) +; CHECK: tail call signext i32 @foo(i32 signext 1) +; CHECK: tail call signext i32 @foo(i32 signext 0) +; CHECK: tail call signext i32 @foo(i32 signext 4) +; CHECK: ret i32 +} + +; Function Attrs: nounwind readnone +define signext i32 @tar5(i32 signext %x) #0 { +entry: + %call = tail call signext i32 @foo(i32 signext 5) #0 + %and = and i32 %call, 33554432 + %or = or i32 %and, %x + %call1 = tail call signext i32 @foo(i32 signext 3) #0 + %and2 = and i32 %call1, 67108864 + %or3 = or i32 %or, %and2 + %call4 = tail call signext i32 @foo(i32 signext 2) #0 + %and5 = and i32 %call4, 16 + %or6 = or i32 %or3, %and5 + %call7 = tail call signext i32 @foo(i32 signext 1) #0 + %and8 = and i32 %call7, 32 + %or9 = or i32 %or6, %and8 + %call10 = tail call signext i32 @foo(i32 signext 0) #0 + %and11 = and i32 %call10, 64 + %or12 = or i32 %or9, %and11 + %call13 = tail call signext i32 @foo(i32 signext 4) #0 + %and14 = and i32 %call13, 128 + %or15 = or i32 %or12, %and14 + %xor = xor i32 %or15, 5 + %shl = shl i32 %xor, 10 + ret i32 %shl + +; CHECK-LABEL: @tar5 +; CHECK-NOT: tail call signext i32 @foo(i32 signext 5) +; CHECK-NOT: tail call signext i32 @foo(i32 signext 3) +; CHECK: tail call signext i32 @foo(i32 signext 2) +; CHECK: tail call signext i32 @foo(i32 signext 1) +; CHECK: tail call signext i32 @foo(i32 signext 0) +; CHECK: tail call signext i32 @foo(i32 signext 4) +; CHECK: ret i32 +} + +; Function Attrs: nounwind readnone +define signext i32 @tar7(i32 signext %x, i1 %b) #0 { +entry: + %call = tail call signext i32 @foo(i32 signext 5) #0 + %and = and i32 %call, 33554432 + %or = or i32 %and, %x + %call1 = tail call signext i32 @foo(i32 signext 3) #0 + %and2 = and i32 %call1, 67108864 + %or3 = or i32 %or, %and2 + %call4 = tail call signext i32 @foo(i32 signext 2) #0 + %and5 = and i32 %call4, 16 + %or6 = or i32 %or3, %and5 + %call7 = tail call signext i32 @foo(i32 signext 1) #0 + %and8 = and i32 %call7, 32 + %or9 = or i32 %or6, %and8 + %call10 = tail call signext i32 @foo(i32 signext 0) #0 + %and11 = and i32 %call10, 64 + %or12 = or i32 %or9, %and11 + %call13 = tail call signext i32 @foo(i32 signext 4) #0 + %and14 = and i32 %call13, 128 + %or15 = or i32 %or12, %and14 + %v = select i1 %b, i32 %or15, i32 5 + %shl = shl i32 %v, 10 + ret i32 %shl + +; CHECK-LABEL: @tar7 +; CHECK-NOT: tail call signext i32 @foo(i32 signext 5) +; CHECK-NOT: tail call signext i32 @foo(i32 signext 3) +; CHECK: tail call signext i32 @foo(i32 signext 2) +; CHECK: tail call signext i32 @foo(i32 signext 1) +; CHECK: tail call signext i32 @foo(i32 signext 0) +; CHECK: tail call signext i32 @foo(i32 signext 4) +; CHECK: ret i32 +} + +; Function Attrs: nounwind readnone +define signext i16 @tar8(i32 signext %x) #0 { +entry: + %call = tail call signext i32 @foo(i32 signext 5) #0 + %and = and i32 %call, 33554432 + %or = or i32 %and, %x + %call1 = tail call signext i32 @foo(i32 signext 3) #0 + %and2 = and i32 %call1, 67108864 + %or3 = or i32 %or, %and2 + %call4 = tail call signext i32 @foo(i32 signext 2) #0 + %and5 = and i32 %call4, 16 + %or6 = or i32 %or3, %and5 + %call7 = tail call signext i32 @foo(i32 signext 1) #0 + %and8 = and i32 %call7, 32 + %or9 = or i32 %or6, %and8 + %call10 = tail call signext i32 @foo(i32 signext 0) #0 + %and11 = and i32 %call10, 64 + %or12 = or i32 %or9, %and11 + %call13 = tail call signext i32 @foo(i32 signext 4) #0 + %and14 = and i32 %call13, 128 + %or15 = or i32 %or12, %and14 + %tr = trunc i32 %or15 to i16 + ret i16 %tr + +; CHECK-LABEL: @tar8 +; CHECK-NOT: tail call signext i32 @foo(i32 signext 5) +; CHECK-NOT: tail call signext i32 @foo(i32 signext 3) +; CHECK: tail call signext i32 @foo(i32 signext 2) +; CHECK: tail call signext i32 @foo(i32 signext 1) +; CHECK: tail call signext i32 @foo(i32 signext 0) +; CHECK: tail call signext i32 @foo(i32 signext 4) +; CHECK: ret i16 +} + +attributes #0 = { nounwind readnone } +attributes #1 = { nounwind } + diff --git a/test/Transforms/BDCE/dce-pure.ll b/test/Transforms/BDCE/dce-pure.ll new file mode 100644 index 0000000..6a432fc --- /dev/null +++ b/test/Transforms/BDCE/dce-pure.ll @@ -0,0 +1,33 @@ +; RUN: opt -bdce -S < %s | FileCheck %s + +declare i32 @strlen(i8*) readonly nounwind + +define void @test1() { + call i32 @strlen( i8* null ) + ret void + +; CHECK-LABEL: @test1 +; CHECK-NOT: call +; CHECK: ret void +} + +define i32 @test2() { + ; invoke of pure function should not be deleted! + invoke i32 @strlen( i8* null ) readnone + to label %Cont unwind label %Other + +Cont: ; preds = %0 + ret i32 0 + +Other: ; preds = %0 + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup + ret i32 1 + +; CHECK-LABEL: @test2 +; CHECK: invoke +; CHECK: ret i32 1 +} + +declare i32 @__gxx_personality_v0(...) + diff --git a/test/Transforms/BDCE/order.ll b/test/Transforms/BDCE/order.ll new file mode 100644 index 0000000..301f447 --- /dev/null +++ b/test/Transforms/BDCE/order.ll @@ -0,0 +1,37 @@ +; RUN: opt -bdce -S < %s | FileCheck %s +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +declare i32 @__gxx_personality_v0(...) + +define fastcc void @_ZN11__sanitizerL12TestRegistryEPNS_14ThreadRegistryEb() #0 { +entry: + br i1 undef, label %if.else, label %entry.if.end_crit_edge + +if.else: + ret void + +invoke.cont70: + store i32 %call71, i32* undef, align 4 + br label %if.else + +; CHECK-LABEL: @_ZN11__sanitizerL12TestRegistryEPNS_14ThreadRegistryEb +; CHECK: store i32 %call71 + +lpad65.loopexit.split-lp.loopexit.split-lp: + br label %if.else + +lpad65.loopexit.split-lp.loopexit.split-lp.loopexit: + %lpad.loopexit1121 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + cleanup + br label %lpad65.loopexit.split-lp.loopexit.split-lp + +entry.if.end_crit_edge: + %call71 = invoke i32 @_ZN11__sanitizer14ThreadRegistry12CreateThreadEmbjPv() + to label %invoke.cont70 unwind label %lpad65.loopexit.split-lp.loopexit.split-lp.loopexit +} + +declare i32 @_ZN11__sanitizer14ThreadRegistry12CreateThreadEmbjPv() + +attributes #0 = { uwtable } + diff --git a/test/Transforms/CodeGenPrepare/statepoint-relocate.ll b/test/Transforms/CodeGenPrepare/statepoint-relocate.ll new file mode 100644 index 0000000..cf411bc --- /dev/null +++ b/test/Transforms/CodeGenPrepare/statepoint-relocate.ll @@ -0,0 +1,88 @@ +; RUN: opt -codegenprepare -S < %s | FileCheck %s + +target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +declare zeroext i1 @return_i1() + +define i32 @test_sor_basic(i32* %base) { +; CHECK: getelementptr i32* %base, i32 15 +; CHECK: getelementptr i32* %base-new, i32 15 +entry: + %ptr = getelementptr i32* %base, i32 15 + %tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, i32* %base, i32* %ptr) + %base-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 4) + %ptr-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 5) + %ret = load i32* %ptr-new + ret i32 %ret +} + +define i32 @test_sor_two_derived(i32* %base) { +; CHECK: getelementptr i32* %base, i32 15 +; CHECK: getelementptr i32* %base, i32 12 +; CHECK: getelementptr i32* %base-new, i32 15 +; CHECK: getelementptr i32* %base-new, i32 12 +entry: + %ptr = getelementptr i32* %base, i32 15 + %ptr2 = getelementptr i32* %base, i32 12 + %tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, i32* %base, i32* %ptr, i32* %ptr2) + %base-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 4) + %ptr-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 5) + %ptr2-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 6) + %ret = load i32* %ptr-new + ret i32 %ret +} + +define i32 @test_sor_ooo(i32* %base) { +; CHECK: getelementptr i32* %base, i32 15 +; CHECK: getelementptr i32* %base-new, i32 15 +entry: + %ptr = getelementptr i32* %base, i32 15 + %tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, i32* %base, i32* %ptr) + %ptr-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 5) + %base-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 4) + %ret = load i32* %ptr-new + ret i32 %ret +} + +define i32 @test_sor_gep_smallint([3 x i32]* %base) { +; CHECK: getelementptr [3 x i32]* %base, i32 0, i32 2 +; CHECK: getelementptr [3 x i32]* %base-new, i32 0, i32 2 +entry: + %ptr = getelementptr [3 x i32]* %base, i32 0, i32 2 + %tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, [3 x i32]* %base, i32* %ptr) + %base-new = call [3 x i32]* @llvm.experimental.gc.relocate.p0a3i32(i32 %tok, i32 4, i32 4) + %ptr-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 5) + %ret = load i32* %ptr-new + ret i32 %ret +} + +define i32 @test_sor_gep_largeint([3 x i32]* %base) { +; CHECK: getelementptr [3 x i32]* %base, i32 0, i32 21 +; CHECK-NOT: getelementptr [3 x i32]* %base-new, i32 0, i32 21 +entry: + %ptr = getelementptr [3 x i32]* %base, i32 0, i32 21 + %tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, [3 x i32]* %base, i32* %ptr) + %base-new = call [3 x i32]* @llvm.experimental.gc.relocate.p0a3i32(i32 %tok, i32 4, i32 4) + %ptr-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 5) + %ret = load i32* %ptr-new + ret i32 %ret +} + +define i32 @test_sor_noop(i32* %base) { +; CHECK: getelementptr i32* %base, i32 15 +; CHECK: call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 5) +; CHECK: call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 6) +entry: + %ptr = getelementptr i32* %base, i32 15 + %ptr2 = getelementptr i32* %base, i32 12 + %tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, i32* %base, i32* %ptr, i32* %ptr2) + %ptr-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 5) + %ptr2-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 6) + %ret = load i32* %ptr-new + ret i32 %ret +} + +declare i32 @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()*, i32, i32, ...) +declare i32* @llvm.experimental.gc.relocate.p0i32(i32, i32, i32) +declare [3 x i32]* @llvm.experimental.gc.relocate.p0a3i32(i32, i32, i32) diff --git a/test/Transforms/ConstProp/InsertElement.ll b/test/Transforms/ConstProp/InsertElement.ll new file mode 100644 index 0000000..d249c2e --- /dev/null +++ b/test/Transforms/ConstProp/InsertElement.ll @@ -0,0 +1,12 @@ +; RUN: opt < %s -constprop -S | FileCheck %s + +define i32 @test1() { + %A = bitcast i32 2139171423 to float + %B = insertelement <1 x float> undef, float %A, i32 0 + %C = extractelement <1 x float> %B, i32 0 + %D = bitcast float %C to i32 + ret i32 %D +; CHECK: @test1 +; CHECK: ret i32 2139171423 +} + diff --git a/test/Transforms/ConstProp/insertvalue.ll b/test/Transforms/ConstProp/insertvalue.ll index 0d288b3..dce2b72 100644 --- a/test/Transforms/ConstProp/insertvalue.ll +++ b/test/Transforms/ConstProp/insertvalue.ll @@ -65,3 +65,12 @@ define [3 x %struct] @undef-test3() { ; CHECK: ret [3 x %struct] [%struct undef, %struct { i32 0, [4 x i8] undef }, %struct undef] } +define i32 @test-float-Nan() { + %A = bitcast i32 2139171423 to float + %B = insertvalue [1 x float] undef, float %A, 0 + %C = extractvalue [1 x float] %B, 0 + %D = bitcast float %C to i32 + ret i32 %D +; CHECK: @test-float-Nan +; CHECK: ret i32 2139171423 +} diff --git a/test/Transforms/CorrelatedValuePropagation/icmp.ll b/test/Transforms/CorrelatedValuePropagation/icmp.ll new file mode 100644 index 0000000..c2863ff --- /dev/null +++ b/test/Transforms/CorrelatedValuePropagation/icmp.ll @@ -0,0 +1,63 @@ +; RUN: opt -correlated-propagation -S %s | FileCheck %s + +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.10.0" + +; Function Attrs: noreturn +declare void @check1(i1) #1 + +; Function Attrs: noreturn +declare void @check2(i1) #1 + +; Make sure we propagate the value of %tmp35 to the true/false cases +; CHECK-LABEL: @test1 +; CHECK: call void @check1(i1 false) +; CHECK: call void @check2(i1 true) +define void @test1(i64 %tmp35) { +bb: + %tmp36 = icmp sgt i64 %tmp35, 0 + br i1 %tmp36, label %bb_true, label %bb_false + +bb_true: + %tmp47 = icmp slt i64 %tmp35, 0 + tail call void @check1(i1 %tmp47) #4 + unreachable + +bb_false: + %tmp48 = icmp sle i64 %tmp35, 0 + tail call void @check2(i1 %tmp48) #4 + unreachable +} + +; Function Attrs: noreturn +; This is the same as test1 but with a diamond to ensure we +; get %tmp36 from both true and false BBs. +; CHECK-LABEL: @test2 +; CHECK: call void @check1(i1 false) +; CHECK: call void @check2(i1 true) +define void @test2(i64 %tmp35, i1 %inner_cmp) { +bb: + %tmp36 = icmp sgt i64 %tmp35, 0 + br i1 %tmp36, label %bb_true, label %bb_false + +bb_true: + br i1 %inner_cmp, label %inner_true, label %inner_false + +inner_true: + br label %merge + +inner_false: + br label %merge + +merge: + %tmp47 = icmp slt i64 %tmp35, 0 + tail call void @check1(i1 %tmp47) #0 + unreachable + +bb_false: + %tmp48 = icmp sle i64 %tmp35, 0 + tail call void @check2(i1 %tmp48) #4 + unreachable +} + +attributes #4 = { noreturn } diff --git a/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll b/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll index 077394f..dd283ae 100644 --- a/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll +++ b/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll @@ -4,10 +4,10 @@ define i8* @vfs_addname(i8* %name, i32 %len, i32 %hash, i32 %flags) nounwind ssp { entry: - call void @llvm.dbg.value(metadata !{i8* %name}, i64 0, metadata !0, metadata !{}) - call void @llvm.dbg.value(metadata !{i32 %len}, i64 0, metadata !10, metadata !{}) - call void @llvm.dbg.value(metadata !{i32 %hash}, i64 0, metadata !11, metadata !{}) - call void @llvm.dbg.value(metadata !{i32 %flags}, i64 0, metadata !12, metadata !{}) + call void @llvm.dbg.value(metadata i8* %name, i64 0, metadata !0, metadata !{}) + call void @llvm.dbg.value(metadata i32 %len, i64 0, metadata !10, metadata !{}) + call void @llvm.dbg.value(metadata i32 %hash, i64 0, metadata !11, metadata !{}) + call void @llvm.dbg.value(metadata i32 %flags, i64 0, metadata !12, metadata !{}) ; 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 @@ -17,11 +17,11 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone define internal fastcc i8* @add_name_internal(i8* %name, i32 %len, i32 %hash, i8 zeroext %extra, i32 %flags) noinline nounwind ssp { entry: - call void @llvm.dbg.value(metadata !{i8* %name}, i64 0, metadata !15, metadata !{}) - call void @llvm.dbg.value(metadata !{i32 %len}, i64 0, metadata !20, metadata !{}) - call void @llvm.dbg.value(metadata !{i32 %hash}, i64 0, metadata !21, metadata !{}) - call void @llvm.dbg.value(metadata !{i8 %extra}, i64 0, metadata !22, metadata !{}) - call void @llvm.dbg.value(metadata !{i32 %flags}, i64 0, metadata !23, metadata !{}) + call void @llvm.dbg.value(metadata i8* %name, i64 0, metadata !15, metadata !{}) + call void @llvm.dbg.value(metadata i32 %len, i64 0, metadata !20, metadata !{}) + call void @llvm.dbg.value(metadata i32 %hash, i64 0, metadata !21, metadata !{}) + call void @llvm.dbg.value(metadata i8 %extra, i64 0, metadata !22, metadata !{}) + call void @llvm.dbg.value(metadata i32 %flags, i64 0, metadata !23, metadata !{}) %0 = icmp eq i32 %hash, 0, !dbg !24 ; [#uses=1] br i1 %0, label %bb, label %bb1, !dbg !24 @@ -45,34 +45,34 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!30} -!0 = metadata !{metadata !"0x101\00name\008\000", metadata !1, metadata !2, metadata !6} ; [ DW_TAG_arg_variable ] -!1 = metadata !{metadata !"0x2e\00vfs_addname\00vfs_addname\00vfs_addname\0012\000\001\000\006\000\000\000", metadata !28, metadata !2, metadata !4, null, null, null, null, null} ; [ DW_TAG_subprogram ] -!2 = metadata !{metadata !"0x29", metadata !28} ; [ DW_TAG_file_type ] -!3 = metadata !{metadata !"0x11\001\004.2.1 (Based on Apple Inc. build 5658) (LLVM build 9999)\001\00\000\00\000", metadata !28, metadata !29, metadata !29, null, null, null} ; [ DW_TAG_compile_unit ] -!4 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", metadata !28, metadata !2, null, metadata !5, 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 !{metadata !"0xf\00\000\0064\0064\000\000", metadata !28, metadata !2, metadata !7} ; [ DW_TAG_pointer_type ] -!7 = metadata !{metadata !"0x26\00\000\008\008\000\000", metadata !28, metadata !2, metadata !8} ; [ DW_TAG_const_type ] -!8 = metadata !{metadata !"0x24\00char\000\008\008\000\000\006", metadata !28, metadata !2} ; [ DW_TAG_base_type ] -!9 = metadata !{metadata !"0x24\00unsigned int\000\0032\0032\000\000\007", metadata !28, metadata !2} ; [ DW_TAG_base_type ] -!10 = metadata !{metadata !"0x101\00len\009\000", metadata !1, metadata !2, metadata !9} ; [ DW_TAG_arg_variable ] -!11 = metadata !{metadata !"0x101\00hash\0010\000", metadata !1, metadata !2, metadata !9} ; [ DW_TAG_arg_variable ] -!12 = metadata !{metadata !"0x101\00flags\0011\000", metadata !1, metadata !2, metadata !9} ; [ DW_TAG_arg_variable ] -!13 = metadata !{i32 13, i32 0, metadata !14, null} -!14 = metadata !{metadata !"0xb\0012\000\000", metadata !28, metadata !1} ; [ DW_TAG_lexical_block ] -!15 = metadata !{metadata !"0x101\00name\0017\000", metadata !16, metadata !2, metadata !6} ; [ DW_TAG_arg_variable ] -!16 = metadata !{metadata !"0x2e\00add_name_internal\00add_name_internal\00add_name_internal\0022\001\001\000\006\000\000\000", metadata !28, metadata !2, metadata !17, null, null, null, null, null} ; [ DW_TAG_subprogram ] -!17 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", metadata !28, metadata !2, null, metadata !18, 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 !{metadata !"0x24\00unsigned char\000\008\008\000\000\008", metadata !28, metadata !2} ; [ DW_TAG_base_type ] -!20 = metadata !{metadata !"0x101\00len\0018\000", metadata !16, metadata !2, metadata !9} ; [ DW_TAG_arg_variable ] -!21 = metadata !{metadata !"0x101\00hash\0019\000", metadata !16, metadata !2, metadata !9} ; [ DW_TAG_arg_variable ] -!22 = metadata !{metadata !"0x101\00extra\0020\000", metadata !16, metadata !2, metadata !19} ; [ DW_TAG_arg_variable ] -!23 = metadata !{metadata !"0x101\00flags\0021\000", metadata !16, metadata !2, metadata !9} ; [ DW_TAG_arg_variable ] -!24 = metadata !{i32 23, i32 0, metadata !25, null} -!25 = metadata !{metadata !"0xb\0022\000\000", metadata !28, metadata !16} ; [ 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 2} +!0 = !{!"0x101\00name\008\000", !1, !2, !6} ; [ DW_TAG_arg_variable ] +!1 = !{!"0x2e\00vfs_addname\00vfs_addname\00vfs_addname\0012\000\001\000\006\000\000\000", !28, !2, !4, null, null, null, null, null} ; [ DW_TAG_subprogram ] +!2 = !{!"0x29", !28} ; [ DW_TAG_file_type ] +!3 = !{!"0x11\001\004.2.1 (Based on Apple Inc. build 5658) (LLVM build 9999)\001\00\000\00\000", !28, !29, !29, null, null, null} ; [ DW_TAG_compile_unit ] +!4 = !{!"0x15\00\000\000\000\000\000\000", !28, !2, null, !5, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!5 = !{!6, !6, !9, !9, !9} +!6 = !{!"0xf\00\000\0064\0064\000\000", !28, !2, !7} ; [ DW_TAG_pointer_type ] +!7 = !{!"0x26\00\000\008\008\000\000", !28, !2, !8} ; [ DW_TAG_const_type ] +!8 = !{!"0x24\00char\000\008\008\000\000\006", !28, !2} ; [ DW_TAG_base_type ] +!9 = !{!"0x24\00unsigned int\000\0032\0032\000\000\007", !28, !2} ; [ DW_TAG_base_type ] +!10 = !{!"0x101\00len\009\000", !1, !2, !9} ; [ DW_TAG_arg_variable ] +!11 = !{!"0x101\00hash\0010\000", !1, !2, !9} ; [ DW_TAG_arg_variable ] +!12 = !{!"0x101\00flags\0011\000", !1, !2, !9} ; [ DW_TAG_arg_variable ] +!13 = !MDLocation(line: 13, scope: !14) +!14 = !{!"0xb\0012\000\000", !28, !1} ; [ DW_TAG_lexical_block ] +!15 = !{!"0x101\00name\0017\000", !16, !2, !6} ; [ DW_TAG_arg_variable ] +!16 = !{!"0x2e\00add_name_internal\00add_name_internal\00add_name_internal\0022\001\001\000\006\000\000\000", !28, !2, !17, null, null, null, null, null} ; [ DW_TAG_subprogram ] +!17 = !{!"0x15\00\000\000\000\000\000\000", !28, !2, null, !18, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!18 = !{!6, !6, !9, !9, !19, !9} +!19 = !{!"0x24\00unsigned char\000\008\008\000\000\008", !28, !2} ; [ DW_TAG_base_type ] +!20 = !{!"0x101\00len\0018\000", !16, !2, !9} ; [ DW_TAG_arg_variable ] +!21 = !{!"0x101\00hash\0019\000", !16, !2, !9} ; [ DW_TAG_arg_variable ] +!22 = !{!"0x101\00extra\0020\000", !16, !2, !19} ; [ DW_TAG_arg_variable ] +!23 = !{!"0x101\00flags\0021\000", !16, !2, !9} ; [ DW_TAG_arg_variable ] +!24 = !MDLocation(line: 23, scope: !25) +!25 = !{!"0xb\0022\000\000", !28, !16} ; [ DW_TAG_lexical_block ] +!26 = !MDLocation(line: 24, scope: !25) +!27 = !MDLocation(line: 26, scope: !25) +!28 = !{!"tail.c", !"/Users/echeng/LLVM/radars/r7927803/"} +!29 = !{i32 0} +!30 = !{i32 1, !"Debug Info Version", i32 2} diff --git a/test/Transforms/DeadArgElim/aggregates.ll b/test/Transforms/DeadArgElim/aggregates.ll new file mode 100644 index 0000000..f54c6c9 --- /dev/null +++ b/test/Transforms/DeadArgElim/aggregates.ll @@ -0,0 +1,162 @@ +; RUN: opt -S -deadargelim %s | FileCheck %s + +; Case 0: the basic example: an entire aggregate use is returned, but it's +; actually only used in ways we can eliminate. We gain benefit from analysing +; the "use" and applying its results to all sub-values. + +; CHECK-LABEL: define internal void @agguse_dead() + +define internal { i32, i32 } @agguse_dead() { + ret { i32, i32 } { i32 0, i32 1 } +} + +define internal { i32, i32 } @test_agguse_dead() { + %val = call { i32, i32 } @agguse_dead() + ret { i32, i32 } %val +} + + + +; Case 1: an opaque use of the aggregate exists (in this case dead). Otherwise +; only one value is used, so function can be simplified. + +; CHECK-LABEL: define internal i32 @rets_independent_if_agguse_dead() +; CHECK: [[RET:%.*]] = extractvalue { i32, i32 } { i32 0, i32 1 }, 1 +; CHECK: ret i32 [[RET]] + +define internal { i32, i32 } @rets_independent_if_agguse_dead() { + ret { i32, i32 } { i32 0, i32 1 } +} + +define internal { i32, i32 } @test_rets_independent_if_agguse_dead(i1 %tst) { + %val = call { i32, i32 } @rets_independent_if_agguse_dead() + br i1 %tst, label %use_1, label %use_aggregate + +use_1: + ; This use can be classified as applying only to ret 1. + %val0 = extractvalue { i32, i32 } %val, 1 + call void @callee(i32 %val0) + ret { i32, i32 } undef + +use_aggregate: + ; This use is assumed to apply to both 0 and 1. + ret { i32, i32 } %val +} + +; Case 2: an opaque use of the aggregate exists (in this case *live*). Other +; uses shouldn't matter. + +; CHECK-LABEL: define internal { i32, i32 } @rets_live_agguse() +; CHECK: ret { i32, i32 } { i32 0, i32 1 } + +define internal { i32, i32 } @rets_live_agguse() { + ret { i32, i32} { i32 0, i32 1 } +} + +define { i32, i32 } @test_rets_live_aggues(i1 %tst) { + %val = call { i32, i32 } @rets_live_agguse() + br i1 %tst, label %use_1, label %use_aggregate + +use_1: + ; This use can be classified as applying only to ret 1. + %val0 = extractvalue { i32, i32 } %val, 1 + call void @callee(i32 %val0) + ret { i32, i32 } undef + +use_aggregate: + ; This use is assumed to apply to both 0 and 1. + ret { i32, i32 } %val +} + +declare void @callee(i32) + +; Case 3: the insertvalue meant %in was live if ret-slot-1 was, but we were only +; tracking multiple ret-slots for struct types. So %in was eliminated +; incorrectly. + +; CHECK-LABEL: define internal [2 x i32] @array_rets_have_multiple_slots(i32 %in) + +define internal [2 x i32] @array_rets_have_multiple_slots(i32 %in) { + %ret = insertvalue [2 x i32] undef, i32 %in, 1 + ret [2 x i32] %ret +} + +define [2 x i32] @test_array_rets_have_multiple_slots() { + %res = call [2 x i32] @array_rets_have_multiple_slots(i32 42) + ret [2 x i32] %res +} + +; Case 4: we can remove some retvals from the array. It's nice to produce an +; array again having done so (rather than converting it to a struct). + +; CHECK-LABEL: define internal [2 x i32] @can_shrink_arrays() +; CHECK: [[VAL0:%.*]] = extractvalue [3 x i32] [i32 42, i32 43, i32 44], 0 +; CHECK: [[RESTMP:%.*]] = insertvalue [2 x i32] undef, i32 [[VAL0]], 0 +; CHECK: [[VAL2:%.*]] = extractvalue [3 x i32] [i32 42, i32 43, i32 44], 2 +; CHECK: [[RES:%.*]] = insertvalue [2 x i32] [[RESTMP]], i32 [[VAL2]], 1 +; CHECK: ret [2 x i32] [[RES]] + +; CHECK-LABEL: define void @test_can_shrink_arrays() + +define internal [3 x i32] @can_shrink_arrays() { + ret [3 x i32] [i32 42, i32 43, i32 44] +} + +define void @test_can_shrink_arrays() { + %res = call [3 x i32] @can_shrink_arrays() + + %res.0 = extractvalue [3 x i32] %res, 0 + call void @callee(i32 %res.0) + + %res.2 = extractvalue [3 x i32] %res, 2 + call void @callee(i32 %res.2) + + ret void +} + +; Case 5: %in gets passed directly to the return. It should mark be marked as +; used if *any* of the return values are, not just if value 0 is. + +; CHECK-LABEL: define internal i32 @ret_applies_to_all({ i32, i32 } %in) +; CHECK: [[RET:%.*]] = extractvalue { i32, i32 } %in, 1 +; CHECK: ret i32 [[RET]] + +define internal {i32, i32} @ret_applies_to_all({i32, i32} %in) { + ret {i32, i32} %in +} + +define i32 @test_ret_applies_to_all() { + %val = call {i32, i32} @ret_applies_to_all({i32, i32} {i32 42, i32 43}) + %ret = extractvalue {i32, i32} %val, 1 + ret i32 %ret +} + +; Case 6: When considering @mid, the return instruciton has sub-value 0 +; unconditionally live, but 1 only conditionally live. Since at that level we're +; applying the results to the whole of %res, this means %res is live and cannot +; be reduced. There is scope for further optimisation here (though not visible +; in this test-case). + +; CHECK-LABEL: define internal { i8*, i32 } @inner() + +define internal {i8*, i32} @mid() { + %res = call {i8*, i32} @inner() + %intval = extractvalue {i8*, i32} %res, 1 + %tst = icmp eq i32 %intval, 42 + br i1 %tst, label %true, label %true + +true: + ret {i8*, i32} %res +} + +define internal {i8*, i32} @inner() { + ret {i8*, i32} {i8* null, i32 42} +} + +define internal i8 @outer() { + %res = call {i8*, i32} @mid() + %resptr = extractvalue {i8*, i32} %res, 0 + + %val = load i8* %resptr + ret i8 %val +} \ No newline at end of file diff --git a/test/Transforms/DeadArgElim/dbginfo.ll b/test/Transforms/DeadArgElim/dbginfo.ll index b457f01..5bbf821 100644 --- a/test/Transforms/DeadArgElim/dbginfo.ll +++ b/test/Transforms/DeadArgElim/dbginfo.ll @@ -29,7 +29,7 @@ entry: ; Function Attrs: nounwind uwtable define internal void @_ZL2f1iz(i32, ...) #1 { entry: - call void @llvm.dbg.value(metadata !{i32 %0}, i64 0, metadata !17, metadata !18), !dbg !19 + call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !17, metadata !18), !dbg !19 ret void, !dbg !20 } @@ -47,24 +47,24 @@ attributes #2 = { nounwind readnone } !llvm.module.flags = !{!12, !13} !llvm.ident = !{!14} -!0 = metadata !{metadata !"0x11\004\00clang version 3.6.0 \000\00\000\00\001", metadata !1, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2} ; [ DW_TAG_compile_unit ] [/tmp/dbginfo/dbg.cpp] [DW_LANG_C_plus_plus] -!1 = metadata !{metadata !"dbg.cpp", metadata !"/tmp/dbginfo"} -!2 = metadata !{} -!3 = metadata !{metadata !4, metadata !8} -!4 = metadata !{metadata !"0x2e\00f2\00f2\00_Z2f2v\004\000\001\000\000\00256\000\004", metadata !1, metadata !5, metadata !6, null, void ()* @_Z2f2v, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 4] [def] [f2] -!5 = metadata !{metadata !"0x29", metadata !1} ; [ DW_TAG_file_type ] [/tmp/dbginfo/dbg.cpp] -!6 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", null, null, null, metadata !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = metadata !{null} -!8 = metadata !{metadata !"0x2e\00f1\00f1\00_ZL2f1iz\001\001\001\000\000\00256\000\001", metadata !1, metadata !5, metadata !9, null, void (i32, ...)* @_ZL2f1iz, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 1] [local] [def] [f1] -!9 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", null, null, null, metadata !10, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!10 = metadata !{null, metadata !11, null} -!11 = metadata !{metadata !"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] -!12 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} -!13 = metadata !{i32 2, metadata !"Debug Info Version", i32 2} -!14 = metadata !{metadata !"clang version 3.6.0 "} -!15 = metadata !{i32 5, i32 3, metadata !4, null} -!16 = metadata !{i32 6, i32 1, metadata !4, null} -!17 = metadata !{metadata !"0x101\00\0016777217\000", metadata !8, metadata !5, metadata !11} ; [ DW_TAG_arg_variable ] [line 1] -!18 = metadata !{metadata !"0x102"} ; [ DW_TAG_expression ] -!19 = metadata !{i32 1, i32 19, metadata !8, null} -!20 = metadata !{i32 2, i32 1, metadata !8, null} +!0 = !{!"0x11\004\00clang version 3.6.0 \000\00\000\00\001", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [/tmp/dbginfo/dbg.cpp] [DW_LANG_C_plus_plus] +!1 = !{!"dbg.cpp", !"/tmp/dbginfo"} +!2 = !{} +!3 = !{!4, !8} +!4 = !{!"0x2e\00f2\00f2\00_Z2f2v\004\000\001\000\000\00256\000\004", !1, !5, !6, null, void ()* @_Z2f2v, null, null, !2} ; [ DW_TAG_subprogram ] [line 4] [def] [f2] +!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [/tmp/dbginfo/dbg.cpp] +!6 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = !{null} +!8 = !{!"0x2e\00f1\00f1\00_ZL2f1iz\001\001\001\000\000\00256\000\001", !1, !5, !9, null, void (i32, ...)* @_ZL2f1iz, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [local] [def] [f1] +!9 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !10, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!10 = !{null, !11, null} +!11 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] +!12 = !{i32 2, !"Dwarf Version", i32 4} +!13 = !{i32 2, !"Debug Info Version", i32 2} +!14 = !{!"clang version 3.6.0 "} +!15 = !MDLocation(line: 5, column: 3, scope: !4) +!16 = !MDLocation(line: 6, column: 1, scope: !4) +!17 = !{!"0x101\00\0016777217\000", !8, !5, !11} ; [ DW_TAG_arg_variable ] [line 1] +!18 = !{!"0x102"} ; [ DW_TAG_expression ] +!19 = !MDLocation(line: 1, column: 19, scope: !8) +!20 = !MDLocation(line: 2, column: 1, scope: !8) diff --git a/test/Transforms/DeadStoreElimination/2011-03-25-DSEMiscompile.ll b/test/Transforms/DeadStoreElimination/2011-03-25-DSEMiscompile.ll index 079eec4..39d5358 100644 --- a/test/Transforms/DeadStoreElimination/2011-03-25-DSEMiscompile.ll +++ b/test/Transforms/DeadStoreElimination/2011-03-25-DSEMiscompile.ll @@ -5,9 +5,9 @@ target triple = "i386-apple-darwin9.8" @A = external global [0 x i32] -declare cc10 void @Func2(i32*, i32*, i32*, i32) +declare ghccc void @Func2(i32*, i32*, i32*, i32) -define cc10 void @Func1(i32* noalias %Arg1, i32* noalias %Arg2, i32* %Arg3, i32 %Arg4) { +define ghccc void @Func1(i32* noalias %Arg1, i32* noalias %Arg2, i32* %Arg3, i32 %Arg4) { entry: store i32 add (i32 ptrtoint ([0 x i32]* @A to i32), i32 1), i32* %Arg2 ; CHECK: store i32 add (i32 ptrtoint ([0 x i32]* @A to i32), i32 1), i32* %Arg2 @@ -18,6 +18,6 @@ entry: %ln2gE = bitcast i32* %ln2gD to double* store double %ln2gB, double* %ln2gE ; CHECK: store double %ln2gB, double* %ln2gE - tail call cc10 void @Func2(i32* %Arg1, i32* %Arg2, i32* %Arg3, i32 %Arg4) nounwind + tail call ghccc void @Func2(i32* %Arg1, i32* %Arg2, i32* %Arg3, i32 %Arg4) nounwind ret void } diff --git a/test/Transforms/DeadStoreElimination/inst-limits.ll b/test/Transforms/DeadStoreElimination/inst-limits.ll index 3d78bb5..3ef5607 100644 --- a/test/Transforms/DeadStoreElimination/inst-limits.ll +++ b/test/Transforms/DeadStoreElimination/inst-limits.ll @@ -118,7 +118,7 @@ entry: ; 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, metadata !{}) + call void @llvm.dbg.value(metadata i32* undef, i64 0, metadata !10, metadata !{}) ; CHECK: store i32 -1, i32* @x, align 4 store i32 -1, i32* @x, align 4 @@ -245,18 +245,18 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!11, !13} -!0 = metadata !{metadata !"0x11\004\00clang version 3.4\001\00\000\00\000", metadata !1, metadata !2, metadata !2, metadata !3, metadata !9, metadata !2} ; [ 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 !{metadata !"0x2e\00test_within_limit\00test_within_limit\00\003\000\001\000\006\00256\000\004", metadata !1, metadata !5, metadata !6, null, i32 ()* @test_within_limit, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 3] [def] [scope 4] [test] -!5 = metadata !{metadata !"0x29", metadata !1} ; [ DW_TAG_file_type ] [/home/tmp/test.c] -!6 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = metadata !{metadata !8} -!8 = metadata !{metadata !"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] -!9 = metadata !{metadata !10} -!10 = metadata !{metadata !"0x34\00x\00x\00\001\000\001", null, metadata !5, metadata !8, i32* @x, null} ; [ DW_TAG_variable ] [x] [line 1] [def] -!11 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} -!12 = metadata !{i32* undef} +!0 = !{!"0x11\004\00clang version 3.4\001\00\000\00\000", !1, !2, !2, !3, !9, !2} ; [ DW_TAG_compile_unit ] [/home/tmp/test.c] [DW_LANG_C99] +!1 = !{!"test.c", !"/home/tmp"} +!2 = !{i32 0} +!3 = !{!4} +!4 = !{!"0x2e\00test_within_limit\00test_within_limit\00\003\000\001\000\006\00256\000\004", !1, !5, !6, null, i32 ()* @test_within_limit, null, null, !2} ; [ DW_TAG_subprogram ] [line 3] [def] [scope 4] [test] +!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [/home/tmp/test.c] +!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = !{!8} +!8 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] +!9 = !{!10} +!10 = !{!"0x34\00x\00x\00\001\000\001", null, !5, !8, i32* @x, null} ; [ DW_TAG_variable ] [x] [line 1] [def] +!11 = !{i32 2, !"Dwarf Version", i32 4} +!12 = !{i32* undef} -!13 = metadata !{i32 1, metadata !"Debug Info Version", i32 2} +!13 = !{i32 1, !"Debug Info Version", i32 2} diff --git a/test/Transforms/DebugIR/crash.ll b/test/Transforms/DebugIR/crash.ll deleted file mode 100644 index f4a88d7..0000000 --- a/test/Transforms/DebugIR/crash.ll +++ /dev/null @@ -1,42 +0,0 @@ -; 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 deleted file mode 100644 index 2436d38..0000000 --- a/test/Transforms/DebugIR/exception.ll +++ /dev/null @@ -1,127 +0,0 @@ -; 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 - -;