diff --git a/compiler/src/iree/compiler/Codegen/Dialect/GPU/Transforms/Transforms.cpp b/compiler/src/iree/compiler/Codegen/Dialect/GPU/Transforms/Transforms.cpp index a61f075ba3ec..190a1c27e401 100644 --- a/compiler/src/iree/compiler/Codegen/Dialect/GPU/Transforms/Transforms.cpp +++ b/compiler/src/iree/compiler/Codegen/Dialect/GPU/Transforms/Transforms.cpp @@ -132,7 +132,7 @@ static FailureOr createSharedAllocDestination(RewriterBase &rewriter, // of the `tensor.empty` op. if (auto swizzleHintOp = dyn_cast(*empty->getUsers().begin())) { - assert(swizzleHintOp->hasOneUse() && + assert(empty->hasOneUse() && "a tensor.empty op with a swizzle hint applied, should have the " "swizzle hint as its only user"); auto newSwizzle = IREE::Codegen::SwizzleHintOp::create(