SuccessChanges

Summary

  1. [lldb] Introduce createTestTarget for creating a valid target in API tests (details)
  2. [lldb] Readd deleted variable in the sample test (details)
  3. [VPlan] Add first VPlan version of sinkScalarOperands. (details)
  4. [ConstProp] add tests for vector reductions with poison elements; NFC (details)
  5. [ConstProp] propagate poison from vector reduction element(s) to result (details)
  6. [CostModel][X86] Regenerate sse-itoi.ll test checks (details)
  7. [NVPTX] Fix lowering of frem for negative values (details)
  8. [libc++][doc] Update format paper status. (details)
  9. [CostModel][X86] Add missing SSE41 v2iX sext/zext costs (details)
  10. Remark was added to clang tooling Diagnostic (details)
  11. [LoopUnroll] Regenerate test checks (NFC) (details)
  12. [LoopUnroll] Add additional trip multiple test (NFC) (details)
  13. [CVP] Add additional test for phi common val transform (NFC) (details)
  14. [scudo] Separate Fuchsia & Default SizeClassMap (details)
  15. [mlir][tosa] Align tensor rank specifications with current spec (details)
  16. [llvm] Revert align attr test in test/Bitcode/attribute-3.3.ll (details)
  17. CoroSplit: Replace ad-hoc implementation of reachability with API from CFG.h (details)
  18. [Remarks] Look through inttoptr/ptrtoint for -ftrivial-auto-var-init remarks. (details)
  19. [mlir][doc] Fix links and references in top level docs directory (details)
  20. [RISCV] Optimize getVLENFactoredAmount function. (details)
  21. [X86][Costmodel] getMaskedMemoryOpCost(): don't scalarize non-power-of-two vectors with legal element type (details)
  22. [Remarks] Add analysis remarks for memset/memcpy/memmove lengths (details)
  23. [NFC][scudo] Small test cleanup (details)
  24. [gn build] Port 095e91c9737b (details)
  25. [X86] Call insertDAGNode on trunc/zext created in tryShiftAmountMod. (details)
Commit 54c2687292da54a2d7964a47b0e334155385f084 by Raphael Isemann
[lldb] Introduce createTestTarget for creating a valid target in API tests

At the moment nearly every test calls something similar to
`self.dbg.CreateTarget(self.getBuildArtifact("a.out"))` and them sometimes
checks if the created target is actually valid with something like
`self.assertTrue(target.IsValid(), "some useless text")`.

Beside being really verbose the error messages generated by this pattern are
always just indicating that the target failed to be created but now why.

This patch introduces a helper function `createTestTarget` to our Test class
that creates the target with the much more verbose `CreateTarget` overload that
gives us back an SBError (with a fancy error). If the target couldn't be created
the function prints out the SBError that LLDB returned and asserts for us. It
also defaults to the "a.out" build artifact path that nearly all tests are using
to avoid to hardcode "a.out" in every test.

