[Mlir-commits] [mlir] [MLIR][NVVM] Fixed assertion failure for insufficient parsing validation of nvvm dialect PureSpecialRangeableRegisterOp (PR #163434)
Guray Ozen
llvmlistbot at llvm.org
Tue Oct 14 12:31:02 PDT 2025
================
@@ -279,6 +280,23 @@ class NVVM_PureSpecialRangeableRegisterOp<string mnemonic, list<Trait> traits =
SetIntRangeFn setResultRanges) {
nvvmInferResultRanges(getOperation(), getResult(), argRanges, setResultRanges);
}
+
+ // Verify the range attribute satisfies LLVM ConstantRange constructor requirements.
+ ::llvm::LogicalResult $cppClass::verify() {
+ auto rangeAttr = getRange();
+ if (!rangeAttr)
+ return ::mlir::success(); // No range specified, validation passes
+
+ const ::llvm::APInt &lower = rangeAttr->getLower();
----------------
grypp wrote:
We have never verified the range attribute if I'm not mistaken.
I think we can do that for the other ops as well.
https://github.com/llvm/llvm-project/pull/163434
More information about the Mlir-commits
mailing list