[PATCH] D153257: AMDGPU: Implement llvm.set.rounding

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 23 05:27:51 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:3621
+  } else {
+    SDValue BitTable =
+      DAG.getConstant(AMDGPU::FltRoundToHWConversionTable, SL, MVT::i64);
----------------
Pierre-vh wrote:
> Can you add a short explanation of how the lowering works, with the bit table?
There's more explanation of that in the get_rounding implementation.


I'm wondering if we can just fix the use of value 7 in the generic enum. The standard says -1 is for unknown, and I don't know why FloatingPointMode uses 7 for "dynamic". We wouldn't have to have this offset of 3 if the full range of target reserved values were available 


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

https://reviews.llvm.org/D153257



More information about the llvm-commits mailing list