I converted a bunch of tests to the new function but I'll do the rest of the
test suite as follow ups.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D102771
The file was modifiedlldb/test/API/commands/frame/var/TestFrameVar.py
The file was modifiedlldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
The file was modifiedlldb/test/API/commands/expression/no-deadlock/TestExprDoesntBlock.py
The file was modifiedlldb/test/API/commands/watchpoints/watchpoint_events/TestWatchpointEvents.py
The file was modifiedlldb/test/API/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py
The file was modifiedlldb/test/API/commands/frame/language/TestGuessLanguage.py
The file was modifiedlldb/test/API/functionalities/asan/TestReportData.py
The file was modifiedlldb/test/API/commands/watchpoints/watchpoint_disable/TestWatchpointDisable.py
The file was modifiedlldb/test/API/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py
The file was modifiedlldb/test/API/sample_test/main.c
The file was modifiedlldb/test/API/commands/disassemble/basic/TestFrameDisassemble.py
The file was modifiedlldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py
The file was modifiedlldb/test/API/commands/expression/completion/TestExprCompletion.py
The file was modifiedlldb/test/API/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py
The file was modifiedlldb/test/API/commands/expression/expr-in-syscall/TestExpressionInSyscall.py
The file was modifiedlldb/test/API/commands/process/launch/TestProcessLaunch.py
The file was modifiedlldb/test/API/commands/expression/error-limit/TestExprErrorLimit.py
The file was modifiedlldb/test/API/commands/watchpoints/multiple_hits/TestMultipleHits.py
The file was modifiedlldb/test/API/api/listeners/TestListener.py
The file was modifiedlldb/test/API/functionalities/asan/TestMemoryHistory.py
The file was modifiedlldb/test/API/functionalities/breakpoint/breakpoint_by_file_colon_line/TestBreakpointByFileColonLine.py
The file was modifiedlldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
The file was modifiedlldb/test/API/commands/expression/completion-crash-invalid-iterator/TestInvalidIteratorCompletionCrash.py
The file was modifiedlldb/test/API/android/platform/TestDefaultCacheLineSize.py
The file was modifiedlldb/test/API/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py
The file was modifiedlldb/test/API/commands/register/register/register_command/TestRegisters.py
The file was modifiedlldb/test/API/sample_test/TestSampleTest.py
The file was modifiedlldb/test/API/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
The file was modifiedlldb/test/API/commands/expression/test/TestExprs.py
The file was modifiedlldb/test/API/assert_messages_test/TestAssertMessages.py
The file was modifiedlldb/test/API/commands/expression/call-function/TestCallBuiltinFunction.py
The file was modifiedlldb/test/API/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py
The file was modifiedlldb/test/API/commands/trace/multiple-threads/TestTraceStartStopMultipleThreads.py
The file was modifiedlldb/test/API/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
Commit 5d7c1d8f33c305b5113cd1429344524ddc2316d9 by Raphael Isemann
[lldb] Readd deleted variable in the sample test

In D102771 wanted to make `test_var` global to demonstrate the a no-launch test,
but the old variable is still needed for another test. This just creates the
global var with a different name to demonstrate the no-launch functionality.
The file was modifiedlldb/test/API/sample_test/TestSampleTest.py
The file was modifiedlldb/test/API/sample_test/main.c
Commit 65d3dd7c883fd46c855afe71a2f04cf84750e730 by flo
[VPlan] Add first VPlan version of sinkScalarOperands.

This patch adds a first VPlan-based implementation of sinking of scalar
operands.

The current version traverse a VPlan once and processes all operands of
a predicated REPLICATE recipe. If one of those operands can be sunk,
it is moved to the block containing the predicated REPLICATE recipe.
Continue with processing the operands of the sunk recipe.

The initial version does not re-process candidates after other recipes
have been sunk. It also cannot partially sink induction increments at
the moment. The VPlan only contains WIDEN-INDUCTION recipes and if the
induction is used for example in a GEP, only the first lane is used and
in the lowered IR the adds for the other lanes can be sunk into the
predicated blocks.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D100258
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanTransforms.h
The file was modifiedllvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/if-pred-stores.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/small-size.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge-vf1.ll
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Commit 3dd206367116b5519d984fe023d098ca3bbe2307 by spatel
[ConstProp] add tests for vector reductions with poison elements; NFC
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/vecreduce.ll
Commit a0e71f1832d194baffb25a4e7394b623d2bf97cb by spatel
[ConstProp] propagate poison from vector reduction element(s) to result

This follows from the underlying logic for binops and min/max.
Although it does not appear that we handle this for min/max
intrinsics currently.
https://alive2.llvm.org/ce/z/Kq9Xnh
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/vecreduce.ll
Commit 60b33ebe8b9cce8bda3cc15e889a96c0f5b75ac4 by llvm-dev
[CostModel][X86] Regenerate sse-itoi.ll test checks
The file was modifiedllvm/test/Analysis/CostModel/X86/sse-itoi.ll
Commit 505933a489206fc4b27f4fb4292c52097faa294e by thomasraoux
[NVPTX] Fix lowering of frem for negative values

