SuccessChanges

Summary

  1. AMDGPU/GlobalISel: Select more G_EXTRACTs correctly (details)
  2. [lldb] [Process/NetBSD] Remove unused orig_*ax use (details)
  3. AMDGPU/GlobalISel: Select scalar v2s16 G_BUILD_VECTOR (details)
  4. [ARM,MVE] Generate the right instruction for vmaxnmq_m_f16. (details)
  5. [ARM,MVE] Support -ve offsets in gather-load intrinsics. (details)
  6. [ARM,MVE] Fix many signedness errors in MVE intrinsics. (details)
  7. Fix "use of uninitialized variable" static analyzer warning. NFCI. (details)
  8. Fix "use of uninitialized variable" static analyzer warnings. NFCI. (details)
  9. [AMDGPU] Fix "use of uninitialized variable" static analyzer warning. (details)
  10. [NFC] Fixes -Wrange-loop-analysis warnings (details)
  11. Adds -Wrange-loop-analysis to -Wall (details)
  12. [AIX] Use csect reference for function address constants (details)
  13. [ARM] Use correct TRAP opcode for thumb in FastISel (details)
  14. [ARM] Use the correct opcodes for Thumb2 segmented stack frame lowering (details)
  15. [llvm-libc] Fix missing virtual destructor (details)
  16. [AIX] Use csect reference for function address constants (details)
  17. [lldb/CMake] Autodetect Python dependency (details)
  18. [lldb/Test] Temporarily skip TestFoundationDisassembly on the ASan bot. (details)
  19. [clang-tidy] new check: bugprone-signed-char-misuse (details)
  20. [gn build] Port 350da402ef6 (details)
  21. [llvm-readelf] Print EI_ABIVERSION as decimal instead of hexadecimal (details)
