http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56695



--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-03-26 
16:20:39 UTC ---

(In reply to comment #6)

> Created attachment 29733 [details]

> Untested patch

> 

> I was thinking about something like this. In 4.8, I added vec_cond_expr

> expansion when the condition is not a comparison but a signed integer. I 
> didn't

> notice that the vectorizer was generating comparisons with an unsigned result.

> In 4.9 I added some folding of vec_cond_expr, which ended up folding the

> comparison to a constant (still unsigned) and now cannot be expanded. What I 
> do

> in the patch is make the vectorizer generate a signed result. An alternative

> would be to change the decision that vec_cond_expr expects a signed first

> argument.



Ah, yes, that's nice.  Thanks for explanation.  BTW, it passes make

RUNTESTFLAGS=vect.exp check-gcc.



> Note as well that we reach expand with a vec_cond_expr with 3 constant

> arguments, so there is a missed optimization there.



Yep.  Maybe something for fold_ternary?

Reply via email to