Files
clang-p2996/mlir/test/Interfaces/DataLayoutInterfaces/module.mlir
Alex Zinenko f9cdc61d11 [mlir] provide a version of data layout size hooks in bits
This is useful for bit-packing types such as vectors and tuples as well as for
exotic architectures that have non-8-bit bytes.

Depends On D98500

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D98524
2021-03-24 15:13:40 +01:00

16 lines
527 B
MLIR

// RUN: mlir-opt --test-data-layout-query %s | FileCheck %s
module attributes { dlti.dl_spec = #dlti.dl_spec<
#dlti.dl_entry<!test.test_type_with_layout<10>, ["size", 12]>,
#dlti.dl_entry<!test.test_type_with_layout<20>, ["alignment", 32]>>} {
// CHECK-LABEL: @module_level_layout
func @module_level_layout() {
// CHECK: alignment = 32
// CHECK: bitsize = 12
// CHECK: preferred = 1
// CHECK: size = 2
"test.data_layout_query"() : () -> !test.test_type_with_layout<10>
return
}
}