[libc-commits] [libc] [llvm] [LoongArch] Support ISD::SET_ROUNDING (llvm.set.rounding) (PR #205051)

Paper Moon via libc-commits libc-commits at lists.llvm.org
Tue Jun 23 01:10:19 PDT 2026


================
@@ -0,0 +1,74 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc --mtriple=loongarch64 --mattr=+f < %s | FileCheck %s --check-prefix=CHECK-F
+; RUN: llc --mtriple=loongarch64 < %s | FileCheck %s --check-prefix=CHECK-NOF
+; RUN: not llc --mtriple=loongarch64 --mattr=+f < %s 2>&1 | FileCheck %s --check-prefix=CHECK-ERR
+
+; LLVM rounding mode encoding: 0=RTZ, 1=RNE, 2=RUP, 3=RDN.
+; LoongArch FCSR encoding:      0=RNE, 1=RZ,  2=RP,  3=RN.
+; Translation: swap 0↔1, keep 2 and 3.
----------------
tangyuan0821 wrote:

Done.

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


More information about the libc-commits mailing list