[Mlir-commits] [mlir] [mlir][vector] Update `CastAwayInsertLeadingOneDim` (PR #211777)
Federico Bruzzone
llvmlistbot at llvm.org
Fri Aug 28 07:40:36 PDT 2026
================
@@ -534,10 +534,10 @@ func.func @cast_away_insert_leading_one_dims_scalar_scalable(%s: f32, %v: vector
// CHECK-SAME: %[[S:.*]]: f32,
// CHECK-SAME: %[[V:.*]]: vector<1x[1]x4xf32>) -> vector<1x[1]x4xf32> {
func.func @cast_away_insert_leading_one_dims_scalar_skip_scalable_dim(%s: f32, %v: vector<1x[1]x4xf32>) -> vector<1x[1]x4xf32> {
-// CHECK: %[[EXTRACT:.*]] = vector.extract %[[V]][0] : vector<[1]x4xf32> from vector<1x[1]x4xf32>
-// CHECK: %[[INSERT:.*]] = vector.insert %[[S]], %[[EXTRACT]] [0, 0] : f32 into vector<[1]x4xf32>
-// CHECK: %[[BCAST:.*]] = vector.broadcast %[[INSERT]] : vector<[1]x4xf32> to vector<1x[1]x4xf32>
-// CHECK: return %[[BCAST]] : vector<1x[1]x4xf32>
+// CHECK: %[[SC:.*]] = vector.shape_cast %[[V]] : vector<1x[1]x4xf32> to vector<[1]x4xf32>
----------------
FedericoBruzzone wrote:
```suggestion
// CHECK: %[[SC:.*]] = vector.shape_cast %[[V]] : vector<1x[1]x4xf32> to vector<[1]x4xf32>
```
https://github.com/llvm/llvm-project/pull/211777
More information about the Mlir-commits
mailing list