// RTNAME(Sum<T>)(const Descriptor &x, const char *source, int line,
// int dim, const Descriptor *mask)
//
- // Disable SUM inlining by default, because it fatally fails on some
- // FIR yet.
- if (enableExperimental && funcName.startswith("_FortranASum")) {
+ if (funcName.startswith("_FortranASum")) {
mlir::Operation::operand_range args = call.getArgs();
// args[1] and args[2] are source filename and line number, ignored.
const mlir::Value &dim = args[3];
--- /dev/null
+// RUN: fir-opt --split-input-file --simplify-intrinsics='enable-experimental=true' %s | FileCheck %s
+
+// check that a simple function compiled with experimental enabled
+module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.target_triple = "native"} {
+ func.func @experimental_1(%arg0: !fir.ref<i32> {fir.bindc_name = "a"}) -> i32 {
+ %c10 = arith.constant 10 : i32
+ return %c10 : i32
+ }
+}
+
+// CHECK-LABEL: func.func @experimental_1(
+// CHECK: return %{{.*}} : i32
+// CHECK: }
-// RUN: fir-opt --split-input-file --simplify-intrinsics='enable-experimental=true' %s | FileCheck %s
+// RUN: fir-opt --split-input-file --simplify-intrinsics %s | FileCheck %s
// Call to SUM with 1D I32 array is replaced.
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.target_triple = "native"} {