[PATCH] D62018: [AArch64] Handle ISD::LRINT and ISD::LLRINT

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 05:38:55 PDT 2019


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.td:3159
 
+def : Pat<(i64 (lrint f32:$Rn)),
+          (FCVTZSUXSr (!cast<Instruction>(FRINTXSr) f32:$Rn))>;
----------------
mstorsjo wrote:
> Please add patterns for returning `i32` as well; the original C standard math function, which is turned into the llvm IR intrinsic, returns `long`, which is 32 bit on windows platforms. See D62108 for a fix for the same for lround.
And also a pattern for (lrint f16)?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62018





More information about the llvm-commits mailing list