SuccessChanges

Summary

  1. [SVE] Fix VBITS_GE_256 typo in fixed-width tests. (details)
  2. Revert "Canonicalize declaration pointers when forming APValues." (details)
  3. [NFC][ScalarEvolution] Add tests with ptrtoint in constant context in loop (details)
  4. Reland "[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown" (details)
  5. [AMDGPU] Correct processor names for gfx1010 and gfx1011 (details)
  6. [gn build] Add libclang_rt.ios.a, libclang_rt.iossim.a to the build (details)
  7. [mlir][Linalg] Temporarily circumvent TensorConstant bufferize bug (details)
  8. [libomptarget][amdgcn] Implement partial barrier (details)
  9. [libunwind] [SEH] Don't interact with foreign exceptions (details)
  10. [LLD] [COFF] Fix a ubsan error in pdb-type-server-missing.yaml (details)
  11. [MinGW][clang-shlib] Build only when LLVM_LINK_LLVM_DYLIB is enabled (details)
  12. [X86] Add more tests for D89178. NFC (details)
  13. [TableGen] Add overload of RecordKeeper::getAllDerivedDefinitions() (details)
  14. DependencyScanning: pull factory function into MinimizedVFS, NFC (details)
  15. [CostModel] get type-based cost for vector intrinsics directly (details)
  16. Ensure TreeTransform considers ParmVarDecls as transformed Decls (details)
  17. Lex: Avoid MemoryBuffer* key in ExcludedPreprocessorDirectiveSkipMapping, NFC (details)
  18. [AArch64] Add tests for 128-bit shift variations. (details)
Commit abe14485fed7741ef5771d11509373c861ec37eb by mcinally
[SVE] Fix VBITS_GE_256 typo in fixed-width tests.

This seems to be a typo that propagated to a number of tests. Replace VBITS_GE_256 with CHECK. There is no VBITS_GE_256.
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-fp-reduce.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-fp-select.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-int-div.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-log-reduce.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-trunc.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-int-reduce.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-int-select.ll
Commit 9a33f027ac7d73e14ae287e78ab554142d1cbc8f by aeubanks
Revert "Canonicalize declaration pointers when forming APValues."

This reverts commit 9dcd96f728863d40d6f5922ed52732fdd728fb5f.

See https://crbug.com/1134762.
The file was modifiedclang/lib/AST/ExprConstant.cpp
The file was modifiedclang/test/OpenMP/ordered_messages.cpp
The file was modifiedclang/include/clang/AST/APValue.h
The file was modifiedclang/lib/AST/Decl.cpp
The file was modifiedclang/test/CodeGenCXX/weak-external.cpp
The file was modifiedclang/lib/AST/APValue.cpp
The file was modifiedclang/lib/CodeGen/CGExprConstant.cpp
The file was modifiedclang/lib/AST/DeclBase.cpp
The file was modifiedclang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p9.cpp
Commit 73818f450e3a90fc89eca143ee30777ed7e660e9 by lebedev.ri
[NFC][ScalarEvolution] Add tests with ptrtoint in constant context in loop

Reduced from the https://reviews.llvm.org/D88806#2325340
The file was addedllvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll
Commit 1fb610429308a7c29c5065f5cc35dcc3fd69c8b1 by lebedev.ri
Reland "[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown"

This relands commit 1c021c64caef83cccb719c9bf0a2554faa6563af which was
reverted in commit 17cec6a11a12f815052d56a17ef738cf246a2d9a because
an assertion was being triggered, since `BuildConstantFromSCEV()`
wasn't updated to handle the case where the constant we want to truncate
is actually a pointer. I was unsuccessful in coming up with a test case
where we'd end there with constant zext/sext of a pointer,
so i didn't handle those cases there until there is a test case.

Original commit message:

While we indeed can't treat them as no-ops, i believe we can/should
do better than just modelling them as `unknown`. `inttoptr` story
is complicated, but for `ptrtoint`, it seems straight-forward
to model it just as a zext-or-trunc of unknown.

