1// RUN: mlir-translate -mlir-to-llvmir %s -split-input-file -verify-diagnostics | FileCheck %s 2 3// CHECK: target datalayout 4// CHECK: E- 5// CHECK: i64:64:128 6// CHECK: f80:128:256 7module attributes {dlti.dl_spec = #dlti.dl_spec< 8#dlti.dl_entry<"dlti.endianness", "big">, 9#dlti.dl_entry<index, 64>, 10#dlti.dl_entry<i64, dense<[64,128]> : vector<2xi32>>, 11#dlti.dl_entry<f80, dense<[128,256]> : vector<2xi32>> 12>} { 13 llvm.func @foo() { 14 llvm.return 15 } 16} 17 18// ----- 19 20// expected-error@below {{unsupported data layout for non-signless integer 'ui64'}} 21module attributes {dlti.dl_spec = #dlti.dl_spec< 22#dlti.dl_entry<ui64, dense<[64,128]> : vector<2xi32>>> 23} {} 24 25// ----- 26 27// expected-error@below {{unsupported type in data layout: 'bf16'}} 28module attributes {dlti.dl_spec = #dlti.dl_spec< 29#dlti.dl_entry<bf16, dense<[64,128]> : vector<2xi32>>> 30} {} 31 32// ----- 33 34// expected-error@below {{unsupported data layout key "foo"}} 35module attributes {dlti.dl_spec = #dlti.dl_spec< 36#dlti.dl_entry<"foo", dense<[64,128]> : vector<2xi32>>> 37} {} 38