SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [RISCV][ASAN] support code for architecture-specific parts of asan (details)
  2. [CodeGen] Improve likelihood branch weights (details)
  3. [RISCV][ASAN] instrumentation pass now uses proper shadow offset (details)
  4. [X86][SSE] isTargetShuffleEquivalent - ensure shuffle inputs are the correct size. (details)
  5. [MemCpyOpt] Add additional call slot tests (NFC) (details)
  6. [SDAG] fold x * 0.0 at node creation time (details)
  7. [PowerPC] Add builtins for xvtdiv(dp|sp) and xvtsqrt(dp|sp). (details)
  8. [NFC][clang][codegen] Autogenerate a few ARM SVE tests that are being affected by an upcoming patch (details)
  9. [VPlan] Account for removed users in replaceAllUsesWith. (details)
  10. [VPlan] Add VPRecipeBase::toVPUser helper (NFC). (details)
  11. [X86] Consolidate wide Key Locker intrinsics into the same header as the other Key Locker intrinsics. (details)
  12. [X86] Synchronize the loadiwkey builtin operand order with gcc version. (details)
  13. [X86] Synchronize the encodekey builtins with gcc. Don't assume void* is 16 byte aligned. (details)
  14. [X86] Sync AESENC/DEC Key Locker builtins with gcc. (details)
  15. [gn build] Port 6c6cd5f8a97 (details)
  16. [SDA] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds (details)
  17. [X86] Remove an accidentally added file. NFC. (details)
  18. [MemCpyOpt] Don't use array allocas in tests (NFC) (details)
  19. Implement callee/caller type checking for llvm.call (details)
  20. [MemCpyOpt] Add tests for call slot optimization with GEPs (NFC) (details)
  21. llvm-dwarfdump: Skip tombstoned address ranges (details)
  22. [NFC][SCEV] Add a test with some patterns where we could treat inttoptr/ptrtoint as semi-transparent (details)
  23. [Coroutines][NewPM] Fix coroutine tests under new pass manager (details)
  24. Revert "[RFC] Factor out repetitive cmake patterns for llvm-style projects" (details)
Commit 7ce4dfb4dd2ca431f17b62ef563cc3b2737c677e by kupokupokupopo
[RISCV][ASAN] support code for architecture-specific parts of asan

[9/11] patch series to port ASAN for riscv64

Depends On D87579

Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D87580
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp
The file was modifiedcompiler-rt/lib/asan/asan_shadow_setup.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc
The file was modifiedcompiler-rt/lib/asan/asan_mapping.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_common.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
The file was modifiedcompiler-rt/lib/asan/asan_allocator.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform.h
Commit 1113fbf44c2250621548e278d2a1e11ab2b2d63d by koraq
[CodeGen] Improve likelihood branch weights

Bruno De Fraine discovered some issues with D85091. The branch weights
generated for `logical not` and `ternary conditional` were wrong. The
`logical and` and `logical or` differed from the code generated of
`__builtin_predict`.

Adjusted the generated code for the likelihood to match
`__builtin_predict`. The patch is based on Bruno's suggestions.

Differential Revision: https://reviews.llvm.org/D88363
The file was addedclang/test/CodeGenCXX/attr-likelihood-if-vs-builtin-expect.cpp
The file was modifiedclang/lib/CodeGen/CGStmt.cpp
The file was modifiedclang/lib/CodeGen/CodeGenFunction.h
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
Commit a566f0525a692e6e696add6f369edab979d6f300 by kupokupokupopo
[RISCV][ASAN] instrumentation pass now uses proper shadow offset

[10/11] patch series to port ASAN for riscv64

Depends On D87580

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D87581
The file was modifiedllvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Commit e4e5c42896df5ed61a98926ea42f5b1ab734e1c4 by llvm-dev
[X86][SSE] isTargetShuffleEquivalent - ensure shuffle inputs are the correct size.

Preliminary patch for the next stage of PR45974 - we don't want to be creating 'padded' vectors on-the-fly at all in combineX86ShufflesRecursively, and only pad the source inputs if we have a definite match inside combineX86ShuffleChain.

This means that the inputs to combineX86ShuffleChain might soon be smaller than the final root value type, so we should ensure that isTargetShuffleEquivalent only matches with the inputs if they are the correct size.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 2c48dd7c3ac5f8a0287d1fc7455d45d755d664aa by nikita.ppv
[MemCpyOpt] Add additional call slot tests (NFC)

The case of a destination read between call and memcpy was not
covered anywhere (but is handled correctly).

However, a potentially throwing call between the call and the
memcpy appears to be miscompiled.
The file was addedllvm/test/Transforms/MemCpyOpt/callslot.ll
Commit 2ccbf3dbd5bac9d4fea8b67404b4c6b006d4adbe by spatel
[SDAG] fold x * 0.0 at node creation time

In the motivating case from https://llvm.org/PR47517
we create a node that does not get constant folded
before getNegatedExpression is attempted from some
other node, and we crash.

