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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> (In reply to Richard Biener from comment #1)
> > Not only due to this check the following testcase fails to use fully masking
> > or a masked epilog.  I'm not sure how common it would be to have both
> > inbranch
> > and notinbranch variants, I did not check if there's a syntax to get both
> > created for a function definition.
> > 
> > #pragma omp declare simd simdlen(16) inbranch
> > int __attribute__((const)) baz (int x);
> > #pragma omp declare simd simdlen(16) notinbranch
> > int __attribute__((const)) baz (int x);
> 
> Note, just
> #pragma omp declare simd simdlen(16)
> int __attribute__((const)) baz (int x);
> should create both inbranch and notinbranch clones, or you can use
> #pragma omp declare simd simdlen(16) inbranch
> #pragma omp declare simd simdlen(16) notinbranch
> int __attribute__((const)) baz (int x);
> too.
> 
> I believe the #c0 mentioned hunk is from Andre, and if
> LOOP_VINFO_FULLY_MASKED_P isn't computed until late, I think we need some
> alternative for that.

I think we need to compute both a inbranch and notinbranch "optimal" SIMD
clone.  We only know after vectorizable_simd_clone_call analysis whether we
actually will use a masked loop or not.  If we don't we can code-generate
for the notinbranch variant if that's available.

Reply via email to