SuccessChanges

Summary

  1. [clangd] Fix a typo, NFC. (details)
  2. [AST][RecoveryExpr] Support dependent cast-expr in C for error-recovery. (details)
  3. [AMDGPU] Add test with redundant copies to temporary stack slot produced by expandUnalignedLoad (details)
  4. [AMDGPU] Prefer SplitVectorLoad/Store over expandUnalignedLoad/Store (details)
  5. [mlir] Added strides check to rank reducing subview verification (details)
  6. [cmake] Fix cmake warning in standalone compiler-rt builds. (details)
  7. [llvm-readobj] Add --coff-tls-directory flag to print TLS Directory & test. (details)
  8. [Test] Add test showing that we fail to eliminate implied exit conditions (details)
  9. [llvm-readobj][test] - Improve testing in hash-table.test (details)
  10. Import llvm::StringSwitch into mlir namespace. (details)
  11. [InstCombine] canNarrowShiftAmt - replace custom Constant matching with m_SpecificInt_ICMP (details)
  12. [mlir] Add basic support for dynamic tensor results in TensorToBuffers.cpp. (details)
  13. [InstCombine] matchRotate - add support for matching general funnel shifts with constant shift amounts (PR46896) (details)
  14. [llvm-objdump] Ensure we consistently use the llvm::stable_sort wrappers. (details)
  15. AArch64: treat MC expressions as 2s complement arithmetic. (details)
  16. [AMDGPU][MC][GFX1030] Disabled v_mac_f32 (details)
  17. [DebugInfo] Improve dbg preservation in LSR. (details)
  18. [Driver] Add output file to properties of Command (details)
  19. [clangd] Add a missing include-fixer test for incomplete_type, NFC. (details)
  20. [InstCombine] matchFunnelShift - support non-uniform constant vector shift amounts (PR46895) (details)
  21. [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload (details)
  22. [AMDGPU] Use isLegalMUBUFImmOffset more (details)
  23. [mlir][spirv] Add OpenCL extended ops: exp, fabs, s_abs (details)
  24. [mlir][Linalg] Add TensorsToBuffers support for Constant ops. (details)
Commit ba268d2fb09ceabfa03a6499258f973be62d7663 by hokein.wu
[clangd] Fix a typo, NFC.
The file was modifiedclang-tools-extra/clangd/ClangdServer.h
Commit a96bcfb196740b5be217f6166462ee1206530520 by hokein.wu
[AST][RecoveryExpr] Support dependent cast-expr in C for error-recovery.

Suppress spurious "typecheck_cond_expect_scalar_operand" diagnostic.

See whole context: https://reviews.llvm.org/D85025

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D84387
The file was modifiedclang/lib/Sema/SemaCast.cpp
The file was modifiedclang/test/Sema/error-dependence.c
The file was modifiedclang/test/AST/ast-dump-recovery.c
Commit 380087e6c9a226b28c24de3b18e202e20d430765 by Mirko.Brkusanin
[AMDGPU] Add test with redundant copies to temporary stack slot produced by expandUnalignedLoad

Differential Revision: https://reviews.llvm.org/D88895
The file was addedllvm/test/CodeGen/AMDGPU/load-local-redundant-copies.ll
Commit 7c88d13fd1c1a864124d96224996c62192d431f2 by Mirko.Brkusanin
[AMDGPU] Prefer SplitVectorLoad/Store over expandUnalignedLoad/Store

ExpandUnalignedLoad/Store can sometimes produce unnecessary copies to
temporary stack slot. We should prefer splitting vectors if possible.

Differential Revision: https://reviews.llvm.org/D88882
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/load-local-redundant-copies.ll
Commit e7cf723051cd4638cf5d2c407b756312292e7c18 by limo
[mlir] Added strides check to rank reducing subview verification

Added missing strides check to verification method of rank reducing subview
which enforces strides specification for the resulting type.

Differential Revision: https://reviews.llvm.org/D88879
The file was modifiedmlir/test/IR/invalid-ops.mlir
The file was modifiedmlir/test/IR/core-ops.mlir
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
Commit 8e9622f96120842852f37bfaeea738b4b4ed5cb0 by pierre.gousseau
[cmake] Fix cmake warning in standalone compiler-rt builds.

```
cd compiler-rt/build
cmake -G Ninja ../ -DCOMPILER_RT_STANDALONE_BUILD=ON
-DLLVM_CONFIG_PATH=<...>llvm-project/build/bin/llvm-config
-DCOMPILER_RT_INCLUDE_TESTS=ON
```

```
-- check-shadowcallstack does nothing.
Traceback (most recent call last):
  File "<string>", line 22, in <module>
  IndexError: list index out of range
  -- Configuring done
  -- Generating done
```

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D88957
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
Commit 568035ac3955790aee2a5dbc2b1f4074c76bb4d7 by me
[llvm-readobj] Add --coff-tls-directory flag to print TLS Directory & test.

Akin to dumpbin's /TLS option, this will print out the TLS directory, if
present, in the image.

Example output:
```
> llvm-readobj --coff-tls-directory test.exe
File: test.exe
Format: COFF-x86-64
Arch: x86_64
AddressSize: 64bit
TLSDirectory {
  StartAddressOfRawData: 0x140004000
  EndAddressOfRawData: 0x140004040
  AddressOfIndex: 0x140002000
  AddressOfCallBacks: 0x0
  SizeOfZeroFill: 0x0
  Characteristics [ (0x0)
  ]
}
```

Reviewed By: jhenderson, grimar

Differential Revision: https://reviews.llvm.org/D88635
The file was modifiedllvm/tools/llvm-readobj/COFFDumper.cpp
The file was modifiedllvm/docs/CommandGuide/llvm-readobj.rst
The file was modifiedllvm/include/llvm/Object/COFF.h
The file was modifiedllvm/tools/llvm-readobj/ObjDumper.h
The file was modifiedllvm/lib/Object/COFFObjectFile.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/COFF.h
The file was addedllvm/test/tools/llvm-readobj/COFF/tls-directory.test
The file was modifiedllvm/tools/llvm-readobj/llvm-readobj.cpp
Commit 9824d5c83844495ac00c04dc1789c3529a68c1ac by mkazantsev
[Test] Add test showing that we fail to eliminate implied exit conditions
The file was modifiedllvm/test/Transforms/IndVarSimplify/eliminate-comparison.ll
Commit 3578945004e322e45fdc47ca804f65628ea325a7 by grimar
[llvm-readobj][test] - Improve testing in hash-table.test

This makes tests stricter and adds cases to verify what
we do when:

1) there is no `DT_HASH` tag (but there is a `SHT_HASH` section in sections header)
2) the sh_entsize of the `SHT_HASH` section is not equal to 4.

