diff --git a/flang/include/flang/Optimizer/Dialect/FIROps.td b/flang/include/flang/Optimizer/Dialect/FIROps.td --- a/flang/include/flang/Optimizer/Dialect/FIROps.td +++ b/flang/include/flang/Optimizer/Dialect/FIROps.td @@ -1019,34 +1019,6 @@ let verifier = "return ::verify(*this);"; } -def fir_UnboxOp : fir_SimpleOp<"unbox", [NoSideEffect]> { - let summary = "unbox the boxed value into a tuple value"; - - let description = [{ - Unbox a boxed value into a result of multiple values from the box's - component data. The values are, minimally, a reference to the data of the - entity, the byte-size of one element, the rank, the type descriptor, a set - of flags (packed in an integer, and an array of dimension information (of - size rank). - - ```mlir - %40 = ... : !fir.box> - %41:6 = fir.unbox %40 : (!fir.box>) -> (!fir.ref>, i32, i32, !fir.tdesc>, i32, !fir.array) - ``` - }]; - - let arguments = (ins fir_BoxType:$box); - - let results = (outs - fir_ReferenceType, // pointer to data - AnyIntegerLike, // size of a data element - AnyIntegerLike, // rank of data - fir_TypeDescType, // abstract type descriptor - AnyIntegerLike, // attribute flags (bitfields) - fir_SequenceType // dimension information (if any) - ); -} - def fir_UnboxCharOp : fir_SimpleOp<"unboxchar", [NoSideEffect]> { let summary = "unbox a boxchar value into a pair value"; diff --git a/flang/test/Fir/fir-ops.fir b/flang/test/Fir/fir-ops.fir --- a/flang/test/Fir/fir-ops.fir +++ b/flang/test/Fir/fir-ops.fir @@ -142,7 +142,6 @@ // CHECK: [[VAL_40:%.*]] = fir.alloca !fir.char<1> // CHECK: [[VAL_41:%.*]] = fir.alloca tuple // CHECK: [[VAL_42:%.*]] = fir.embox [[VAL_38]] : (!fir.ref) -> !fir.box -// CHECK: [[VAL_43:%.*]]:6 = fir.unbox [[VAL_42]] : (!fir.box) -> (!fir.ref, i32, i32, !fir.tdesc, i32, !fir.array<3x?xindex>) // CHECK: [[VAL_44:%.*]] = arith.constant 8 : i32 // CHECK: [[VAL_45:%.*]] = fir.undefined !fir.char<1> // CHECK: [[VAL_46:%.*]] = fir.emboxchar [[VAL_40]], [[VAL_44]] : (!fir.ref>, i32) -> !fir.boxchar<1> @@ -168,7 +167,6 @@ %d3 = fir.alloca !fir.char<1> %e6 = fir.alloca tuple %1 = fir.embox %0 : (!fir.ref) -> !fir.box - %2:6 = fir.unbox %1 : (!fir.box) -> (!fir.ref,i32,i32,!fir.tdesc,i32,!fir.array<3x?xindex>) %c8 = arith.constant 8 : i32 %3 = fir.undefined !fir.char<1> %4 = fir.emboxchar %d3, %c8 : (!fir.ref>, i32) -> !fir.boxchar<1>