[all-commits] [llvm/llvm-project] 581d13: GlobalISel: Return APInt from getConstantVRegVal

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Dec 22 19:24:16 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 581d13f8aeb66c040d5ea69ad4385f766e1f97c9
      https://github.com/llvm/llvm-project/commit/581d13f8aeb66c040d5ea69ad4385f766e1f97c9
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-12-22 (Tue, 22 Dec 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
    M llvm/include/llvm/CodeGen/GlobalISel/Utils.h
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    M llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp
    M llvm/lib/CodeGen/GlobalISel/Utils.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
    M llvm/lib/Target/X86/X86InstructionSelector.cpp

  Log Message:
  -----------
  GlobalISel: Return APInt from getConstantVRegVal

Returning int64_t was arbitrarily limiting for wide integer types, and
the functions should handle the full generality of the IR.

Also changes the full form which returns the originally defined
vreg. Add another wrapper for the common case of just immediately
converting to int64_t (arguably this would be useful for the full
return value case as well).

One possible issue with this change is some of the existing uses did
break without conversion to getConstantVRegSExtVal, and it's possible
some without adequate test coverage are now broken.




More information about the All-commits mailing list