SuccessChanges

Summary

  1. [libcxx] [test] Add UNSUPPORTED: msvc in a couple verify.cpp tests (details)
  2. [LangRef] update according to unwinding support in inline asm (details)
  3. [mlir] Support permutation maps in vector transfer op folder (details)
  4. [mlir][NFC] Remove illegal TanhOp in LLVMConversionTarget (details)
  5. [WebAssembly][CodeGen] IR support for WebAssembly local variables (details)
  6. [clang] Add support for the "abstract" contextual keyword of MSVC (details)
  7. Revert "[WebAssembly][CodeGen] IR support for WebAssembly local variables" (details)
  8. [clang] NFC: split HeaderMapTest to have re-usable header map implementation for testing (details)
  9. [RISCV] Support vector conversions between fp and i1 (details)
  10. [lldb][NFC] Remove unused var in SBDebugger::GetInternalVariableValue (details)
  11. [DSE] Remove stores in the same loop iteration (details)
  12. [InsCombine] Fix a few remaining vec transforms to use poison instead of undef (details)
  13. [RISCV] Scale scalably-typed split argument offsets by VSCALE (details)
  14. [LiveDebugVariables] Stop trimming locations of non-inlined vars (details)
Commit 7d7b72bad7ff1fc22c79d535826de43452f3379d by martin
[libcxx] [test] Add UNSUPPORTED: msvc in a couple verify.cpp tests

Due to issues with the detection of the clang-verify feature, these
tests have been skipped in the Windows CI configuration so far.

Differential Revision: https://reviews.llvm.org/D103308
The file was modifiedlibcxx/test/std/language.support/cmp/cmp.categories.pre/zero_type.verify.cpp
The file was modifiedlibcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.fail.cpp
Commit 22f635b1b31a6bee1b0b8df58d5c8207c835b216 by amanieu
[LangRef] update according to unwinding support in inline asm

https://reviews.llvm.org/D95745 introduced a new `unwind` keyword for inline assembler expressions. Inline asms marked with the `unwind` keyword allows stack unwinding from inline assembly because the compiler emits unwinding information ("around" the inline asm) as it would for calls/invokes. Unwinding the stack from within non-unwind inline asm may cause UB.

Reviewed By: Amanieu

Differential Revision: https://reviews.llvm.org/D102642
The file was modifiedllvm/docs/LangRef.rst
Commit 2bc8ffa8afabeaf1cc97640419c1c2a926265170 by springerm
[mlir] Support permutation maps in vector transfer op folder

Fold away in_bounds attribute even if the transfer op has a non-identity permutation map.

Differential Revision: https://reviews.llvm.org/D103133
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
Commit 2290a80b4dcbeb230ea47ea59b00205ccefbaa96 by tpopp
[mlir][NFC] Remove illegal TanhOp in LLVMConversionTarget

No tests fail and this seems to be technical debt from when the math
dialect was created. This should not be there as it prevents users from
configuring their converion target freely and results in unexpected
behavior on seemingly unrelated ops.

Differential Revision: https://reviews.llvm.org/D103388
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
Commit bf35f4af51cddd743435bb6b94a45592c967891a by wingo
[WebAssembly][CodeGen] IR support for WebAssembly local variables

This patch adds TargetStackID::WasmLocal.  This stack holds locations of
values that are only addressable by name -- not via a pointer to memory.
For the WebAssembly target, these objects are lowered to WebAssembly
local variables, which are managed by the WebAssembly run-time and are
not addressable by linear memory.

For the WebAssembly target IR indicates that an AllocaInst should be put
on TargetStackID::WasmLocal by putting it in the non-integral address
space WASM_ADDRESS_SPACE_WASM_VAR, with value 1.  SROA will mostly lift
these allocations to SSA locals, but any alloca that reaches instruction
selection (usually in non-optimized builds) will be assigned the new
TargetStackID there.  Loads and stores to those values are transformed
to new WebAssemblyISD::LOCAL_GET / WebAssemblyISD::LOCAL_SET nodes,
which then lower to the type-specific LOCAL_GET_I32 etc instructions via
tablegen patterns.

