[PATCH] D153257: AMDGPU: Implement llvm.set.rounding
Pierre van Houtryve via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 23 02:11:41 PDT 2023
Pierre-vh added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:3616-3617
+ uint32_t ClampedVal = std::min(
+ static_cast<uint32_t>(ConstMode->getZExtValue()),
+ static_cast<uint32_t>(AMDGPU::TowardZeroF32_TowardNegativeF64));
+ NewMode = DAG.getConstant(
----------------
optional nit: can use the constructor form to make it less verbose (same below for the `uint64_t`)
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:3621
+ } else {
+ SDValue BitTable =
+ DAG.getConstant(AMDGPU::FltRoundToHWConversionTable, SL, MVT::i64);
----------------
Can you add a short explanation of how the lowering works, with the bit table?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153257/new/
https://reviews.llvm.org/D153257
More information about the llvm-commits
mailing list