[all-commits] [llvm/llvm-project] aa2009: [NFCI][SimplifyCFG] Mark all the SimplifyCFG tests...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Wed Dec 16 14:08:35 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: aa2009fe786b54f1f665603c9c1eef738ac7df7b
      https://github.com/llvm/llvm-project/commit/aa2009fe786b54f1f665603c9c1eef738ac7df7b
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-12-17 (Thu, 17 Dec 2020)

  Changed paths:
    M llvm/test/Transforms/IndVarSimplify/tripcount_infinite.ll
    M llvm/test/Transforms/JumpThreading/and-and-cond.ll
    M llvm/test/Transforms/JumpThreading/and-cond.ll
    M llvm/test/Transforms/LoopIdiom/scev-invalidation_topmostloop.ll
    M llvm/test/Transforms/LoopUnroll/2012-04-09-unroll-indirectbr.ll
    M llvm/test/Transforms/LoopVectorize/AMDGPU/divergent-runtime-check.ll
    M llvm/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll
    M llvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
    M llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll
    M llvm/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
    M llvm/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
    M llvm/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
    M llvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll
    M llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
    M llvm/test/Transforms/SimplifyCFG/PhiNoEliminate.ll
    M llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-fma.ll
    M llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-load-i32.ll
    M llvm/test/Transforms/SimplifyCFG/SPARC/switch_to_lookup_table.ll
    M llvm/test/Transforms/SimplifyCFG/X86/combine-parallel-mem-md.ll
    M llvm/test/Transforms/SimplifyCFG/X86/merge-cond-stores-cost.ll
    M llvm/test/Transforms/SimplifyCFG/assume.ll
    M llvm/test/Transforms/SimplifyCFG/attr-noduplicate.ll
    M llvm/test/Transforms/SimplifyCFG/branch-fold-three.ll
    M llvm/test/Transforms/SimplifyCFG/callbr-destinations.ll
    M llvm/test/Transforms/SimplifyCFG/convergent.ll
    M llvm/test/Transforms/SimplifyCFG/div-rem-pairs.ll
    M llvm/test/Transforms/SimplifyCFG/duplicate-phis.ll
    M llvm/test/Transforms/SimplifyCFG/gepcost.ll
    M llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
    M llvm/test/Transforms/SimplifyCFG/inline-asm-sink.ll
    M llvm/test/Transforms/SimplifyCFG/lifetime.ll
    M llvm/test/Transforms/SimplifyCFG/merge-default.ll
    M llvm/test/Transforms/SimplifyCFG/noreturn-call.ll
    M llvm/test/Transforms/SimplifyCFG/pr33605.ll
    M llvm/test/Transforms/SimplifyCFG/pr35774.ll
    M llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-2.ll
    M llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-3.ll
    M llvm/test/Transforms/SimplifyCFG/preserve-load-metadata.ll
    M llvm/test/Transforms/SimplifyCFG/preserve-make-implicit-on-switch-to-br.ll
    M llvm/test/Transforms/SimplifyCFG/seh-nounwind.ll
    M llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll
    M llvm/test/Transforms/SimplifyCFG/suppress-zero-branch-weights.ll
    M llvm/test/Transforms/SimplifyCFG/trap-debugloc.ll
    M llvm/test/Transforms/SimplifyCFG/trap-no-null-opt-debugloc.ll
    M llvm/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll
    M llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
    M llvm/test/Transforms/SimplifyCFG/volatile-phioper.ll

  Log Message:
  -----------
  [NFCI][SimplifyCFG] Mark all the SimplifyCFG tests that already don't invalidate DomTree as such

First step after e1133179587dd895962a2fe4d6eb0cb1e63b5ee2,
in these tests, DomTree is valid afterwards, so mark them as such,
so that they don't regress.

