1. Oct 31, 2023
  2. Oct 30, 2023
    • LLVM GN Syncbot's avatar
      [gn build] Port 72e6c1c7 · 3746f20b
      LLVM GN Syncbot authored
      3746f20b
    • Nick Desaulniers's avatar
      [CGExprConstant] stop calling into ConstExprEmitter for Reference type destinations (#70366) · d9b15b06
      Nick Desaulniers authored
      Fixes a bug introduced by
      commit b54294e2 ("[clang][ConstantEmitter] have
      tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first")
      
      In the added test case, the QualType is a LValueReferenceType.
      
          LValueReferenceType 0x558412998d90 'const char (&)[41]'
          `-ParenType 0x558412998d30 'const char[41]' sugar
            `-ConstantArrayType 0x558412998cf0 'const char[41]' 41
              `-QualType 0x55841294c271 'const char' const
                `-BuiltinType 0x55841294c270 'char'
      
      Fixes: #69979
      d9b15b06
    • Luke Lau's avatar
      [RISCV] Remove old peephole declaration in RISCVISelDAGToDAG.h. NFC · fecd11ba
      Luke Lau authored
      It was removed in 72e6c1c7
      fecd11ba
    • David Spickett's avatar
      [lldb][AArch64][Linux] Rename Is<ext>Enabled to Is<ext>Present (#70303) · bb9dced2
      David Spickett authored
      For most register sets, if it was enabled this meant you could use it,
      it was present in the process. There was no present but turned off
      state. So "enabled" made sense.
      
      Then ZA came along (and soon to be ZT0) where ZA can be present in the
      hardware when you have SME, but ZA itself can be made inactive. This
      means that "IsZAEnabled()" doesn't mean is it active, it means do you
      have SME. Which is very confusing when we actually want to know if ZA is
      active.
      
      So instead say "IsZAPresent", to make these checks more specific. For
      things that can't be made inactive, present will imply "active" as
      they're never inactive.
      bb9dced2
    • tsitdikov's avatar
      Remove unused variable. (#70670) · 8bc4462b
      tsitdikov authored
      All usages of the variable have been removed in
      https://github.com/llvm/llvm-project/pull/68689, we now need to clean it
      up.
      8bc4462b
    • Natalie Chouinard's avatar
      [HLSL][SPIR-V] Fix clang driver lang target test (#70330) · f89b8599
      Natalie Chouinard authored
      This test has been failing since the SPIR-V backend started failing
      explicitly on unsupported shader types. Switched this test to a compute
      shader since it is currently the only type supported.
      f89b8599
    • Timm Baeder's avatar
      [clang][Interp] Fix truncateCast() (#69911) · 56dab2cb
      Timm Baeder authored
      The added test case used to fail because we converted the LHS to `-1`.
      56dab2cb
    • Jessica Del's avatar
      [AMDGPU][wmma] - Add tied wmma intrinsic (#69903) · 849297c9
      Jessica Del authored
      These new intrinsics, `amdgcn_wmma_tied_f16_16x16x16_f16` and
      `amdgcn_wmma_tied_f16_16x16x16_f16`,
      explicitly tie the destination accumulator matrix to the input
      accumulator matrix.
      
      The `wmma_f16` and `wmma_bf16` intrinsics only write to 16-bit of the
      32-bit destination VGPRs.
      Which half is determined via the `op_sel` argument. The other half of
      the destination registers remains unchanged.
      
      In some cases however, we expect the destination to copy the other
      halves from the input accumulator.
      For instance, when packing two separate accumulator matrices into one.
      In that case, the two matrices
      are tied into the same registers, but separate halves. Then it is
      important to copy the other matrix values
      to the new destination.
      849297c9
    • Luke Lau's avatar
      [RISCV] Begin moving post-isel vector peepholes to a MF pass (#70342) · 72e6c1c7
      Luke Lau authored
      We currently have three postprocess peephole optimisations for vector
      pseudos:
      
      1) Masked pseudo with all ones mask -> unmasked pseudo
      2) Merge vmerge pseudo into operand pseudo's mask
      3) vmerge pseudo with all ones mask -> vmv.v.v pseudo
      
      This patch aims to move these peepholes out of SelectionDAG and into a
      separate RISCVFoldMasks MachineFunction pass.
      
      There are a few motivations for doing this:
      
      * The current SelectionDAG implementation operates on MachineSDNodes,
      which are essentially MachineInstrs but require a bunch of logic to
      reason about chain and glue operands. The RISCVII::has*Op helper
      functions also don't exactly line up with the SDNode operands. Mutating
      these pseudos and their operands in place becomes a good bit easier at
      the MachineInstr level. For example, we would no longer need to check
      for cycles in the DAG during performCombineVMergeAndVOps.
      
      * Although it's further down the line, moving this code out of
      SelectionDAG allows it to be reused by GlobalISel later on.
      
      * In performCombineVMergeAndVOps, it may be possible to commute the
      operands to enable folding in more cases (see
      test/CodeGen/RISCV/rvv/vmadd-vp.ll). There is existing machinery to
      commute operands in TII::commuteInstruction, but it's implemented on
      MachineInstrs.
      
      The pass runs straight after ISel, before any of the other machine SSA
      optimization passes run. This is so that dead-mi-elimination can mop up
      any vmsets that are no longer used (but if preferred we could try and
      erase them from inside RISCVFoldMasks itself). This also means that
      these peepholes are no longer run at codegen -O0, so this patch isn't
      strictly NFC.
      
      Only the performVMergeToVMv peephole is refactored in this patch, the
      remaining two would be implemented later. And as noted by @preames, it
      should be possible to move doPeepholeSExtW out of SelectionDAG as well.
      72e6c1c7
    • Stanislav Mekhanoshin's avatar
      [AMDGPU] Select 64-bit imm moves if can be encoded as 32 bit operand (#70395) · fe8335ba
      Stanislav Mekhanoshin authored
      This allows folding of 64-bit operands if fit into 32-bit. Fixes
      https://github.com/llvm/llvm-project/issues/67781
      fe8335ba
    • Stanislav Mekhanoshin's avatar
      [AMDGPU] Prevent folding of the negative i32 literals as i64 (#70274) · ee6d62db
      Stanislav Mekhanoshin authored
      We can use sign extended 64-bit literals, but only for signed operands.
      At the moment we do not know if an operand is signed. Such operand will
      be encoded as its low 32 bits and then either correctly sign extended or
      incorrectly zero extended by HW.
      ee6d62db
    • cor3ntin's avatar
      [Clang] Diagnose defaulted assignment operator with incompatible object parameter (#70176) · 273ceb13
      cor3ntin authored
      Per https://eel.is/c++draft/dcl.fct.def.default#2.2, the explicit object
      parameter of a defaulted special member function must be of the same
      type as the one of an equivalent implicitly defaulted function, ignoring
      references.
      
      Fixes #69233
      273ceb13