to match fmod frem result must have the dividend sign. Previous implementation
had the wrong sign when passing negative numbers. For ex: frem(-16, 7) was
returning 5 instead of -2. We should just a ftrunc instead of floor when
lowering to get the right behavior.

Differential Revision: https://reviews.llvm.org/D102528
The file was modifiedllvm/test/CodeGen/NVPTX/f16x2-instructions.ll
The file was modifiedllvm/lib/Target/NVPTX/NVPTXInstrInfo.td
The file was modifiedllvm/test/CodeGen/NVPTX/f16-instructions.ll
Commit 7b2606b0b64e967648511bf62d5dd03851405064 by koraq
[libc++][doc] Update format paper status.

- Fixes paper number P1862 -> P1868. (The title was correct.)
- Marks P1868 as in progress.
- Marks P1892 as in progress.
- Marks LWG-3327 as nothing to do, since the wording change doesn't
  impact the code. (Also updated on the general C++20 status page.)
The file was modifiedlibcxx/docs/Cxx2aStatusIssuesStatus.csv
The file was modifiedlibcxx/docs/FormatIssuePaperStatus.csv
Commit dcaca7206e363eea936b789b501de084dee82e4b by llvm-dev
[CostModel][X86] Add missing SSE41 v2iX sext/zext costs

Also fix existing v4i8->v4i16 sext cost to match the equivalents
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
The file was modifiedllvm/test/Analysis/CostModel/X86/sse-itoi.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/extend.ll
Commit 7f2f0247f855b143c12cd33d1f53d14bc63f3e82 by aaron
Remark was added to clang tooling Diagnostic

The diff adds Remark to Diagnostic::Level for clang tooling. That makes
Remark diagnostic level ready to use in clang-tidy checks: the
clang-diagnostic-module-import becomes visible as a part of the change.
The file was modifiedclang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
The file was addedclang-tools-extra/test/clang-tidy/infrastructure/Inputs/remarks/module.modulemap
The file was modifiedclang/include/clang/Tooling/DiagnosticsYaml.h
The file was modifiedclang/include/clang/Tooling/Core/Diagnostic.h
The file was addedclang-tools-extra/test/clang-tidy/infrastructure/Inputs/remarks/A.h
The file was addedclang-tools-extra/test/clang-tidy/infrastructure/remarks.cpp
The file was modifiedclang/unittests/Tooling/DiagnosticsYamlTest.cpp
Commit 971a2ae8b386a6bca5a03f302cd744e644fbd931 by nikita.ppv
[LoopUnroll] Regenerate test checks (NFC)
The file was modifiedllvm/test/Transforms/LoopUnroll/unloop.ll
The file was modifiedllvm/test/Transforms/LoopUnroll/rebuild_lcssa.ll
Commit a832e83bcbad088536ea8819a3abe7eb81ce59b3 by nikita.ppv
[LoopUnroll] Add additional trip multiple test (NFC)

This uses a trip multiple on a (unique) non-latch exit.
The file was modifiedllvm/test/Transforms/LoopUnroll/shifted-tripcount.ll
Commit e42636d3c1a41a9b7c5d8095ae5ef6682e26d4a2 by nikita.ppv
[CVP] Add additional test for phi common val transform (NFC)
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/phi-common-val.ll
Commit 20c1f94220d938936867cb047fb6444a187626ba by kostyak
[scudo] Separate Fuchsia & Default SizeClassMap

The Fuchsia allocator config was using the default size class map.

This CL gives Fuchsia its own size class map and changes a couple of
things in the default one:
- make `SizeDelta` configurable in `Config` for a fixed size class map
  as it currently is for a table size class map;
- switch `SizeDelta` to 0 for the default config, it allows for size
  classes that allow for power of 2s, and overall better wrt pages
  filling;
- increase the max number of caches pointers to 14 in the default,
  this makes the transfer batch 64/128 bytes on 32/64-bit platforms,
  which is cache-line friendly (previous size was 48/96 bytes).

