[Mlir-commits] [mlir] Update MLIR to support nusw and nuw in GEP. (PR #137272)
Mehdi Amini
llvmlistbot at llvm.org
Mon Apr 28 11:55:06 PDT 2025
================
@@ -794,6 +794,9 @@ LogicalResult LLVM::GEPOp::verify() {
return emitOpError("expected as many dynamic indices as specified in '")
<< getRawConstantIndicesAttrName().getValue() << "'";
+ if (getNoWrapFlags() == GEPNoWrapFlags::inboundsFlag)
+ return emitOpError("'inbounds_flag' can not be used directly.");
----------------
joker-eph wrote:
```suggestion
return emitOpError("'inbounds_flag' cannot be used directly.");
```
We also need a test for this in the `invalid.mlir` test file.
https://github.com/llvm/llvm-project/pull/137272
More information about the Mlir-commits
mailing list