From eb121b63777d8d1e7250b25ec55269dbf2ad9f6f Mon Sep 17 00:00:00 2001 From: Keshav Vinayak Jha Date: Tue, 20 Jan 2026 18:23:29 +0000 Subject: [PATCH] =?UTF-8?q?Because=20MSVC=20is=20stricter=20about=20the=20?= =?UTF-8?q?conditional=20operator=E2=80=99s=20common=20type.=20The=20origi?= =?UTF-8?q?nal=20code=20returns=20two=20types,=20and=20MSVC=20refuses=20to?= =?UTF-8?q?=20pick=20a=20common=20type.=20By=20switching=20the=20condition?= =?UTF-8?q?al=20to=20return=20a=20Value,=20the=20types=20are=20identical,?= =?UTF-8?q?=20so=20MSVC=20should=20accept=20it.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Keshav Vinayak Jha --- .../Dialect/LinalgExt/IR/AggregatedOpInterfaceImpl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/IR/AggregatedOpInterfaceImpl.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/AggregatedOpInterfaceImpl.cpp index 3cb319dbe17a..d26cd007297b 100644 --- a/compiler/src/iree/compiler/Dialect/LinalgExt/IR/AggregatedOpInterfaceImpl.cpp +++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/AggregatedOpInterfaceImpl.cpp @@ -281,9 +281,9 @@ static Value computeSubAndExp(OpBuilder &builder, Location loc, Value in = convertScalarToDtype(b, loc, args[0], args[1].getType(), /*isUnsignedCast=*/false); Value diff = arith::SubFOp::create(b, loc, args[1], in); - Operation *weight = useExp2 ? math::Exp2Op::create(b, loc, diff) - : math::ExpOp::create(b, loc, diff); - linalg::YieldOp::create(b, loc, weight->getResult(0)); + Value weight = useExp2 ? math::Exp2Op::create(b, loc, diff).getResult() + : math::ExpOp::create(b, loc, diff).getResult(); + linalg::YieldOp::create(b, loc, weight); }); return genericOp.getResult(0); }