SuccessChanges

Summary

  1. Fix XCore test on Windows, the register order is reversed, for reasons unknown (details)
  2. [libc++] Install git-clang-format on CI nodes. (details)
  3. [PGO] Use the sum of profile counts to fix the function entry count (details)
  4. Fix split-debug.c test on Windows (details)
  5. [libc++] Fix CI Dockerfile (details)
  6. [AArch64InstPrinter] Use * 4096 instead of << 12 (details)
  7. [NFCI][SimplifyCFG] Mark all the SimplifyCFG tests that already don't invalidate DomTree as such (details)
  8. [SimplifyCFG] removeUnreachableBlocks() already knows how to preserve DomTree (details)
  9. [SimplifyCFG] MergeBlockIntoPredecessor() already knows how to preserve DomTree (details)
  10. [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree (details)
  11. [SimplifyCFG] Teach mergeEmptyReturnBlocks() to preserve DomTree (details)
Commit 15ca54525d6c2927b2a51b871a9e343c7ce1c2ea by rnk
Fix XCore test on Windows, the register order is reversed, for reasons unknown
The file was modifiedllvm/test/CodeGen/XCore/threads.ll
Commit d69fc6629d077475b0fa1c2de531c4bf0fda9d67 by Louis Dionne
[libc++] Install git-clang-format on CI nodes.

Two problems fixed:
* an old version of clang-format get installed by default (6.0).
* git-clang-format is not present, only git-clang-format-<version> (e.g. git-clang-format-6.0).

Solution:
* install clang-format-11 with explicit version
* make symlink git-clang-format to the latest version of git-clang-format-<version>

Differential Revision: https://reviews.llvm.org/D93201
The file was modifiedlibcxx/utils/ci/Dockerfile
Commit 0abd744597ee502b6424e5a99fb940ca0f866fe9 by xur
[PGO] Use the sum of profile counts to fix the function entry count

Raw profile count values for each BB are not kept after profile
annotation. We record function entry count and branch weights
and use them to compute the count when needed.  This mechanism
works well in a perfect world, but often breaks in real programs,
because of number prevision, inconsistent profile, or bugs in
BFI). This patch uses sum of profile count values to fix
function entry count to make the BFI count close to real profile
counts.

Differential Revision: https://reviews.llvm.org/D61540
The file was addedllvm/test/Transforms/PGOProfile/fix_bfi.ll
The file was addedllvm/test/Transforms/PGOProfile/Inputs/fix_bfi.proftext
The file was modifiedllvm/test/Transforms/PGOProfile/bfi_verification.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
Commit b7905e81fc3d7b045a5346442ce92ee87bdb7b21 by rnk
Fix split-debug.c test on Windows
The file was modifiedclang/test/Driver/split-debug.c
Commit 46ae36045257e2d1f60ce6178d99a77f45160fbc by Louis Dionne
[libc++] Fix CI Dockerfile

Installing clang-format-11 doesn't seem to work if it's done before
we've installed LLVM. I must admit I didn't try to get to the bottom
of the issue, since installing it after seems to work.
The file was modifiedlibcxx/utils/ci/Dockerfile
Commit 1bd928e50bb85a1ab8440473abd2a0a4ecd1349a by i
[AArch64InstPrinter] Use * 4096 instead of << 12

