Skip to content

Commit aeceb3d

Browse files
[mlir][Arith] Remove arith-to-llvm from func-to-llvm
1 parent b4c1ded commit aeceb3d

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,6 @@ struct ConvertFuncToLLVMPass
787787

788788
// TODO(https://github.com/llvm/llvm-project/issues/70982): Remove these in
789789
// favor of their dedicated conversion passes.
790-
arith::populateArithToLLVMConversionPatterns(typeConverter, patterns);
791790
cf::populateControlFlowToLLVMConversionPatterns(typeConverter, patterns);
792791

793792
LLVMConversionTarget target(getContext());

mlir/test/Dialect/ArmSVE/legalize-for-llvm.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mlir-opt -convert-vector-to-llvm="enable-arm-sve" -convert-func-to-llvm -cse -reconcile-unrealized-casts -split-input-file %s | FileCheck %s
1+
// RUN: mlir-opt -convert-vector-to-llvm="enable-arm-sve" -convert-func-to-llvm -convert-arith-to-llvm -cse -reconcile-unrealized-casts -split-input-file %s | FileCheck %s
22

33
func.func @arm_sve_sdot(%a: vector<[16]xi8>,
44
%b: vector<[16]xi8>,

mlir/test/lib/Dialect/LLVM/TestLowerToLLVM.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//===----------------------------------------------------------------------===//
1313

1414
#include "mlir/Conversion/AffineToStandard/AffineToStandard.h"
15+
#include "mlir/Conversion/ArithToLLVM/ArithToLLVM.h"
1516
#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h"
1617
#include "mlir/Conversion/IndexToLLVM/IndexToLLVM.h"
1718
#include "mlir/Conversion/MathToLLVM/MathToLLVM.h"
@@ -73,6 +74,8 @@ void buildTestLowerToLLVM(OpPassManager &pm,
7374
pm.addPass(createFinalizeMemRefToLLVMConversionPass());
7475
// Convert Func to LLVM (always needed).
7576
pm.addPass(createConvertFuncToLLVMPass());
77+
// Convert Arith to LLVM (always needed).
78+
pm.addPass(createArithToLLVMConversionPass());
7679
// Convert Index to LLVM (always needed).
7780
pm.addPass(createConvertIndexToLLVMPass());
7881
// Convert remaining unrealized_casts (always needed).

mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mlir-opt %s -pass-pipeline="builtin.module(func.func(test-math-polynomial-approximation,convert-arith-to-llvm),convert-vector-to-scf,convert-scf-to-cf,convert-cf-to-llvm,convert-vector-to-llvm,func.func(convert-math-to-llvm),convert-func-to-llvm,reconcile-unrealized-casts)" \
1+
// RUN: mlir-opt %s -pass-pipeline="builtin.module(func.func(test-math-polynomial-approximation),convert-vector-to-scf,convert-scf-to-cf,convert-vector-to-llvm,convert-to-llvm,reconcile-unrealized-casts)" \
22
// RUN: | mlir-cpu-runner \
33
// RUN: -e main -entry-point-result=void -O0 \
44
// RUN: -shared-libs=%mlir_c_runner_utils \

mlir/test/mlir-cpu-runner/test-expand-math-approx.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mlir-opt %s -pass-pipeline="builtin.module(func.func(test-expand-math,convert-arith-to-llvm),convert-vector-to-scf,convert-scf-to-cf,convert-cf-to-llvm,convert-vector-to-llvm,func.func(convert-math-to-llvm),convert-func-to-llvm,reconcile-unrealized-casts)" \
1+
// RUN: mlir-opt %s -pass-pipeline="builtin.module(func.func(test-expand-math),convert-vector-to-scf,convert-scf-to-cf,convert-vector-to-llvm,convert-to-llvm,reconcile-unrealized-casts)" \
22
// RUN: | mlir-cpu-runner \
33
// RUN: -e main -entry-point-result=void -O0 \
44
// RUN: -shared-libs=%mlir_c_runner_utils \

0 commit comments

Comments
 (0)