[Mlir-commits] [mlir] [mlir][NFC] Simplify constant checks with isZeroIndex and isOneIndex. (PR #139340)

Matthias Springer llvmlistbot at llvm.org
Sun May 11 00:38:45 PDT 2025


================
@@ -28,6 +28,10 @@ namespace mlir {
 /// with attribute with value `0`.
 bool isZeroIndex(OpFoldResult v);
 
+/// Return true if `v` is an IntegerAttr with value `1` of a ConstantIndexOp
----------------
matthias-springer wrote:

Drop the part about `ConstantIndexOp`. This helper extracts integer attributes regardless of the type of operation.

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


More information about the Mlir-commits mailing list