https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99102
--- Comment #3 from Joel Hutton <joelh at gcc dot gnu.org> --- Seems like the 'vect' pass is vectorizing a 'MASK_STORE' to a 'SCATTER_STORE' and ignoring the mask. 1292 testcase.c:7:29: note: vect_is_simple_use: operand 0, type of def: constant$ 1293 testcase.c:7:29: note: created new init_stmt: vect_cst__65 = { 0, 0, 0, 0 };$ 1294 testcase.c:7:29: note: add new stmt: mask__60.11_66 = vect_cst__64 == vect_cst__65;$ 1295 testcase.c:7:29: note: ------>vectorizing statement: _61 = &a[_10];$ 1296 testcase.c:7:29: note: ------>vectorizing statement: .MASK_STORE (_61, 128B, _60, _31);$ 1297 testcase.c:7:29: note: transform statement.$ 1298 testcase.c:7:29: note: vect_is_simple_use: operand l_23(D) == 0, type of def: internal$ 1299 testcase.c:7:29: note: vect_is_simple_use: vectype vector(4) <signed-boolean:8>$ 1300 testcase.c:7:29: note: vect_is_simple_use: operand (long intD.9) j_24(D), type of def: internal$ 1301 testcase.c:7:29: note: vect_is_simple_use: vectype vector(4) long int$ 1302 Applying pattern match.pd:139, generic-match.c:24056$ 1303 Applying pattern match.pd:139, generic-match.c:24056$ 1304 testcase.c:7:29: note: transform store. ncopies = 1$ 1305 testcase.c:7:29: note: vect_get_vec_defs_for_operand: _31$ 1306 testcase.c:7:29: note: vect_is_simple_use: operand (long intD.9) j_24(D), type of def: internal$ 1307 testcase.c:7:29: note: def_stmt = _31 = (long int) j_24(D);$ 1308 testcase.c:7:29: note: vect_get_vec_defs_for_operand: _60$ 1309 testcase.c:7:29: note: vect_is_simple_use: operand l_23(D) == 0, type of def: internal$ 1310 testcase.c:7:29: note: def_stmt = _60 = l_23(D) == 0;$ 1311 testcase.c:7:29: note: create integer_type-pointer variable to type: long int vectorizing a pointer ref: MEM[(long int *)&a]$ 1312 Applying pattern match.pd:139, generic-match.c:27580$ 1313 testcase.c:7:29: note: created &a$ 1314 testcase.c:7:29: note: add new stmt: .SCATTER_STORE (vectp_a.12_67, { 0, 32, 64, 96 }, 1, vect__31.10_63);$ before: 112 <bb 4> [local count: 858993458]:$ 113 # i_39 = PHI <i_26(17), 0(3)>$ 114 # ivtmp_16 = PHI <ivtmp_7(17), 4(3)>$ 115 _1 = (int) i_39;$ 116 _2 = (long int) j_24(D);$ 117 _45 = l_23(D) == 0;$ 118 _46 = &a[_1];$ 119 .MASK_STORE (_46, 128B, _45, _2);$ 120 i.0_3 = (unsigned short) i_39;$ 121 _4 = i.0_3 + 4;$ 122 i_26 = (short int) _4;$ 123 ivtmp_7 = ivtmp_16 - 1;$ 124 if (ivtmp_7 != 0)$ 125 goto <bb 17>; [75.00%]$ 126 else$ 127 goto <bb 7>; [25.00%]$ 128 $ 129 <bb 17> [local count: 644245087]:$ 130 goto <bb 4>; [100.00%]$ 131 $ 132 <bb 7> [local count: 214748368]:$ 133 h_22 = h_33 + 1;$ 134 if (_14 > h_22)$ 135 goto <bb 16>; [89.00%]$ 136 else$ 137 goto <bb 19>; [11.00%]$ after: 1525 # PT = null { D.3608 } (nonlocal)$ 1526 # ALIGN = 32, MISALIGN = 0$ 1527 # vectp_a.12_67 = PHI <&aD.3608(21), vectp_a.12_68(26)>$ 1528 # ivtmp_70 = PHI <0(21), ivtmp_71(26)>$ 1529 _10 = (intD.7) i_9;$ 1530 vect__31.10_63 = (vector(4) long intD.9) vect_cst__62;$ 1531 _31 = (long intD.9) j_24(D);$ 1532 mask__60.11_66 = vect_cst__64 == vect_cst__65;$ 1533 _60 = l_23(D) == 0;$ 1534 # PT = null { D.3608 } (nonlocal)$ 1535 _61 = &aD.3608[_10];$ 1536 # .MEM_69 = VDEF <.MEM_13>$ 1537 # USE = anything~$ 1538 # CLB = anything~$ 1539 .SCATTER_STORE (vectp_a.12_67, { 0, 32, 64, 96 }, 1, vect__31.10_63);$ 1540 # RANGE [0, 14] NONZERO 12$ 1541 i.0_27 = (unsigned short) i_9;$ 1542 # RANGE [4, 18] NONZERO 28$ 1543 _28 = i.0_27 + 4;$ 1544 # RANGE [4, 18] NONZERO 28$ 1545 i_29 = (short intD.18) _28;$ 1546 ivtmp_30 = ivtmp_11 - 1;$ 1547 # PT = null { D.3608 } (nonlocal)$ 1548 # ALIGN = 32, MISALIGN = 0$ 1549 vectp_a.12_68 = vectp_a.12_67 + 128;$ 1550 ivtmp_71 = ivtmp_70 + 1;$ 1551 if (ivtmp_71 < 1)$ 1552 goto <bb 26>; [0.00%]$ 1553 else$ 1554 goto <bb 40>; [100.00%]$ 1555 ;; succ: 26 [never (adjusted)] count:0 (estimated locally) (TRUE_VALUE,EXECUTABLE)$ 1556 ;; 40 [always (adjusted)] count:214748371 (estimated locally) (FALSE_VALUE,EXECUTABLE)$ 1557 $ 1558 ;; basic block 26, loop depth 4, count 0 (estimated locally)$ 1559 ;; prev block 22, next block 40, flags: (NEW, VISITED)$ 1560 ;; pred: 22 [never (adjusted)] count:0 (estimated locally) (TRUE_VALUE,EXECUTABLE)$ 1561 goto <bb 22>; [100.00%]$