Lines Matching full:create

25 /// Create a float constant.
35 return b.create<arith::ConstantOp>(loc,
39 return b.create<arith::ConstantOp>(loc, attr);
47 /// Create an integer constant.
52 return b.create<arith::ConstantOp>(loc,
56 return b.create<arith::ConstantOp>(loc, attr);
64 Value fixedConvert = b.create<arith::FPToSIOp>(i64Ty, operand);
65 Value fpFixedConvert = b.create<arith::SIToFPOp>(opType, fixedConvert);
68 return b.create<math::CopySignOp>(fpFixedConvert, operand);
77 Value exp = b.create<math::ExpOp>(operand);
78 Value neg = b.create<arith::NegFOp>(operand);
79 Value nexp = b.create<math::ExpOp>(neg);
80 Value sub = b.create<arith::SubFOp>(exp, nexp);
82 Value res = b.create<arith::MulFOp>(sub, half);
93 Value exp = b.create<math::ExpOp>(operand);
94 Value neg = b.create<arith::NegFOp>(operand);
95 Value nexp = b.create<math::ExpOp>(neg);
96 Value add = b.create<arith::AddFOp>(exp, nexp);
98 Value res = b.create<arith::MulFOp>(add, half);
119 Value isNegative = rewriter.create<arith::CmpFOp>(
122 rewriter.create<arith::UIToFPOp>(loc, floatType, isNegative);
124 rewriter.create<arith::MulFOp>(loc, isNegativeFloat, negTwo);
125 Value sign = rewriter.create<arith::AddFOp>(loc, isNegativeTimesNegTwo, one);
128 Value positiveX = rewriter.create<arith::MulFOp>(loc, sign, op.getOperand());
131 Value negDoubledX = rewriter.create<arith::MulFOp>(loc, negTwo, positiveX);
132 Value exp2x = rewriter.create<math::ExpOp>(loc, negDoubledX);
133 Value dividend = rewriter.create<arith::SubFOp>(loc, one, exp2x);
134 Value divisor = rewriter.create<arith::AddFOp>(loc, one, exp2x);
135 Value positiveRes = rewriter.create<arith::DivFOp>(loc, dividend, divisor);
148 Value sin = b.create<math::SinOp>(type, operand);
149 Value cos = b.create<math::CosOp>(type, operand);
150 Value div = b.create<arith::DivFOp>(type, sin, cos);
163 Value fma = b.create<math::FmaOp>(operand, operand, one);
164 Value sqrt = b.create<math::SqrtOp>(fma);
165 Value add = b.create<arith::AddFOp>(operand, sqrt);
166 Value res = b.create<math::LogOp>(add);
179 Value fma = b.create<math::FmaOp>(operand, operand, negOne);
180 Value sqrt = b.create<math::SqrtOp>(fma);
181 Value add = b.create<arith::AddFOp>(operand, sqrt);
182 Value res = b.create<math::LogOp>(add);
195 Value add = b.create<arith::AddFOp>(operand, one);
196 Value neg = b.create<arith::NegFOp>(operand);
197 Value sub = b.create<arith::AddFOp>(neg, one);
198 Value div = b.create<arith::DivFOp>(add, sub);
199 Value log = b.create<math::LogOp>(div);
201 Value res = b.create<arith::MulFOp>(log, half);
212 Value mult = b.create<arith::MulFOp>(type, operandA, operandB);
213 Value add = b.create<arith::AddFOp>(type, mult, operandC);
233 Value gtCheck = b.create<arith::CmpFOp>(arith::CmpFPredicate::OGT, operand,
235 Value incrValue = b.create<arith::SelectOp>(op->getLoc(), gtCheck, one, zero);
237 Value ret = b.create<arith::AddFOp>(opType, fpFixedConvert, incrValue);
255 rewriter.create<arith::SIToFPOp>(op.getLoc(), baseType, power);
256 Value res = rewriter.create<math::PowFOp>(op.getLoc(), baseType, base,
278 res = b.create<arith::MulFOp>(baseType, base, res);
280 base = b.create<arith::MulFOp>(baseType, base, base);
300 b.create<arith::CmpFOp>(arith::CmpFPredicate::OEQ, res, zero);
302 b.create<arith::CmpFOp>(arith::CmpFPredicate::OEQ, res, negZero);
303 res = b.create<arith::DivFOp>(baseType, one, res);
305 b.create<arith::SelectOp>(op->getLoc(), zeroEqCheck, posInfinity, res);
306 res = b.create<arith::SelectOp>(op->getLoc(), negZeroEqCheck, negInfinity,
324 Value logA = b.create<math::LogOp>(opType, operandA);
325 Value mult = b.create<arith::MulFOp>(opType, operandB, logA);
326 Value expResult = b.create<math::ExpOp>(opType, mult);
333 b.create<arith::CmpFOp>(arith::CmpFPredicate::OEQ, operandB, zero);
335 b.create<arith::SelectOp>(op->getLoc(), zeroCheck, one, expResult);
350 Value mult = b.create<arith::MulFOp>(opType, operand, ln2);
351 Value exp = b.create<math::ExpOp>(op->getLoc(), mult);
377 Value incrValue = b.create<math::CopySignOp>(half, operand);
378 Value add = b.create<arith::AddFOp>(opType, operand, incrValue);
401 Value operandBitcast = b.create<arith::BitcastOp>(i32Ty, operand);
402 Value operandExp = b.create<arith::AndIOp>(
403 b.create<arith::ShRUIOp>(operandBitcast, c23), expMask);
404 Value operandBiasedExp = b.create<arith::SubIOp>(operandExp, c127);
406 b.create<arith::CmpIOp>(arith::CmpIPredicate::sge, operandBiasedExp, c23);
408 Value result = b.create<arith::SelectOp>(isSpecialValOrLargeVal, operand,
440 rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::ule, x, mask);
441 Value add = rewriter.create<arith::AddIOp>(loc, count, bits);
442 Value shift = rewriter.create<arith::ShLIOp>(loc, x, bits);
444 x = rewriter.create<arith::SelectOp>(loc, pred, shift, x);
445 count = rewriter.create<arith::SelectOp>(loc, pred, add, count);
449 Value pred = rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::eq,
453 Value sel = rewriter.create<arith::SelectOp>(loc, pred, bwval, count);
500 Value operandBitcast = b.create<arith::BitcastOp>(iTy, operand);
501 Value round = b.create<math::RoundOp>(operand);
502 Value roundBitcast = b.create<arith::BitcastOp>(iTy, round);
505 Value operandExp = b.create<arith::AndIOp>(
506 b.create<arith::ShRUIOp>(operandBitcast, c23), expMask);
507 Value operandBiasedExp = b.create<arith::SubIOp>(operandExp, c127);
508 Value roundExp = b.create<arith::AndIOp>(
509 b.create<arith::ShRUIOp>(roundBitcast, c23), expMask);
510 Value roundBiasedExp = b.create<arith::SubIOp>(roundExp, c127);
514 Value clampedShift = b.create<arith::MaxSIOp>(shift, c0);
515 clampedShift = b.create<arith::MinSIOp>(clampedShift, c31);
516 return b.create<arith::ShRUIOp>(x, clampedShift);
522 return b.create<arith::AndIOp>(mantissa, shiftedMantissaMask);
540 b.create<arith::CmpIOp>(arith::CmpIPredicate::eq, roundBiasedExp, c0);
541 Value roundBiasedExpMinus1 = b.create<arith::SubIOp>(roundBiasedExp, c1);
543 Value roundIsNotEvenOrSpecialVal = b.create<arith::CmpIOp>(
546 b.create<arith::OrIOp>(roundIsNotEvenOrSpecialVal, roundBiasedExpEq0);
555 Value operandBiasedExpEqNeg1 = b.create<arith::CmpIOp>(
557 Value expectedOperandMaskedMantissa = b.create<arith::SelectOp>(
561 b.create<arith::CmpIOp>(arith::CmpIPredicate::eq, operandMaskedMantissa,
564 Value operandBiasedExpGeNeg1 = b.create<arith::CmpIOp>(
567 b.create<arith::CmpIOp>(arith::CmpIPredicate::slt, operandBiasedExp, c23);
569 b.create<arith::AndIOp>(operandIsHalfway, operandBiasedExpLt23);
571 b.create<arith::AndIOp>(operandIsHalfway, operandBiasedExpGeNeg1);
575 Value sign = b.create<math::CopySignOp>(c1Float, operand);
576 Value roundShifted = b.create<arith::SubFOp>(round, sign);
580 b.create<arith::AndIOp>(roundIsNotEvenOrSpecialVal, operandIsHalfway);
581 Value result = b.create<arith::SelectOp>(needsShift, roundShifted, round);
585 result = b.create<math::CopySignOp>(result, operand);
602 auto sqrtOp = rewriter.create<math::SqrtOp>(loc, operand);