[PATCH] D107507: [amdgpu] Revise the conversion from i64 to f32.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 6 02:09:18 PDT 2021


foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp:2493-2494
     // preserve the sign bit.
     ShAmt = DAG.getNode(ISD::SUB, SL, MVT::i32, ShAmt,
                         DAG.getConstant(1, SL, MVT::i32));
   } else {
----------------
Another possible micro-optimization is to push the -1 into the umin, to shorten the critical path: `umin((ffbh hi)-1, ((hi^lo) ashr 31)+32)`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107507



More information about the llvm-commits mailing list