forked from OSchip/llvm-project
[mlir] Align LLVM_Type ODS constraint on type verifiers
Verify only the outer type being LLVM-compatible, the elemental types if present are already checked by the type verifiers. This makes some LLVM dialect operations compatible with mixed-dialect types that appear during progressive lowering. Reviewed By: wsmoses Differential Revision: https://reviews.llvm.org/D116671
This commit is contained in:
parent
859ebca744
commit
06cc2f2f12
|
@ -57,7 +57,7 @@ def LLVM_Dialect : Dialect {
|
|||
|
||||
// LLVM dialect type.
|
||||
def LLVM_Type : DialectType<LLVM_Dialect,
|
||||
CPred<"::mlir::LLVM::isCompatibleType($_self)">,
|
||||
CPred<"::mlir::LLVM::isCompatibleOuterType($_self)">,
|
||||
"LLVM dialect-compatible type">;
|
||||
|
||||
// Type constraint accepting LLVM token type.
|
||||
|
|
|
@ -178,9 +178,11 @@ func @verbose() {
|
|||
|
||||
// CHECK-LABEL: @ptr_elem_interface
|
||||
// CHECK-COUNT-3: !llvm.ptr<!test.smpla>
|
||||
// CHECK: llvm.mlir.undef : !llvm.ptr<!test.smpla>
|
||||
func @ptr_elem_interface(%arg0: !llvm.ptr<!test.smpla>) {
|
||||
%0 = llvm.load %arg0 : !llvm.ptr<!test.smpla>
|
||||
llvm.store %0, %arg0 : !llvm.ptr<!test.smpla>
|
||||
llvm.mlir.undef : !llvm.ptr<!test.smpla>
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue