[all-commits] [llvm/llvm-project] 754ff4: AMDGPU: Try to use zext to implement constant-32-b...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Thu Nov 20 16:22:35 PST 2025
Branch: refs/heads/users/arsenm/amdgpu/use-zext-addrspacecast-constant-32-lowering
Home: https://github.com/llvm/llvm-project
Commit: 754ff45ec723d8f6ac09f4a5cf80b78471422fcc
https://github.com/llvm/llvm-project/commit/754ff45ec723d8f6ac09f4a5cf80b78471422fcc
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2025-11-20 (Thu, 20 Nov 2025)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-addrspacecast.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-constant-32bit.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sextload-constant-32bit.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-zextload-constant-32bit.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/load-constant32bit.ll
M llvm/test/CodeGen/AMDGPU/codegen-prepare-addrspacecast-non-null.ll
Log Message:
-----------
AMDGPU: Try to use zext to implement constant-32-bit addrspacecast
If the high bits are assumed 0 for the cast, use zext. Previously
we would emit a build_vector and a bitcast with the high element
as 0. The zext is more easily optimized. I'm less convinced this is
good for globalisel, since you still need to have the inttoptr back
to the original pointer type.
The default value is 0, though I'm not sure if this is meaningful
in the real world. The real uses might always override the high
bit value with the attribute.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list