public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
@ 2015-02-01  1:37 ` pinskia at gcc dot gnu.org
  2015-02-01  1:42 ` pinskia at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-01  1:37 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.0


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

* [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler
@ 2015-02-01  1:37 pinskia at gcc dot gnu.org
  2015-02-01  1:37 ` [Bug target/64893] " pinskia at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-01  1:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64893
           Summary: [5 Regression] ICE while doing a bootstrap with the
                    latest compiler
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: build, ice-on-valid-code
          Severity: blocker
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
            Target: aarch64*

Compile the following with -O0:
typedef __Uint32x2_t uint32x2_t;
__extension__ static __inline unsigned __attribute__
((__always_inline__))vget_lane_u32 (uint32x2_t __a, const int __b)
{
  return __extension__ ({ __builtin_aarch64_im_lane_boundsi ((sizeof (__a) /
sizeof (__a[0])), __b); __a[__b]; });
}
int
search_line_fast (uint32x2_t t)
{
  return vget_lane_u32 (t, 0);
}

-- CUT ---
With the C front-end, it works correctly but with the C++ front-end it fails
due to (int) (8 / 4) not being folded into just 2.


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
  2015-02-01  1:37 ` [Bug target/64893] " pinskia at gcc dot gnu.org
@ 2015-02-01  1:42 ` pinskia at gcc dot gnu.org
  2015-02-01  3:43 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-01  1:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This was caused/exposed by revision 218532.


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
  2015-02-01  1:37 ` [Bug target/64893] " pinskia at gcc dot gnu.org
  2015-02-01  1:42 ` pinskia at gcc dot gnu.org
@ 2015-02-01  3:43 ` pinskia at gcc dot gnu.org
  2015-02-02  7:22 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-01  3:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Ok, the problem is related to sizeof.
Let me see if I can make the gimplifier fold the statements or something
similar.  Note we might want to change the first argument of
__builtin_aarch64_im_lane_boundsi to size_t to get rid of the case so it is
easy to handle in fold.


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-02-01  3:43 ` pinskia at gcc dot gnu.org
@ 2015-02-02  7:22 ` pinskia at gcc dot gnu.org
  2015-02-02  8:22 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-02  7:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can we change the arguments for __builtin_aarch64_im_lane_boundsi to take three
arguments, the two sizeof's and the idx?  And do the division inside the
compiler?  Also change the argument types of __builtin_aarch64_im_lane_boundsi
to be size_type_node instead.

Something like:

#define __AARCH64_NUM_LANES(__v) (sizeof (__v) / sizeof (__v[0]))
#define __AARCH64_LANE_CHECK(__vec, __idx)      \
        __builtin_aarch64_im_lane_boundsi (__AARCH64_NUM_LANES (__vec), __idx)

Into:
#define __AARCH64_NUM_LANES(__v) (sizeof (__v) / sizeof (__v[0]))
#define __AARCH64_LANE_CHECK(__vec, __idx)      \
        __builtin_aarch64_im_lane_boundsi (sizeof (__v), sizeof(__v[0]), __idx)


Both of these things should allow C++ to work without much work.


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-02-02  7:22 ` pinskia at gcc dot gnu.org
@ 2015-02-02  8:22 ` pinskia at gcc dot gnu.org
  2015-02-02  8:27 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-02  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is the "unincluded" version of the code:
#include <arm_neon.h>
int
search_line_fast (uint32x2_t t)
{
  return vget_lane_u32 (t, 0);
}


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-02-02  8:22 ` pinskia at gcc dot gnu.org
@ 2015-02-02  8:27 ` pinskia at gcc dot gnu.org
  2015-02-02  8:44 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-02  8:27 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-02-02
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
My patch works so I am going to bootstrap/test it.


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-02-02  8:27 ` pinskia at gcc dot gnu.org
@ 2015-02-02  8:44 ` pinskia at gcc dot gnu.org
  2015-02-02  8:48 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-02  8:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 34642
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34642&action=edit
The patch which fixes the C++ failure (but does not include a testcase yet)


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-02-02  8:44 ` pinskia at gcc dot gnu.org
@ 2015-02-02  8:48 ` rguenth at gcc dot gnu.org
  2015-02-02 17:04 ` alalaw01 at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-02  8:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2015-02-02  8:48 ` rguenth at gcc dot gnu.org
@ 2015-02-02 17:04 ` alalaw01 at gcc dot gnu.org
  2015-02-06  9:01 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: alalaw01 at gcc dot gnu.org @ 2015-02-02 17:04 UTC (permalink / raw)
  To: gcc-bugs

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

alalaw01 at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alalaw01 at gcc dot gnu.org

--- Comment #7 from alalaw01 at gcc dot gnu.org ---
This feels like we are working around a deficiency in the C++ frontend, which
is a shame, but if we have to, then seems to me like an OK way to do so.


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2015-02-02 17:04 ` alalaw01 at gcc dot gnu.org
@ 2015-02-06  9:01 ` jakub at gcc dot gnu.org
  2015-02-08  5:58 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-06  9:01 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to alalaw01 from comment #7)
> This feels like we are working around a deficiency in the C++ frontend,
> which is a shame, but if we have to, then seems to me like an OK way to do
> so.

That is not an deficiency, and the general trend is that we should fold less in
the FE unless required by the language, rather than more.  The built-in right
now relies on optimization, which is certainly not guaranteed when not
optimizing.


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2015-02-06  9:01 ` jakub at gcc dot gnu.org
@ 2015-02-08  5:58 ` pinskia at gcc dot gnu.org
  2015-02-11 10:19 ` pinskia at gcc dot gnu.org
  2015-02-11 10:20 ` pinskia at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-08  5:58 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                URL|                            |https://gcc.gnu.org/ml/gcc-
                   |                            |patches/2015-02/msg00472.ht
                   |                            |ml

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Posted a new patch:
https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00472.html


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2015-02-08  5:58 ` pinskia at gcc dot gnu.org
@ 2015-02-11 10:19 ` pinskia at gcc dot gnu.org
  2015-02-11 10:20 ` pinskia at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-11 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Author: pinskia
Date: Wed Feb 11 10:18:45 2015
New Revision: 220610

URL: https://gcc.gnu.org/viewcvs?rev=220610&root=gcc&view=rev
Log:
Fix bug 64893: ICE with vget_lane_u32 with C++ front-end

2015-02-11  Andrew Pinski  <apinski@cavium.com>

    PR target/64893
    * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
    Change the first argument type to size_type_node and add another
    size_type_node.
    (aarch64_simd_expand_builtin): Handle the new argument to
    AARCH64_SIMD_BUILTIN_LANE_CHECK and don't ICE but rather
    print an out when the first two arguments are not
    nonzero integer constants.
    * config/aarch64/arm_neon.h (__AARCH64_LANE_CHECK):
    Pass the sizeof directly to __builtin_aarch64_im_lane_boundsi.

2015-02-11  Andrew Pinski  <apinski@cavium.com>

    PR target/64893
    * c-c++-common/torture/aarch64-vect-lane-1.c: New testcase.
    * c-c++-common/torture/aarch64-vect-lane-2.c: New testcase.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/aarch64/aarch64-builtins.c
    trunk/gcc/config/aarch64/arm_neon.h
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/64893] [5 Regression] ICE while doing a bootstrap with the latest compiler
  2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2015-02-11 10:19 ` pinskia at gcc dot gnu.org
@ 2015-02-11 10:20 ` pinskia at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-11 10:20 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2015-02-11 10:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-01  1:37 [Bug target/64893] New: [5 Regression] ICE while doing a bootstrap with the latest compiler pinskia at gcc dot gnu.org
2015-02-01  1:37 ` [Bug target/64893] " pinskia at gcc dot gnu.org
2015-02-01  1:42 ` pinskia at gcc dot gnu.org
2015-02-01  3:43 ` pinskia at gcc dot gnu.org
2015-02-02  7:22 ` pinskia at gcc dot gnu.org
2015-02-02  8:22 ` pinskia at gcc dot gnu.org
2015-02-02  8:27 ` pinskia at gcc dot gnu.org
2015-02-02  8:44 ` pinskia at gcc dot gnu.org
2015-02-02  8:48 ` rguenth at gcc dot gnu.org
2015-02-02 17:04 ` alalaw01 at gcc dot gnu.org
2015-02-06  9:01 ` jakub at gcc dot gnu.org
2015-02-08  5:58 ` pinskia at gcc dot gnu.org
2015-02-11 10:19 ` pinskia at gcc dot gnu.org
2015-02-11 10:20 ` pinskia 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).