[llvm] AMDGPU: Fix assertion on load of vector of pointers (PR #110436)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 29 23:15:37 PDT 2024
================
@@ -0,0 +1,45 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=infer-address-spaces %s | FileCheck %s
+
+define <8 x i1> @load_vector_of_flat_ptr_from_constant(ptr addrspace(4) %ptr) {
+; CHECK-LABEL: define <8 x i1> @load_vector_of_flat_ptr_from_constant(
+; CHECK-SAME: ptr addrspace(4) [[PTR:%.*]]) {
+; CHECK-NEXT: [[LD:%.*]] = load <8 x ptr>, ptr addrspace(4) [[PTR]], align 128
+; CHECK-NEXT: [[TMP1:%.*]] = addrspacecast <8 x ptr> [[LD]] to <8 x ptr addrspace(1)>
+; CHECK-NEXT: [[TMP2:%.*]] = addrspacecast <8 x ptr addrspace(1)> [[TMP1]] to <8 x ptr>
+; CHECK-NEXT: [[CMP:%.*]] = icmp eq <8 x ptr> [[TMP2]], zeroinitializer
----------------
arsenm wrote:
This output isn't great. We should have changed the type of the load and compare
https://github.com/llvm/llvm-project/pull/110436
More information about the llvm-commits
mailing list