By moving the fold into SelectionDAG::simplifyFPBinop(),
we get the constant fold sooner and avoid the problem.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/X86/fmul-combines.ll
The file was modifiedllvm/test/CodeGen/ARM/softfp-constant-comparison.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit e3475f5b91c8dc3142b90b2bb4a1884d6e8d8c2c by esme.yi
[PowerPC] Add builtins for xvtdiv(dp|sp) and xvtsqrt(dp|sp).

Summary: This patch implements the builtins for xvtdivdp, xvtdivsp, xvtsqrtdp, xvtsqrtsp.
The instructions correspond to the following builtins:
int vec_test_swdiv(vector double v1, vector double v2);
int vec_test_swdivs(vector float v1, vector float v2);
int vec_test_swsqrt(vector double v1);
int vec_test_swsqrts(vector float v1);
This patch depends on D88274, which fixes the bug in copying from CRRC to GPRC/G8RC.

Reviewed By: steven.zhang, amyk

Differential Revision: https://reviews.llvm.org/D88278
The file was modifiedclang/test/CodeGen/builtins-ppc-vsx.c
The file was modifiedllvm/test/CodeGen/PowerPC/vsx_builtins.ll
The file was modifiedclang/include/clang/Basic/BuiltinsPPC.def
The file was modifiedllvm/include/llvm/IR/IntrinsicsPowerPC.td
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrVSX.td
The file was modifiedclang/lib/Headers/altivec.h
Commit aaae13d0c29ec2a20f93e6adb9d9b5c2656d2af6 by lebedev.ri
[NFC][clang][codegen] Autogenerate a few ARM SVE tests that are being affected by an upcoming patch
The file was modifiedclang/test/CodeGen/attr-arm-sve-vector-bits-call.c
The file was modifiedclang/test/CodeGen/attr-arm-sve-vector-bits-bitcast.c
The file was modifiedclang/test/CodeGen/attr-arm-sve-vector-bits-globals.c
The file was modifiedclang/test/CodeGen/attr-arm-sve-vector-bits-cast.c
Commit f5fe7abe8a8c8150b7b305bae963b429f15ea217 by flo
[VPlan] Account for removed users in replaceAllUsesWith.

Make sure we do not iterate using an invalid iterator.

Another small fix/step towards traversing the def-use chains in VPlan.
The file was modifiedllvm/unittests/Transforms/Vectorize/VPlanTest.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
Commit 357bbaab666b212c5bfb65df80e76aace5367eff by flo
[VPlan] Add VPRecipeBase::toVPUser helper (NFC).

This adds a helper to convert a VPRecipeBase pointer to a VPUser, for
recipes that inherit from VPUser. Once VPRecipeBase directly inherits
from VPUser this helper can be removed.
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
The file was modifiedllvm/unittests/Transforms/Vectorize/VPlanTest.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.h
Commit 6c6cd5f8a9750865800ce26bdeacd84533335db3 by craig.topper
[X86] Consolidate wide Key Locker intrinsics into the same header as the other Key Locker intrinsics.
The file was modifiedclang/lib/Headers/CMakeLists.txt
The file was modifiedclang/lib/Headers/keylockerintrin.h
The file was modifiedclang/lib/Headers/immintrin.h
The file was removedclang/lib/Headers/keylocker_wide_intrin.h
Commit 28595cbbeb2cc75584410b8b974f67ec99a853f2 by craig.topper
[X86] Synchronize the loadiwkey builtin operand order with gcc version.
The file was modifiedllvm/include/llvm/IR/IntrinsicsX86.td
The file was modifiedllvm/lib/Target/X86/X86InstrKL.td
The file was modifiedllvm/test/CodeGen/X86/keylocker-intrinsics.ll
The file was modifiedclang/include/clang/Basic/BuiltinsX86.def
The file was modifiedclang/lib/Headers/keylockerintrin.h
Commit 230c57b0bd8321085a5e0339baf37b509d5c76f6 by craig.topper
[X86] Synchronize the encodekey builtins with gcc. Don't assume void* is 16 byte aligned.

We were taking multiple pointer arguments in the builtin.
gcc accepts a single void*.

The cast from void* to _m128i* caused the IR generation to assume
the pointer was aligned.

Instead make the builtin take a single void*, emit i8* GEPs to
adjust then cast to <2 x i64>* and perform a store with align of 1.
The file was modifiedclang/lib/Headers/keylockerintrin.h
The file was modifiedclang/test/CodeGen/X86/keylocker.c
The file was addedllvm/test/CodeGen/X86/keylocker-intrinsics-fast-isel.ll
The file was modifiedclang/include/clang/Basic/BuiltinsX86.def
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
Commit a02b449bb1556fe0f17b86eaa69f6bcda945d123 by craig.topper
[X86] Sync AESENC/DEC Key Locker builtins with gcc.