This may be important now that we track towards
making inttoptr/ptrtoint casts not no-op,
and towards preventing folding them into loads/etc
(see D88979/D88789/D88788)

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D88806
The file was modifiedllvm/test/Analysis/ScalarEvolution/add-expr-pointer-operand-sorting.ll
The file was modifiedpolly/test/Isl/CodeGen/scev_looking_through_bitcasts.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/ptrtoint.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/lib/Transforms/Utils/SimplifyIndVar.cpp
The file was modifiedllvm/test/Analysis/ScalarEvolution/no-wrap-add-exprs.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll
The file was modifiedllvm/test/CodeGen/ARM/lsr-undef-in-binop.ll
The file was modifiedllvm/test/CodeGen/X86/ragreedy-hoist-spill.ll
Commit fe145b66ecfd98769feef496d47e49781efd6a2e by Tony.Tye
[AMDGPU] Correct processor names for gfx1010 and gfx1011

Change-Id: Ie409f86876b0437d0b0405aff42872963708d926

Differential Revision: https://reviews.llvm.org/D89259
The file was modifiedllvm/docs/AMDGPUUsage.rst
Commit 4a96b2e75f6db5b6f51febdd2ee559bacb7833b7 by thakis
[gn build] Add libclang_rt.ios.a, libclang_rt.iossim.a to the build

It's built with just-built clang, like all other compiler-rt parts
in the GN build.

This requires adding some cross build support to the mac toolchain.

Also add explicit mmacosx-version-min and miphoneos-version-min
flags to the build.

ios.a is only built with the arm64 slice, iossim.a only with the
x86_64 slice for now. (The latter should maybe become host_cpu
when Arm Macs become a common iOS development platform.)

With this, it's possible to build chromium/iOS with a GN-built LLVM.

Differential Revision: https://reviews.llvm.org/D89260
The file was modifiedllvm/utils/gn/build/toolchain/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/compiler-rt/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/triples.gni
The file was modifiedllvm/utils/gn/build/mac_sdk.gni
The file was modifiedllvm/utils/gn/build/toolchain/target_flags.gni
The file was modifiedllvm/utils/gn/secondary/compiler-rt/target.gni
The file was modifiedllvm/utils/gn/build/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
Commit 81ead8a53525abe1f149b3c5ad1bb44ee258d10f by nicolas.vasilache
[mlir][Linalg] Temporarily circumvent TensorConstant bufferize bug

The TensorConstantOp bufferize conversion pattern has a bug that
makes it incorrect in the case of vectors whose alignment is not
the natural alignment. Circumvent it temporarily by using a power of 2.

Differential Revision: https://reviews.llvm.org/D89265
The file was modifiedmlir/integration_test/Dialect/Linalg/CPU/test-tensor-matmul.mlir
Commit 8b6cd15242673c04618fb0aafc07d5de9e0bbe1e by jonchesterfield
[libomptarget][amdgcn] Implement partial barrier

[libomptarget][amdgcn] Implement partial barrier

named_sync is used to coordinate non-spmd kernels. This uses bar.sync on nvptx.
There is no corresponding ISA support on amdgcn, so this is implemented using
shared memory, one word initialized to zero.

Each wave increments the variable by one. Whichever wave is last is responsible
for resetting the variable to zero, at which point it and the others continue.

The race condition on a wave reaching the barrier before another wave has
noticed that it has been released is handled with a generation counter, packed
into the same word.

Uses a shared variable that is not needed on nvptx. Introduces a new hook,
kmpc_impl_target_init, to allow different targets to do extra initialization.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D88602
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/omptarget.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip
Commit fc5e68fab965bdc8fdf6db9ae2603f9dd02dec5b by martin
[libunwind] [SEH] Don't interact with foreign exceptions

This unfortunately means that we don't execute C++ destructors when
unwinding past such frames for a different SEH unwind purpose (e.g.
as part of setjmp/longjmp), but that case isn't handled properly at
the moment (the original unwind intent is lost and we end up with an
unhandled exception). This patch makes sure the foreign unwind terminates
as intended.

After executing a handler, _Unwind_Resume doesn't have access to
the target frame parameter of the original foreign unwind. We also
currently blindly set ExceptionCode to STATUS_GCC_THROW - we could
set that correctly by storing the original code in _GCC_specific_handler,
but we don't have access to the original target frame value.

This also matches what libgcc's SEH unwinding code does in this case.

Differential Revision: https://reviews.llvm.org/D89231
The file was modifiedlibunwind/src/Unwind-seh.cpp
Commit d77d727339a7439fe747f6b33c6e63ec57c6662e by martin
[LLD] [COFF] Fix a ubsan error in pdb-type-server-missing.yaml

This error has been present since 5519e4da83d1abc666203.

