[Mlir-commits] [mlir] [mlir][Vector] Improve support for vector.extract(broadcast) (PR #116234)
Andrzej Warzyński
llvmlistbot at llvm.org
Thu Nov 14 08:52:57 PST 2024
================
@@ -652,24 +652,44 @@ func.func @fold_extract_transpose(
// -----
-// CHECK-LABEL: fold_extract_broadcast
+// CHECK-LABEL: fold_extract_broadcast_same_type
// CHECK-SAME: %[[A:.*]]: f32
// CHECK: return %[[A]] : f32
-func.func @fold_extract_broadcast(%a : f32) -> f32 {
+func.func @fold_extract_broadcast_same_type(%a : f32,
+ %idx0 : index,
+ %idx1 : index) -> f32 {
%b = vector.broadcast %a : f32 to vector<1x2x4xf32>
- %r = vector.extract %b[0, 1, 2] : f32 from vector<1x2x4xf32>
+ // The indices don't batter for this folder, so we use mixed indices.
----------------
banach-space wrote:
https://en.wikipedia.org/wiki/Batter_(cooking)#:~:text=Batter%20is%20a%20flour%20mixture,consistency%20that%20cannot%20be%20kneaded.
😂
https://github.com/llvm/llvm-project/pull/116234
More information about the Mlir-commits
mailing list