https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92534

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> ---
This is related to the realign vector load. It only fail with
-mno-allow-movmisalign (which is disabled from Power8), I can't see the abort
if I specified the option explicitly on Power8.

The generated IR below is incorrect:

  vectp.43_73 = &MEM[(int *)b_17(D) + 4B];
  vect__160.44_21 = __builtin_altivec_mask_for_load (vectp.43_73);
==> Here we use the vectp.43_73 (b+4), this is unexpected.
  vectp.46_20 = &MEM[(int *)b_17(D) + 4B];
  vectp.46_19 = vectp.46_20 + 18446744073709551612;
==> Here we use the vectp.46_19 (b)
  vectp.46_18 = vectp.46_19 & -16B;
  vect__160.47_206 = MEM <vector(4) int> [(int *)vectp.46_18];
  vectp.46_207 = vectp.46_19 + 15;
==> Here we use the vectp.46_19 (b) + 15
  vectp.46_208 = vectp.46_207 & -16B;
  vect__160.48_209 = MEM <vector(4) int> [(int *)vectp.46_208];
  vect__160.49_210 = REALIGN_LOAD <vect__160.47_206, vect__160.48_209,
vect__160.44_21>;
  vect__144.50_211 = VEC_PERM_EXPR <vect__160.49_210, vect__160.49_210, { 1, 1,
1, 1 }>;

If I adjusted it as the below code, it can pass.

      msq = vect_setup_realignment (first_stmt_info_for_drptr && !slp_perm
                                    ? first_stmt_info_for_drptr
                                    : first_stmt_info, gsi, &realignment_token,
                                    alignment_support_scheme, NULL_TREE,
                                    &at_loop);

Need more time to figure out it's reasonable.

Reply via email to