Differential revision: https://reviews.llvm.org/D88812
The file was modifiedllvm/test/tools/llvm-readobj/ELF/hash-table.test
Commit cc83dc191c1ef04907ccd4308cc6aa5bf6fcd3c6 by csigg
Import llvm::StringSwitch into mlir namespace.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D88971
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp
The file was modifiedmlir/lib/IR/SymbolTable.cpp
The file was modifiedmlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp
The file was modifiedmlir/include/mlir/Support/LLVM.h
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedmlir/lib/ExecutionEngine/JitRunner.cpp
The file was modifiedmlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
The file was modifiedmlir/lib/Parser/Lexer.cpp
The file was modifiedmlir/lib/Dialect/PDL/IR/PDL.cpp
The file was modifiedmlir/lib/TableGen/Predicate.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
The file was modifiedmlir/lib/TableGen/Format.cpp
Commit aa47962cc9493cd79ca78954e721ed02479729c7 by llvm-dev
[InstCombine] canNarrowShiftAmt - replace custom Constant matching with m_SpecificInt_ICMP

The existing code ignores undef values which matches m_SpecificInt_ICMP, although m_SpecificInt_ICMP returns false for an all-undef constant, I've added test coverage at rGfe0197e194a64f9 to show that undef folding should already have dealt with that case.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Commit c1fd4305b68500c754a7ce6a86fe297c36e21d3b by pifon
[mlir] Add basic support for dynamic tensor results in TensorToBuffers.cpp.

The simplest case is when the indexing maps are DimIds in every component. This covers cwise ops.

Also:
* Expose populateConvertLinalgOnTensorsToBuffersPatterns in Transforms.h
* Expose emitLoopRanges in Transforms.h

Differential Revision: https://reviews.llvm.org/D88781
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Loops.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
The file was modifiedmlir/test/Dialect/Linalg/tensors-to-buffers.mlir
Commit e1d4ca00094a4267b6fd70f613f2e0390b2a8cbf by llvm-dev
[InstCombine] matchRotate - add support for matching general funnel shifts with constant shift amounts (PR46896)

