Lines Matching full:shape
7 func.func @shapeof(%arg0: !hlfir.expr<2x2xi32>) -> !fir.shape<2> {
8 %shape = hlfir.shape_of %arg0 : (!hlfir.expr<2x2xi32>) -> !fir.shape<2>
9 return %shape : !fir.shape<2>
14 // CHECK-NEXT: %[[SHAPE:.*]] = hlfir.shape_of %[[EXPR]] : (!hlfir.expr<2x2xi32>) -> !fir.shape<2>
17 // CHECK-CANON-NEXT: %[[SHAPE:.*]] = fir.shape %[[C2]], %[[C2]] : (index, index) -> !fir.shape<2>
19 // CHECK-ALL-NEXT: return %[[SHAPE]]
22 func.func @shapeof2(%arg0: !hlfir.expr<?x2xi32>) -> !fir.shape<2> {
23 %shape = hlfir.shape_of %arg0 : (!hlfir.expr<?x2xi32>) -> !fir.shape<2>
24 return %shape : !fir.shape<2>
28 // CHECK-ALL-NEXT: %[[SHAPE:.*]] = hlfir.shape_of %[[EXPR]] : (!hlfir.expr<?x2xi32>) -> !fir.shape<2>
29 // CHECK-ALL-NEXT: return %[[SHAPE]]
32 func.func @shapeof_fold1(%extent: index) -> !fir.shape<1> {
33 %shape1 = fir.shape %extent : (index) -> !fir.shape<1>
34 %elem = hlfir.elemental %shape1 : (!fir.shape<1>) -> !hlfir.expr<?xindex> {
37 %shape2 = hlfir.shape_of %elem : (!hlfir.expr<?xindex>) -> !fir.shape<1>
38 return %shape2 : !fir.shape<1>
41 // CHECK-ALL-SAME: %[[VAL_0:.*]]: index) -> !fir.shape<1> {
42 // CHECK-CANON-NEXT: %[[VAL_1:.*]] = fir.shape %[[VAL_0]] : (index) -> !fir.shape<1>
43 // CHECK-CANON-NEXT: %[[VAL_2:.*]] = hlfir.elemental %[[VAL_1]] : (!fir.shape<1>) -> !hlfir.expr<?xindex> {
46 // CHECK-CANON-NEXT: return %[[VAL_1]] : !fir.shape<1>