[Mlir-commits] [mlir] [mlir][scf]: Expose emitNormalizedLoopBounds/denormalizeInductionVariable util functions (NFC) (PR #94429)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jun 12 12:37:39 PDT 2024


================
@@ -54,7 +54,13 @@ llvm::SmallBitVector getPositionsOfShapeOne(unsigned rank,
                                             ArrayRef<int64_t> shape);
 
 /// Converts an OpFoldResult to a Value. Returns the fold result if it casts to
-/// a Value or creates a ConstantIndexOp if it casts to an IntegerAttribute.
+/// a Value or creates a ConstantOp if it casts to an Integer Attribute.
+/// Other attribute types are not supported.
+Value getValueOrCreateConstantOp(OpBuilder &b, Location loc, Type targetType,
----------------
MaheshRavishankar wrote:

Nit: I think this only works for `int` ops. So maybe call it `getValueOrCreateContantIntOp`?

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


More information about the Mlir-commits mailing list