First step towards extending the existing rotation support to full funnel shift handling now that the backend legalization support has improved.

This enables us to match the shift by constant cases, which are pretty trivial to expand again if necessary.

D88420 will add non-uniform support for funnel shifts as well once its been finalized.

Differential Revision: https://reviews.llvm.org/D88834
The file was modifiedllvm/test/Transforms/InstCombine/funnel.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Commit 7d01bb8f56f5f1d8e180e1b8d47c00b45aa0555b by llvm-dev
[llvm-objdump] Ensure we consistently use the llvm::stable_sort wrappers.

We use this everywhere else in this file, these were just missed.
The file was modifiedllvm/tools/llvm-objdump/llvm-objdump.cpp
Commit 38348fa26548fdcdbc1ae18c6e612d67f103ee37 by Tim Northover
AArch64: treat MC expressions as 2s complement arithmetic.

We had a couple of over-zealous diagnostics that meant IR with a reasonable and
valid interpretation was rejected.
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
The file was addedllvm/test/CodeGen/AArch64/2s-complement-asm.ll
Commit 1e75668821f7c2abfdb4a25af76239b9120ae0ca by dmitry.preobrazhensky
[AMDGPU][MC][GFX1030] Disabled v_mac_f32

See bug 47741 <https://bugs.llvm.org/show_bug.cgi?id=47741>

Reviewers: nhaehnle, rampitec

Differential Revision: https://reviews.llvm.org/D89000
The file was modifiedllvm/test/MC/AMDGPU/gfx1030_err.s
The file was modifiedllvm/lib/Target/AMDGPU/VOP2Instructions.td
Commit 06758c6a6135f59deec8e73d4fcb69946ab47f54 by markus.lavin
[DebugInfo] Improve dbg preservation in LSR.

Use SCEV to salvage additional @llvm.dbg.value that have turned into
referencing undef after transformation (and traditional
salvageDebugInfo). Before transformation compute SCEV for each
@llvm.dbg.value in the loop body and store it (along side its current
DIExpression). After transformation update those @llvm.dbg.value now
referencing undef by comparing its stored SCEV to the SCEV of the
current loop-header PHI-nodes. Allow match with offset by inserting
compensation code in the DIExpression.

Includes fix for the nullptr deref that caused the original commit
to be reverted in 9d63029770.

Fixes : PR38815

Differential Revision: https://reviews.llvm.org/D87494
The file was modifiedllvm/test/DebugInfo/COFF/fpo-shrink-wrap.ll
The file was addedllvm/test/Transforms/LoopStrengthReduce/dbg-preserve-0.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
Commit 70bf35070a74df02ed12b9988ce58d50e63a7c04 by sepavloff
[Driver] Add output file to properties of Command

Object of class `Command` contains various properties of a command to
execute, but output file was missed from them. This change adds this
property. It is required for reporting consumed time and memory implemented
in D78903 and may be used in other cases too.

Differential Revision: https://reviews.llvm.org/D78902
The file was modifiedclang/lib/Driver/ToolChains/NaCl.cpp
The file was modifiedclang/lib/Driver/ToolChains/PS4CPU.cpp
The file was modifiedclang/lib/Driver/ToolChains/InterfaceStubs.cpp
The file was modifiedclang/lib/Driver/ToolChains/OpenBSD.cpp
The file was modifiedclang/lib/Driver/ToolChains/XCore.cpp
The file was modifiedclang/lib/Driver/ToolChains/DragonFly.cpp
The file was modifiedclang/lib/Driver/ToolChains/Myriad.cpp
The file was modifiedclang/lib/Driver/ToolChains/NetBSD.cpp
The file was modifiedclang/lib/Driver/ToolChains/Flang.cpp
The file was modifiedclang/lib/Driver/ToolChains/BareMetal.cpp
The file was modifiedclang/lib/Driver/Job.cpp
The file was modifiedclang/lib/Driver/ToolChains/MSVC.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Driver/ToolChains/CloudABI.cpp
The file was modifiedclang/lib/Driver/ToolChains/Fuchsia.cpp
The file was modifiedclang/include/clang/Driver/Job.h
The file was modifiedclang/unittests/Driver/ToolChainTest.cpp
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
The file was modifiedclang/lib/Driver/ToolChains/Ananas.cpp
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedclang/lib/Driver/ToolChains/Darwin.cpp
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.cpp
The file was modifiedclang/lib/Driver/ToolChains/CrossWindows.cpp
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was modifiedclang/lib/Driver/ToolChains/Hexagon.cpp
The file was modifiedclang/lib/Driver/ToolChains/Solaris.cpp
The file was modifiedclang/lib/Driver/ToolChains/Cuda.cpp
The file was modifiedclang/lib/Driver/ToolChains/WebAssembly.cpp
The file was modifiedclang/lib/Driver/ToolChains/AVR.cpp
The file was modifiedclang/lib/Driver/ToolChains/Minix.cpp
The file was modifiedclang/lib/Driver/ToolChains/MinGW.cpp
The file was modifiedclang/lib/Driver/ToolChains/AIX.cpp
The file was modifiedclang/lib/Driver/ToolChains/RISCVToolchain.cpp
The file was modifiedclang/lib/Driver/ToolChains/MSP430.cpp
The file was modifiedclang/lib/Driver/ToolChains/FreeBSD.cpp
Commit a4e27220c2a1046616556b8aadb0ae8f5e0255be by hokein.wu
[clangd] Add a missing include-fixer test for incomplete_type, NFC.