Differential Revision: https://reviews.llvm.org/D101140
The file was modifiedllvm/include/llvm/CodeGen/TargetFrameLowering.h
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
The file was addedllvm/test/CodeGen/WebAssembly/ir-locals.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.cpp
The file was addedllvm/test/CodeGen/WebAssembly/ir-locals-stackid.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISD.def
The file was modifiedllvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h
The file was modifiedllvm/lib/Target/RISCV/RISCVFrameLowering.cpp
The file was modifiedllvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.cpp
The file was modifiedllvm/include/llvm/CodeGen/MIRYamlMapping.h
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
Commit 818338add77411f5e9713247ea66142f332ef350 by hans
[clang] Add support for the "abstract" contextual keyword of MSVC

https://docs.microsoft.com/en-us/cpp/extensions/abstract-cpp-component-extensions?view=msvc-160
Note: like the already supported "sealed" keyword, the "abstract"
keyword is supported by MSVC by default.

Differential revision: https://reviews.llvm.org/D102517
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td
The file was modifiedclang/include/clang/Basic/DiagnosticParseKinds.td
The file was modifiedclang/include/clang/Sema/DeclSpec.h
The file was modifiedclang/lib/Parse/ParseDeclCXX.cpp
The file was modifiedclang/include/clang/Parse/Parser.h
The file was modifiedclang/lib/Sema/DeclSpec.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/test/SemaCXX/MicrosoftExtensions.cpp
The file was modifiedclang/include/clang/AST/DeclCXX.h
Commit bc1ad6e3c49dacea862ca6fa44297c64bb053ad8 by wingo
Revert "[WebAssembly][CodeGen] IR support for WebAssembly local variables"

This reverts commit bf35f4af51cddd743435bb6b94a45592c967891a.  There was
an error in a shared-library build.
The file was modifiedllvm/lib/Target/RISCV/RISCVFrameLowering.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
The file was modifiedllvm/include/llvm/CodeGen/TargetFrameLowering.h
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h
The file was modifiedllvm/include/llvm/CodeGen/MIRYamlMapping.h
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.cpp
The file was removedllvm/test/CodeGen/WebAssembly/ir-locals-stackid.ll
The file was modifiedllvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
The file was removedllvm/test/CodeGen/WebAssembly/ir-locals.ll
The file was modifiedllvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISD.def
Commit 37b530a2ea8bdc28a22a3f8ca701455fb7febdea by dmitry.polukhin
[clang] NFC: split HeaderMapTest to have re-usable header map implementation for testing

NFC changes required for https://reviews.llvm.org/D103142

Test Plan: check-clang

Differential Revision: https://reviews.llvm.org/D103229
The file was addedclang/unittests/Lex/HeaderMapTestUtils.h
The file was modifiedclang/unittests/Lex/HeaderMapTest.cpp
Commit eb2393659113696adf2bd770917f3109d1455c76 by fraser
[RISCV] Support vector conversions between fp and i1

This patch custom lowers FP_TO_[US]INT and [US]INT_TO_FP conversions
between floating-point and boolean vectors. As the default action is
scalarization, this patch both supports scalable-vector conversions and
improves the code generation for fixed-length vectors.

The lowering for these conversions can piggy-back on the existing
lowering, which lowers the operations to a supported narrowing/widening
conversion and then either an extension or truncation.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D103312
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp2i.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-i2fp.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vitofp-sdnode.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfptoi-sdnode.ll
Commit 24ee6d3d3c6215db11e9015e94f5f4a9b5a7b750 by Raphael Isemann
[lldb][NFC] Remove unused var in SBDebugger::GetInternalVariableValue

This variable was originally just the default return value but got unused
in 6920b52be6f8731692a9bff4fe6a7b596cda00c5 .
The file was modifiedlldb/source/API/SBDebugger.cpp
Commit 222aeb4d51a46c5a81c9e4ccb16d1d19dd21ec95 by david.green
[DSE] Remove stores in the same loop iteration

DSE will currently only remove stores in the same block unless they can
be guaranteed to be loop invariant. This expands that to any stores that
are in the same Loop, at the same loop level. This should still account
for where AA/MSSA will not handle aliasing between loops, but allow the
dead stores to be removed where they overlap in the same loop iteration.
It requires adding loop info to DSE, but that looks fairly harmless.

The test case this helps is from code like this, which can come up in
certain matrix operations:
  for(i=..)
    dst[i] = 0;
    for(j=..)
      dst[i] += src[i*n+j];

