[llvm] llvm: Convert some assorted lit tests to opaque pointers (PR #174564)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 6 03:00:52 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-aarch64

Author: Matt Arsenault (arsenm)

<details>
<summary>Changes</summary>

Some of the MIR test hit a bug where it errors if there is a
raw global reference as the referenced value. Worked around some
of those by just keeping a no-op bitcast constant expression.

---

Patch is 117.47 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/174564.diff


40 Files Affected:

- (modified) llvm/test/Analysis/DependenceAnalysis/FlipFlopBaseAddress.ll (+8-8) 
- (modified) llvm/test/CodeGen/AArch64/aggressive-interleaving.ll (+7-7) 
- (modified) llvm/test/CodeGen/AArch64/apply-terminal-rule.mir (+2-2) 
- (modified) llvm/test/CodeGen/AArch64/speculation-hardening-sls-blr.mir (+4-4) 
- (modified) llvm/test/CodeGen/AArch64/tail-dup-redundant-phi.mir (+24-26) 
- (modified) llvm/test/CodeGen/AMDGPU/amdgpu-miscellaneous-uniform-intrinsic.ll (+6-6) 
- (modified) llvm/test/CodeGen/AMDGPU/amdgpu-uniform-intrinsic-combine.ll (+18-18) 
- (modified) llvm/test/CodeGen/AMDGPU/merge-load-store.mir (+23-23) 
- (modified) llvm/test/CodeGen/AMDGPU/wait-xcnt.mir (+3-3) 
- (modified) llvm/test/CodeGen/AMDGPU/waitcnt-looptest.ll (+2-2) 
- (modified) llvm/test/CodeGen/AMDGPU/wqm.ll (+1-1) 
- (modified) llvm/test/CodeGen/BPF/BTF/ptr-named-2.ll (+1-1) 
- (modified) llvm/test/CodeGen/BPF/unaligned_load_store.ll (+16-16) 
- (modified) llvm/test/CodeGen/Hexagon/and_mask_cmp0_sink.ll (+2-2) 
- (modified) llvm/test/CodeGen/Hexagon/autohvx/addi-offset-opt-addr-mode.ll (+14-14) 
- (modified) llvm/test/CodeGen/Hexagon/bittracker-regclass.ll (+5-5) 
- (modified) llvm/test/CodeGen/Hexagon/isel-fold-shl-zext.ll (+3-3) 
- (modified) llvm/test/CodeGen/Hexagon/mpy-operand-hoist.ll (+7-7) 
- (modified) llvm/test/CodeGen/Hexagon/swp-pragma-disable.ii (+10-10) 
- (modified) llvm/test/CodeGen/Hexagon/swp-pragma-initiation-interval.ii (+9-9) 
- (modified) llvm/test/CodeGen/MLRegAlloc/Inputs/input.ll (+35-35) 
- (modified) llvm/test/CodeGen/MLRegAlloc/Inputs/two-large-fcts.ll (+64-64) 
- (modified) llvm/test/CodeGen/MLRegAlloc/default-eviction-advisor.ll (+2-2) 
- (modified) llvm/test/CodeGen/MLRegAlloc/default-priority-advisor.ll (+2-2) 
- (modified) llvm/test/CodeGen/MLRegAlloc/dev-mode-log-2-fcts.ll (+4-4) 
- (modified) llvm/test/CodeGen/MLRegAlloc/empty-log.ll (+4-4) 
- (modified) llvm/test/CodeGen/Mips/GlobalISel/legalizer/load_split_because_of_memsize_or_align (+56-56) 
- (modified) llvm/test/CodeGen/RISCV/xandesbfhcvt.ll (+4-4) 
- (modified) llvm/test/CodeGen/RISCV/xqcilo.ll (+24-24) 
- (modified) llvm/test/CodeGen/RISCV/xqcisls.ll (+24-24) 
- (modified) llvm/test/CodeGen/SystemZ/debuginstr-cgp.mir (+17-17) 
- (modified) llvm/test/CodeGen/X86/isel-fabs-x87.ll (+3-3) 
- (modified) llvm/test/CodeGen/X86/non-value-mem-operand.mir (+41-44) 
- (modified) llvm/test/Feature/testalloca.ll (+7-7) 
- (modified) llvm/test/Instrumentation/NumericalStabilitySanitizer/cfg.ll (+2-2) 
- (modified) llvm/test/Instrumentation/NumericalStabilitySanitizer/memory.ll (+9-9) 
- (modified) llvm/test/LTO/Resolution/X86/comdat.ll (+8-8) 
- (modified) llvm/test/Linker/2003-08-23-GlobalVarLinking.ll (+2-2) 
- (modified) llvm/test/Transforms/LoopVersioning/add-phi-update-users.ll (+1-1) 
- (modified) llvm/test/Transforms/PGOProfile/Inputs/cspgo_bar_sample.ll (+5-5) 


``````````diff
diff --git a/llvm/test/Analysis/DependenceAnalysis/FlipFlopBaseAddress.ll b/llvm/test/Analysis/DependenceAnalysis/FlipFlopBaseAddress.ll
index bf2268b746a6f..bd3e29e10e093 100644
--- a/llvm/test/Analysis/DependenceAnalysis/FlipFlopBaseAddress.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/FlipFlopBaseAddress.ll
@@ -20,10 +20,10 @@ entry:
   br label %for.body
 
 for.body:
-  %p = phi float* [ %g, %entry ], [ %q, %for.body ]
-  %q = phi float* [ %h, %entry ], [ %p, %for.body ]
-  %0 = load float, float* %p, align 4
-  store float %f, float* %q, align 4
+  %p = phi ptr [ %g, %entry ], [ %q, %for.body ]
+  %q = phi ptr [ %h, %entry ], [ %p, %for.body ]
+  %0 = load float, ptr %p, align 4
+  store float %f, ptr %q, align 4
   %branch_cond = fcmp ugt float %0, 0.0
   br i1 %branch_cond, label %for.cond.cleanup, label %for.body
 
@@ -47,10 +47,10 @@ entry:
 
 for.body:
   %i = phi i32 [0, %entry ], [ %inc, %for.body ]
-  %p = phi float* [ %g, %entry ], [ %q, %for.body ]
-  %q = phi float* [ %h, %entry ], [ %p, %for.body ]
-  %0 = load float, float* %p, align 4
-  store float 0.0, float* %q, align 4
+  %p = phi ptr [ %g, %entry ], [ %q, %for.body ]
+  %q = phi ptr [ %h, %entry ], [ %p, %for.body ]
+  %0 = load float, ptr %p, align 4
+  store float 0.0, ptr %q, align 4
   %inc = add nuw i32 %i, 1
   %branch_cond = icmp ult i32 %i, %n
   br i1 %branch_cond, label %for.body, label %for.cond.cleanup
diff --git a/llvm/test/CodeGen/AArch64/aggressive-interleaving.ll b/llvm/test/CodeGen/AArch64/aggressive-interleaving.ll
index 4951a5e9ef070..57b4703073e81 100644
--- a/llvm/test/CodeGen/AArch64/aggressive-interleaving.ll
+++ b/llvm/test/CodeGen/AArch64/aggressive-interleaving.ll
@@ -7,7 +7,7 @@
 ; multiple loads / multiplies / adds in the vector body.
 
 
-define void @test_interleave_reduction(i32*** %arg, double** %arg1) {
+define void @test_interleave_reduction(ptr %arg, ptr %arg1) {
 ; A320-LABEL: define void @test_interleave_reduction(
 ; A320-SAME: ptr [[ARG:%.*]], ptr [[ARG1:%.*]]) #[[ATTR0:[0-9]+]] {
 ; A320-NEXT:  [[ENTRY:.*:]]
@@ -99,16 +99,16 @@ define void @test_interleave_reduction(i32*** %arg, double** %arg1) {
 ; A320-NEXT:    br label %[[OUTER]]
 ;
 entry:
-  %tpm15 = load i32**, i32*** %arg, align 8
-  %tpm19 = load double*, double** %arg1, align 8
+  %tpm15 = load ptr, ptr %arg, align 8
+  %tpm19 = load ptr, ptr %arg1, align 8
   br label %outer
 
 outer:                                            ; preds = %inner, %entry
   %tpm26 = add i64 0, 1
   %tpm10 = alloca i32, align 8
   %tpm27 = getelementptr inbounds i32, ptr %tpm10, i64 %tpm26
-  %tpm28 = getelementptr inbounds i32*, ptr %tpm15, i64 0
-  %tpm29 = load i32*, ptr %tpm28, align 8
+  %tpm28 = getelementptr inbounds ptr, ptr %tpm15, i64 0
+  %tpm29 = load ptr, ptr %tpm28, align 8
   %tpm17 = alloca double, align 8
   %tpm32 = getelementptr inbounds double, ptr %tpm17, i64 %tpm26
   br label %inner
@@ -144,7 +144,7 @@ exit.inner:                                       ; preds = %inner
 ;    duplicated loads and adds.
 ;===---------------------------------------------------------------------===;
 
-define double @sum_reduction(double* nocapture readonly %a, i64 %n) {
+define double @sum_reduction(ptr nocapture readonly %a, i64 %n) {
 ; A320-LABEL: define double @sum_reduction(
 ; A320-SAME: ptr readonly captures(none) [[A:%.*]], i64 [[N:%.*]]) #[[ATTR0]] {
 ; A320-NEXT:  [[ENTRY:.*]]:
@@ -225,7 +225,7 @@ exit:
 ;    have multiple pairs of loads and fmuls/fadds.
 ;===---------------------------------------------------------------------===;
 
-define double @dot_product(double* nocapture readonly %a, double* nocapture readonly %b, i64 %n) {
+define double @dot_product(ptr nocapture readonly %a, ptr nocapture readonly %b, i64 %n) {
 ; A320-LABEL: define double @dot_product(
 ; A320-SAME: ptr readonly captures(none) [[A:%.*]], ptr readonly captures(none) [[B:%.*]], i64 [[N:%.*]]) #[[ATTR0]] {
 ; A320-NEXT:  [[ENTRY:.*]]:
diff --git a/llvm/test/CodeGen/AArch64/apply-terminal-rule.mir b/llvm/test/CodeGen/AArch64/apply-terminal-rule.mir
index 917616fadfee1..223e715a9c2e1 100644
--- a/llvm/test/CodeGen/AArch64/apply-terminal-rule.mir
+++ b/llvm/test/CodeGen/AArch64/apply-terminal-rule.mir
@@ -11,7 +11,7 @@
     br i1 %cmp63, label %for.body.preheader, label %for.cond.cleanup
 
   for.body.preheader:                               ; preds = %entry
-    %0 = load i32, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i64 0, i64 0), align 4
+    %0 = load i32, ptr @A, align 4
     br label %for.body
 
   for.cond.cleanup:                                 ; preds = %for.body, %entry
@@ -96,7 +96,7 @@ body:             |
     successors: %bb.3(0x80000000)
 
     %1:gpr64common = ADRP target-flags(aarch64-page) @A
-    %2:gpr32 = LDRWui %1:gpr64common, target-flags(aarch64-pageoff, aarch64-nc) @A :: (dereferenceable load (s32) from `i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i64 0, i64 0)`)
+    %2:gpr32 = LDRWui %1:gpr64common, target-flags(aarch64-pageoff, aarch64-nc) @A :: (dereferenceable load (s32) from `i32* getelementptr inbounds ([100 x i32], ptr @A, i64 0, i64 0)`)
     %3:gpr32all = COPY %2:gpr32
     %4:gpr32sp = COPY %0:gpr32common
     %5:gpr32 = COPY %0:gpr32common
diff --git a/llvm/test/CodeGen/AArch64/speculation-hardening-sls-blr.mir b/llvm/test/CodeGen/AArch64/speculation-hardening-sls-blr.mir
index 7f85ce8485a07..54a2e0220475c 100644
--- a/llvm/test/CodeGen/AArch64/speculation-hardening-sls-blr.mir
+++ b/llvm/test/CodeGen/AArch64/speculation-hardening-sls-blr.mir
@@ -12,14 +12,14 @@
 # Check that the BLR SLS hardening transforms a BLR into a BL with operands as
 # expected.
 --- |
-  @a = dso_local local_unnamed_addr global i32 (...)* null, align 8
+  @a = dso_local local_unnamed_addr global ptr null, align 8
   @b = dso_local local_unnamed_addr global i32 0, align 4
 
   define dso_local void @fn1() local_unnamed_addr "target-features"="+harden-sls-blr" {
   entry:
-    %0 = load i32 ()*, i32 ()** bitcast (i32 (...)** @a to i32 ()**), align 8
+    %0 = load ptr, ptr @a, align 8
     %call = tail call i32 %0() nounwind
-    store i32 %call, i32* @b, align 4
+    store i32 %call, ptr @b, align 4
     ret void
   }
 ...
@@ -35,7 +35,7 @@ body:             |
     frame-setup CFI_INSTRUCTION def_cfa_offset 16
     frame-setup CFI_INSTRUCTION offset $w30, -16
     renamable $x8 = ADRP target-flags(aarch64-page) @a
-    renamable $x8 = LDRXui killed renamable $x8, target-flags(aarch64-pageoff, aarch64-nc) @a :: (dereferenceable load (s64) from `i32 ()** bitcast (i32 (...)** @a to i32 ()**)`)
+    renamable $x8 = LDRXui killed renamable $x8, target-flags(aarch64-pageoff, aarch64-nc) @a :: (dereferenceable load (s64) from `ptr bitcast (ptr @a to ptr)`)
     BLRNoIP killed renamable $x8, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
   ; CHECK:  BL <mcsymbol __llvm_slsblr_thunk_x8>, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0, implicit killed $x8
     renamable $x8 = ADRP target-flags(aarch64-page) @b
diff --git a/llvm/test/CodeGen/AArch64/tail-dup-redundant-phi.mir b/llvm/test/CodeGen/AArch64/tail-dup-redundant-phi.mir
index 034d226f4890b..e62518c238313 100644
--- a/llvm/test/CodeGen/AArch64/tail-dup-redundant-phi.mir
+++ b/llvm/test/CodeGen/AArch64/tail-dup-redundant-phi.mir
@@ -4,7 +4,7 @@
   target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
   target triple = "aarch64-none-linux-gnu"
 
-  define void @ham() gc "statepoint-example" personality i32* ()* @baz {
+  define void @ham() gc "statepoint-example" personality ptr @baz {
   bb:
     switch i32 undef, label %bb4 [
       i32 2050, label %bb1
@@ -12,16 +12,16 @@
     ]
 
   bb1:                                              ; preds = %bb
-    %tmp = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 10, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
+    %tmp = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 10, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
     unreachable
 
   bb2:                                              ; preds = %bb
-    %tmp3 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 10, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
+    %tmp3 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 10, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
     unreachable
 
   bb4:                                              ; preds = %bb
-    %tmp5 = call token (i64, i32, i8 addrspace(1)* (i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i8p1i8f(i64 2882400000, i32 0, i8 addrspace(1)* (i8 addrspace(1)*)* elementtype(i8 addrspace(1)* (i8 addrspace(1)*)) undef, i32 1, i32 0, i8 addrspace(1)* nonnull undef, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
-    %tmp10 = call token (i64, i32, i8 addrspace(1)* (i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i8p1i8f(i64 2, i32 4, i8 addrspace(1)* (i8 addrspace(1)*)* nonnull elementtype(i8 addrspace(1)* (i8 addrspace(1)*)) @barney, i32 1, i32 0, i8 addrspace(1)* nonnull undef, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
+    %tmp5 = call token (i64, i32, ptr addrspace(1) (ptr addrspace(1))*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr addrspace(1) (ptr addrspace(1))* elementtype(ptr addrspace(1) (ptr addrspace(1))) undef, i32 1, i32 0, ptr addrspace(1) nonnull undef, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
+    %tmp10 = call token (i64, i32, ptr addrspace(1) (ptr addrspace(1))*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2, i32 4, ptr addrspace(1) (ptr addrspace(1))* nonnull elementtype(ptr addrspace(1) (ptr addrspace(1))) @barney, i32 1, i32 0, ptr addrspace(1) nonnull undef, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
     br i1 undef, label %bb40, label %bb24
 
   bb24:                                             ; preds = %bb4
@@ -32,30 +32,30 @@
     ]
 
   bb25:                                             ; preds = %bb24
-    %tmp26 = call token (i64, i32, i8 addrspace(1)* (i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i8p1i8f(i64 2, i32 4, i8 addrspace(1)* (i8 addrspace(1)*)* nonnull elementtype(i8 addrspace(1)* (i8 addrspace(1)*)) @wobble, i32 1, i32 0, i8 addrspace(1)* nonnull undef, i32 0, i32 0) [ "deopt"(), "gc-live"(i8 addrspace(1)* null) ]
-    %tmp27 = call align 8 i8 addrspace(1)* @llvm.experimental.gc.result.p1i8(token %tmp26)
-    %tmp28 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp26, i32 0, i32 0) ; (null, null)
+    %tmp26 = call token (i64, i32, ptr addrspace(1) (ptr addrspace(1))*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2, i32 4, ptr addrspace(1) (ptr addrspace(1))* nonnull elementtype(ptr addrspace(1) (ptr addrspace(1))) @wobble, i32 1, i32 0, ptr addrspace(1) nonnull undef, i32 0, i32 0) [ "deopt"(), "gc-live"(ptr addrspace(1) null) ]
+    %tmp27 = call align 8 ptr addrspace(1) @llvm.experimental.gc.result.p1(token %tmp26)
+    %tmp28 = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %tmp26, i32 0, i32 0) ; (null, null)
     br label %bb36
 
   bb29:                                             ; preds = %bb24
-    %tmp30 = call token (i64, i32, i8 addrspace(1)* (i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i8p1i8f(i64 2, i32 4, i8 addrspace(1)* (i8 addrspace(1)*)* nonnull elementtype(i8 addrspace(1)* (i8 addrspace(1)*)) @bar, i32 1, i32 0, i8 addrspace(1)* nonnull undef, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
+    %tmp30 = call token (i64, i32, ptr addrspace(1) (ptr addrspace(1))*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2, i32 4, ptr addrspace(1) (ptr addrspace(1))* nonnull elementtype(ptr addrspace(1) (ptr addrspace(1))) @bar, i32 1, i32 0, ptr addrspace(1) nonnull undef, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
     br label %bb36
 
   bb31:                                             ; preds = %bb24
-    %tmp32 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 10, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
+    %tmp32 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 10, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
     unreachable
 
   bb35:                                             ; preds = %bb24
     unreachable
 
   bb36:                                             ; preds = %bb29, %bb25
-    %tmp37 = phi i8 addrspace(1)* [ undef, %bb29 ], [ %tmp28, %bb25 ]
-    %tmp38 = phi i8 addrspace(1)* [ undef, %bb29 ], [ %tmp27, %bb25 ]
-    %tmp39 = icmp eq i8 addrspace(1)* %tmp38, null
+    %tmp37 = phi ptr addrspace(1) [ undef, %bb29 ], [ %tmp28, %bb25 ]
+    %tmp38 = phi ptr addrspace(1) [ undef, %bb29 ], [ %tmp27, %bb25 ]
+    %tmp39 = icmp eq ptr addrspace(1) %tmp38, null
     br i1 %tmp39, label %bb51, label %bb42
 
   bb40:                                             ; preds = %bb4
-    %tmp41 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 10, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
+    %tmp41 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 10, i32 0, i32 0) [ "deopt"(), "gc-live"() ]
     unreachable
 
   bb42:                                             ; preds = %bb36
@@ -64,35 +64,33 @@
     br i1 %or.cond, label %bb49, label %bb47
 
   bb47:                                             ; preds = %bb42
-    %tmp48 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 14, i32 0, i32 0) [ "deopt"(i8 addrspace(1)* %tmp37, i8 addrspace(1)* %tmp38), "gc-live"() ]
+    %tmp48 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 14, i32 0, i32 0) [ "deopt"(ptr addrspace(1) %tmp37, ptr addrspace(1) %tmp38), "gc-live"() ]
     unreachable
 
   bb49:                                             ; preds = %bb42
-    %tmp50 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 10, i32 0, i32 0) [ "deopt"(i8 addrspace(1)* %tmp37, i8 addrspace(1)* %tmp38, i8 addrspace(1)* %tmp38), "gc-live"() ]
+    %tmp50 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 10, i32 0, i32 0) [ "deopt"(ptr addrspace(1) %tmp37, ptr addrspace(1) %tmp38, ptr addrspace(1) %tmp38), "gc-live"() ]
     unreachable
 
   bb51:                                             ; preds = %bb36
-    %tmp52 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 24, i32 0, i32 0) [ "deopt"(i8 addrspace(1)* %tmp37), "gc-live"() ]
+    %tmp52 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @wombat, i32 1, i32 0, i32 24, i32 0, i32 0) [ "deopt"(ptr addrspace(1) %tmp37), "gc-live"() ]
     unreachable
   }
 
-  declare i32* @baz()
+  declare ptr @baz()
 
-  declare i8 addrspace(1)* @barney(i8 addrspace(1)*)
+  declare ptr addrspace(1) @barney(ptr addrspace(1))
 
-  declare i8 addrspace(1)* @wobble(i8 addrspace(1)*)
+  declare ptr addrspace(1) @wobble(ptr addrspace(1))
 
-  declare i8 addrspace(1)* @bar(i8 addrspace(1)*)
+  declare ptr addrspace(1) @bar(ptr addrspace(1))
 
-  declare i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token, i32 immarg, i32 immarg) #0
+  declare ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token, i32 immarg, i32 immarg) #0
 
-  declare i8 addrspace(1)* @llvm.experimental.gc.result.p1i8(token) #0
+  declare ptr addrspace(1) @llvm.experimental.gc.result.p1(token) #0
 
   declare void @wombat(i32)
 
-  declare token @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 immarg, i32 immarg, void (i32)*, i32 immarg, i32 immarg, ...)
-
-  declare token @llvm.experimental.gc.statepoint.p0f_p1i8p1i8f(i64 immarg, i32 immarg, i8 addrspace(1)* (i8 addrspace(1)*)*, i32 immarg, i32 immarg, ...)
+  declare token @llvm.experimental.gc.statepoint.p0(i64 immarg, i32 immarg, ptr, i32 immarg, i32 immarg, ...)
 
   attributes #0 = { nounwind readnone }
 
diff --git a/llvm/test/CodeGen/AMDGPU/amdgpu-miscellaneous-uniform-intrinsic.ll b/llvm/test/CodeGen/AMDGPU/amdgpu-miscellaneous-uniform-intrinsic.ll
index 34d4c519851d4..92198f2593f3a 100644
--- a/llvm/test/CodeGen/AMDGPU/amdgpu-miscellaneous-uniform-intrinsic.ll
+++ b/llvm/test/CodeGen/AMDGPU/amdgpu-miscellaneous-uniform-intrinsic.ll
@@ -91,7 +91,7 @@ define amdgpu_kernel void @permlane64_uniform(ptr addrspace(1) %out, i32 %src) {
   ret void
 }
 
-define amdgpu_kernel void @permlane64_nonuniform(i32 addrspace(1)* %out) {
+define amdgpu_kernel void @permlane64_nonuniform(ptr addrspace(1) %out) {
 ; CHECK-LABEL: permlane64_nonuniform:
 ; CHECK:       ; %bb.0:
 ; CHECK-NEXT:    s_load_b64 s[0:1], s[4:5], 0x0
@@ -104,12 +104,12 @@ define amdgpu_kernel void @permlane64_nonuniform(i32 addrspace(1)* %out) {
 ; CHECK-NEXT:    s_endpgm
   %tid = call i32 @llvm.amdgcn.workitem.id.x()
   %v = call i32 @llvm.amdgcn.permlane64(i32 %tid)
-  %out_ptr = getelementptr i32, i32 addrspace(1)* %out, i32 %tid
-  store i32 %v, i32 addrspace(1)* %out_ptr
+  %out_ptr = getelementptr i32, ptr addrspace(1) %out, i32 %tid
+  store i32 %v, ptr addrspace(1) %out_ptr
   ret void
 }
 
-define amdgpu_kernel void @permlane64_nonuniform_expression(i32 addrspace(1)* %out) {
+define amdgpu_kernel void @permlane64_nonuniform_expression(ptr addrspace(1) %out) {
 ; CHECK-LABEL: permlane64_nonuniform_expression:
 ; CHECK:       ; %bb.0:
 ; CHECK-NEXT:    s_load_b64 s[0:1], s[4:5], 0x0
@@ -124,8 +124,8 @@ define amdgpu_kernel void @permlane64_nonuniform_expression(i32 addrspace(1)* %o
   %tid = call i32 @llvm.amdgcn.workitem.id.x()
   %tid2 = add i32 %tid, 1
   %v = call i32 @llvm.amdgcn.permlane64(i32 %tid2)
-  %out_ptr = getelementptr i32, i32 addrspace(1)* %out, i32 %tid
-  store i32 %v, i32 addrspace(1)* %out_ptr
+  %out_ptr = getelementptr i32, ptr addrspace(1) %out, i32 %tid
+  store i32 %v, ptr addrspace(1) %out_ptr
   ret void
 }
 
diff --git a/llvm/test/CodeGen/AMDGPU/amdgpu-uniform-intrinsic-combine.ll b/llvm/test/CodeGen/AMDGPU/amdgpu-uniform-intrinsic-combine.ll
index 402ccd91fed8d..2fb7d8ab6af29 100644
--- a/llvm/test/CodeGen/AMDGPU/amdgpu-uniform-intrinsic-combine.ll
+++ b/llvm/test/CodeGen/AMDGPU/amdgpu-uniform-intrinsic-combine.ll
@@ -46,7 +46,7 @@ define amdgpu_kernel void @permlane64_uniform(ptr addrspace(1) %out, i32 %src) {
   ret void
 }
 
-define amdgpu_kernel void @permlane64_nonuniform(i32 addrspace(1)* %out) {
+define amdgpu_kernel void @permlane64_nonuniform(ptr addrspace(1) %out) {
 ; CURRENT-CHECK-LABEL: define amdgpu_kernel void @permlane64_nonuniform(
 ; CURRENT-CHECK-SAME: ptr addrspace(1) writeonly captures(none) [[OUT:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
 ; CURRENT-CHECK-NEXT:    [[TID:%.*]] = tail call i32 @llvm.amdgcn.workitem.id.x()
@@ -74,12 +74,12 @@ define amdgpu_kernel void @permlane64_nonuniform(i32 addrspace(1)* %out) {
 ;
   %tid = call i32 @llvm.amdgcn.workitem.id.x()
   %v = call i32 @llvm.amdgcn.permlane64(i32 %tid)
-  %out_ptr = getelementptr i32, i32 addrspace(1)* %out, i32 %tid
- ...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/174564


More information about the llvm-commits mailing list