[Mlir-commits] [mlir] [MLIR][NVVM] Fixed assertion failure for insufficient parsing validation of nvvm dialect PureSpecialRangeableRegisterOp (PR #163434)
Stefan Mada
llvmlistbot at llvm.org
Tue Oct 14 13:50:06 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();
----------------
smada3 wrote:
Are there any other ops that I missed that have a range attribute? This bug was initially targeting nvvm.read.ptx.sreg.tid.x but the fix applies to all the special registers.
https://github.com/llvm/llvm-project/pull/163434
More information about the Mlir-commits
mailing list