After LICM, this becomes:
for(i=..)
  dst[i] = 0;
  sum = 0;
  for(j=..)
    sum += src[i*n+j];
  dst[i] = sum;

The first store is dead, and with this patch is now removed.

Differntial Revision: https://reviews.llvm.org/D100464
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedllvm/test/Other/opt-O2-pipeline.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/opt-pipeline.ll
The file was modifiedllvm/test/Other/opt-O3-pipeline.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/multiblock-loops.ll
The file was modifiedllvm/test/Other/opt-O3-pipeline-enable-matrix.ll
The file was modifiedllvm/test/Other/opt-Os-pipeline.ll
Commit 7161bb87c914684562bfb20fec7d60e533150f7a by aqjune
[InsCombine] Fix a few remaining vec transforms to use poison instead of undef

This is a patch that replaces shufflevector and insertelement's placeholder value with poison.

Underlying motivation is to fix the semantics of shufflevector with undef mask to return poison instead
(D93818)
The consensus has been made in the late 2020 via mailing list as well as the thread in https://bugs.llvm.org/show_bug.cgi?id=44185 .

This patch is a simple syntactic change to the existing code, hence directly pushed as a commit.
The file was modifiedllvm/test/Transforms/InstCombine/X86/x86-pshufb.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/operandorder.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/pr47629.ll
The file was modifiedllvm/test/Transforms/InstCombine/broadcast-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/alternate-int.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was modifiedllvm/test/Transforms/InstCombine/bitcast-vec-canon-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/pr46983.ll
The file was modifiedllvm/test/Transforms/InstCombine/X86/x86-pshufb-inseltpoison.ll
The file was modifiedllvm/test/Transforms/InstCombine/extractelement-inseltpoison.ll
The file was modifiedllvm/test/Transforms/InstCombine/canonicalize-vector-extract.ll
The file was modifiedllvm/test/Transforms/InstCombine/insert-extract-shuffle.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/alternate-int-inseltpoison.ll
The file was modifiedllvm/test/Transforms/InstCombine/masked_intrinsics.ll
The file was modifiedllvm/test/Transforms/InstCombine/bitcast-vec-canon.ll
The file was modifiedllvm/test/Transforms/InstCombine/broadcast.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
The file was modifiedllvm/test/Transforms/InstCombine/insert-extract-shuffle-inseltpoison.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/metadata-enable.ll
The file was modifiedllvm/test/Transforms/InstCombine/extractelement.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/getelementptr.ll
The file was modifiedllvm/test/Transforms/InstCombine/masked_intrinsics-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/pr47629-inseltpoison.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
Commit 2b37c405cc18019ea5056a63fa65f839a4890b50 by fraser
[RISCV] Scale scalably-typed split argument offsets by VSCALE

This patch fixes a bug in lowering scalable-vector types in RISC-V's
main calling convention. When scalable-vector types are split and passed
indirectly, the target is responsible for scaling the offset --
initially set to the known-minimum store size -- by the scalable factor.

Before this we were issuing overlapping loads or stores to the different
parts, leading to incorrect codegen.

Credit to @HsiangKai for spotting this.

Reviewed By: HsiangKai

Differential Revision: https://reviews.llvm.org/D103262
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/calling-conv.ll
Commit dee85d47d9f15fc268f7b18f279dac2774836615 by djtodoro
[LiveDebugVariables] Stop trimming locations of non-inlined vars

The D35953, D62650 and D73691 introduced trimming of variables locations
in LiveDebugVariables pass, since there are some cases where after
the virtregrewrite we have exploded number of DBG_VALUEs created for some
inlined variables. As it looks, all problematic cases were regarding
inlined variables, so it seems reasonable to stop trimming the location
ranges for non-inlined variables.
It has very good impact on the llvm-locstats report.

Differential Revision: https://reviews.llvm.org/D102917
The file was addedllvm/test/DebugInfo/MIR/Mips/livedebugvars-stop-trimming-loc.mir
The file was modifiedllvm/test/CodeGen/PowerPC/non-debug-mi-search-frspxsrsp.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ptr-arg-dbg-value.ll
The file was modifiedllvm/test/DebugInfo/X86/dbg-addr-dse.ll
The file was modifiedllvm/lib/CodeGen/LiveDebugVariables.cpp