Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| mlir/lib/Dialect/Arith/Transforms/UnsignedWhenEquivalent.cpp | ||
|---|---|---|
| 38 ↗ | (On Diff #486493) | Where is the 0 bit width coming from? |
| mlir/lib/Dialect/Arith/Transforms/UnsignedWhenEquivalent.cpp | ||
|---|---|---|
| 38 ↗ | (On Diff #486493) | IntegerValueRange IntegerValueRange::getMaxRange(Value value) {
unsigned width = ConstantIntRanges::getStorageBitwidth(value.getType());
APInt umin = APInt::getMinValue(width);
APInt umax = APInt::getMaxValue(width);
APInt smin = width != 0 ? APInt::getSignedMinValue(width) : umin;
APInt smax = width != 0 ? APInt::getSignedMaxValue(width) : umax;
return IntegerValueRange{ConstantIntRanges{umin, umax, smin, smax}};
}When the type is not Integer or Index, width is 0. |
| mlir/lib/Dialect/Arith/Transforms/UnsignedWhenEquivalent.cpp | ||
|---|---|---|
| 38 ↗ | (On Diff #486493) | The result should be set to some invalid state if the operation result type is not integral |
| mlir/lib/Dialect/Arith/Transforms/UnsignedWhenEquivalent.cpp | ||
|---|---|---|
| 38 ↗ | (On Diff #486493) | Done. |