Open alankarmisra opened 3 months ago
@llvm/issue-subscribers-mlir
Author: Alankar Misra (alankarmisra)
There's no direct lowering from arith.floordivsi to llvm. Instead use the FloorDivSIOpConverter pattern in mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp
In the following example, I arith.addi and arith.floordivsi with constant vectors and vectors loaded from a memref. The add will succeed in lowering to llvm in both situations but floordivsi fails to lower to llvm with vectors loaded from memrefs for some reason.
Running
gives me
%4 is the result for the first arith.floordivsi for (10, 10) and correctly folds to 1 %26 is the result for the second arith.floordivsi and does not lower to llvm %0 is the result for the first arith.add for (10, 10) and correctly folds to 20 %27 is the result for the second arith.add and lowers to llvm.add