The Fuchsia size class map remains untouched for now, this doesn't
impact Android which uses the table size class map.

Differential Revision: https://reviews.llvm.org/D102783
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/size_class_map_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/allocator_config.h
The file was modifiedcompiler-rt/lib/scudo/standalone/size_class_map.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
Commit 1ceff40df0a4969923ac8aa9ed10661821d94492 by stellaraccident
[mlir][tosa] Align tensor rank specifications with current spec

Deconstrains several TOSA operators to align with the current TOSA spec, including all the elementwise ops.
Note: some more ops are under consideration for further cleanup; they will follow once the spec has been updated.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D102958
The file was modifiedmlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
The file was modifiedmlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td
Commit 0346514984291cba05f36ad461504ae32ee3c1bf by Steven Wu
[llvm] Revert align attr test in test/Bitcode/attribute-3.3.ll

Revert testcase changed in D87304 now the upgrader can correctly handle
the align attribute in upgrader.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D102880
The file was modifiedllvm/test/Bitcode/attributes-3.3.ll
The file was modifiedllvm/test/Bitcode/attributes-3.3.ll.bc
Commit 4cba0a4f11e40f447545434aa57effc4e39a8a57 by Adrian Prantl
CoroSplit: Replace ad-hoc implementation of reachability with API from CFG.h

The current ad-hoc implementation used to determine whether a basic
block is unreachable doesn't work correctly in the general case (for
example it won't detect successors of unreachable blocks as
unreachable). This patch replaces it with the correct API that uses a
DominatorTree to answer the question correctly and quickly.

rdar://77181156

Differential Revision: https://reviews.llvm.org/D102963
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
The file was modifiedllvm/test/Transforms/Coroutines/coro-debug.ll
Commit 694068d0db4378d9956fe0d3234ee0c4d353d94c by jonathan_roelofs
[Remarks] Look through inttoptr/ptrtoint for -ftrivial-auto-var-init remarks.

The crasher is a related problem that @aemerson found broke speck2k6/403.gcc
when I landed https://reviews.llvm.org/D102452. It has been reduced & modified
to reproduce without that patch.

Differential revision: https://reviews.llvm.org/D102935
The file was addedllvm/test/Transforms/Util/trivial-auto-var-init-crash-20210521.ll
The file was modifiedllvm/test/Transforms/Util/trivial-auto-var-init-store.ll
The file was modifiedllvm/lib/Transforms/Utils/AutoInitRemark.cpp
Commit d35bd98651ec64a8c6c9e5b942d950a20ecdcb79 by markus.boeck02
[mlir][doc] Fix links and references in top level docs directory

This is the fourth and final patch in a series of patches fixing markdown links and references inside the mlir documentation. This patch combined with the other three should fix almost every broken link on mlir.llvm.org as far as I can tell.

This patch in particular addresses all Markdown files in the top level docs directory.

Differential Revision: https://reviews.llvm.org/D103032
The file was modifiedmlir/docs/Bufferization.md
The file was modifiedmlir/docs/DeclarativeRewrites.md
The file was modifiedmlir/docs/Quantization.md
The file was modifiedmlir/docs/DebugActions.md
The file was modifiedmlir/docs/SPIRVToLLVMDialectConversion.md
The file was modifiedmlir/docs/Diagnostics.md
The file was modifiedmlir/docs/PatternRewriter.md
The file was modifiedmlir/include/mlir/IR/RegionKindInterface.td
The file was modifiedmlir/docs/OpDefinitions.md
The file was modifiedmlir/docs/LangRef.md
The file was modifiedmlir/docs/Traits.md
The file was modifiedmlir/include/mlir/IR/SymbolInterfaces.td
The file was modifiedmlir/docs/LLVMDialectMemRefConvention.md
The file was modifiedmlir/docs/DataLayout.md
The file was modifiedmlir/docs/Interfaces.md
The file was modifiedmlir/docs/PassManagement.md
The file was modifiedmlir/docs/SymbolsAndSymbolTables.md
The file was modifiedmlir/docs/ConversionToLLVMDialect.md
The file was modifiedmlir/docs/Canonicalization.md
Commit d70e9195a3339a6d56ed46ad4b8b467a0053322a by craig.topper
[RISCV] Optimize getVLENFactoredAmount function.