In further steps, SimplifyCFG transforms shall taught to preserve DomTree,
in as small steps as possible.


  Commit: 4fc169f6644fa60be543fb46b4b94b20a035ca40
      https://github.com/llvm/llvm-project/commit/4fc169f6644fa60be543fb46b4b94b20a035ca40
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-12-17 (Thu, 17 Dec 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
    A llvm/test/Transforms/SimplifyCFG/unreachable-selfloop.ll

  Log Message:
  -----------
  [SimplifyCFG] removeUnreachableBlocks() already knows how to preserve DomTree

... so just ensure that we pass DomTreeUpdater it into it.

Apparently, there were no dedicated tests just for that functionality,
so i'm adding one here.


  Commit: 49dac4aca0a13960f1aa46a20b11765992a9196c
      https://github.com/llvm/llvm-project/commit/49dac4aca0a13960f1aa46a20b11765992a9196c
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-12-17 (Thu, 17 Dec 2020)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/Local.h
    M llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
    M llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/ADCE/basictest.ll
    M llvm/test/Transforms/ADCE/unreachable.ll
    M llvm/test/Transforms/GlobalDCE/deadblockaddr.ll
    M llvm/test/Transforms/IndVarSimplify/exit_value_tests.ll
    M llvm/test/Transforms/InstCombine/2003-08-12-AllocaNonNull.ll
    M llvm/test/Transforms/InstCombine/2009-01-19-fmod-constant-float-specials.ll
    M llvm/test/Transforms/InstCombine/2009-01-19-fmod-constant-float.ll
    M llvm/test/Transforms/InstCombine/bittest.ll
    M llvm/test/Transforms/JumpThreading/no-irreducible-loops.ll
    M llvm/test/Transforms/LICM/2003-02-27-PreheaderProblem.ll
    M llvm/test/Transforms/LoopInterchange/interchange-no-deps.ll
    M llvm/test/Transforms/LoopSimplify/2003-08-15-PreheadersFail.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/aarch64-predication.ll
    M llvm/test/Transforms/LoopVectorize/PowerPC/widened-massv-vfabi-attr.ll
    M llvm/test/Transforms/LoopVectorize/X86/pr42674.ll
    M llvm/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll
    M llvm/test/Transforms/SCCP/calltest.ll
    M llvm/test/Transforms/SimplifyCFG/2002-05-21-PHIElimination.ll
    M llvm/test/Transforms/SimplifyCFG/2003-03-07-DominateProblem.ll
    M llvm/test/Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll
    M llvm/test/Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.ll
    M llvm/test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll
    M llvm/test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll
    M llvm/test/Transforms/SimplifyCFG/PHINode.ll
    M llvm/test/Transforms/SimplifyCFG/PhiEliminate3.ll
    M llvm/test/Transforms/SimplifyCFG/X86/merge-cleanuppads.ll
    M llvm/test/Transforms/SimplifyCFG/X86/unreachable-blocks.ll
    M llvm/test/Transforms/SimplifyCFG/branch-fold-test.ll
    M llvm/test/Transforms/SimplifyCFG/branch-phi-thread.ll
    M llvm/test/Transforms/SimplifyCFG/dbginfo.ll
    M llvm/test/Transforms/SimplifyCFG/dce-cond-after-folding-terminator.ll
    M llvm/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll
    M llvm/test/Transforms/SimplifyCFG/duplicate-landingpad.ll
    M llvm/test/Transforms/SimplifyCFG/implied-and-or.ll
    M llvm/test/Transforms/SimplifyCFG/invoke.ll
    M llvm/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll
    M llvm/test/Transforms/SimplifyCFG/phi-undef-loadstore.ll
    M llvm/test/Transforms/SimplifyCFG/pr46638.ll
    M llvm/test/Transforms/SimplifyCFG/preserve-store-alignment.ll
    M llvm/test/Transforms/SimplifyCFG/speculate-vector-ops.ll
    M llvm/test/Transforms/SimplifyCFG/switch-to-br.ll
    M llvm/test/Transforms/SimplifyCFG/unprofitable-pr.ll
    M llvm/unittests/Transforms/Utils/LocalTest.cpp

  Log Message:
  -----------
  [SimplifyCFG] MergeBlockIntoPredecessor() already knows how to preserve DomTree

... so just ensure that we pass DomTreeUpdater it into it.

Fixes DomTree preservation for a large number of tests,
all of which are marked as such so that they do not regress.


  Commit: 5cce4aff18c4066c11c927fbe0943dffb6cd76b5
      https://github.com/llvm/llvm-project/commit/5cce4aff18c4066c11c927fbe0943dffb6cd76b5
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-12-17 (Thu, 17 Dec 2020)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll
    M llvm/test/Transforms/Inline/invoke_test-2.ll
    M llvm/test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.ll
    M llvm/test/Transforms/JumpThreading/lvi-tristate.ll
    M llvm/test/Transforms/LoopDeletion/dcetest.ll
    M llvm/test/Transforms/LoopSimplify/do-preheader-dbg.ll
    M llvm/test/Transforms/LoopSimplify/for-preheader-dbg.ll
    M llvm/test/Transforms/LoopUnroll/peel-loop.ll
    M llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll
    M llvm/test/Transforms/LoopUnswitch/infinite-loop.ll
    M llvm/test/Transforms/LoopVectorize/ARM/mve-qabs.ll
    M llvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll
    M llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll
    M llvm/test/Transforms/LoopVectorize/ARM/tail-fold-multiple-icmps.ll
    M llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll
    M llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
    M llvm/test/Transforms/LoopVectorize/X86/x86-predication.ll
    M llvm/test/Transforms/LoopVectorize/float-induction.ll
    M llvm/test/Transforms/LoopVectorize/hints-trans.ll
    M llvm/test/Transforms/LoopVectorize/if-pred-not-when-safe.ll
    M llvm/test/Transforms/LoopVectorize/tbaa-nodep.ll
    M llvm/test/Transforms/LoopVectorize/vectorize-once.ll
    M llvm/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
    M llvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
    M llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll
    M llvm/test/Transforms/SimplifyCFG/2006-06-12-InfLoop.ll
    M llvm/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll
    M llvm/test/Transforms/SimplifyCFG/2007-12-21-Crash.ll
    M llvm/test/Transforms/SimplifyCFG/2008-09-17-SpeculativeHoist.ll
    M llvm/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll
    M llvm/test/Transforms/SimplifyCFG/AArch64/cttz-ctlz.ll
    M llvm/test/Transforms/SimplifyCFG/AMDGPU/cttz-ctlz.ll
    M llvm/test/Transforms/SimplifyCFG/ARM/cttz-ctlz.ll
    M llvm/test/Transforms/SimplifyCFG/ARM/select-costs.ll
    M llvm/test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table-constant-expr.ll
    M llvm/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll
    M llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll
    M llvm/test/Transforms/SimplifyCFG/Mips/cttz-ctlz.ll
    M llvm/test/Transforms/SimplifyCFG/PR16069.ll
    M llvm/test/Transforms/SimplifyCFG/PR17073.ll
    M llvm/test/Transforms/SimplifyCFG/PR27615-simplify-cond-br.ll
    M llvm/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll
    M llvm/test/Transforms/SimplifyCFG/PhiEliminate.ll
    M llvm/test/Transforms/SimplifyCFG/PowerPC/cttz-ctlz-spec.ll
    M llvm/test/Transforms/SimplifyCFG/UncondBranchToHeader.ll
    M llvm/test/Transforms/SimplifyCFG/X86/disable-lookup-table.ll
    M llvm/test/Transforms/SimplifyCFG/X86/fold-branch-debuginvariant.ll
    M llvm/test/Transforms/SimplifyCFG/X86/remove-debug-2.ll
    M llvm/test/Transforms/SimplifyCFG/X86/remove-debug.ll
    M llvm/test/Transforms/SimplifyCFG/attr-convergent.ll
    M llvm/test/Transforms/SimplifyCFG/branch-cond-merge.ll
    M llvm/test/Transforms/SimplifyCFG/branch-cond-prop.ll
    M llvm/test/Transforms/SimplifyCFG/common-code-hoisting.ll
    M llvm/test/Transforms/SimplifyCFG/constantexprs.ll
    M llvm/test/Transforms/SimplifyCFG/drop-debug-loc-when-speculating.ll
    M llvm/test/Transforms/SimplifyCFG/extract-cost.ll
    M llvm/test/Transforms/SimplifyCFG/guards.ll
    M llvm/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll
    M llvm/test/Transforms/SimplifyCFG/multiple-phis.ll
    M llvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_asan.ll
    M llvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll
    M llvm/test/Transforms/SimplifyCFG/phi-to-select-constexpr-icmp.ll
    M llvm/test/Transforms/SimplifyCFG/preserve-branchweights-partial.ll
    M llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll
    M llvm/test/Transforms/SimplifyCFG/preserve-store-alignment.ll
    M llvm/test/Transforms/SimplifyCFG/select-gep.ll
    M llvm/test/Transforms/SimplifyCFG/speculate-call.ll
    M llvm/test/Transforms/SimplifyCFG/speculate-dbgvalue.ll
    M llvm/test/Transforms/SimplifyCFG/speculate-store.ll
    M llvm/test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll
    M llvm/test/Transforms/SimplifyCFG/switch_undef.ll
    M llvm/test/Transforms/SimplifyCFG/two-entry-phi-return.ll
    M llvm/test/Transforms/SimplifyCFG/unreachable-cleanuppad.ll

  Log Message:
  -----------
  [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree

... so just ensure that we pass DomTreeUpdater it into it.

Fixes DomTree preservation for a large number of tests,
all of which are marked as such so that they do not regress.


  Commit: d22a47e9fff84c0872331d871b8fe2850e56d809
      https://github.com/llvm/llvm-project/commit/d22a47e9fff84c0872331d871b8fe2850e56d809
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-12-17 (Thu, 17 Dec 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
    M llvm/test/Transforms/SimplifyCFG/2005-10-02-InvokeSimplify.ll
    A llvm/test/Transforms/SimplifyCFG/merge-empty-return-blocks.ll
    M llvm/test/Transforms/SimplifyCFG/return-merge.ll

  Log Message:
  -----------
  [SimplifyCFG] Teach mergeEmptyReturnBlocks() to preserve DomTree

A first real transformation that didn't already knew how to do that,
but it's pretty tame - either change successor of all the predecessors
of a block and carefully delay deletion of the block until afterwards
the DomTree updates are appled, or add a successor to the block.

There wasn't a great test coverage for this, so i added extra, to be sure.


Compare: https://github.com/llvm/llvm-project/compare/1bd928e50bb8...d22a47e9fff8


More information about the All-commits mailing list