[mlir][AMDGPU] Explicitly truncate memory addresses in buffer ops
authorKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>
Wed, 6 Jul 2022 20:37:30 +0000 (20:37 +0000)
committerKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>
Thu, 4 Aug 2022 19:42:33 +0000 (19:42 +0000)
commit63295622491a31eaccb6c534ba5caa836beb843f
tree79c761eca8b335e7f25781ab1be5222198584858
parent35cc1738468e62453611fcb5d88d212da7022768
[mlir][AMDGPU] Explicitly truncate memory addresses in buffer ops

As a percaution, truncate memory addresses passed to kernels to 48 bits,
since bits 48-63 of the buffer descriptor are used for the stride field
and, on gfx10, to control swizzling.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D131016
mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
mlir/test/Conversion/AMDGPUToROCDL/amdgpu-to-rocdl.mlir