If an image load feeds into truncates to 16-bit, use a d16 load.
In the same way, if a stored value has only 16-bit precission, enable
d16.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp | ||
---|---|---|
64–67 | I don't understand why we need this code. | |
90–91 | I know you haven't changed this but it seems dangerous: for a d16 input treated as unsigned you should not match sext here, and for a d16 input treated as signed you should not match zext. Or do all d16 integer inputs ignore the high bits? | |
107 | NewTy = VTy->getWithNewType(NewScalarTy)? | |
llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.h | ||
41 | If this was already unused, you can remove it with a separate NFC patch (consider it pre-approved if you want). |
llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp | ||
---|---|---|
90–91 | You’re right, this seems to be incorrect. Good catch. |
I don't understand why we need this code.