aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
diff options
context:
space:
mode:
authorBenjamin Maxwell <benjamin.maxwell@arm.com>2023-08-04 13:32:33 +0000
committerBenjamin Maxwell <benjamin.maxwell@arm.com>2023-08-04 13:32:33 +0000
commit28fef902fc9f872fcdcd95237f425f58c9609ab4 (patch)
tree53268e59c721a9075170a392cd1d3cece371e693 /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
parentfcb0294b587e58e64503a7738a832fd00ab1c08b (diff)
downloadllvm-28fef902fc9f872fcdcd95237f425f58c9609ab4.zip
llvm-28fef902fc9f872fcdcd95237f425f58c9609ab4.tar.gz
llvm-28fef902fc9f872fcdcd95237f425f58c9609ab4.tar.bz2
[mlir][VectorOps] Fix folding of vector.extract from stretch vector.broadcast
Previously, foldExtractFromBroadcast() would incorrectly fold: func.func @extract_from_stretch_broadcast(%src: vector<3x1x2xf32>) -> f32 { %0 = vector.broadcast %src : vector<3x1x2xf32> to vector<3x4x2xf32> %1 = vector.extract %0[0, 2, 0] : vector<3x4x2xf32> return %1: f32 } to: func.func @extract_from_stretch_broadcast(%src: vector<3x1x2xf32>) -> f32 { %0 = vector.extract %src[0, 2, 0] : vector<3x1x2xf32> return %0: f32 } This was due to the wrong offset being used when zeroing the "dim-1" broadcasted dims. It should use the difference in rank across the broadcast as the starting offset, as the ranks after that are the ones that could have been stretched. Reviewed By: awarzynski, dcaballe Differential Revision: https://reviews.llvm.org/D157003
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
0 files changed, 0 insertions, 0 deletions