[llvm] ISel: introduce vector ISD::LRINT, ISD::LLRINT; custom RISCV lowering (PR #66924)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 09:19:01 PDT 2023


================
@@ -0,0 +1,155 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+f,+d \
+; RUN:     -target-abi=ilp32d -verify-machineinstrs | FileCheck %s --check-prefix=RV32
+; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+f,+d \
+; RUN:     -target-abi=lp64d -verify-machineinstrs | FileCheck %s --check-prefix=RV64
+
+define <vscale x 1 x iXLen> @lrint_nxv1f32(<vscale x 1 x float> %x) {
----------------
topperc wrote:

Please test i32 on rv64. I don't think there's any reason it wouldn't work. I know flag uses llvm.lround.i32.f32 on rv64 see https://reviews.llvm.org/D147195. I don't think flang uses lrint though.

https://github.com/llvm/llvm-project/pull/66924


More information about the llvm-commits mailing list