[PATCH] D14327: IR: Add llvm.ldexp and llvm.experimental.constrained.ldexp intrinsics

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 09:01:50 PDT 2023


foad added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/llvm.ldexp.ll:259
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_ldexp_f16_e32 v0, v0, v1
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
----------------
This doesn't quite work because the instruction truncates v1 to 16 bits, so if you wanted ldexp(1.0, 0x10000) aka +inf you'll actually get ldexp(1.0, 0) aka 1.0.


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

https://reviews.llvm.org/D14327



More information about the llvm-commits mailing list