Open tgymnich opened 1 month ago
@llvm/issue-subscribers-backend-amdgpu
Author: Tim Gymnich (tgymnich)
The gfx6/gfx7 ABI is broken for half values. It should work correctly on targets with legal half.
I think the GlobalISel behavior of passing as the low 16-bits makes more sense than the float promotion SelectionDAG does. Ideally we would fix SelectionDAG to stop the promotion, but it insists on using legal types. It's been many years since I last tried to fix that.
This example from the test suite (
llvm/test/CodeGen/AMDGPU/GlobalISel/lshr.ll
) seems to compile to different assembly for SelectionDAG and GlobalISel:llc -mtriple=amdgcn-amd-amdpal -mcpu=tahiti
GlobalISel:
SelectionDAG:
One seems to perform a fpext at the end the other performs an anyext/bitcast. This difference is not present for gfx940 for example.
How is the
amdgpu_ps
calling convention defined?