[PATCH] D113283: [fir] Add test for FIR types conversion

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 8 00:41:49 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG29abf2a4a488: [fir] Add test for FIR types conversion (authored by clementval).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113283/new/

https://reviews.llvm.org/D113283

Files:
  flang/test/Fir/types-to-llvm.fir


Index: flang/test/Fir/types-to-llvm.fir
===================================================================
--- /dev/null
+++ flang/test/Fir/types-to-llvm.fir
@@ -0,0 +1,31 @@
+// Test FIR types conversion.
+
+// RUN: fir-opt --split-input-file --fir-to-llvm-ir %s | FileCheck %s
+
+
+// Test sequence types `!fir.array`
+
+func private @foo0(%arg0: !fir.array<10x10xi64>)
+// CHECK-LABEL: foo0 
+// CHECK-SAME: !llvm.array<10 x array<10 x i64>>
+func private @foo1(%arg0: !fir.array<?xf32>)
+// CHECK-LABEL: foo1
+// CHECK-SAME: !llvm.ptr<f32>
+func private @foo2(%arg0: !fir.array<?x?xf128>)
+// CHECK-LABEL: foo2 
+// CHECK-SAME: !llvm.ptr<f128>
+func private @foo3(%arg0: !fir.array<*:i32>)
+// CHECK-LABEL: foo3
+// CHECK-SAME: !llvm.ptr<i32>
+
+// -----
+
+// Test reference types `!fir.ref`
+
+func private @foo0(%arg0: !fir.ref<i32>)
+// CHECK-LABEL: foo0
+// CHECK-SAME: !llvm.ptr<i32>
+func private @foo1(%arg0: !fir.ref<!fir.array<10xf32>>)
+// CHECK-LABEL: foo1
+// CHECK-SAME: !llvm.ptr<array<10 x f32>>
+


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113283.385413.patch
Type: text/x-patch
Size: 1019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211108/b856cc34/attachment.bin>


More information about the llvm-commits mailing list