1. Jan 07, 2020
    • Simon Pilgrim's avatar
      [AMDGPU] Fix "use of uninitialized variable" static analyzer warning. NFCI. · ea2c159f
      Simon Pilgrim authored
      Add "unreachable" default case to AMDGPUTargetStreamer::getArchNameFromElfMach
      ea2c159f
    • Simon Pilgrim's avatar
      Fix "use of uninitialized variable" static analyzer warnings. NFCI. · 5bcc7473
      Simon Pilgrim authored
      Add "unreachable" default cases like we do for the other switch()s in X86MCInstLower::Lower
      5bcc7473
    • Simon Pilgrim's avatar
    • Simon Tatham's avatar
      [ARM,MVE] Fix many signedness errors in MVE intrinsics. · 34817e04
      Simon Tatham authored
      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
      34817e04
    • Simon Tatham's avatar
      [ARM,MVE] Support -ve offsets in gather-load intrinsics. · 4978296c
      Simon Tatham authored
      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
      4978296c
    • Simon Tatham's avatar
      [ARM,MVE] Generate the right instruction for vmaxnmq_m_f16. · b99ef32d
      Simon Tatham authored
      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
      b99ef32d
    • Matt Arsenault's avatar
      e4464bf3
    • Michał Górny's avatar
      [lldb] [Process/NetBSD] Remove unused orig_*ax use · bc763c42
      Michał Górny authored
      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
      bc763c42
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Select more G_EXTRACTs correctly · f1c85ecd
      Matt Arsenault authored
      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.
      f1c85ecd
  2. Jan 06, 2020