For the wide builtins, pass a single input and output pointer to
the builtins. Emit the GEPs and input loads from CGBuiltin.
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/lib/Headers/keylockerintrin.h
The file was modifiedclang/include/clang/Basic/BuiltinsX86.def
The file was modifiedllvm/test/CodeGen/X86/keylocker-intrinsics-fast-isel.ll
The file was modifiedclang/test/CodeGen/X86/keylocker.c
Commit 955b926b0b37ee3f56d32a90702cea9878eb9c78 by llvmgnsyncbot
[gn build] Port 6c6cd5f8a97
The file was modifiedllvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
Commit c36d441b6b64e412a975adb1401657870588563c by i
[SDA] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds
The file was modifiedllvm/lib/Analysis/SyncDependenceAnalysis.cpp
Commit b4288f278a254e597295001f7e544b680b54e61a by martin
[X86] Remove an accidentally added file. NFC.

This file seems to have been accidentally added as part of commit
413577a8790407d75ba834fa5668c2632fe1851e.
The file was removedllvm/lib/Target/X86/X86InstrInfo.td.rej
Commit 22664a325167086260aa2d1ff629686020f2b27d by nikita.ppv
[MemCpyOpt] Don't use array allocas in tests (NFC)

Apparently querying dereferenceability of array allocations is
being intentionally penalized (https://reviews.llvm.org/D41398),
so avoid using them in tests.
The file was modifiedllvm/test/Transforms/MemCpyOpt/callslot.ll
Commit f05173d0bfc268530afd9fb9622caf7f1db5f8d6 by joker.eph
Implement callee/caller type checking for llvm.call

This aligns the behavior with the standard call as well as the LLVM verifier.

Reviewed By: ftynse, dcaballe

Differential Revision: https://reviews.llvm.org/D88362
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/test/Dialect/LLVMIR/invalid.mlir
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
Commit 8aaa73134954b5e5ad51631665fd188f38ded75e by nikita.ppv
[MemCpyOpt] Add tests for call slot optimization with GEPs (NFC)
The file was modifiedllvm/test/Transforms/MemCpyOpt/callslot.ll
Commit 8036cf7f5402ea7fc8564a9a2beae512c324bf3d by dblaikie
llvm-dwarfdump: Skip tombstoned address ranges

Make the dumper & API a bit more informative by using the new tombstone
addresses to filter out or otherwise render more explicitly dead code
ranges.
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
The file was addedllvm/test/tools/llvm-dwarfdump/X86/tombstone.s
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDie.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/Dwarf.h
Commit 80ac6da98e8fb88ed68308acc8e8689420a54f90 by lebedev.ri
[NFC][SCEV] Add a test with some patterns where we could treat inttoptr/ptrtoint as semi-transparent
The file was addedllvm/test/Analysis/ScalarEvolution/semi-transparent-inttoptr-ptrtoint-casts.ll
Commit 37010d4ddf477d3cc60792a92918af5f2f6e42c3 by aeubanks
[Coroutines][NewPM] Fix coroutine tests under new pass manager

Some new function parameter attributes are derived under NPM.

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D88760
The file was modifiedllvm/test/Transforms/Coroutines/coro-retcon.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-swifterror.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-retcon-alloca.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-retcon-resume-values.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-retcon-once-value.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-retcon-value.ll
Commit b0dce6b37f15f487064223f7e3e6a5701a9d7bff by stephen.neuendorffer
Revert "[RFC] Factor out repetitive cmake patterns for llvm-style projects"

This reverts commit e9b87f43bde8b5f0d8a79c5884fdce639b12e0ca.

There are issues with macros generating macros without an obvious simple fix
so I'm going to revert this and try something different.
The file was removedllvm/cmake/modules/LLVMProjectTargets.cmake
The file was modifiedmlir/examples/standalone/CMakeLists.txt
The file was modifiedmlir/examples/toy/CMakeLists.txt
The file was modifiedmlir/tools/mlir-linalg-ods-gen/CMakeLists.txt
The file was modifiedmlir/tools/mlir-cuda-runner/CMakeLists.txt
The file was modifiedmlir/tools/mlir-translate/CMakeLists.txt
The file was modifiedmlir/tools/mlir-reduce/CMakeLists.txt
The file was modifiedmlir/examples/standalone/standalone-opt/CMakeLists.txt
The file was modifiedmlir/test/Examples/standalone/test.toy
The file was modifiedmlir/tools/mlir-opt/CMakeLists.txt
The file was modifiedmlir/tools/mlir-rocm-runner/CMakeLists.txt
The file was modifiedmlir/tools/mlir-vulkan-runner/CMakeLists.txt
The file was removedllvm/cmake/modules/LLVMProjectOptions.cmake
The file was modifiedmlir/cmake/modules/AddMLIR.cmake
The file was modifiedmlir/CMakeLists.txt
The file was modifiedmlir/tools/mlir-cpu-runner/CMakeLists.txt
The file was modifiedmlir/examples/standalone/standalone-translate/CMakeLists.txt