[flang-commits] [flang] [flang] Make more [HL]FIR operations Pure. (PR #191309)

via flang-commits flang-commits at lists.llvm.org
Fri Apr 10 03:03:51 PDT 2026


================
@@ -526,7 +526,7 @@ def fir_CharConvertOp : fir_Op<"char_convert", []> {
   let hasVerifier = 1;
 }
 
-def fir_UndefOp : fir_OneResultOp<"undefined", [NoMemoryEffect]> {
+def fir_UndefOp : fir_OneResultOp<"undefined", [Pure]> {
----------------
jeanPerier wrote:

I am not sure we can currently use that attributes for all those operation because we are not folding them to an attribute/we do not have attribute representation for their value and that is a requirement of the ConstantLike trait [here](https://github.com/llvm/llvm-project/blob/6175a4d455e170fa947859e2a5952c89585150aa/mlir/include/mlir/IR/OpDefinition.h#L1241).

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


More information about the flang-commits mailing list