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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-07-24
             Blocks|                            |53947
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  The issue is

t.c:7:3: note:   ==> examining statement: _25 = .MASK_LOAD (_43, 32B, _42);
t.c:7:3: note:   vect_is_simple_use: operand x_12(D) != _13, type of def:
internal
t.c:7:3: note:   vect_is_simple_use: vectype vector(4) <unnamed type>
t.c:7:3: missed:   unsupported access type for masked load.
t.c:10:12: missed:   not vectorized: relevant stmt not supported: _25 =
.MASK_LOAD (_43, 32B, _42);
t.c:7:3: missed:  bad operation or unsupported loop bound.

possibly because how we if-convert the unrolled inner loop with the
early exit you introduced.  If you remove the early exit then we
elide the outer loop and nothing is left to do (it's replaced by
s *= 1024).

If you remove the early exit and disable the unrolling we vectorize
the loop successfully (but with awkward code generation IMHO).

If you remove the pointless outer loop we no longer unroll the inner
loop but it shows we cannot handle if-converting loops with multiple
exits.

A testcase more closely matching real-world code appreciated.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

Reply via email to