[PATCH] D93963: [GlobalISel][AMDGPU] Lower G_UMULO/G_SMULO
Pushpinder Singh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 18 00:32:11 PDT 2021
pdhaliwal added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1854-1855
+ } else {
+ // Unsigned overflow occurred if the high part is non-zero
+ auto ZExtResult = MIRBuilder.buildZExtInReg(WideTy, Mul, SrcBitWidth);
+ Overflow =
----------------
arsenm wrote:
> I don't think the unsigned case is right. The DAG version inserts a shift here, not a mask
I have changed it use shift instead of masking. Just curious, why was previous logic wrong? I thought zero'ing the upper bits of multiplication result and then comparing it with latter should provide the correct result.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93963/new/
https://reviews.llvm.org/D93963
More information about the llvm-commits
mailing list