SuccessChanges

Summary

  1. [DebugInfo] Avoid LSR crash on large integer inputs (details)
  2. [Coroutines] checkAsyncFuncPointer - use cast<> instead of dyn_cast<> for dereferenced pointer. NFCI. (details)
  3. [SimplifyIndVar] createWideIV - make WideIVInfo arg a const ref. NFCI. (details)
  4. [LV] Simplify lambda in all_of to directly return hasVF() result. (NFC) (details)
  5. [SVE] Lower vector CTLZ, CTPOP and CTTZ operations. (details)
  6. [IR] Add ConstantInt::getBool helpers to wrap getTrue/getFalse. (details)
  7. [VE] Support SJLJ exception related instructions (details)
  8. [OpenCL] Warn about side effects for unevaluated vec_step arg (details)
  9. [clangd] When querying drivers by binary, look in PATH too (details)
  10. [AMDGPU] Split out new helper function macToMad in SIFoldOperands. NFC. (details)
  11. [AMDGPU] Precommit test case for D94010 (details)
  12. [AMDGPU] Handle v_fmac_legacy_f32 in SIFoldOperands (details)
Commit 914066fe38a93c004b742a696ec337701eb738ec by jeremy.morse
[DebugInfo] Avoid LSR crash on large integer inputs

Loop strength reduction tries to recover debug variable values by looking
for simple offsets from PHI values. In really extreme conditions there may
be an offset used that won't fit in an int64_t, hitting an APInt assertion.

This patch adds a regression test and adjusts the equivalent value
collecting code to filter out any values where the offset can't be
represented by an int64_t. This means that for very large integers with
very large offsets, the variable location will become undef, which is the
same behaviour as before 2a6782bb9f1 / D87494.

Differential Revision: https://reviews.llvm.org/D94016
The file was addedllvm/test/Transforms/LoopStrengthReduce/dbg-preserve-1.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Commit 7a97eeb197a8023acbb800d40b3bb852fc2f5d60 by llvm-dev
[Coroutines] checkAsyncFuncPointer - use cast<> instead of dyn_cast<> for dereferenced pointer. NFCI.

We're immediately dereferencing the casted pointer, so use cast<> which will assert instead of dyn_cast<> which can return null.

Fixes static analyzer warning.
The file was modifiedllvm/lib/Transforms/Coroutines/Coroutines.cpp
Commit a000366d0502b35fc0d3b113ace7f0e3bbdc08cd by llvm-dev
[SimplifyIndVar] createWideIV - make WideIVInfo arg a const ref. NFCI.

The WideIVInfo arg is only ever used as a const.

Fixes cppcheck warning.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyIndVar.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/SimplifyIndVar.h
Commit 38c6933dcc9660b0c00f00ae62345339010dc764 by flo
[LV] Simplify lambda in all_of to directly return hasVF() result. (NFC)

The if in the lambda is not necessary. We can directly return the result
of hasVF.
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
Commit eba6deab22b576004a209b3f42ccc5e58f7603bf by paul.walker
[SVE] Lower vector CTLZ, CTPOP and CTTZ operations.

CTLZ and CTPOP are lowered to CLZ and CNT instructions respectively.

CTTZ is not a native SVE operation but is instead lowered to:
  CTTZ(V) => CTLZ(BITREVERSE(V))

In the case of fixed-length support using SVE we also lower CTTZ
operating on NEON sized vectors because of its reliance on
BITREVERSE which is also lowered to SVE intructions at these lengths.

Differential Revision: https://reviews.llvm.org/D93607
The file was modifiedllvm/lib/Target/AArch64/SVEInstrFormats.td
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was addedllvm/test/CodeGen/AArch64/sve-bit-counting.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was addedllvm/test/CodeGen/AArch64/sve-fixed-length-bit-counting.ll
Commit 313d982df65a7a8f1da2da5f0e03e6b6e301ce3c by llvm-dev
[IR] Add ConstantInt::getBool helpers to wrap getTrue/getFalse.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
The file was modifiedllvm/lib/IR/Constants.cpp
The file was modifiedllvm/include/llvm/IR/Constants.h
Commit f784be0777f34a5b3bc3da6892ca242de7840fce by marukawa
[VE] Support SJLJ exception related instructions

Support EH_SJLJ_LONGJMP, EH_SJLJ_SETJMP, and EH_SJLJ_SETUP_DISPATCH
for SjLj exception handling.  NC++ uses SjLj exception handling, so
implement it first.  Add regression tests also.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D94071
The file was addedllvm/test/CodeGen/VE/Scalar/builtin_sjlj_landingpad.ll
The file was modifiedllvm/lib/Target/VE/VEISelLowering.cpp
The file was addedllvm/lib/Target/VE/VEInstrBuilder.h
The file was modifiedllvm/lib/Target/VE/VEInstrInfo.td
The file was modifiedllvm/lib/Target/VE/VEISelLowering.h
The file was addedllvm/test/CodeGen/VE/Scalar/builtin_sjlj_bp.ll
The file was addedllvm/test/CodeGen/VE/Scalar/builtin_sjlj_callsite.ll
The file was addedllvm/test/CodeGen/VE/Scalar/builtin_sjlj.ll
The file was removedllvm/test/CodeGen/VE/Scalar/sjlj_except.ll
Commit 0e4d2361b817bd16f97cd45d5792017edc3891ee by sven.vanhaastregt
[OpenCL] Warn about side effects for unevaluated vec_step arg

The argument to the `vec_step` builtin is not evaluated.  Hoist the
diagnostic for this in `Sema::CheckUnaryExprOrTypeTraitOperand` such
that it comes before `Sema::CheckVecStepTraitOperandType`.

A minor side-effect of this change is that it also produces the
warning for `co_await` and `co_yield` as `sizeof` arguments now, which
seems to be reasonable given that the warning is emitted for `typeid`
already.

Differential Revision: https://reviews.llvm.org/D91348
The file was modifiedclang/test/SemaCXX/coroutines.cpp
The file was modifiedclang/test/SemaOpenCL/vec_step.cl
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit 2f8d1e9eb27e111eb6dfd242d88dd7c98005fb5c by sam.mccall
[clangd] When querying drivers by binary, look in PATH too

Sometimes compile_commands.json databases are created without an
absolute path for the driver in the command field. By default the driver
name is appended to the current directory, however if no driver is found
in that location assume it was in the default PATH and try finding it
there

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D93600
The file was modifiedclang-tools-extra/clangd/test/system-include-extractor.test
The file was modifiedclang-tools-extra/clangd/QueryDriverDatabase.cpp
Commit 4e6054a86c0cb0697913007c99b59f3f65c9d04b by jay.foad
[AMDGPU] Split out new helper function macToMad in SIFoldOperands. NFC.

Differential Revision: https://reviews.llvm.org/D94009
The file was modifiedllvm/lib/Target/AMDGPU/SIFoldOperands.cpp
Commit 639a50e2f138ed3e647b00809a2871a1b9ae9012 by jay.foad
[AMDGPU] Precommit test case for D94010
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.fma.legacy.ll
Commit 3914bebe91f6b557e61d6d74117762f9043593e0 by jay.foad
[AMDGPU] Handle v_fmac_legacy_f32 in SIFoldOperands

Convert it to v_fma_legacy_f32 if it is profitable to do so, just like
other mac instructions that are converted to their mad equivalents.

Differential Revision: https://reviews.llvm.org/D94010
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.fma.legacy.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIFoldOperands.cpp