[mlir][tensor] Fix gcc build (ValueBoundsOpInterface)
The order of evaluation of a sum (e.g., `a() + b()`) is unspecified in C++. clang evaluates left-to-right. gcc evaluate right-to-left. This led to slighly different (but equivalent) affine_map in a test and the FileCheck did not match anymore.
This commit is contained in:
@@ -86,10 +86,10 @@ struct PadOpInterface
|
||||
auto padOp = cast<PadOp>(op);
|
||||
assert(value == padOp.getResult() && "invalid value");
|
||||
|
||||
AffineExpr expr = cstr.getExpr(padOp.getSource(), dim) +
|
||||
cstr.getExpr(padOp.getMixedLowPad()[dim]) +
|
||||
cstr.getExpr(padOp.getMixedHighPad()[dim]);
|
||||
cstr.bound(value)[dim] == expr;
|
||||
AffineExpr srcSize = cstr.getExpr(padOp.getSource(), dim);
|
||||
AffineExpr lowPad = cstr.getExpr(padOp.getMixedLowPad()[dim]);
|
||||
AffineExpr highPad = cstr.getExpr(padOp.getMixedHighPad()[dim]);
|
||||
cstr.bound(value)[dim] == srcSize + lowPad + highPad;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user