[all-commits] [llvm/llvm-project] 5af0f0: GlobalISel: Constant fold G_PTR_ADD

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Feb 8 16:21:18 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5af0f097bad5f8ff7d502c241b913ba77dfdd9eb
      https://github.com/llvm/llvm-project/commit/5af0f097bad5f8ff7d502c241b913ba77dfdd9eb
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp
    M llvm/lib/CodeGen/GlobalISel/Utils.cpp
    M llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fold-binop-into-select.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i16.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-call.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-function-args.ll
    A llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-non-integral-address-spaces.ll
    M llvm/test/CodeGen/AMDGPU/overlapping-tuple-copy-implicit-op-failure.ll

  Log Message:
  -----------
  GlobalISel: Constant fold G_PTR_ADD

Some globals lower to literal addresses on AMDGPU.

This may be wrong for non-integral address spaces. I'm wondering if we
should just allow regular G_ADD to use pointer types, and reserve
G_PTR_ADD for non-integral address spaces.




More information about the All-commits mailing list