Commit f1c85ecdfcc3b1c3500ab91ac7c1fb9d2cd8aa78 by arsenm2
AMDGPU/GlobalISel: Select more G_EXTRACTs correctly
This assumed a 32-bit extract size, which would produce invalid copies
with 64-bit extracts. Handle the easy case. Ideally we would have a way
to get the proper subreg index for any 32-bit offset, but there should
probably be a tablegenerated way of getting the subreg index for any
size and offset.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-extract.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
Commit bc763c42bbcf830ad4e543ddc8c39cd146790176 by mgorny
[lldb] [Process/NetBSD] Remove unused orig_*ax use
orig_*ax logic is Linux-specific, and was never used on NetBSD. In fact,
its support seems to be a dead code entirely.
Differential Revision: https://reviews.llvm.org/D72195
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
Commit e4464bf3d45848461630e3771d66546d389f1ed5 by arsenm2
AMDGPU/GlobalISel: Select scalar v2s16 G_BUILD_VECTOR
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
The file was modifiedllvm/include/llvm/Target/GlobalISel/SelectionDAGCompat.td
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-build-vector.v2s16.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
Commit b99ef32d041c992d0cb192bdee3e16b9a56de3a9 by simon.tatham
[ARM,MVE] Generate the right instruction for vmaxnmq_m_f16.
Summary: Due to a copy-paste error in the isel patterns, the predicated
version of this intrinsic was expanding to the `VMAXNMT.F32` instruction
instead of `VMAXNMT.F16`. Similarly for vminnm.
Reviewers: dmgreen, miyuki, MarkMurrayARM
Reviewed By: dmgreen
Subscribers: kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72269
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vmaxnmq.ll
The file was modifiedllvm/lib/Target/ARM/ARMInstrMVE.td
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vminnmq.ll
Commit 4978296cd8e4d10724cfa41f0308d256c0fd490c by simon.tatham
[ARM,MVE] Support -ve offsets in gather-load intrinsics.
Summary: The ACLE intrinsics with `gather_base` or `scatter_base` in the
name are wrappers on the MVE load/store instructions that take a vector
of base addresses and an immediate offset. The immediate offset can be
up to 127 times the alignment unit, and it can be positive or negative.
At the MC layer, we got that right. But in the Sema error checking for
the wrapping intrinsics, the offset was erroneously constrained to be
positive.
To fix this I've adjusted the `imm_mem7bit` class in the Tablegen that
defines the intrinsics. But that causes integer literals like
`0xfffffffffffffe04` to appear in the autogenerated calls to
`SemaBuiltinConstantArgRange`, which provokes a compiler warning because
that's out of the non-overflowing range of an `int64_t`. So I've also
tweaked `MveEmitter` to emit that as `-0x1fc` instead.
Updated the tests of the Sema checks themselves, and also adjusted a
random sample of the CodeGen tests to actually use negative offsets and
prove they get all the way through code generation without causing a
crash.
Reviewers: dmgreen, miyuki, MarkMurrayARM
Reviewed By: dmgreen
Subscribers: kristof.beyls, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D72268
The file was modifiedclang/test/Sema/arm-mve-immediates.c
The file was modifiedclang/include/clang/Basic/arm_mve_defs.td
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/scatter-gather.ll
The file was modifiedclang/utils/TableGen/MveEmitter.cpp
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/scatter-gather.c
Commit 34817e04feeb00dcd0515e5810218587438bd5a8 by simon.tatham
[ARM,MVE] Fix many signedness errors in MVE intrinsics.
Summary: Running an end-to-end test last week I noticed that a lot of
the ACLE intrinsics that operate differently on vectors of signed and
unsigned integers were ending up generating the signed version of the
instruction unconditionally. This is because the IR intrinsics had no
way to distinguish signed from unsigned: the LLVM type system just calls
them both `v8i16` (or whatever), so you need either separate intrinsics
for signed and unsigned, or a flag parameter that tells ISel which one
to choose.
This patch fixes all the problems of that kind that I've noticed, by
adding an i32 flag parameter to many of the IR intrinsics which is set
to 1 for unsigned (matching the existing practice in cases where we got
it right), and conditioning all the isel patterns on that flag. So the
fundamental change is in `IntrinsicsARM.td`, changing the low-level IR
intrinsics API; there are knock-on changes in
`arm_mve.td` (adjusting code gen for the ACLE intrinsics to use the
modified API) and in `ARMInstrMVE.td` (adjusting isel to expect the new
unsigned flags). The rest of this patch is boringly updating tests.
Reviewers: dmgreen, miyuki, MarkMurrayARM
Reviewed By: dmgreen
Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D72270
The file was modifiedllvm/include/llvm/IR/IntrinsicsARM.td
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vmaxnmq.c
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vqsubq.ll
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vqaddq.c
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vrhaddq.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vmullbq.ll
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vqsubq.c
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vmaxq.c
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vminnmq.ll
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vmullbq.c
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vrmulhq.ll
The file was modifiedllvm/lib/Target/ARM/ARMInstrMVE.td
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vrmulhq.c
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vrhaddq.c
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vhaddq.ll
The file was modifiedclang/include/clang/Basic/arm_mve.td
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vmulhq.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vhsubq.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vabdq.ll
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vhaddq.c
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vminq.c
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vhsubq.c
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vmulhq.c
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vqaddq.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vmaxq.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vmaxnmq.ll
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vminnmq.c
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vmulltq.ll
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vabdq.c
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/vmulltq.c
The file was modifiedllvm/test/CodeGen/Thumb2/mve-intrinsics/vminq.ll
Commit ea5abf14530634d05b9d1dc6d5d7d5f7934f0ea3 by llvm-dev
Fix "use of uninitialized variable" static analyzer warning. NFCI.
The file was modifiedllvm/lib/CodeGen/LiveDebugVariables.cpp
Commit 5bcc747393be963620d152e1637b0d2ca79bd3c2 by llvm-dev
Fix "use of uninitialized variable" static analyzer warnings. NFCI.
Add "unreachable" default cases like we do for the other switch()s in
X86MCInstLower::Lower
The file was modifiedllvm/lib/Target/X86/X86MCInstLower.cpp
Commit ea2c159f966be363d5c19df8d116d471604f7db5 by llvm-dev
[AMDGPU] Fix "use of uninitialized variable" static analyzer warning.
NFCI.
Add "unreachable" default case to
AMDGPUTargetStreamer::getArchNameFromElfMach
The file was modifiedllvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
Commit 1d549cff48cd52b9967c3a70eeb61abf86444ac3 by koraq
[NFC] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to
-Wall.
Differential Revision: https://reviews.llvm.org/D72210
The file was modifiedmlir/lib/Dialect/Linalg/Utils/Utils.cpp
The file was modifiedpolly/lib/Analysis/ScopGraphPrinter.cpp
Commit eec0240f97180ea876193dcfa3cb03cb652d9fe3 by koraq
Adds -Wrange-loop-analysis to -Wall
This makes the range loop warnings part of -Wall.
Fixes PR32823: Warn about accidental coping of data in range based for
Differential Revision: https://reviews.llvm.org/D68912
Recomitted after fixing the warnings it created.
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td
The file was modifiedclang/test/Misc/warning-wall.c
The file was modifiedclang/test/SemaCXX/warn-range-loop-analysis.cpp
Commit 61b5e727b7ccfca7e0cbb0ed70f9e828cd1514bd by diggerlin
[AIX] Use csect reference for function address constants
SUMMARY: We currently emit a reference for function address constants as
labels; for example:
foo_ptr:
.long foo however, there may be no such label in the case where the
function is undefined. Although the label exists when the function is
defined, we will (to be consistent) also use a csect reference in that
case.
Reviewers: daltenty,hubert.reinterpretcast,jasonliu,Xiangling_L
Subscribers: cebowleratibm, wuzish, nemanjai
Differential Revision: https://reviews.llvm.org/D71144
The file was addedllvm/test/CodeGen/PowerPC/aix-reference-func-addr-const.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Commit 0eb981b8ce70d07b1b1fb39b969a6fe9509840c1 by david.green
[ARM] Use correct TRAP opcode for thumb in FastISel
We were previously unconditionally using the ARM::TRAP opcode, even
under Thumb. My understanding is that these are essentially the same
thing (they both result in a trap under Thumb), but the ARM::TRAP opcode
is marked as requiring IsARM, so it is more correct to use ARM::tTRAP.
Differential Revision: https://reviews.llvm.org/D72075
The file was modifiedllvm/test/CodeGen/ARM/load_store_opt_clobber_cpsr.mir
The file was modifiedllvm/lib/Target/ARM/ARMFastISel.cpp
Commit f88d52728b9c7f91e4cfec657c0fc60be07d2cb4 by david.green
[ARM] Use the correct opcodes for Thumb2 segmented stack frame lowering
The segmented stack lowering code appears to be using ARM opcodes under
Thumb2. The MRC opcode will be the same for Thumb and ARM, but t2LDR
seems wrong. Either way, using the correct thumb vs arm opcodes is more
correct.
Differential Revision: https://reviews.llvm.org/D72074
The file was modifiedllvm/test/CodeGen/Thumb2/segmented-stacks.ll
The file was modifiedllvm/lib/Target/ARM/ARMFrameLowering.cpp
Commit 3e1f3b164cc0b4be486eebf24cca79c9f9c8c1f7 by gchatelet
[llvm-libc] Fix missing virtual destructor
Summary: This patch adds a virtual destructor to the Command class.
Reviewers: sivachandra
Subscribers: mgorny, MaskRay, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D72253
The file was modifiedlibc/utils/HdrGen/Command.h
The file was addedlibc/utils/HdrGen/Command.cpp
The file was modifiedlibc/utils/HdrGen/CMakeLists.txt
Commit 83ec9b51ed21b39063f0e0e7b272e66ae57bbcba by diggerlin
[AIX] Use csect reference for function address constants
SUMMARY: We currently emit a reference for function address constants as
labels; for example:
foo_ptr:
.long foo however, there may be no such label in the case where the
function is undefined. Although the label exists when the function is
defined, we will (to be consistent) also use a csect reference in that
case.
Address one comment https://reviews.llvm.org/D71144#inline-653255
Reviewers: daltenty,hubert.reinterpretcast,jasonliu,Xiangling_L
Subscribers: cebowleratibm, wuzish, nemanjai
Differential Revision: https://reviews.llvm.org/D71144
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Commit b3757f3091d1c718a91f5b06b7364b2af28339fa by Jonas Devlieghere
[lldb/CMake] Autodetect Python dependency
Python was the last remaining "optional" dependency for LLDB. This moves
the code to find Python into FindPythonInterpAndLibs using the same
principles as FindCursesAndPanel.
Differential revision: https://reviews.llvm.org/D72107
The file was modifiedlldb/cmake/modules/LLDBConfig.cmake
The file was addedlldb/cmake/modules/FindPythonInterpAndLibs.cmake
The file was addedlldb/lldb/cmake/modules/FindPythonInterpAndLibs.cmake
Commit 8eba3fbb12fc179959f709aa93f9af8d902fb6d7 by Jonas Devlieghere
[lldb/Test] Temporarily skip TestFoundationDisassembly on the ASan bot.
This test is timing out on the sanitized bot on GreenDragon. Temporarily
disable it to increase the signal-to-noise ration.
The file was modifiedlldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
Commit 350da402ef6b8b2473ff74822e8267bf2716c661 by tamas.zolnai
[clang-tidy] new check: bugprone-signed-char-misuse
Summary: This check searches for signed char -> integer conversions
which might indicate programming error, because of the misinterpretation
of char values. A signed char might store the non-ASCII characters as
negative values. The human programmer probably expects that after an
integer conversion the converted value matches with the character code
(a value from [0..255]), however, the actual value is in
[-128..127] interval.
See also: STR34-C. Cast characters to unsigned char before converting to
larger integer sizes
<https://wiki.sei.cmu.edu/confluence/display/c/STR34-C.+Cast+characters+to+unsigned+char+before+converting+to+larger+integer+sizes>
By now this check is limited to assignment / variable declarations. If
we would catch all signed char -> integer conversion, then it would
produce a lot of findings and also false positives. So I added only this
use case now, but this check can be extended with additional use cases
later. The CERT documentation mentions another use case when the char is
used for array subscript. Next to that a third use case can be the
signed char - unsigned char comparison, which also a use case where
things happen unexpectedly because of conversion to integer.
Reviewers: alexfh, hokein, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: sylvestre.ledru, whisperity, Eugene.Zelenko, mgorny,
xazax.hun, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D71174
The file was addedclang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.h
The file was modifiedclang-tools-extra/docs/clang-tidy/checks/list.rst
The file was modifiedclang-tools-extra/docs/ReleaseNotes.rst
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-signed-char-misuse-with-option.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
The file was addedclang-tools-extra/docs/clang-tidy/checks/bugprone-signed-char-misuse.rst
The file was addedclang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.cpp
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-signed-char-misuse.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-signed-char-misuse-fsigned-char.cpp
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-signed-char-misuse-funsigned-char.cpp
Commit ba4ca37b814a368f66328e9aee5cc479bf28d727 by llvmgnsyncbot
[gn build] Port 350da402ef6
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn
Commit 896b84ac2c70ad69075c2496f8f89247704fff0b by maskray
[llvm-readelf] Print EI_ABIVERSION as decimal instead of hexadecimal
This matches GNU readelf and llvm-readobj.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D72234
The file was modifiedllvm/test/tools/llvm-readobj/ELF/gnu-file-headers.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/file-header-abi-version.test
The file was modifiedllvm/test/tools/llvm-objcopy/ELF/partitions.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedlld/test/ELF/mips-n32-rels.s