[all-commits] [llvm/llvm-project] 8bc03d: GlobalISel: Merge G_PTR_MASK with llvm.ptrmask int...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue May 26 08:48:37 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8bc03d2168241f7b12265e9cd7e4eb7655709f34
      https://github.com/llvm/llvm-project/commit/8bc03d2168241f7b12265e9cd7e4eb7655709f34
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-05-26 (Tue, 26 May 2020)

  Changed paths:
    M llvm/docs/GlobalISel/GenericOpcode.rst
    M llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
    M llvm/include/llvm/Support/TargetOpcodes.def
    M llvm/include/llvm/Target/GenericOpcodes.td
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
    M llvm/lib/CodeGen/MachineVerifier.cpp
    M llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
    M llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
    M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/legalize-vaarg.mir
    M llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
    M llvm/test/CodeGen/AArch64/GlobalISel/select.mir
    R llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ptr-mask.mir
    A llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ptrmask.mir
    A llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-ptrmask.ll
    A llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-ptrmask.mir
    A llvm/test/MachineVerifier/test_g_ptrmask.mir

  Log Message:
  -----------
  GlobalISel: Merge G_PTR_MASK with llvm.ptrmask intrinsic

Confusingly, these were unrelated and had different semantics. The
G_PTR_MASK instruction predates the llvm.ptrmask intrinsic, but has a
different format. G_PTR_MASK only allows clearing the low bits of a
pointer, and only a constant number of bits. The ptrmask intrinsic
allows an arbitrary mask. Replace G_PTR_MASK to match the intrinsic.

Only selects the cases that look like the old instruction. More work
is needed to select the general case. Also new legalization code is
still needed to deal with the case where the incoming mask size does
not match the pointer size, which has a specified behavior in the
langref.




More information about the All-commits mailing list