This revision replaces the LLVM dialect NullOp by the recently introduced ZeroOp. The ZeroOp is more generic in the sense that it represents zero values of any LLVM type rather than null pointers only. This is a follow to https://github.com/llvm/llvm-project/pull/65508
13 lines
492 B
LLVM
13 lines
492 B
LLVM
; RUN: mlir-translate --import-llvm %s | FileCheck %s
|
|
|
|
%Domain = type { ptr, ptr }
|
|
|
|
; CHECK: llvm.mlir.global external @D()
|
|
; CHECK-SAME: !llvm.struct<"Domain", (ptr, ptr)>
|
|
; CHECK: %[[E0:.+]] = llvm.mlir.zero : !llvm.ptr
|
|
; CHECK: %[[ROOT:.+]] = llvm.mlir.undef : !llvm.struct<"Domain", (ptr, ptr)>
|
|
; CHECK: %[[CHAIN:.+]] = llvm.insertvalue %[[E0]], %[[ROOT]][0]
|
|
; CHECK: %[[RES:.+]] = llvm.insertvalue %[[E0]], %[[CHAIN]][1]
|
|
; CHECK: llvm.return %[[RES]]
|
|
@D = global %Domain zeroinitializer
|