Lines Matching refs:arith
32 : public OpConversionPattern<arith::ConstantOp> {
33 using OpConversionPattern<arith::ConstantOp>::OpConversionPattern;
36 matchAndRewrite(arith::ConstantOp op, OpAdaptor adaptor,
42 : public OpConversionPattern<arith::ConstantOp> {
43 using OpConversionPattern<arith::ConstantOp>::OpConversionPattern;
46 matchAndRewrite(arith::ConstantOp op, OpAdaptor adaptor,
54 struct RemSIOpGLPattern final : public OpConversionPattern<arith::RemSIOp> {
55 using OpConversionPattern<arith::RemSIOp>::OpConversionPattern;
58 matchAndRewrite(arith::RemSIOp op, OpAdaptor adaptor,
63 struct RemSIOpCLPattern final : public OpConversionPattern<arith::RemSIOp> {
64 using OpConversionPattern<arith::RemSIOp>::OpConversionPattern;
67 matchAndRewrite(arith::RemSIOp op, OpAdaptor adaptor,
85 struct XOrIOpLogicalPattern final : public OpConversionPattern<arith::XOrIOp> {
86 using OpConversionPattern<arith::XOrIOp>::OpConversionPattern;
89 matchAndRewrite(arith::XOrIOp op, OpAdaptor adaptor,
95 struct XOrIOpBooleanPattern final : public OpConversionPattern<arith::XOrIOp> {
96 using OpConversionPattern<arith::XOrIOp>::OpConversionPattern;
99 matchAndRewrite(arith::XOrIOp op, OpAdaptor adaptor,
105 struct UIToFPI1Pattern final : public OpConversionPattern<arith::UIToFPOp> {
106 using OpConversionPattern<arith::UIToFPOp>::OpConversionPattern;
109 matchAndRewrite(arith::UIToFPOp op, OpAdaptor adaptor,
115 struct ExtUII1Pattern final : public OpConversionPattern<arith::ExtUIOp> {
116 using OpConversionPattern<arith::ExtUIOp>::OpConversionPattern;
119 matchAndRewrite(arith::ExtUIOp op, OpAdaptor adaptor,
125 struct TruncII1Pattern final : public OpConversionPattern<arith::TruncIOp> {
126 using OpConversionPattern<arith::TruncIOp>::OpConversionPattern;
129 matchAndRewrite(arith::TruncIOp op, OpAdaptor adaptor,
144 class CmpIOpBooleanPattern final : public OpConversionPattern<arith::CmpIOp> {
146 using OpConversionPattern<arith::CmpIOp>::OpConversionPattern;
149 matchAndRewrite(arith::CmpIOp op, OpAdaptor adaptor,
154 class CmpIOpPattern final : public OpConversionPattern<arith::CmpIOp> {
156 using OpConversionPattern<arith::CmpIOp>::OpConversionPattern;
159 matchAndRewrite(arith::CmpIOp op, OpAdaptor adaptor,
164 class CmpFOpPattern final : public OpConversionPattern<arith::CmpFOp> {
166 using OpConversionPattern<arith::CmpFOp>::OpConversionPattern;
169 matchAndRewrite(arith::CmpFOp op, OpAdaptor adaptor,
175 class CmpFOpNanKernelPattern final : public OpConversionPattern<arith::CmpFOp> {
177 using OpConversionPattern<arith::CmpFOp>::OpConversionPattern;
180 matchAndRewrite(arith::CmpFOp op, OpAdaptor adaptor,
186 class CmpFOpNanNonePattern final : public OpConversionPattern<arith::CmpFOp> {
188 using OpConversionPattern<arith::CmpFOp>::OpConversionPattern;
191 matchAndRewrite(arith::CmpFOp op, OpAdaptor adaptor,
196 class SelectOpPattern final : public OpConversionPattern<arith::SelectOp> {
198 using OpConversionPattern<arith::SelectOp>::OpConversionPattern;
200 matchAndRewrite(arith::SelectOp op, OpAdaptor adaptor,
300 arith::ConstantOp constOp, OpAdaptor adaptor, in matchAndRewrite()
386 arith::ConstantOp constOp, OpAdaptor adaptor, in matchAndRewrite()
479 RemSIOpGLPattern::matchAndRewrite(arith::RemSIOp op, OpAdaptor adaptor, in matchAndRewrite()
494 RemSIOpCLPattern::matchAndRewrite(arith::RemSIOp op, OpAdaptor adaptor, in matchAndRewrite()
533 arith::XOrIOp op, OpAdaptor adaptor, in matchAndRewrite()
554 arith::XOrIOp op, OpAdaptor adaptor, in matchAndRewrite()
574 UIToFPI1Pattern::matchAndRewrite(arith::UIToFPOp op, OpAdaptor adaptor, in matchAndRewrite()
595 ExtUII1Pattern::matchAndRewrite(arith::ExtUIOp op, OpAdaptor adaptor, in matchAndRewrite()
616 TruncII1Pattern::matchAndRewrite(arith::TruncIOp op, OpAdaptor adaptor, in matchAndRewrite()
667 arith::CmpIOp op, OpAdaptor adaptor, in matchAndRewrite()
677 case arith::CmpIPredicate::eq: { in matchAndRewrite()
682 case arith::CmpIPredicate::ne: { in matchAndRewrite()
687 case arith::CmpIPredicate::uge: in matchAndRewrite()
688 case arith::CmpIPredicate::ugt: in matchAndRewrite()
689 case arith::CmpIPredicate::ule: in matchAndRewrite()
690 case arith::CmpIPredicate::ult: { in matchAndRewrite()
697 rewriter.create<arith::ExtUIOp>(op.getLoc(), type, adaptor.getLhs()); in matchAndRewrite()
699 rewriter.create<arith::ExtUIOp>(op.getLoc(), type, adaptor.getRhs()); in matchAndRewrite()
701 rewriter.replaceOpWithNewOp<arith::CmpIOp>(op, op.getPredicate(), extLhs, in matchAndRewrite()
716 CmpIOpPattern::matchAndRewrite(arith::CmpIOp op, OpAdaptor adaptor, in matchAndRewrite()
737 DISPATCH(arith::CmpIPredicate::eq, spirv::IEqualOp); in matchAndRewrite()
738 DISPATCH(arith::CmpIPredicate::ne, spirv::INotEqualOp); in matchAndRewrite()
739 DISPATCH(arith::CmpIPredicate::slt, spirv::SLessThanOp); in matchAndRewrite()
740 DISPATCH(arith::CmpIPredicate::sle, spirv::SLessThanEqualOp); in matchAndRewrite()
741 DISPATCH(arith::CmpIPredicate::sgt, spirv::SGreaterThanOp); in matchAndRewrite()
742 DISPATCH(arith::CmpIPredicate::sge, spirv::SGreaterThanEqualOp); in matchAndRewrite()
743 DISPATCH(arith::CmpIPredicate::ult, spirv::ULessThanOp); in matchAndRewrite()
744 DISPATCH(arith::CmpIPredicate::ule, spirv::ULessThanEqualOp); in matchAndRewrite()
745 DISPATCH(arith::CmpIPredicate::ugt, spirv::UGreaterThanOp); in matchAndRewrite()
746 DISPATCH(arith::CmpIPredicate::uge, spirv::UGreaterThanEqualOp); in matchAndRewrite()
758 CmpFOpPattern::matchAndRewrite(arith::CmpFOp op, OpAdaptor adaptor, in matchAndRewrite()
768 DISPATCH(arith::CmpFPredicate::OEQ, spirv::FOrdEqualOp); in matchAndRewrite()
769 DISPATCH(arith::CmpFPredicate::OGT, spirv::FOrdGreaterThanOp); in matchAndRewrite()
770 DISPATCH(arith::CmpFPredicate::OGE, spirv::FOrdGreaterThanEqualOp); in matchAndRewrite()
771 DISPATCH(arith::CmpFPredicate::OLT, spirv::FOrdLessThanOp); in matchAndRewrite()
772 DISPATCH(arith::CmpFPredicate::OLE, spirv::FOrdLessThanEqualOp); in matchAndRewrite()
773 DISPATCH(arith::CmpFPredicate::ONE, spirv::FOrdNotEqualOp); in matchAndRewrite()
775 DISPATCH(arith::CmpFPredicate::UEQ, spirv::FUnordEqualOp); in matchAndRewrite()
776 DISPATCH(arith::CmpFPredicate::UGT, spirv::FUnordGreaterThanOp); in matchAndRewrite()
777 DISPATCH(arith::CmpFPredicate::UGE, spirv::FUnordGreaterThanEqualOp); in matchAndRewrite()
778 DISPATCH(arith::CmpFPredicate::ULT, spirv::FUnordLessThanOp); in matchAndRewrite()
779 DISPATCH(arith::CmpFPredicate::ULE, spirv::FUnordLessThanEqualOp); in matchAndRewrite()
780 DISPATCH(arith::CmpFPredicate::UNE, spirv::FUnordNotEqualOp); in matchAndRewrite()
795 arith::CmpFOp op, OpAdaptor adaptor, in matchAndRewrite()
797 if (op.getPredicate() == arith::CmpFPredicate::ORD) { in matchAndRewrite()
803 if (op.getPredicate() == arith::CmpFPredicate::UNO) { in matchAndRewrite()
817 arith::CmpFOp op, OpAdaptor adaptor, in matchAndRewrite()
819 if (op.getPredicate() != arith::CmpFPredicate::ORD && in matchAndRewrite()
820 op.getPredicate() != arith::CmpFPredicate::UNO) in matchAndRewrite()
829 if (op.getPredicate() == arith::CmpFPredicate::ORD) in matchAndRewrite()
841 SelectOpPattern::matchAndRewrite(arith::SelectOp op, OpAdaptor adaptor, in matchAndRewrite()
853 void mlir::arith::populateArithmeticToSPIRVPatterns( in populateArithmeticToSPIRVPatterns()
859 spirv::ElementwiseOpPattern<arith::AddIOp, spirv::IAddOp>, in populateArithmeticToSPIRVPatterns()
860 spirv::ElementwiseOpPattern<arith::SubIOp, spirv::ISubOp>, in populateArithmeticToSPIRVPatterns()
861 spirv::ElementwiseOpPattern<arith::MulIOp, spirv::IMulOp>, in populateArithmeticToSPIRVPatterns()
862 spirv::ElementwiseOpPattern<arith::DivUIOp, spirv::UDivOp>, in populateArithmeticToSPIRVPatterns()
863 spirv::ElementwiseOpPattern<arith::DivSIOp, spirv::SDivOp>, in populateArithmeticToSPIRVPatterns()
864 spirv::ElementwiseOpPattern<arith::RemUIOp, spirv::UModOp>, in populateArithmeticToSPIRVPatterns()
866 BitwiseOpPattern<arith::AndIOp, spirv::LogicalAndOp, spirv::BitwiseAndOp>, in populateArithmeticToSPIRVPatterns()
867 BitwiseOpPattern<arith::OrIOp, spirv::LogicalOrOp, spirv::BitwiseOrOp>, in populateArithmeticToSPIRVPatterns()
869 spirv::ElementwiseOpPattern<arith::ShLIOp, spirv::ShiftLeftLogicalOp>, in populateArithmeticToSPIRVPatterns()
870 spirv::ElementwiseOpPattern<arith::ShRUIOp, spirv::ShiftRightLogicalOp>, in populateArithmeticToSPIRVPatterns()
871 spirv::ElementwiseOpPattern<arith::ShRSIOp, spirv::ShiftRightArithmeticOp>, in populateArithmeticToSPIRVPatterns()
872 spirv::ElementwiseOpPattern<arith::NegFOp, spirv::FNegateOp>, in populateArithmeticToSPIRVPatterns()
873 spirv::ElementwiseOpPattern<arith::AddFOp, spirv::FAddOp>, in populateArithmeticToSPIRVPatterns()
874 spirv::ElementwiseOpPattern<arith::SubFOp, spirv::FSubOp>, in populateArithmeticToSPIRVPatterns()
875 spirv::ElementwiseOpPattern<arith::MulFOp, spirv::FMulOp>, in populateArithmeticToSPIRVPatterns()
876 spirv::ElementwiseOpPattern<arith::DivFOp, spirv::FDivOp>, in populateArithmeticToSPIRVPatterns()
877 spirv::ElementwiseOpPattern<arith::RemFOp, spirv::FRemOp>, in populateArithmeticToSPIRVPatterns()
878 TypeCastingOpPattern<arith::ExtUIOp, spirv::UConvertOp>, ExtUII1Pattern, in populateArithmeticToSPIRVPatterns()
879 TypeCastingOpPattern<arith::ExtSIOp, spirv::SConvertOp>, in populateArithmeticToSPIRVPatterns()
880 TypeCastingOpPattern<arith::ExtFOp, spirv::FConvertOp>, in populateArithmeticToSPIRVPatterns()
881 TypeCastingOpPattern<arith::TruncIOp, spirv::SConvertOp>, TruncII1Pattern, in populateArithmeticToSPIRVPatterns()
882 TypeCastingOpPattern<arith::TruncFOp, spirv::FConvertOp>, in populateArithmeticToSPIRVPatterns()
883 TypeCastingOpPattern<arith::UIToFPOp, spirv::ConvertUToFOp>, UIToFPI1Pattern, in populateArithmeticToSPIRVPatterns()
884 TypeCastingOpPattern<arith::SIToFPOp, spirv::ConvertSToFOp>, in populateArithmeticToSPIRVPatterns()
885 TypeCastingOpPattern<arith::FPToSIOp, spirv::ConvertFToSOp>, in populateArithmeticToSPIRVPatterns()
886 TypeCastingOpPattern<arith::IndexCastOp, spirv::SConvertOp>, in populateArithmeticToSPIRVPatterns()
887 TypeCastingOpPattern<arith::BitcastOp, spirv::BitcastOp>, in populateArithmeticToSPIRVPatterns()
892 spirv::ElementwiseOpPattern<arith::MaxFOp, spirv::GLFMaxOp>, in populateArithmeticToSPIRVPatterns()
893 spirv::ElementwiseOpPattern<arith::MaxSIOp, spirv::GLSMaxOp>, in populateArithmeticToSPIRVPatterns()
894 spirv::ElementwiseOpPattern<arith::MaxUIOp, spirv::GLUMaxOp>, in populateArithmeticToSPIRVPatterns()
895 spirv::ElementwiseOpPattern<arith::MinFOp, spirv::GLFMinOp>, in populateArithmeticToSPIRVPatterns()
896 spirv::ElementwiseOpPattern<arith::MinSIOp, spirv::GLSMinOp>, in populateArithmeticToSPIRVPatterns()
897 spirv::ElementwiseOpPattern<arith::MinUIOp, spirv::GLUMinOp> in populateArithmeticToSPIRVPatterns()
935 arith::populateArithmeticToSPIRVPatterns(typeConverter, patterns); in runOnOperation()
943 std::unique_ptr<Pass> mlir::arith::createConvertArithmeticToSPIRVPass() { in createConvertArithmeticToSPIRVPass()