4 Commits

Author SHA1 Message Date
Matt Arsenault
daecc303bb
AMDGPU: Replace sqrt OpenCL libcalls with llvm.sqrt (#74197)
The library implementation is just a wrapper around a call to the
intrinsic, but loses metadata. Swap out the call site to the intrinsic
so that the lowering can see the !fpmath metadata and fast math flags.

Since d56e0d07cc5ee8e334fd1ad403eef0b1a771384f, clang started placing
!fpmath on OpenCL library sqrt calls. Also don't bother emitting
native_sqrt anymore, it's just another wrapper around llvm.sqrt.
2024-01-09 15:13:58 +07:00
Jessica Del
32f9983c06
[AMDGPU] - Add address space for strided buffers (#74471)
This is an experimental address space for strided buffers. These buffers
can have structs as elements and
a stride > 1.
These pointers allow the indexed access in units of stride, i.e., they
point at `buffer[index * stride]`.
Thus, we can use the `idxen` modifier for buffer loads.

We assign address space 9 to 192-bit buffer pointers which contain a
128-bit descriptor, a 32-bit offset and a 32-bit index. Essentially,
they are fat buffer pointers with an additional 32-bit index.
2023-12-15 15:49:25 +01:00
Matt Arsenault
5e94080fc7 AMDGPU: Regenerate test checks
Avoids spurious diffs from change in how metadata is checked in
a future commit.
2023-12-02 21:42:05 +07:00
Matt Arsenault
a8376bbe53 AMDGPU: Add baseline tests for libcall to intrinsic handling
Test all the different itanium mangled opencl functions that are
interesting to replace with raw intrinsic calls.

https://reviews.llvm.org/D157873
2023-08-14 15:15:30 -04:00