Lines Matching full:create

26 /// Create an integer or index constant.
31 return rewriter.create<arith::ConstantOp>( in createConst()
35 return rewriter.create<arith::ConstantOp>(loc, attr); in createConst()
51 rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::eq, a, zero); in matchAndRewrite()
53 Value minusOne = rewriter.create<arith::SubIOp>(loc, a, one); in matchAndRewrite()
54 Value quotient = rewriter.create<arith::DivUIOp>(loc, minusOne, b); in matchAndRewrite()
55 Value plusOne = rewriter.create<arith::AddIOp>(loc, quotient, one); in matchAndRewrite()
77 rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::sgt, b, zero); in matchAndRewrite()
78 Value x = rewriter.create<arith::SelectOp>(loc, compare, minusOne, plusOne); in matchAndRewrite()
80 Value xPlusA = rewriter.create<arith::AddIOp>(loc, x, a); in matchAndRewrite()
81 Value xPlusADivB = rewriter.create<arith::DivSIOp>(loc, xPlusA, b); in matchAndRewrite()
82 Value posRes = rewriter.create<arith::AddIOp>(loc, plusOne, xPlusADivB); in matchAndRewrite()
84 Value minusA = rewriter.create<arith::SubIOp>(loc, zero, a); in matchAndRewrite()
85 Value minusADivB = rewriter.create<arith::DivSIOp>(loc, minusA, b); in matchAndRewrite()
86 Value negRes = rewriter.create<arith::SubIOp>(loc, zero, minusADivB); in matchAndRewrite()
95 rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::slt, a, zero); in matchAndRewrite()
97 rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::sgt, a, zero); in matchAndRewrite()
99 rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::slt, b, zero); in matchAndRewrite()
101 rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::sgt, b, zero); in matchAndRewrite()
102 Value firstTerm = rewriter.create<arith::AndIOp>(loc, aNeg, bNeg); in matchAndRewrite()
103 Value secondTerm = rewriter.create<arith::AndIOp>(loc, aPos, bPos); in matchAndRewrite()
105 rewriter.create<arith::OrIOp>(loc, firstTerm, secondTerm); in matchAndRewrite()
129 Value quotient = rewriter.create<arith::DivSIOp>(loc, a, b); in matchAndRewrite()
130 Value product = rewriter.create<arith::MulIOp>(loc, quotient, b); in matchAndRewrite()
131 Value notEqualDivisor = rewriter.create<arith::CmpIOp>( in matchAndRewrite()
136 rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::slt, a, zero); in matchAndRewrite()
138 rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::slt, b, zero); in matchAndRewrite()
140 Value signOpposite = rewriter.create<arith::CmpIOp>( in matchAndRewrite()
143 rewriter.create<arith::AndIOp>(loc, notEqualDivisor, signOpposite); in matchAndRewrite()
147 rewriter.create<arith::AddIOp>(loc, quotient, minusOne); in matchAndRewrite()
165 Value cmp = rewriter.create<arith::CmpIOp>(op.getLoc(), pred, lhs, rhs); in matchAndRewrite()
186 Value cmp = rewriter.create<arith::CmpFOp>(loc, pred, lhs, rhs); in matchAndRewrite()
187 Value select = rewriter.create<arith::SelectOp>(loc, cmp, lhs, rhs); in matchAndRewrite()
190 Value isNaN = rewriter.create<arith::CmpFOp>(loc, arith::CmpFPredicate::UNO, in matchAndRewrite()
212 Value cmp = rewriter.create<arith::CmpFOp>(loc, pred, lhs, rhs); in matchAndRewrite()
213 Value select = rewriter.create<arith::SelectOp>(loc, cmp, lhs, rhs); in matchAndRewrite()
216 Value isNaN = rewriter.create<arith::CmpFOp>(loc, arith::CmpFPredicate::UNO, in matchAndRewrite()
245 Value bitcast = b.create<arith::BitcastOp>(i16Ty, operand); in matchAndRewrite()
246 Value exti = b.create<arith::ExtUIOp>(i32Ty, bitcast); in matchAndRewrite()
249 Value shl = b.create<arith::ShLIOp>(exti, c16); in matchAndRewrite()
250 Value result = b.create<arith::BitcastOp>(resultTy, shl); in matchAndRewrite()
300 b.create<arith::CmpFOp>(arith::CmpFPredicate::UNE, operand, operand); in matchAndRewrite()
309 Value bitcast = b.create<arith::BitcastOp>(i32Ty, operand); in matchAndRewrite()
312 b.create<arith::AndIOp>(b.create<arith::ShRUIOp>(bitcast, c16), c1); in matchAndRewrite()
315 Value roundingBias = b.create<arith::AddIOp>(bit16, c7FFF); in matchAndRewrite()
322 Value biased = b.create<arith::AddIOp>(bitcast, roundingBias); in matchAndRewrite()
325 Value biasedAndShifted = b.create<arith::ShRUIOp>(biased, c16); in matchAndRewrite()
327 b.create<arith::TruncIOp>(i16Ty, biasedAndShifted); in matchAndRewrite()
331 b.create<arith::SelectOp>(isNan, c7FC0_i16, normalCaseResult_i16); in matchAndRewrite()
332 Value result = b.create<arith::BitcastOp>(resultTy, select); in matchAndRewrite()