[clang] [CIR] Upstream Builtin FloorOp (PR #169954)

Letu Ren via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 3 10:16:00 PST 2025


================
@@ -4722,6 +4722,16 @@ def CIR_FAbsOp : CIR_UnaryFPToFPBuiltinOp<"fabs", "FAbsOp"> {
   }];
 }
 
+def CIR_FloorOp : CIR_UnaryFPToFPBuiltinOp<"floor", "FloorOp"> {
+  let summary = "Computes the floating-point floor value";
+  let description = [{
+    `cir.floor` computes the floor of a floating-point operand and returns
+    a result of the same type.
+
+    Floating-point exceptions are ignored, and it does not set `errno`.
+  }];
----------------
FantasqueX wrote:

OK. I'll add an example for CeilOp as well.

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


More information about the cfe-commits mailing list