If the local variable `NumOfVReg` isPowerOf2_32(NumOfVReg - 1) or isPowerOf2_32(NumOfVReg + 1), the ADDI and MUL instructions can be replaced with SLLI and ADD(or SUB) instructions.

Based on original patch by StephenFan.

Reviewed By: frasercrmck, StephenFan

Differential Revision: https://reviews.llvm.org/D100577
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/rvv-framelayout.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/allocate-lmul-2-4-8.ll
Commit c666208f63802cd104db2689cd72eb7a86e64a06 by lebedev.ri
[X86][Costmodel] getMaskedMemoryOpCost(): don't scalarize non-power-of-two vectors with legal element type

This follows in steps of similar `getMemoryOpCost()` changes, D100099/D100684.

Intel SDM, `VPMASKMOV — Conditional SIMD Integer Packed Loads and Stores`:
```
Faults occur only due to mask-bit required memory accesses that caused the faults. Faults will not occur due to
referencing any memory location if the corresponding mask bit for that memory location is 0. For example, no
faults will be detected if the mask bits are all zero.
```
I.e., if mask is all-zeros, any address is fine.

Masked load/store's prime use-case is e.g. tail masking the loop remainder,
where for the last iteration, only first some few elements of a vector exist.

So much similarly, i don't see why must we scalarize non-power-of-two vectors,
iff the element type is something we can masked- store/load.
We simply need to legalize it, widen the mask, and be done with it.
And we even already count the cost of widening the mask.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D102990
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
The file was modifiedllvm/test/Analysis/CostModel/X86/masked-intrinsic-cost.ll
Commit 095e91c9737b4f67c1cb192be3fb45bee925ad8e by jonathan_roelofs
[Remarks] Add analysis remarks for memset/memcpy/memmove lengths

Re-landing now that the crasher this patch previously uncovered has been fixed
in: https://reviews.llvm.org/D102935

Differential revision: https://reviews.llvm.org/D102452
The file was removedllvm/include/llvm/Transforms/Utils/AutoInitRemark.h
The file was addedllvm/include/llvm/Transforms/Utils/MemoryOpRemark.h
The file was addedllvm/test/CodeGen/AArch64/memsize-remarks.ll
The file was modifiedllvm/lib/Transforms/Utils/CMakeLists.txt
The file was addedllvm/lib/Transforms/Utils/MemoryOpRemark.cpp
The file was modifiedllvm/test/Transforms/Util/trivial-auto-var-init-store.ll
The file was removedllvm/lib/Transforms/Utils/AutoInitRemark.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
The file was modifiedllvm/test/Transforms/Util/trivial-auto-var-init-call.ll
The file was modifiedllvm/include/llvm/Analysis/OptimizationRemarkEmitter.h
The file was modifiedllvm/lib/Transforms/Scalar/AnnotationRemarks.cpp
Commit 6435ca4e2b9b4dbdec0b1be65fcacbc0bbdb1d22 by Vitaly Buka
[NFC][scudo] Small test cleanup

Fixing issues raised on D102979 review.

Reviewed By: cryptoad

Differential Revision: https://reviews.llvm.org/D102994
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/common_test.cpp
Commit f55a7335065c8d3b9e9115ca2f234dc8b164e819 by llvmgnsyncbot
[gn build] Port 095e91c9737b
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn
Commit 3c0735c6d8d009dacdb6f63fd3164de54f7121cf by craig.topper
[X86] Call insertDAGNode on trunc/zext created in tryShiftAmountMod.

This puts the new nodes in the proper place in the topologically
sorted list of nodes.

Fixes PR50431, which was introduced recently in D101944.
The file was modifiedllvm/lib/Target/X86/X86ISelDAGToDAG.cpp
The file was addedllvm/test/CodeGen/X86/pr50431.ll