[PATCH] D76180: AMDGPU/GlobalISel: Legalize 64-bit G_UDIV/G_UREM

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 15 12:19:22 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:2548
+  auto Mul1 =
+      B.buildFMul(S32, Rcp, B.buildFConstant(S32, BitsToFloat(0x5f7ffffc)));
+
----------------
foad wrote:
> What is this constant?
I couldn't figure this one out, it's just what's in the existing implementation


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:2555
+
+  // -(2**32)
+  auto Mad2 = B.buildFMAD(S32, Trunc,
----------------
foad wrote:
> No, it's -(2**-32).
No? That would be 0xaf800000?


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

https://reviews.llvm.org/D76180





More information about the llvm-commits mailing list