[clang] [CIR] Add Pure trait to IsFPClassOp (PR #186625)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 14 14:47:13 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Henrich Lauko (xlauko)
<details>
<summary>Changes</summary>
IsFPClassOp is a pure classification check on a floating-point value
with no memory effects.
---
Full diff: https://github.com/llvm/llvm-project/pull/186625.diff
1 Files Affected:
- (modified) clang/include/clang/CIR/Dialect/IR/CIROps.td (+1-1)
``````````diff
diff --git a/clang/include/clang/CIR/Dialect/IR/CIROps.td b/clang/include/clang/CIR/Dialect/IR/CIROps.td
index d9c4356ba95b9..9b04d4aa4773f 100644
--- a/clang/include/clang/CIR/Dialect/IR/CIROps.td
+++ b/clang/include/clang/CIR/Dialect/IR/CIROps.td
@@ -5624,7 +5624,7 @@ def FPClassTestEnum : CIR_I32EnumAttr<"FPClassTest", "floating-point class test
let cppNamespace = "::cir";
}
-def CIR_IsFPClassOp : CIR_Op<"is_fp_class"> {
+def CIR_IsFPClassOp : CIR_Op<"is_fp_class", [Pure]> {
let summary = "Corresponding to the `__builtin_fpclassify` builtin function in clang";
let description = [{
``````````
</details>
https://github.com/llvm/llvm-project/pull/186625
More information about the cfe-commits
mailing list