public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/56934] New: ICE folding a COND_EXPR involving vectors
@ 2013-04-12 13:50 glisse at gcc dot gnu.org
  2013-04-16  5:09 ` [Bug middle-end/56934] " mpolacek at gcc dot gnu.org
  2013-05-23 22:43 ` glisse at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-04-12 13:50 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56934
           Summary: ICE folding a COND_EXPR involving vectors
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: glisse@gcc.gnu.org


typedef long veci __attribute__((vector_size(16)));
veci f(double a, veci b){
  return (a<2)?(b<3):(b!=b);
}

e.cc: In function 'veci f(double, veci)':
e.cc:3:27: internal compiler error: in fold_convert_loc, at fold-const.c:1972
   return (a<2)?(b<3):(b!=b);
                           ^

I think the folding should just be disabled in this case. Even if fold_convert
was taught how to convert scalars to vectors, it would produce a vector {1,1}
instead of {-1,-1} (and it would build a TRUTH_ANDIF_EXPR with vectors). I have
a fix as part of another patch.

An alternative fix would be to make truth_value_p return false for vectors,
which would make us regress on several optimizations I guess.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/56934] ICE folding a COND_EXPR involving vectors
  2013-04-12 13:50 [Bug middle-end/56934] New: ICE folding a COND_EXPR involving vectors glisse at gcc dot gnu.org
@ 2013-04-16  5:09 ` mpolacek at gcc dot gnu.org
  2013-05-23 22:43 ` glisse at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-04-16  5:09 UTC (permalink / raw)
  To: gcc-bugs


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-04-16
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever Confirmed|0                           |1
      Known to fail|                            |4.8.0, 4.9.0

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-04-16 05:09:52 UTC ---
Confirmed with trunk/4.8.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/56934] ICE folding a COND_EXPR involving vectors
  2013-04-12 13:50 [Bug middle-end/56934] New: ICE folding a COND_EXPR involving vectors glisse at gcc dot gnu.org
  2013-04-16  5:09 ` [Bug middle-end/56934] " mpolacek at gcc dot gnu.org
@ 2013-05-23 22:43 ` glisse at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-05-23 22:43 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.9.0
      Known to fail|4.9.0                       |

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
Fixed on trunk.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-23 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-12 13:50 [Bug middle-end/56934] New: ICE folding a COND_EXPR involving vectors glisse at gcc dot gnu.org
2013-04-16  5:09 ` [Bug middle-end/56934] " mpolacek at gcc dot gnu.org
2013-05-23 22:43 ` glisse at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).