Skip to content

Commit 535e796

Browse files
committed
.
1 parent 6a501bd commit 535e796

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4444,7 +4444,6 @@ static LogicalResult commonVerifierPackAndUnPackOp(OpTy packOrUnPack) {
44444444
!packOrUnPack.hasPureTensorSemantics()) {
44454445
return op->emitError("mixing tensor and buffer semantics is not allowed");
44464446
}
4447-
bool hasTensorSemantics = packOrUnPack.hasPureTensorSemantics();
44484447

44494448
// Verify inner_dims_pos and outer_dims_perm.
44504449
ShapedType unpackedType = (std::is_same<OpTy, PackOp>::value)

mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,8 @@ getPackingInfoFromOperand(OpOperand *opOperand, linalg::GenericOp genericOp,
6363
OpTy packOrUnPackOp) {
6464
static_assert(llvm::is_one_of<OpTy, linalg::PackOp, linalg::UnPackOp>::value,
6565
"applies to only pack or unpack operations");
66-
if constexpr (std::is_same_v<OpTy, linalg::PackOp>) {
67-
if (!packOrUnPackOp.hasPureTensorSemantics())
68-
return failure();
69-
}
70-
if constexpr (std::is_same_v<OpTy, linalg::UnPackOp>) {
71-
if (!packOrUnPackOp.hasPureTensorSemantics())
72-
return failure();
73-
}
66+
if (!packOrUnPackOp.hasPureTensorSemantics())
67+
return failure();
7468

7569
LLVM_DEBUG(
7670
{ llvm::dbgs() << "--- Construct PackInfo From an operand ---\n"; });

0 commit comments

Comments
 (0)