[Mlir-commits] [mlir] [mlir] Handle arith.const expr in dispatchIndexOpFoldResult func (PR #122432)

Matthias Springer llvmlistbot at llvm.org
Fri Jan 10 02:22:38 PST 2025


================
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/Dialect/Utils/StaticValueUtils.h"
+#include "mlir/Dialect/Arith/IR/Arith.h"
----------------
matthias-springer wrote:

Oh I mean you can use `dispatchIndexOpFoldResult(getAsOpFoldResult(v))` wherever you need it. I wouldn't call `getAsOpFoldResult` from `dispatchIndexOpFoldResult` because it does not fit with the name of the function. This function is just a switch that populates two vectors, it's not meant to analyze any IR.

Why do you need this functionality?


https://github.com/llvm/llvm-project/pull/122432


More information about the Mlir-commits mailing list