[PATCH] D85653: [GlobalISel][AMDGPU] Lower G_SMULH/G_UMULH

Pushpinder Singh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 08:45:45 PDT 2020


pdhaliwal added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:6020
+
+  auto ShiftAmt = MIRBuilder.buildConstant(WideTy, SizeInBits - IsSigned);
+  auto Shifted = MIRBuilder.buildInstr(ShiftOp, {WideTy}, {Mul, ShiftAmt});
----------------
foad wrote:
> As Matt said you definitely should not subtract IsSigned here.
I got confused in signed binary multiplication. For this operation, it is not required to subtract IsSigned.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85653/new/

https://reviews.llvm.org/D85653



More information about the llvm-commits mailing list