[PATCH] D116927: [flang] Add tests for converting arrays and refs to arrays. NFC
Diana Picus via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 10 03:53:17 PST 2022
rovka created this revision.
rovka added reviewers: jeanPerier, schweitz, clementval, kiranchandramohan, awarzynski.
rovka added a project: Flang.
Herald added a subscriber: jdoerfert.
rovka requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Cover some of the code paths from LLVMTypeConverter::convertPointerLike
and LLVMTypeConverter::convertSequenceType (specifically related to
whether or not the sequence type has a constant interior).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116927
Files:
flang/test/Fir/types-to-llvm.fir
Index: flang/test/Fir/types-to-llvm.fir
===================================================================
--- flang/test/Fir/types-to-llvm.fir
+++ flang/test/Fir/types-to-llvm.fir
@@ -17,6 +17,15 @@
func private @foo3(%arg0: !fir.array<*:i32>)
// CHECK-LABEL: foo3
// CHECK-SAME: !llvm.ptr<i32>
+func private @foo4(%arg0: !fir.array<3x?xi32>)
+// CHECK-LABEL: foo4
+// CHECK-SAME: !llvm.ptr<array<3 x i32>>
+func private @foo5(%arg0: !fir.array<?x6xi32>)
+// CHECK-LABEL: foo5
+// CHECK-SAME: !llvm.ptr<i32>
+func private @foo6(%arg0: !fir.array<2x?x3x?x4xi32>)
+// CHECK-LABEL: foo6
+// CHECK-SAME: !llvm.ptr<array<2 x i32>
// -----
@@ -31,6 +40,12 @@
func private @foo2(%arg0: !fir.ref<!fir.box<!fir.heap<!fir.type<_QMs1Ta1{x:i32,y:f32}>>>>)
// CHECK-LABEL: foo2
// CHECK-SAME: !llvm.ptr<struct<(ptr<struct<"_QMs1Ta1", (i32, f32)>>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, ptr<i{{.*}}>, array<1 x i{{.*}}>)>>
+func private @foo3(%arg0: !fir.ref<!fir.array<10x?x11xf32>>)
+// CHECK-LABEL: foo3
+// CHECK-SAME: !llvm.ptr<f32>
+func private @foo4(%arg0: !fir.ref<!fir.array<10x11x?x?xf32>>)
+// CHECK-LABEL: foo4
+// CHECK-SAME: !llvm.ptr<array<11 x array<10 x f32>>>
// -----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116927.398566.patch
Type: text/x-patch
Size: 1208 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220110/2db8fde6/attachment.bin>
More information about the llvm-commits
mailing list