Lines Matching defs:lhsOp
131 auto lhsOp = op.getLhs().template getDefiningOp<BinaryOp>();
132 if (!lhsOp)
135 if (!mlir::matchPattern(lhsOp.getRhs(), mlir::m_Constant()))
139 lhsOp.getRhs());
143 rewriter.replaceOpWithNewOp<BinaryOp>(op, lhsOp.getLhs(), c);
618 static std::optional<bool> foldCmpOfMaxOrMin(Operation *lhsOp,
622 ConstantIntRanges lhsRange = TypeSwitch<Operation *, ConstantIntRanges>(lhsOp)
676 Operation *lhsOp = getLhs().getDefiningOp();
678 if (isa_and_nonnull<MinSOp, MinUOp, MaxSOp, MaxUOp>(lhsOp) &&
679 matchPattern(lhsOp->getOperand(1), m_Constant(&cstA)) && rhs) {
681 lhsOp, cstA.getValue(), rhs.getValue(), 64, getPred());
683 foldCmpOfMaxOrMin(lhsOp, cstA.getValue().trunc(32),