[mlir][vector] Fix bug in extractOp folding
authorThomas Raoux <thomasraoux@google.com>
Thu, 22 Dec 2022 22:50:07 +0000 (14:50 -0800)
committerLei Zhang <antiagainst@gmail.com>
Thu, 22 Dec 2022 22:51:02 +0000 (14:51 -0800)
commit1a0453eb44cdf82df292d2da93092f0fa64043b9
tree84a8b056ac57caa2a372ee4d323e15341f5e44c2
parent4eddbf9f10a6d1881c93d84f4363d6d881daf848
[mlir][vector] Fix bug in extractOp folding

We were missing to check for transpose when folding.
Also add a new file to test folding independently of
canonicalization as canonicalization was hiding the bug.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D140533
mlir/lib/Dialect/Vector/IR/VectorOps.cpp
mlir/test/Dialect/Vector/constant-fold.mlir [new file with mode: 0644]