[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
Mon Aug 7 01:51:19 PDT 2023


foad requested changes to this revision.
foad added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:5107
+  assert(ExpVal != INT_MIN);
+  MIB.addImm(APF.isNegative() ? -ExpVal : ExpVal);
+}
----------------
This makes no sense at all. The sign of APF has nothing to do with the sign of ExpVal. If ExpVal is negative that means that the magnitude of APF is < 1, irrespective of its sign.


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

https://reviews.llvm.org/D157111



More information about the llvm-commits mailing list