[PATCH] D157111: AMDGPU: Try to select fmul by power of 2 to ldexp

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 08:49:54 PDT 2023


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstructions.td:3334
+    // [+-]4.0, [+-]2.0, [+-]0.5, [+-]1.0
+    if (Exp >= -2 && Exp <= 2)
+      return false;
----------------
Should be `>= -1`. As is you are treating +/-0.25 as an inline.


================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmul.mir:277
+
+...
----------------
Need some tests with negated powers of two. I don't see how the patch handles these.


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

https://reviews.llvm.org/D157111



More information about the llvm-commits mailing list