Lines Matching refs:LLVM

21 using AbsOpLowering = VectorConvertToLLVMPattern<math::AbsOp, LLVM::FAbsOp>;
22 using CeilOpLowering = VectorConvertToLLVMPattern<math::CeilOp, LLVM::FCeilOp>;
24 VectorConvertToLLVMPattern<math::CopySignOp, LLVM::CopySignOp>;
25 using CosOpLowering = VectorConvertToLLVMPattern<math::CosOp, LLVM::CosOp>;
27 VectorConvertToLLVMPattern<math::CtPopOp, LLVM::CtPopOp>;
28 using Exp2OpLowering = VectorConvertToLLVMPattern<math::Exp2Op, LLVM::Exp2Op>;
29 using ExpOpLowering = VectorConvertToLLVMPattern<math::ExpOp, LLVM::ExpOp>;
31 VectorConvertToLLVMPattern<math::FloorOp, LLVM::FFloorOp>;
32 using FmaOpLowering = VectorConvertToLLVMPattern<math::FmaOp, LLVM::FMAOp>;
34 VectorConvertToLLVMPattern<math::Log10Op, LLVM::Log10Op>;
35 using Log2OpLowering = VectorConvertToLLVMPattern<math::Log2Op, LLVM::Log2Op>;
36 using LogOpLowering = VectorConvertToLLVMPattern<math::LogOp, LLVM::LogOp>;
37 using PowFOpLowering = VectorConvertToLLVMPattern<math::PowFOp, LLVM::PowOp>;
39 VectorConvertToLLVMPattern<math::RoundOp, LLVM::RoundOp>;
40 using SinOpLowering = VectorConvertToLLVMPattern<math::SinOp, LLVM::SinOp>;
41 using SqrtOpLowering = VectorConvertToLLVMPattern<math::SqrtOp, LLVM::SqrtOp>;
54 if (!operandType || !LLVM::isCompatibleType(operandType)) in matchAndRewrite()
62 if (!operandType.template isa<LLVM::LLVMArrayType>()) { in matchAndRewrite()
63 LLVM::ConstantOp zero = in matchAndRewrite()
64 rewriter.create<LLVM::ConstantOp>(loc, boolType, boolZero); in matchAndRewrite()
74 return LLVM::detail::handleMultidimensionalVectors( in matchAndRewrite()
77 LLVM::ConstantOp zero = in matchAndRewrite()
78 rewriter.create<LLVM::ConstantOp>(loc, boolType, boolZero); in matchAndRewrite()
87 CountOpLowering<math::CountLeadingZerosOp, LLVM::CountLeadingZerosOp>;
89 CountOpLowering<math::CountTrailingZerosOp, LLVM::CountTrailingZerosOp>;
100 if (!operandType || !LLVM::isCompatibleType(operandType)) in matchAndRewrite()
108 if (!operandType.isa<LLVM::LLVMArrayType>()) { in matchAndRewrite()
109 LLVM::ConstantOp one; in matchAndRewrite()
110 if (LLVM::isCompatibleVectorType(operandType)) { in matchAndRewrite()
111 one = rewriter.create<LLVM::ConstantOp>( in matchAndRewrite()
115 one = rewriter.create<LLVM::ConstantOp>(loc, operandType, floatOne); in matchAndRewrite()
117 auto exp = rewriter.create<LLVM::ExpOp>(loc, adaptor.getOperand()); in matchAndRewrite()
118 rewriter.replaceOpWithNewOp<LLVM::FSubOp>(op, operandType, exp, one); in matchAndRewrite()
126 return LLVM::detail::handleMultidimensionalVectors( in matchAndRewrite()
131 {LLVM::getVectorNumElements(llvm1DVectorTy).getFixedValue()}, in matchAndRewrite()
135 rewriter.create<LLVM::ConstantOp>(loc, llvm1DVectorTy, splatAttr); in matchAndRewrite()
137 rewriter.create<LLVM::ExpOp>(loc, llvm1DVectorTy, operands[0]); in matchAndRewrite()
138 return rewriter.create<LLVM::FSubOp>(loc, llvm1DVectorTy, exp, one); in matchAndRewrite()
153 if (!operandType || !LLVM::isCompatibleType(operandType)) in matchAndRewrite()
161 if (!operandType.isa<LLVM::LLVMArrayType>()) { in matchAndRewrite()
162 LLVM::ConstantOp one = in matchAndRewrite()
163 LLVM::isCompatibleVectorType(operandType) in matchAndRewrite()
164 ? rewriter.create<LLVM::ConstantOp>( in matchAndRewrite()
168 : rewriter.create<LLVM::ConstantOp>(loc, operandType, floatOne); in matchAndRewrite()
170 auto add = rewriter.create<LLVM::FAddOp>(loc, operandType, one, in matchAndRewrite()
172 rewriter.replaceOpWithNewOp<LLVM::LogOp>(op, operandType, add); in matchAndRewrite()
180 return LLVM::detail::handleMultidimensionalVectors( in matchAndRewrite()
185 {LLVM::getVectorNumElements(llvm1DVectorTy).getFixedValue()}, in matchAndRewrite()
189 rewriter.create<LLVM::ConstantOp>(loc, llvm1DVectorTy, splatAttr); in matchAndRewrite()
190 auto add = rewriter.create<LLVM::FAddOp>(loc, llvm1DVectorTy, one, in matchAndRewrite()
192 return rewriter.create<LLVM::LogOp>(loc, llvm1DVectorTy, add); in matchAndRewrite()
207 if (!operandType || !LLVM::isCompatibleType(operandType)) in matchAndRewrite()
215 if (!operandType.isa<LLVM::LLVMArrayType>()) { in matchAndRewrite()
216 LLVM::ConstantOp one; in matchAndRewrite()
217 if (LLVM::isCompatibleVectorType(operandType)) { in matchAndRewrite()
218 one = rewriter.create<LLVM::ConstantOp>( in matchAndRewrite()
222 one = rewriter.create<LLVM::ConstantOp>(loc, operandType, floatOne); in matchAndRewrite()
224 auto sqrt = rewriter.create<LLVM::SqrtOp>(loc, adaptor.getOperand()); in matchAndRewrite()
225 rewriter.replaceOpWithNewOp<LLVM::FDivOp>(op, operandType, one, sqrt); in matchAndRewrite()
233 return LLVM::detail::handleMultidimensionalVectors( in matchAndRewrite()
238 {LLVM::getVectorNumElements(llvm1DVectorTy).getFixedValue()}, in matchAndRewrite()
242 rewriter.create<LLVM::ConstantOp>(loc, llvm1DVectorTy, splatAttr); in matchAndRewrite()
244 rewriter.create<LLVM::SqrtOp>(loc, llvm1DVectorTy, operands[0]); in matchAndRewrite()
245 return rewriter.create<LLVM::FDivOp>(loc, llvm1DVectorTy, one, sqrt); in matchAndRewrite()