[PATCH] D111236: [AArch64] Improve fptosi.sat lowering

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 12 07:50:22 PDT 2021


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:3503
+  // width.
+  if (DstWidth < SatWidth)
+    return SDValue();
----------------
samtebbs wrote:
> I may be misunderstanding the logic here, but the comment says the saturation to a higher bitwidth and consequent saturation of the result is only valid if the legal conversion is smaller than the saturation width, but with this if statement you're bailing out if the dstwidth is less than the saturation width.
The comment should be the other way around. We use the natural saturation to the legal width, then saturate it further.


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

https://reviews.llvm.org/D111236



More information about the llvm-commits mailing list