llvm-project
6883d4a2 - AMDGPU: Try to use zext to implement constant-32-bit addrspacecast (#168977)

Commit
30 days ago
AMDGPU: Try to use zext to implement constant-32-bit addrspacecast (#168977) 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.
Author
Parents
Loading