llvm-project/flang/test/Fir/annotate-constant.fir
River Riddle a8308020ac [mlir] Remove special case parsing/printing of func operations
This was leftover from when the standard dialect was destroyed, and
when FuncOp moved to the func dialect. Now that these transitions
have settled a bit we can drop these.

Most updates were handled using a simple regex: replace `^( *)func` with `$1func.func`

Differential Revision: https://reviews.llvm.org/D124146
2022-05-06 13:36:15 -07:00

10 lines
410 B
Plaintext

// RUN: fir-opt -annotate-constant %s | FileCheck %s
// CHECK-LABEL: func @annotate_test() -> !fir.ref<!fir.array<?xi32>> {
func.func @annotate_test() -> !fir.ref<!fir.array<?xi32>> {
%1 = arith.constant 5 : index
// CHECK: %[[a:.*]] = fir.alloca !fir.array<?xi32>, %{{.*}} {canonicalize_constant_operands = [5 : index]}
%2 = fir.alloca !fir.array<?xi32>, %1
return %2 : !fir.ref<!fir.array<?xi32>>
}