|
| 1 | +// RUN: mlir-opt --convert-to-llvm="filter-dialects=func dynamic=true" --split-input-file %s |
| 2 | + |
| 3 | + |
| 4 | +// CHECK-LABEL: llvm.func @test_default_index |
| 5 | +// CHECK-SAME: (%{{.*}}: i64) -> i64 |
| 6 | +func.func private @test_default_index(%arg0: index) -> index |
| 7 | + |
| 8 | +// ----- |
| 9 | + |
| 10 | +// CHECK-LABEL: module attributes {dlti.dl_spec = #dlti.dl_spec< |
| 11 | +// CHECK-SAME: #dlti.dl_entry<index, 32> |
| 12 | +// CHECK-SAME: >} |
| 13 | +module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<index, 32>>} { |
| 14 | + // CHECK-LABEL: llvm.func @test_32bit_index |
| 15 | + // CHECK-SAME: (%{{.*}}: i32) -> i32 |
| 16 | + func.func private @test_32bit_index(%arg0: index) -> index |
| 17 | +} |
| 18 | + |
| 19 | +// ----- |
| 20 | + |
| 21 | +// CHECK-LABEL: module attributes {dlti.dl_spec = #dlti.dl_spec< |
| 22 | +// CHECK-SAME: #dlti.dl_entry<index, 64> |
| 23 | +// CHECK-SAME: >} |
| 24 | +module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<index, 64>>} { |
| 25 | + // CHECK-LABEL: llvm.func @test_64bit_index |
| 26 | + // CHECK-SAME: (%{{.*}}: i64) -> i64 |
| 27 | + func.func private @test_64bit_index(%arg0: index) -> index |
| 28 | +} |
| 29 | + |
| 30 | +// ----- |
| 31 | + |
| 32 | +// CHECK-LABEL: module attributes {dlti.dl_spec = #dlti.dl_spec< |
| 33 | +// CHECK-SAME: #dlti.dl_entry<index, 16> |
| 34 | +// CHECK-SAME: >} |
| 35 | +module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<index, 16>>} { |
| 36 | + // CHECK-LABEL: llvm.func @test_16bit_index |
| 37 | + // CHECK-SAME: (%{{.*}}: i16) -> i16 |
| 38 | + func.func private @test_16bit_index(%arg0: index) -> index |
| 39 | +} |
0 commit comments