[PATCH] D64966: [AMDGPU/GlobalISel] Add llvm.amdgcn.fdiv.fast legalization.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 20 09:33:32 PDT 2019


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:1290
+  auto C1 = B.buildConstant(S32, 0x2f800000);
+  auto C2 = B.buildConstant(S32, 1.0);
+
----------------
This one is incorrect and will implicitly convert to integer. You can use FloatToBits(1.0)


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:1297-1298
+
+  auto RCP = B.buildIntrinsic(Intrinsic::amdgcn_rcp, {S32}, false)
+    .addUse(Mul0.getReg(0));
+
----------------
You also set the flags here


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64966





More information about the llvm-commits mailing list