Differential Revision: https://reviews.llvm.org/D89027
The file was modifiedlld/COFF/DebugTypes.cpp
Commit 3b1d018c0dba45408164f5e69cb400976efa350f by martin
[MinGW][clang-shlib] Build only when LLVM_LINK_LLVM_DYLIB is enabled

Otherwise it's easy to hit 2^16 DLL exports limit.

Differential Revision: https://reviews.llvm.org/D89225
The file was modifiedclang/tools/CMakeLists.txt
Commit 09ee1fe85a34642699fc1f3a74605dd79688c739 by craig.topper
[X86] Add more tests for D89178. NFC
The file was addedllvm/test/CodeGen/X86/xaluo128.ll
Commit 350fafabe9d3bda75e80bf077303eb5a09130b53 by paul
[TableGen] Add overload of RecordKeeper::getAllDerivedDefinitions()
  and use in PseudoLowering backend.
Now the two getAllDerivedDefinitions() use StringRef and Arrayref.
Use all_of() in getAllDerivedDefinitions().
The file was modifiedllvm/lib/TableGen/Record.cpp
The file was modifiedllvm/docs/TableGen/BackGuide.rst
The file was modifiedllvm/include/llvm/TableGen/Record.h
The file was modifiedllvm/utils/TableGen/PseudoLoweringEmitter.cpp
Commit d07b290e4b7c55823895e88b683de4178ffc66db by Duncan P. N. Exon Smith
DependencyScanning: pull factory function into MinimizedVFS, NFC

Avoid need for getBufferPtr API, simplifying another patch. No
functionality change.
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
Commit 46d3e428a83ccc0cab73abb2e39a82b1cca53a52 by spatel
[CostModel] get type-based cost for vector intrinsics directly

This is NFC-intended (the reductions and other intrinsics have
tests that should provide coverage) - trying to untangle the
mess that has formed here.

We were stripping the arguments off of the given
"IntrinsicCostAttributes" and then semi-recursively
calling back into getIntrinsicInstrCost() only to
then call getTypeBasedIntrinsicInstrCost(), so make
that call directly instead.
The file was modifiedllvm/include/llvm/CodeGen/BasicTTIImpl.h
Commit ac73cafac0e523879b42b305106cd6e67bfb412e by erich.keane
Ensure TreeTransform considers ParmVarDecls as transformed Decls

See PR47804:

TreeTransform uses TransformedLocalDecls as a map of declarations that
have been transformed already. When doing a "TransformDecl", which
happens in the cases of updating a DeclRefExpr's target, the default
implementation simply returns the already transformed declaration.

However, this was not including ParmVarDecls. SO, any use of
TreeTransform that didn't re-implement TransformDecl would NOT properly
update the target of a DeclRefExpr, resulting in odd behavior.

In the case of Typo-recovery, the result was that a lambda that used its
own parameter would cause an error, since it thought that the
ParmVarDecl referenced was a different lambda. Additionally, this caused
a problem in the AST (a declrefexpr into another scope) such that a
future instantiation would cause an assertion.

This patch ensures that the ParmVarDecl transforming process records
into TransformedLocalDecls so that the DeclRefExpr is ALSO updated.
The file was modifiedclang/lib/Sema/TreeTransform.h
The file was addedclang/test/SemaCXX/pr47804.cpp
Commit 69feac12d0539a7cc19cbda906d46f67029486e1 by Duncan P. N. Exon Smith
Lex: Avoid MemoryBuffer* key in ExcludedPreprocessorDirectiveSkipMapping, NFC

This is a prep patch for changing SourceManager to return
`Optional<MemoryBufferRef>` instead of `MemoryBuffer`. With that change the
address of the MemoryBuffer will be gone, so instead use the start of the
buffer as the key for this map.

No functionality change intended, as it's expected that the pointer identity
matches between the buffers and the buffer data.

Radar-Id: rdar://70139990
Differential Revision: https://reviews.llvm.org/D89136
The file was modifiedclang/include/clang/Lex/PreprocessorExcludedConditionalDirectiveSkipMapping.h
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
The file was modifiedclang/lib/Lex/PPDirectives.cpp
Commit a324d8f964bf421fa7d8b882b0f64ead28c4149c by efriedma
[AArch64] Add tests for 128-bit shift variations.

It looks like there's still some room for optimization; the funnel shift
lowering is more efficient than the lowering of actual shifts.
The file was modifiedllvm/test/CodeGen/AArch64/arm64-long-shift.ll
The file was modifiedllvm/test/CodeGen/AArch64/funnel-shift.ll