[RISCV] Support llvm.lround intrinsics with i32 return type on RV64.
It seems that flang uses this for "nint" and expects this i32 to work. On the C side we think lround should only work for "long" which is i64 on rv64. It's easy for us to support i32 when we have native FP instructions. I fell back to i64 and truncated the result otherwise. The documentation for lround says it returns an unspecified value if doesn't fit in the integer type. I have no idea what flang is expecting. I really only did the libcall to avoid forking a test. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D147195
parent
da68d216
Please register or sign in to comment