llvm-project/mlir/test/Dialect
Alex Zinenko 54e5600e4d [mlir] fix wrong symbol order in AffineApplyNormalizer
Summary:
AffineApplyNormalizer provides common logic for folding affine maps that appear
in affine.apply into other affine operations that use the result of said
affine.apply. In the process, affine maps of both operations are composed.
During the composition `A.compose(B)` the symbols from the map A are placed
before those of the map B in a single concatenated symbol list. However,
AffineApplyNormalizer was ordering the operands of the operation being
normalized by iteratively appending the symbols into a single list accoridng to
the operand order, regardless of whether these operands are symbols of the
current operation or of the map that is being folded into it. This could lead
to wrong order of symbols and, when the symbols were bound to constant values,
to visibly incorrect folding of constants into affine maps as reported in
PR45031. Make sure symbols operands to the current operation are always placed
before symbols coming from the folded maps.

Update the test that was exercising the incorrect folder behavior. For some
reason, the order of symbol operands was swapped in the test input compared to
the previous operations, making it easy to assume the correct maps were
produced whereas they were swapping the symbols back due to the problem
described above.

Closes https://bugs.llvm.org/show_bug.cgi?id=45031

Differential Revision: https://reviews.llvm.org/D75247
2020-02-27 15:15:29 +01:00
..
AffineOps [mlir] fix wrong symbol order in AffineApplyNormalizer 2020-02-27 15:15:29 +01:00
FxpMathOps Convert the Canonicalize and CSE passes to generic Operation Passes. 2019-10-24 15:01:09 -07:00
GPU [MLIR][GPU] Implement a simple greedy loop mapper. 2020-02-25 11:42:42 +01:00
LLVMIR [MLIR] change NVVM.mma.sync to the most useful variant. 2020-02-18 17:57:04 -08:00
Linalg [MLIR] Allow Loop dialect IfOp and ForOp to define values 2020-02-21 10:05:32 -08:00
Loops Add a basic tiling pass for parallel loops 2020-02-24 11:44:40 +01:00
OpenMP [MLIR] Add OpenMP dialect with barrier operation 2020-01-29 11:34:58 +00:00
QuantOps Refactor QuantOps TypeParser to use the DialectAsmParser methods directly. 2019-11-01 15:47:03 -07:00
SPIRV [mlir][spirv] Add some folders for spv.LogicalAnd/spv.LogicalOr 2020-02-26 15:13:37 -05:00
VectorOps [mlir] [VectorOps] Multi-dim reductions for lowering vector.contract 2020-02-20 14:16:50 -08:00
traits.mlir [mlir] Generalize broadcastable trait operands 2020-01-20 13:02:14 -08:00