slp pass assert when compiler configure with --enable-checking

Reported by mickael guene on 2012-03-20
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Linaro GCC
High
Ulrich Weigand
4.6
High
Ulrich Weigand
4.7
High
Ulrich Weigand

Bug Description

When compiling attached small.c file with linaro-4.6-2012.03 configured with --enable-checking and gcc options :
gcc -c small.c -msoft-float -march=armv7-a -mfloat-abi=softfp -mfpu=neon -mvectorize-with-neon-quad -ftree-vectorize -O2

I have a great number of assertion due to access to unallocated memory.
patch from Bug #960274 plus attached patch fix them all (certainly badly)

I have not done a very deep analysis but either analysis pass make a wrong decision when applying slp optimization or
code is seriously bugged.

mickael guene (mickael-guene) wrote :
mickael guene (mickael-guene) wrote :
description: updated
Ulrich Weigand (uweigand) wrote :

Thanks for the bug report. I can confirm this also with current mainline. I'll have a look.

Changed in gcc-linaro:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Ulrich Weigand (uweigand)
Changed in gcc-linaro:
status: Confirmed → In Progress
Ulrich Weigand (uweigand) wrote :

It seems the root cause of all the memory problems is that vect_get_smallest_scalar_type neglected to handle WIDEN_LSHIFT_EXPR, which causes the SLP pass to mis-compute the number of statements needed to vectorize the expression. The attached patch (together with your patch from #960274) fixes the ICEs for me ...

mickael guene (mickael-guene) wrote :

  I have test patch from #960274 + your patch and now it works well.
 Thanks for the fix

Ulrich Weigand (uweigand) wrote :

Fix committed to mainline, Linaro GCC 4.6, and Linaro GCC 4.7.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.