This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/70729] Loop marked with omp simd pragma is not vectorized


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

--- Comment #26 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Yuri Rumyantsev from comment #25)
> Created attachment 38684 [details]
> patch.2
> 
> Richard!
> 
> I prepared the second part of patch and checked that it does not
> produce any new failures.
> What is your opinion - could I send it to GCC community for review?

Instead of marking ->aux when seeing unanalyzed memory references simply
put the check after

static bool
ref_indep_loop_p_1 (struct loop *loop, im_mem_ref *ref, bool stored_p)
{
  bitmap refs_to_check;
  unsigned i;
  bitmap_iterator bi;
  im_mem_ref *aref;

  if (stored_p)
    refs_to_check = &memory_accesses.refs_in_loop[loop->num];
  else
    refs_to_check = &memory_accesses.refs_stored_in_loop[loop->num];

  if (bitmap_bit_p (refs_to_check, UNANALYZABLE_MEM_ID))
    return false;


The tree-vect-loop.c change looks good but please expand the comment to say
why safelen is no longer valid after successful vectorization.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]