@@ -3380,12 +3380,37 @@ func.func @negative_from_elements_to_constant() -> vector<1x!llvm.ptr> {
3380
3380
// CHECK-LABEL: @negative_from_elements_poison
3381
3381
// CHECK: %[[VAL:.*]] = ub.poison : vector<2xf32>
3382
3382
// CHECK: return %[[VAL]] : vector<2xf32>
3383
- func.func @negative_from_elements_poison () -> vector <2 xf32 > {
3383
+ func.func @negative_from_elements_poison_f32 () -> vector <2 xf32 > {
3384
3384
%0 = ub.poison : f32
3385
3385
%1 = vector.from_elements %0 , %0 : vector <2 xf32 >
3386
3386
return %1 : vector <2 xf32 >
3387
3387
}
3388
3388
3389
+ // -----
3390
+
3391
+ // CHECK-LABEL: @negative_from_elements_poison_i32
3392
+ // CHECK: %[[VAL:.*]] = ub.poison : vector<2xi32>
3393
+ // CHECK: return %[[VAL]] : vector<2xi32>
3394
+ func.func @negative_from_elements_poison_i32 () -> vector <2 xi32 > {
3395
+ %0 = ub.poison : i32
3396
+ %1 = vector.from_elements %0 , %0 : vector <2 xi32 >
3397
+ return %1 : vector <2 xi32 >
3398
+ }
3399
+
3400
+ // -----
3401
+
3402
+ // CHECK-LABEL: @negative_from_elements_poison_constant_mix
3403
+ // CHECK: %[[POISON:.*]] = ub.poison : f32
3404
+ // CHECK: %[[CONST:.*]] = arith.constant 1.000000e+00 : f32
3405
+ // CHECK: %[[RES:.*]] = vector.from_elements %[[POISON]], %[[CONST]] : vector<2xf32>
3406
+ // CHECK: return %[[RES]] : vector<2xf32>
3407
+ func.func @negative_from_elements_poison_constant_mix () -> vector <2 xf32 > {
3408
+ %0 = ub.poison : f32
3409
+ %c = arith.constant 1.0 : f32
3410
+ %1 = vector.from_elements %0 , %c : vector <2 xf32 >
3411
+ return %1 : vector <2 xf32 >
3412
+ }
3413
+
3389
3414
// +---------------------------------------------------------------------------
3390
3415
// End of Tests for foldFromElementsToConstant
3391
3416
// +---------------------------------------------------------------------------
0 commit comments