SuccessChanges

Summary

  1. [SimplifyCFG] mergeConditionalStoreToAddress(): consider cost, not (details)
  2. [AArch64] Don't implicitly enable global isel on Darwin if (details)
  3. [InstCombine] foldUnsignedUnderflowCheck(): handle last few cases (details)
  4. [CodeGen][X86][NFC] Tests for (sub Carry, X) -> (addcarry (sub 0, X), 0, (details)
  5. [DAGCombine][ARM][X86] (sub Carry, X)  ->  (addcarry (sub 0, X), 0, (details)
  6. On PowerPC, Secure-PLT by default for FreeBSD 13 and higher (details)
  7. On PowerPC, Secure-PLT by default for FreeBSD 13 and higher (details)
  8. [SimplifyCFG] mergeConditionalStoreToAddress(): try to pacify MSAN (details)
  9. fix build, adjust test also for Windows path separator (details)
  10. llvm-reduce: Add pass to reduce basic blocks (details)
  11. gn build: Merge r372264 (details)
  12. [lld][WebAssembly] Fix use after free of archive path (details)
  13. Add AutoUpgrade function to add new address space datalayout string to (details)
  14. gn build: Merge r372267 (details)
  15. [analyzer] PR43102: Fix an assertion and an out-of-bounds error for (details)
  16. llvm-reduce: Fix inconsistencies between int/unsigned usage (standardize (details)
  17. llvm-reduce: Remove inaccurate doxy comment about a return that isn't (details)
Commit dd0170ab24577f76a5c8c78b4f7e068ac29de40c by lebedev.ri
[SimplifyCFG] mergeConditionalStoreToAddress(): consider cost, not
instruction count
Summary: As it can be see in the changed test, while `div` is really
costly, we were speculating it. This does not seem correct.
Also, the old code would run for every single insturuction in BB,
instead of eagerly bailing out as soon as there are too many
instructions.
This function still has a problem that `PHINodeFoldingThreshold` is
per-basic-block, while it should be for all the basic blocks.
Reviewers: efriedma, craig.topper, dmgreen, jmolloy
Reviewed By: jmolloy
Subscribers: xbolva00, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67315
llvm-svn: 372255
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/merge-cond-stores-cost.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 366ab0d086a457b085e3c9ba1c987d5499079cd6 by Lang Hames
[AArch64] Don't implicitly enable global isel on Darwin if
code-model==large.
Summary: AArch64 GlobalISel doesn't support MachO's large code model, so
this patch adds a check for that combination before implicitly enabling
it.
Reviewers: paquette
Subscribers: kristof.beyls, ributzka, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67724
llvm-svn: 372256
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetMachine.cpp
The file was addedllvm/test/CodeGen/AArch64/arm64-code-model-large-darwin.ll
Commit b646dd92c2385d31104057e8ff6f651b28c931b6 by lebedev.ri
[InstCombine] foldUnsignedUnderflowCheck(): handle last few cases
(PR43251)
Summary: I don't have a direct motivational case for this, but it would
be good to have this for completeness/symmetry.
This pattern is basically the motivational pattern from
https://bugs.llvm.org/show_bug.cgi?id=43251 but with different predicate
that requires that the offset is non-zero.
The completeness bit comes from the fact that a similar pattern (offset
!= zero) will be needed for https://bugs.llvm.org/show_bug.cgi?id=43259,
so it'd seem to be good to not overlook very similar patterns..
Proofs: https://rise4fun.com/Alive/21b
Also, there is something odd with `isKnownNonZero()`, if the non-zero
knowledge was specified as an assumption, it didn't pick it up (PR43267)
With this, i see no other missing folds for
https://bugs.llvm.org/show_bug.cgi?id=43251
Reviewers: spatel, nikic, xbolva00
Reviewed By: spatel
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67412
llvm-svn: 372257
The file was modifiedllvm/test/Transforms/InstCombine/result-of-usub-is-non-zero-and-no-overflow.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Commit a042aa1d829bbf37dc1feeca66d1c3fe77d53272 by lebedev.ri
[CodeGen][X86][NFC] Tests for (sub Carry, X) -> (addcarry (sub 0, X), 0,
Carry) fold (D62392)
llvm-svn: 372258
The file was modifiedllvm/test/CodeGen/X86/subcarry.ll
Commit c00f3182243d097382b71af199719c3027d96900 by lebedev.ri
[DAGCombine][ARM][X86] (sub Carry, X)  ->  (addcarry (sub 0, X), 0,
Carry)  fold
Summary:
`DAGCombiner::visitADDLikeCommutative()` already has a sibling fold:
`(add X, Carry) -> (addcarry X, 0, Carry)`
This fold, as suggested by @efriedma, helps recover from //some// of the
regressions of D62266
Reviewers: efriedma, deadalnix
Subscribers: javed.absar, kristof.beyls, llvm-commits, efriedma
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62392
llvm-svn: 372259
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/X86/subcarry.ll
The file was modifiedllvm/test/CodeGen/ARM/addsubcarry-promotion.ll
Commit f88e75525d253a2af2e5ccfc860673aedbafc552 by dimitry
On PowerPC, Secure-PLT by default for FreeBSD 13 and higher
Summary: In https://svnweb.freebsd.org/changeset/base/349351, FreeBSD 13
and higher transitioned to Secure-PLT for PowerPC.  This part contains
the changes in llvm's PPC subtarget.
Reviewers: emaste, jhibbits, hfinkel
Reviewed By: jhibbits
Subscribers: wuzish, nemanjai, krytarowski, kbarton, MaskRay, jsji,
shchenz, steven.zhang, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67118
llvm-svn: 372260
The file was modifiedllvm/lib/Target/PowerPC/PPCSubtarget.cpp
Commit ab8b456ce5d85d3143b04475449733b2f5e02233 by dimitry
On PowerPC, Secure-PLT by default for FreeBSD 13 and higher
Summary: In https://svnweb.freebsd.org/changeset/base/349351, FreeBSD 13
and higher transitioned to Secure-PLT for PowerPC.  This part contains
the changes in clang's PPC architecture defaults.
Reviewers: emaste, jhibbits, hfinkel
Reviewed By: jhibbits
Subscribers: wuzish, nemanjai, krytarowski, kbarton, MaskRay, jsji,
shchenz, steven.zhang, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67119
llvm-svn: 372261
The file was modifiedclang/lib/Driver/ToolChains/Arch/PPC.cpp
Commit feea722cf3dc9bcabec7350cfb3e8ac9ed19de10 by lebedev.ri
[SimplifyCFG] mergeConditionalStoreToAddress(): try to pacify MSAN
MSAN bot complains that there is use-of-uninitialized-value of this
FreeStores later in IsWorthwhile(). Perhaps FreeStores needs to be
stored in a vector?
llvm-svn: 372262
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 3425a896767621d2cb594edbca16424c3ee8b73d by l.lunak
fix build, adjust test also for Windows path separator
Introduced in 1e9c1d2b7bfc.
llvm-svn: 372263
The file was modifiedclang/test/Frontend/rewrite-includes.c
The file was modifiedclang/test/Frontend/rewrite-includes-conditions.c
Commit 070598bb529a9ac1b10e4c65a9644c90855255c4 by dblaikie
llvm-reduce: Add pass to reduce basic blocks
Patch by Diego Treviño!
Differential Revision: https://reviews.llvm.org/D66320
llvm-svn: 372264
The file was modifiedllvm/tools/llvm-reduce/DeltaManager.h
The file was addedllvm/test/Reduce/remove-bbs.ll
The file was addedllvm/test/Reduce/Inputs/remove-bbs.py
The file was addedllvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.h
The file was modifiedllvm/tools/llvm-reduce/CMakeLists.txt
The file was addedllvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
Commit 79718839d282506f1c2d5e439fc433e94c3abf3f by llvmgnsyncbot
gn build: Merge r372264
llvm-svn: 372265
The file was modifiedllvm/utils/gn/secondary/llvm/tools/llvm-reduce/BUILD.gn
Commit e40ef12bfad0108024d7d3979565096843bb29a7 by sbc
[lld][WebAssembly] Fix use after free of archive path
This was fixed in the ELF backend in https://reviews.llvm.org/D34554.
Differential Revision: https://reviews.llvm.org/D67676
llvm-svn: 372266
The file was modifiedlld/wasm/InputFiles.h
Commit 68eae4985995f06a8bbfadb9cf420a66cbfbe04a by akhuang
Add AutoUpgrade function to add new address space datalayout string to
existing datalayouts.
Summary: Add function to AutoUpgrade to change the datalayout of old X86
datalayout strings. This adds "-p270:32:32-p271:32:32-p272:64:64" to X86
datalayouts that are otherwise valid and don't already contain it.
This also removes the compatibility changes in
https://reviews.llvm.org/D66843. Datalayout change in
https://reviews.llvm.org/D64931.
Reviewers: rnk, echristo
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67631
llvm-svn: 372267
The file was modifiedllvm/include/llvm/Target/TargetMachine.h
The file was modifiedllvm/lib/Target/X86/X86TargetMachine.h
The file was addedllvm/test/Bitcode/upgrade-datalayout2.ll
The file was modifiedllvm/unittests/Bitcode/CMakeLists.txt
The file was addedllvm/unittests/Bitcode/DataLayoutUpgradeTest.cpp
The file was addedllvm/test/Bitcode/upgrade-datalayout.ll
The file was addedllvm/test/Bitcode/upgrade-datalayout3.ll
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
The file was modifiedllvm/lib/Target/X86/X86TargetMachine.cpp
The file was modifiedllvm/lib/IR/AutoUpgrade.cpp
The file was modifiedllvm/include/llvm/IR/AutoUpgrade.h
Commit bdad30a8b8fa48a62a37e7400b3ae5a99a6aca53 by llvmgnsyncbot
gn build: Merge r372267
llvm-svn: 372268
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/Bitcode/BUILD.gn
Commit b8ac93c73b618dd9bec20dc2d94ec9afb0140780 by kristof.umann
[analyzer] PR43102: Fix an assertion and an out-of-bounds error for
diagnostic location construction
Summary: https://bugs.llvm.org/show_bug.cgi?id=43102
In today's edition of "Is this any better now that it isn't crashing?",
I'd like to show you a very interesting test case with loop widening.
Looking at the included test case, it's immediately obvious that this is
not only a false positive, but also a very bad bug report in general. We
can see how the analyzer mistakenly invalidated `b`, instead of its
pointee, resulting in it reporting a null pointer dereference error. Not
only that, the point at which this change of value is noted at is at the
loop, rather then at the method call.
It turns out that `FindLastStoreVisitor` works correctly, rather the
supplied explodedgraph is faulty, because `BlockEdge` really is the
`ProgramPoint` where this happens.
{F9855739} So it's fair to say that this needs improving on multiple
fronts. In any case, at least the crash is gone.
Full ExplodedGraph: {F9855743}
Reviewers: NoQ, xazax.hun, baloghadamsoftware, Charusso, dcoughlin,
rnkovacs, TWeaver
Subscribers: JesperAntonsson, uabelho, Ka-Ka, bjope, whisperity, szepet,
a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D66716
llvm-svn: 372269
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
The file was addedclang/test/Analysis/loop-widening.cpp
The file was modifiedclang/lib/Analysis/PathDiagnostic.cpp
Commit c4da7eeccde607dc7a0d9efe0ddf299aee54ef01 by dblaikie
llvm-reduce: Fix inconsistencies between int/unsigned usage (standardize
on int)
llvm-svn: 372270
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
The file was modifiedllvm/tools/llvm-reduce/deltas/Delta.h
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
The file was modifiedllvm/tools/llvm-reduce/deltas/Delta.cpp
Commit 69a92352022338417f27bfa45c0471beb6a92cc7 by dblaikie
llvm-reduce: Remove inaccurate doxy comment about a return that isn't
returned
Addressing post-commit code review feedback from Dávid Bolvanský -
thanks!
llvm-svn: 372271
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp