[PATCH] D93963: [GlobalISel][AMDGPU] Lower G_UMULO/G_SMULO

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 00:30:51 PST 2021


foad added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1891
+  unsigned SrcBitWidth = SrcTy.getScalarSizeInBits();
+  MachineInstrBuilder LeftOperand, RightOperand;
+
----------------
foad wrote:
> Maybe assert that WideTy is at least twice as wide as SrcTy, otherwise the trick we use for calculating overflow below does not work.
Did you test with assertions enabled? I think this needs to be `>=`.


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