Skip to content

Commit 5ba5da3

Browse files
committed
Merge from 'main' to 'sycl-web' (21 commits)
CONFLICT (content): Merge conflict in clang/include/clang/AST/PrettyPrinter.h
2 parents 4ac2c2a + bb3980a commit 5ba5da3

File tree

56 files changed

+1532
-264
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1532
-264
lines changed

clang-tools-extra/clangd/unittests/CanonicalIncludesTests.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ TEST(CanonicalIncludesTest, Precedence) {
100100
// We added a mapping from some/path to <path>.
101101
ASSERT_EQ("<path>", CI.mapHeader(File));
102102
// We should have a path from 'bits/stl_vector.h' to '<vector>'.
103-
auto STLVectorFile = addFile(*InMemFS, Files, testPath("bits/stl_vector.h"));
103+
// FIXME: The Standrad Library map in CanonicalIncludes expects forward
104+
// slashes and Windows would use backward slashes instead, so the headers are
105+
// not matched appropriately.
106+
auto STLVectorFile = addFile(*InMemFS, Files, "bits/stl_vector.h");
104107
ASSERT_EQ("<vector>", CI.mapHeader(STLVectorFile));
105108
}
106109

clang/include/clang/AST/PrettyPrinter.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ struct PrintingPolicy {
7777
SkipCanonicalizationOfTemplateTypeParms(false),
7878
PrintInjectedClassNameWithArguments(true), UsePreferredNames(true),
7979
AlwaysIncludeTypeForTemplateArgument(false),
80-
CleanUglifiedParameters(false), EntireContentsOfLargeArray(true) {}
80+
CleanUglifiedParameters(false), EntireContentsOfLargeArray(true),
81+
UseEnumerators(true) {}
8182

8283
/// Adjust this printing policy for cases where it's known that we're
8384
/// printing C++ code (for instance, if AST dumping reaches a C++-only
@@ -349,6 +350,10 @@ struct PrintingPolicy {
349350
/// template parameters, no matter how many elements there are.
350351
unsigned EntireContentsOfLargeArray : 1;
351352

353+
/// Whether to print enumerator non-type template parameters with a matching
354+
/// enumerator name or via cast of an integer.
355+
unsigned UseEnumerators : 1;
356+
352357
/// Callbacks to use to allow the behavior of printing to be customized.
353358
const PrintingCallbacks *Callbacks = nullptr;
354359
};

clang/lib/AST/TemplateBase.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,17 @@ static void printIntegral(const TemplateArgument &TemplArg, raw_ostream &Out,
5959
const Type *T = TemplArg.getIntegralType().getTypePtr();
6060
const llvm::APSInt &Val = TemplArg.getAsIntegral();
6161

62-
if (const EnumType *ET = T->getAs<EnumType>()) {
63-
for (const EnumConstantDecl* ECD : ET->getDecl()->enumerators()) {
64-
// In Sema::CheckTemplateArugment, enum template arguments value are
65-
// extended to the size of the integer underlying the enum type. This
66-
// may create a size difference between the enum value and template
67-
// argument value, requiring isSameValue here instead of operator==.
68-
if (llvm::APSInt::isSameValue(ECD->getInitVal(), Val)) {
69-
ECD->printQualifiedName(Out, Policy);
70-
return;
62+
if (Policy.UseEnumerators) {
63+
if (const EnumType *ET = T->getAs<EnumType>()) {
64+
for (const EnumConstantDecl *ECD : ET->getDecl()->enumerators()) {
65+
// In Sema::CheckTemplateArugment, enum template arguments value are
66+
// extended to the size of the integer underlying the enum type. This
67+
// may create a size difference between the enum value and template
68+
// argument value, requiring isSameValue here instead of operator==.
69+
if (llvm::APSInt::isSameValue(ECD->getInitVal(), Val)) {
70+
ECD->printQualifiedName(Out, Policy);
71+
return;
72+
}
7173
}
7274
}
7375
}

clang/lib/CodeGen/CGDebugInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ PrintingPolicy CGDebugInfo::getPrintingPolicy() const {
248248
PP.PrintCanonicalTypes = true;
249249
PP.UsePreferredNames = false;
250250
PP.AlwaysIncludeTypeForTemplateArgument = true;
251+
PP.UseEnumerators = false;
251252

252253
// Apply -fdebug-prefix-map.
253254
PP.Callbacks = &PrintCB;

clang/test/CodeGenCXX/debug-info-simple-template-names.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct t4 {
3131
};
3232

3333
t4 v1;
34-
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "t3<(anonymous namespace)::LocalEnum, (anonymous namespace)::LocalEnum1>"
34+
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "t3<(anonymous namespace)::LocalEnum, ((anonymous namespace)::LocalEnum)0>"
3535
void f() {
3636
// Basic examples of simplifiable/rebuildable names
3737
f1<>();

clang/tools/clang-format/git-clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,4 +628,4 @@ def convert_string(bytes_input):
628628
return str(bytes_input)
629629

630630
if __name__ == '__main__':
631-
main()
631+
sys.exit(main())

compiler-rt/lib/scudo/standalone/linux.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
#include <time.h>
2929
#include <unistd.h>
3030

31+
#if SCUDO_ANDROID
3132
#include <sys/prctl.h>
32-
// Definitions of prctl arguments to set a vma name in kernels (Linux from 5.17).
33-
#ifndef PR_SET_VMA
34-
#define PR_SET_VMA 0x53564d41
35-
#define PR_SET_VMA_ANON_NAME 0
33+
// Definitions of prctl arguments to set a vma name in Android kernels.
34+
#define ANDROID_PR_SET_VMA 0x53564d41
35+
#define ANDROID_PR_SET_VMA_ANON_NAME 0
3636
#endif
3737

3838
namespace scudo {
@@ -66,8 +66,10 @@ void *map(void *Addr, uptr Size, UNUSED const char *Name, uptr Flags,
6666
dieOnMapUnmapError(errno == ENOMEM ? Size : 0);
6767
return nullptr;
6868
}
69+
#if SCUDO_ANDROID
6970
if (Name)
70-
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, P, Size, Name);
71+
prctl(ANDROID_PR_SET_VMA, ANDROID_PR_SET_VMA_ANON_NAME, P, Size, Name);
72+
#endif
7173
return P;
7274
}
7375

flang/lib/Optimizer/CodeGen/CodeGen.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,9 @@ struct XEmboxOpConversion : public EmboxCommonConversion<fir::cg::XEmboxOp> {
14911491
}
14921492

14931493
bool hasSubcomp = !xbox.subcomponent().empty();
1494+
if (!xbox.substr().empty())
1495+
TODO(loc, "codegen of fir.embox with substring");
1496+
14941497
mlir::Value stepExpr;
14951498
if (hasSubcomp) {
14961499
// We have a subcomponent. The step value needs to be the number of
@@ -1522,7 +1525,6 @@ struct XEmboxOpConversion : public EmboxCommonConversion<fir::cg::XEmboxOp> {
15221525
auto ao = rewriter.create<mlir::LLVM::SubOp>(loc, i64Ty, off, adj);
15231526
if (constRows > 0) {
15241527
gepArgs.push_back(ao);
1525-
--constRows;
15261528
} else {
15271529
auto dimOff =
15281530
rewriter.create<mlir::LLVM::MulOp>(loc, i64Ty, ao, prevPtrOff);
@@ -1550,9 +1552,10 @@ struct XEmboxOpConversion : public EmboxCommonConversion<fir::cg::XEmboxOp> {
15501552
// denormalized descriptors.
15511553
if (isaPointerOrAllocatable || !normalizedLowerBound(xbox)) {
15521554
lb = one;
1553-
// If there is a shifted origin and this is not a normalized
1554-
// descriptor then use the value from the shift op as the lower bound.
1555-
if (hasShift) {
1555+
// If there is a shifted origin, and no fir.slice, and this is not
1556+
// a normalized descriptor then use the value from the shift op as
1557+
// the lower bound.
1558+
if (hasShift && !(hasSlice || hasSubcomp)) {
15561559
lb = operands[shiftOffset];
15571560
auto extentIsEmpty = rewriter.create<mlir::LLVM::ICmpOp>(
15581561
loc, mlir::LLVM::ICmpPredicate::eq, extent, zero);
@@ -1580,6 +1583,8 @@ struct XEmboxOpConversion : public EmboxCommonConversion<fir::cg::XEmboxOp> {
15801583
if (constRows == 0)
15811584
prevPtrOff = rewriter.create<mlir::LLVM::MulOp>(loc, i64Ty, prevPtrOff,
15821585
outerExtent);
1586+
else
1587+
--constRows;
15831588

15841589
// increment iterators
15851590
++shapeOffset;

flang/test/Fir/convert-to-llvm.fir

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,9 +1743,7 @@ func @xembox0(%arg0: !fir.ref<!fir.array<?xi32>>) {
17431743
// CHECK: %[[EXTENT2:.*]] = llvm.sdiv %[[EXTENT1]], %[[C0]] : i64
17441744
// CHECK: %[[EXTENT_CMP:.*]] = llvm.icmp "sgt" %[[EXTENT2]], %[[ZERO]] : i64
17451745
// CHECK: %[[EXTENT:.*]] = llvm.select %[[EXTENT_CMP]], %[[EXTENT2]], %[[ZERO]] : i1, i64
1746-
// CHECK: %[[EXTENT_CMP_2:.*]] = llvm.icmp "eq" %[[EXTENT]], %[[ZERO]] : i64
1747-
// CHECK: %[[LOWER:.*]] = llvm.select %[[EXTENT_CMP_2]], %[[ONE]], %[[C0]] : i1, i64
1748-
// CHECK: %[[BOX7:.*]] = llvm.insertvalue %[[LOWER]], %[[BOX6]][7 : i32, 0 : i32, 0 : i32] : !llvm.struct<(ptr<i32>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<1 x array<3 x i64>>)>
1746+
// CHECK: %[[BOX7:.*]] = llvm.insertvalue %[[ONE]], %[[BOX6]][7 : i32, 0 : i32, 0 : i32] : !llvm.struct<(ptr<i32>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<1 x array<3 x i64>>)>
17491747
// CHECK: %[[BOX8:.*]] = llvm.insertvalue %[[EXTENT]], %[[BOX7]][7 : i32, 0 : i32, 1 : i32] : !llvm.struct<(ptr<i32>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<1 x array<3 x i64>>)>
17501748
// CHECK: %[[STRIDE:.*]] = llvm.mul %[[ELEM_LEN_I64]], %[[C0]] : i64
17511749
// CHECK: %[[BOX9:.*]] = llvm.insertvalue %[[STRIDE]], %[[BOX8]][7 : i32, 0 : i32, 2 : i32] : !llvm.struct<(ptr<i32>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<1 x array<3 x i64>>)>
@@ -1844,9 +1842,7 @@ func private @_QPxb(!fir.box<!fir.array<?x?xf64>>)
18441842
// CHECK: %[[EXTENT2:.*]] = llvm.sdiv %[[EXTENT1]], %[[C1]] : i64
18451843
// CHECK: %[[EXTENT_CMP:.*]] = llvm.icmp "sgt" %[[EXTENT2]], %[[ZERO]] : i64
18461844
// CHECK: %[[EXTENT:.*]] = llvm.select %[[EXTENT_CMP]], %[[EXTENT2]], %[[ZERO]] : i1, i64
1847-
// CHECK: %[[EXTENT_CMP_2:.*]] = llvm.icmp "eq" %[[EXTENT]], %[[ZERO]] : i64
1848-
// CHECK: %[[SH1B:.*]] = llvm.select %[[EXTENT_CMP_2]], %[[ONE]], %[[SH1]] : i1, i64
1849-
// CHECK: %[[BOX7:.*]] = llvm.insertvalue %[[SH1B]], %[[BOX6]][7 : i32, 0 : i32, 0 : i32] : !llvm.struct<(ptr<f64>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<2 x array<3 x i64>>)>
1845+
// CHECK: %[[BOX7:.*]] = llvm.insertvalue %[[ONE]], %[[BOX6]][7 : i32, 0 : i32, 0 : i32] : !llvm.struct<(ptr<f64>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<2 x array<3 x i64>>)>
18501846
// CHECK: %[[BOX8:.*]] = llvm.insertvalue %[[EXTENT]], %[[BOX7]][7 : i32, 0 : i32, 1 : i32] : !llvm.struct<(ptr<f64>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<2 x array<3 x i64>>)>
18511847
// CHECK: %[[STRIDE:.*]] = llvm.mul %[[ELEM_LEN_I64]], %[[C1]] : i64
18521848
// CHECK: %[[BOX9:.*]] = llvm.insertvalue %[[STRIDE]], %[[BOX8]][7 : i32, 0 : i32, 2 : i32] : !llvm.struct<(ptr<f64>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<2 x array<3 x i64>>)>
@@ -1860,9 +1856,7 @@ func private @_QPxb(!fir.box<!fir.array<?x?xf64>>)
18601856
// CHECK: %[[EXT_SDIV:.*]] = llvm.sdiv %[[EXT_ADD]], %[[C1]] : i64
18611857
// CHECK: %[[EXT_ICMP:.*]] = llvm.icmp "sgt" %[[EXT_SDIV]], %[[ZERO]] : i64
18621858
// CHECK: %[[EXT_SELECT:.*]] = llvm.select %[[EXT_ICMP]], %[[EXT_SDIV]], %[[ZERO]] : i1, i64
1863-
// CHECK: %[[EXT_ICMP_2:.*]] = llvm.icmp "eq" %[[EXT_SELECT]], %[[ZERO]] : i64
1864-
// CHECK: %[[SH2B:.*]] = llvm.select %[[EXT_ICMP_2]], %[[ONE]], %[[SH2]] : i1, i64
1865-
// CHECK: %[[BOX10:.*]] = llvm.insertvalue %[[SH2B]], %[[BOX9]][7 : i32, 1 : i32, 0 : i32] : !llvm.struct<(ptr<f64>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<2 x array<3 x i64>>)>
1859+
// CHECK: %[[BOX10:.*]] = llvm.insertvalue %[[ONE]], %[[BOX9]][7 : i32, 1 : i32, 0 : i32] : !llvm.struct<(ptr<f64>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<2 x array<3 x i64>>)>
18661860
// CHECK: %[[BOX11:.*]] = llvm.insertvalue %[[EXT_SELECT]], %[[BOX10]][7 : i32, 1 : i32, 1 : i32] : !llvm.struct<(ptr<f64>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<2 x array<3 x i64>>)>
18671861
// CHECK: %[[STRIDE_MUL:.*]] = llvm.mul %[[PREV_DIM]], %[[C1]] : i64
18681862
// CHECK: %[[BOX12:.*]] = llvm.insertvalue %[[STRIDE_MUL]], %[[BOX11]][7 : i32, 1 : i32, 2 : i32] : !llvm.struct<(ptr<f64>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<2 x array<3 x i64>>)>

flang/test/Fir/embox.fir

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
// RUN: fir-opt %s | tco | FileCheck %s
2+
3+
4+
// CHECK-LABEL: define void @_QPtest_callee({ i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }* %0)
5+
func @_QPtest_callee(%arg0: !fir.box<!fir.array<?xi32>>) {
6+
return
7+
}
8+
9+
// CHECK-LABEL: define void @_QPtest_slice()
10+
func @_QPtest_slice() {
11+
// CHECK: %[[a1:.*]] = alloca { i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8,
12+
// CHECK: %[[a2:.*]] = alloca [20 x i32], i64 1, align 4,
13+
// CHECK: %[[a3:.*]] = getelementptr [20 x i32], [20 x i32]* %[[a2]], i64 0, i64 0,
14+
// CHECK: %[[a4:.*]] = insertvalue { i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }
15+
// CHECK: { i32* undef, i64 4, i32 20180515, i8 1, i8 9, i8 0, i8 0, [1 x [3 x i64]]
16+
// CHECK: [i64 1, i64 5, i64 8]] }, i32* %[[a3]], 0,
17+
// CHECK: store { i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] } %[[a4]], { i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }* %[[a1]], align 8
18+
// CHECK: call void @_QPtest_callee({ i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }* %[[a1]]),
19+
%c20 = arith.constant 20 : index
20+
%c1_i64 = arith.constant 1 : i64
21+
%c10_i64 = arith.constant 10 : i64
22+
%c2_i64 = arith.constant 2 : i64
23+
%0 = fir.alloca !fir.array<20xi32> {bindc_name = "x", uniq_name = "_QFtest_sliceEx"}
24+
%1 = fir.shape %c20 : (index) -> !fir.shape<1>
25+
%2 = fir.slice %c1_i64, %c10_i64, %c2_i64 : (i64, i64, i64) -> !fir.slice<1>
26+
%3 = fir.embox %0(%1) [%2] : (!fir.ref<!fir.array<20xi32>>, !fir.shape<1>, !fir.slice<1>) -> !fir.box<!fir.array<?xi32>>
27+
fir.call @_QPtest_callee(%3) : (!fir.box<!fir.array<?xi32>>) -> ()
28+
return
29+
}
30+
31+
// CHECK-LABEL: define void @_QPtest_dt_callee({ i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }* %0)
32+
func @_QPtest_dt_callee(%arg0: !fir.box<!fir.array<?xi32>>) {
33+
return
34+
}
35+
36+
// CHECK-LABEL: define void @_QPtest_dt_slice()
37+
func @_QPtest_dt_slice() {
38+
// CHECK: %[[a1:.*]] = alloca { i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8,
39+
// CHECK: %[[a3:.*]] = alloca [20 x %_QFtest_dt_sliceTt], i64 1, align 8,
40+
// CHECK: %[[a4:.*]] = getelementptr [20 x %_QFtest_dt_sliceTt], [20 x %_QFtest_dt_sliceTt]* %[[a3]], i64 0, i64 0, i32 0,
41+
// CHECK: %[[a5:.*]] = insertvalue { i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }
42+
// CHECK-SAME: { i32* undef, i64 4, i32 20180515, i8 1, i8 9, i8 0, i8 0, [1 x [3 x i64]]
43+
// CHECK-SAME: [i64 1, i64 5, i64 mul
44+
// CHECK-SAME: (i64 ptrtoint (%_QFtest_dt_sliceTt* getelementptr (%_QFtest_dt_sliceTt, %_QFtest_dt_sliceTt* null, i64 1) to i64), i64 2)]] }
45+
// CHECK-SAME: , i32* %[[a4]], 0
46+
47+
// CHECK: store { i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] } %[[a5]], { i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }* %[[a1]], align 8,
48+
// CHECK: call void @_QPtest_dt_callee({ i32*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }* %[[a1]]),
49+
%c20 = arith.constant 20 : index
50+
%c1_i64 = arith.constant 1 : i64
51+
%c10_i64 = arith.constant 10 : i64
52+
%c2_i64 = arith.constant 2 : i64
53+
%0 = fir.alloca i32 {bindc_name = "v", uniq_name = "_QFtest_dt_sliceEv"}
54+
%1 = fir.alloca !fir.array<20x!fir.type<_QFtest_dt_sliceTt{i:i32,j:i32}>> {bindc_name = "x", uniq_name = "_QFtest_dt_sliceEx"}
55+
%2 = fir.field_index i, !fir.type<_QFtest_dt_sliceTt{i:i32,j:i32}>
56+
%3 = fir.shape %c20 : (index) -> !fir.shape<1>
57+
%4 = fir.slice %c1_i64, %c10_i64, %c2_i64 path %2 : (i64, i64, i64, !fir.field) -> !fir.slice<1>
58+
%5 = fir.embox %1(%3) [%4] : (!fir.ref<!fir.array<20x!fir.type<_QFtest_dt_sliceTt{i:i32,j:i32}>>>, !fir.shape<1>, !fir.slice<1>) -> !fir.box<!fir.array<?xi32>>
59+
fir.call @_QPtest_dt_callee(%5) : (!fir.box<!fir.array<?xi32>>) -> ()
60+
return
61+
}
62+
63+
func private @do_something(!fir.box<!fir.array<?xf32>>) -> ()
64+
// CHECK: define void @fir_dev_issue_1416
65+
// CHECK-SAME: [40 x float]* %[[base_addr:.*]], i64 %[[low:.*]], i64 %[[up:.*]], i64 %[[at:.*]])
66+
func @fir_dev_issue_1416(%arg0: !fir.ref<!fir.array<40x?xf32>>, %low: index, %up: index, %at : index) {
67+
// Test fir.embox with a constant interior array shape.
68+
%c1 = arith.constant 1 : index
69+
%c40 = arith.constant 40 : index
70+
%0 = fir.undefined index
71+
%1 = fir.shape_shift %c1, %c40, %low, %up : (index, index, index, index) -> !fir.shapeshift<2>
72+
%2 = fir.slice %c1, %c40, %c1, %at, %0, %0 : (index, index, index, index, index, index) -> !fir.slice<2>
73+
// CHECK: %[[diff:.*]] = sub i64 %[[at]], %[[low]]
74+
// CHECK: %[[mul:.*]] = mul i64 %[[diff]], 1
75+
// CHECK: %[[offset:.*]] = add i64 %[[mul]], 0
76+
// CHECK: %[[addr:.*]] = getelementptr [40 x float], [40 x float]* %0, i64 %[[offset]], i64 0
77+
// CHECK: %[[box:.*]] = insertvalue { float*, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }
78+
// CHECK-SAME: { float* undef, i64 4, i32 20180515, i8 1, i8 27, i8 0, i8 0, [1 x [3 x i64]] [{{.*}} [i64 1, i64 40, i64 4]] }, float* %[[addr]], 0
79+
%3 = fir.embox %arg0(%1) [%2] : (!fir.ref<!fir.array<40x?xf32>>, !fir.shapeshift<2>, !fir.slice<2>) -> !fir.box<!fir.array<?xf32>>
80+
fir.call @do_something(%3) : (!fir.box<!fir.array<?xf32>>) -> ()
81+
return
82+
}

0 commit comments

Comments
 (0)