[all-commits] [llvm/llvm-project] e697c9: [AMDGPU] Add custom MachineValueType entries for b...
Krzysztof Drewniak via All-commits
all-commits at lists.llvm.org
Tue Mar 4 15:19:27 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e697c99b63224069daa3814f536a69fecab8cd4e
https://github.com/llvm/llvm-project/commit/e697c99b63224069daa3814f536a69fecab8cd4e
Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: 2025-03-04 (Tue, 04 Mar 2025)
Changed paths:
M llvm/include/llvm/CodeGen/ValueTypes.td
M llvm/lib/CodeGen/ValueTypes.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.h
A llvm/test/Transforms/LoopVectorize/AMDGPU/buffer-fat-pointer.ll
Log Message:
-----------
[AMDGPU] Add custom MachineValueType entries for buffer fat poiners (#127692)
The old hack of returning v5/v6i32 for the fat and strided buffer
pointers was causing issuse during vectorization queries that expected
to be able to construct a VectorType from the return value of `MVT
getPointerType()`. On example is in the test attached to this PR, which
used to crash.
Now, we define the custom MVT entries, the 160-bit
amdgpuBufferFatPointer and 192-bit amdgpuBufferStridedPointer, which are
used to represent ptr addrspace(7) and ptr addrspace(9) respectively.
Neither of these types will be present at the time of lowering to a
SelectionDAG or other MIR - MVT::amdgpuBufferFatPointer is eliminated by
the LowerBufferFatPointers pass and amdgpu::bufferStridedPointer is not
currently used outside of the SPIR-V translator (which does its own
lowering).
An alternative solution would be to add MVT::i160 and MVT::i192. We
elect not to do this now as it would require changes to unrelated code
and runs the risk of breaking any SelectionDAG code that assumes that
the MVT series are all powers of two (and so can be split apart and
merged back together) in ways that wouldn't be obvious if someone tried
to use MVT::i160 in codegen. If i160 is added at some future point,
these custom types can be retired.
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