Left shirting a negative integer is undefined before C++20.
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
Commit aa2009fe786b54f1f665603c9c1eef738ac7df7b by lebedev.ri
[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.
The file was modifiedllvm/test/Transforms/SimplifyCFG/PowerPC/prefer-fma.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/seh-nounwind.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/volatile-phioper.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/merge-cond-stores-cost.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/callbr-destinations.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/trap-no-null-opt-debugloc.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/convergent.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/inline-asm-sink.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/noreturn-call.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/pr35774.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/branch-fold-three.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/attr-noduplicate.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/div-rem-pairs.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/preserve-load-metadata.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/merge-default.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/PowerPC/prefer-load-i32.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/preserve-load-metadata-2.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/tripcount_infinite.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
The file was modifiedllvm/test/Transforms/JumpThreading/and-cond.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/trap-debugloc.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/preserve-load-metadata-3.ll
The file was modifiedllvm/test/Transforms/LoopUnroll/2012-04-09-unroll-indirectbr.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/PhiNoEliminate.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/gepcost.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/SPARC/switch_to_lookup_table.ll
The file was modifiedllvm/test/Transforms/JumpThreading/and-and-cond.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/assume.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/duplicate-phis.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/suppress-zero-branch-weights.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/AMDGPU/divergent-runtime-check.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/lifetime.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/combine-parallel-mem-md.ll
The file was modifiedllvm/test/Transforms/LoopIdiom/scev-invalidation_topmostloop.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/pr33605.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/preserve-make-implicit-on-switch-to-br.ll
Commit 4fc169f6644fa60be543fb46b4b94b20a035ca40 by lebedev.ri
[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.
The file was modifiedllvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
The file was addedllvm/test/Transforms/SimplifyCFG/unreachable-selfloop.ll
Commit 49dac4aca0a13960f1aa46a20b11765992a9196c by lebedev.ri
[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.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/PHINode.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/AArch64/aarch64-predication.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/exit_value_tests.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/unreachable-blocks.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2003-03-07-DominateProblem.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/pr46638.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/unprofitable-pr.ll
The file was modifiedllvm/test/Transforms/InstCombine/2009-01-19-fmod-constant-float-specials.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/switch-to-br.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll
The file was modifiedllvm/test/Transforms/LoopInterchange/interchange-no-deps.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/PhiEliminate3.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/PowerPC/widened-massv-vfabi-attr.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/branch-phi-thread.ll
The file was modifiedllvm/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/merge-cleanuppads.ll
The file was modifiedllvm/test/Transforms/ADCE/basictest.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
The file was modifiedllvm/test/Transforms/JumpThreading/no-irreducible-loops.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/branch-fold-test.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/preserve-store-alignment.ll
The file was modifiedllvm/test/Transforms/ADCE/unreachable.ll
The file was modifiedllvm/test/Transforms/LICM/2003-02-27-PreheaderProblem.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/speculate-vector-ops.ll
The file was modifiedllvm/test/Transforms/InstCombine/2003-08-12-AllocaNonNull.ll
The file was modifiedllvm/include/llvm/Transforms/Utils/Local.h
The file was modifiedllvm/test/Transforms/SCCP/calltest.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/phi-undef-loadstore.ll
The file was modifiedllvm/test/Transforms/GlobalDCE/deadblockaddr.ll
The file was modifiedllvm/unittests/Transforms/Utils/LocalTest.cpp
The file was modifiedllvm/test/Transforms/LoopSimplify/2003-08-15-PreheadersFail.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/pr42674.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2002-05-21-PHIElimination.ll
The file was modifiedllvm/test/Transforms/InstCombine/2009-01-19-fmod-constant-float.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/dbginfo.ll
The file was modifiedllvm/test/Transforms/InstCombine/bittest.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/dce-cond-after-folding-terminator.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/implied-and-or.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/duplicate-landingpad.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/invoke.ll
The file was modifiedllvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll
Commit 5cce4aff18c4066c11c927fbe0943dffb6cd76b5 by lebedev.ri
[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.
The file was modifiedllvm/test/Transforms/LoopUnswitch/infinite-loop.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/UncondBranchToHeader.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/branch-cond-prop.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/AMDGPU/cttz-ctlz.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/attr-convergent.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2008-09-17-SpeculativeHoist.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/speculate-call.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/speculate-store.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/preserve-store-alignment.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll
The file was modifiedllvm/test/Transforms/LoopSimplify/for-preheader-dbg.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/remove-debug-2.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/ARM/cttz-ctlz.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/branch-cond-merge.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/drop-debug-loc-when-speculating.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/x86-predication.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/tail-fold-multiple-icmps.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/disable-lookup-table.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2006-06-12-InfLoop.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_asan.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/switch_undef.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/select-gep.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/tbaa-nodep.ll
The file was modifiedllvm/test/Transforms/LoopSimplify/do-preheader-dbg.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/guards.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/vectorize-once.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/float-induction.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/phi-to-select-constexpr-icmp.ll
The file was modifiedllvm/test/Transforms/JumpThreading/lvi-tristate.ll
The file was modifiedllvm/test/Transforms/LoopUnroll/peel-loop.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table-constant-expr.ll
The file was modifiedllvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/preserve-branchweights-partial.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/PR16069.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/PR17073.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/multiple-phis.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll
The file was modifiedllvm/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/PR27615-simplify-cond-br.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/AArch64/cttz-ctlz.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/hints-trans.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/PhiEliminate.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/unreachable-cleanuppad.ll
The file was modifiedllvm/test/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/Mips/cttz-ctlz.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2007-12-21-Crash.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/two-entry-phi-return.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/if-pred-not-when-safe.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/fold-branch-debuginvariant.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/remove-debug.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/extract-cost.ll
The file was modifiedllvm/test/Transforms/Inline/invoke_test-2.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/ARM/select-costs.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/common-code-hoisting.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/speculate-dbgvalue.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll
The file was modifiedllvm/test/Transforms/LoopDeletion/dcetest.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/mve-qabs.ll
The file was modifiedllvm/test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/constantexprs.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/PowerPC/cttz-ctlz-spec.ll
Commit d22a47e9fff84c0872331d871b8fe2850e56d809 by lebedev.ri
[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.
The file was modifiedllvm/test/Transforms/SimplifyCFG/return-merge.ll
The file was modifiedllvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/2005-10-02-InvokeSimplify.ll
The file was addedllvm/test/Transforms/SimplifyCFG/merge-empty-return-blocks.ll