[VPlan] Add incoming values for all predecessor to ResumePHI (NFCI).
[llvm-project.git] / mlir / test / Interfaces / DataLayoutInterfaces / types.mlir
blob82ae02cf92adff5c1ed649c134d9ba5db6ab2aa8
1 // RUN: mlir-opt --split-input-file --verify-diagnostics --test-data-layout-query %s | FileCheck %s
3 // expected-error@below {{expected integer attribute in the data layout entry for 'index'}}
4 module attributes { dlti.dl_spec = #dlti.dl_spec<
5   #dlti.dl_entry<index, [32]>>} {
8 // -----
10 // expected-error@below {{expected a dense i64 elements attribute}}
11 module attributes {dlti.dl_spec = #dlti.dl_spec<
12 #dlti.dl_entry<i32, dense<[64,128]> : vector<2xi32>>>
13 } {}
15 // -----
17 // expected-error@below {{expected 1 or 2 elements}}
18 module attributes {dlti.dl_spec = #dlti.dl_spec<
19 #dlti.dl_entry<i32, dense<[64,64,64]> : vector<3xi64>>>
20 } {}
22 // -----
24 // expected-error@below {{preferred alignment is expected to be greater than or equal to the abi alignment}}
25 module attributes {dlti.dl_spec = #dlti.dl_spec<
26 #dlti.dl_entry<i32, dense<[64,32]> : vector<2xi64>>>
27 } {}
29 // -----
31 // expected-error@below {{the 'test' dialect does not support identifier data layout entries}}
32 "test.op_with_data_layout"() { dlti.dl_spec = #dlti.dl_spec<
33   #dlti.dl_entry<index, 32>,
34   #dlti.dl_entry<"test.foo", [32]>>} : () -> ()
36 // -----
38 // CHECK-LABEL: @index
39 module @index attributes { dlti.dl_spec = #dlti.dl_spec<
40   #dlti.dl_entry<index, 32>>} {
41   func.func @query() {
42     // CHECK: bitsize = 32
43     // CHECK: index = 32
44     "test.data_layout_query"() : () -> index
45     return
46   }
49 // -----
51 // CHECK-LABEL: @index_default
52 module @index_default {
53   func.func @query() {
54     // CHECK: bitsize = 64
55     "test.data_layout_query"() : () -> index
56     return
57   }