We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 303f43e commit 9a939efCopy full SHA for 9a939ef
mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp
@@ -155,9 +155,8 @@ void IntegerRangeAnalysis::visitNonControlFlowArguments(
155
Type boundType, bool getUpper) {
156
unsigned int width = ConstantIntRanges::getStorageBitwidth(boundType);
157
if (loopBound.has_value()) {
158
- if (isa<Attribute>(*loopBound)) {
159
- if (auto bound =
160
- dyn_cast_or_null<IntegerAttr>(cast<Attribute>(*loopBound)))
+ if (auto attr = dyn_cast<Attribute>(*loopBound)) {
+ if (auto bound = dyn_cast_or_null<IntegerAttr>(attr))
161
return bound.getValue();
162
} else if (auto value = llvm::dyn_cast_if_present<Value>(*loopBound)) {
163
const IntegerValueRangeLattice *lattice =
0 commit comments