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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-12-07
                 CC|                            |ienkovich at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |6.0
     Ever confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  I suppose we also need to canonicalize VEC_COND_EXPRs to have
-1 in the true and 0 in the false arm.  Note that the optimization also
applies to COND_EXPRs with all_ones/zero arms and bitops.

We also should handle bit_not of course.

Not sure why you guard on !lvec, the optab query is done independent
of the comparison code.

As for the

  _8 = x_1(D) <= y_2(D);
  _6 = VEC_COND_EXPR <_8, { -1, -1, -1, -1 }, { 0, 0, 0, 0 }>;

issue it might be "easiest" to force a target canonical variant during
vector lowering.  That is, forward the conditon into the vec_cond_expr
if that's what the target understands (no bool vectors).  Doing this
at expansion time only may fall foul of coalescing and TER limitations.

Reply via email to