[AMDGPU] Fix sign confusion in performMulLoHiCombine (#105831)
authorJay Foad <jay.foad@amd.com>
Tue, 27 Aug 2024 16:09:40 +0000 (17:09 +0100)
committerTobias Hieta <tobias@hieta.se>
Fri, 13 Sep 2024 06:04:58 +0000 (08:04 +0200)
commit93998aff7662d9b3f94d9627179dffe342e2b399
tree245a165519bd00ddc705ec594975135fb2ed03a0
parent373180b440d04dc3cc0f6111b06684d18779d7c8
[AMDGPU] Fix sign confusion in performMulLoHiCombine (#105831)

SMUL_LOHI and UMUL_LOHI are different operations because the high part
of the result is different, so it is not OK to optimize the signed
version to MUL_U24/MULHI_U24 or the unsigned version to
MUL_I24/MULHI_I24.
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/test/CodeGen/AMDGPU/mul_int24.ll