Also sort the list to make it easier to verify with the implementation
code.

Differential Revision: https://reviews.llvm.org/D88964
The file was modifiedclang-tools-extra/clangd/IncludeFixer.cpp
The file was modifiedclang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
Commit 5415fef3abefd666fc9209f8305f5e0b4103b5cf by llvm-dev
[InstCombine] matchFunnelShift - support non-uniform constant vector shift amounts (PR46895)

Complete basic PR46895 fixes by refactoring D87452/D88402 to allow us to match non-uniform constant values.

We still don't handle non-uniform vectors that contain undef elements, but that can wait until we have a decent generic mechanism for this.

Differential Revision: https://reviews.llvm.org/D88420
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
The file was modifiedllvm/test/Transforms/InstCombine/funnel.ll
The file was modifiedllvm/test/Transforms/InstCombine/rotate.ll
Commit 6668e4cc685e74a17ebd386913e842ac3d7472e5 by jhuber6
[OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

Summary:
This patch adds an error to Clang that detects if OpenMP offloading is used
between two architectures with incompatible pointer sizes. This ensures that
the data mapping can be done correctly and solves an issue in code generation
generating the wrong size pointer.

Reviewer: jdoerfert

Subscribers: cfe-commits delcypher guansong llvm-commits sstefan1 yaxunl

Tags: #OpenMP #Clang

Differential Revision: https://reviews.llvm.org/D88594
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_if_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_if_codegen.cpp
The file was addedclang/test/OpenMP/target_incompatible_architecture_messages.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_if_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_if_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_if_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_parallel_reduction_codegen_tbaa_PR46146.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticDriverKinds.td
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_if_codegen.cpp
Commit f53b43c00a0706232f6b94532a34397d8c2aa681 by sebastian.neubauer
[AMDGPU] Use isLegalMUBUFImmOffset more

Instead of hardcoding isUInt<12>.

Differential Revision: https://reviews.llvm.org/D88961
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit 123415eddaf7d55db8606597e6e2375869b3f395 by konrad.dobros
[mlir][spirv] Add OpenCL extended ops: exp, fabs, s_abs

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D88966
The file was addedmlir/test/Dialect/SPIRV/Serialization/ocl-ops.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
The file was addedmlir/test/Dialect/SPIRV/ocl-ops.mlir
The file was addedmlir/include/mlir/Dialect/SPIRV/SPIRVOCLOps.td
Commit 30e6033b455bfa4b888eedb2cfe808a61845ed5f by nicolas.vasilache
[mlir][Linalg] Add TensorsToBuffers support for Constant ops.

This revision also inserts an end-to-end test that lowers tensors to buffers all the way to executable code on CPU.

Differential revision: https://reviews.llvm.org/D88998
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorOps.td
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorOps.h
The file was modifiedmlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
The file was addedmlir/integration_test/Dialect/Linalg/CPU/test-tensor-e2e.mlir
The file was modifiedmlir/test/Dialect/Linalg/tensors-to-buffers.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/PassDetail.h
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.td
The file was modifiedmlir/lib/Transforms/BufferPlacement.cpp