================
@@ -3043,6 +3043,44 @@ def CIR_ArrayDtor : CIR_ArrayInitDestroy<"array.dtor"> {
}];
}
+//===----------------------------------------------------------------------===//
+// IsConstantOp
+//===----------------------------------------------------------------------===//
+
+def CIR_IsConstantOp : CIR_Op<"is_constant", [Pure]> {
+ let summary = "Check if a value is a compile-time constant";
+ let description = [{
+ The `cir.is_constant` operation checks whether its input value is a
+ compile-time constant. This operation models the `__builtin_constant_p`
+ builtin function.
+
+ The operation takes a single operand of any CIR type and returns a signed
+ 32-bit integer. The result is 1 if the operand is a compile-time constant,
+ and 0 otherwise.
----------------
xlauko wrote:
This is not true, the expected result is bool
https://github.com/llvm/llvm-project/pull/166832
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits