public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/57333] Wrong detection of LZCNT instruction, -mno-lzcnt has no effect
       [not found] <bug-57333-4@http.gcc.gnu.org/bugzilla/>
@ 2013-05-19 19:43 ` bernhard.hartleb at gmail dot com
  2013-05-20  6:33 ` ubizjak at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: bernhard.hartleb at gmail dot com @ 2013-05-19 19:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from bernhard.hartleb at gmail dot com ---
It seems the illegal instructions is caused by the use of LTO.
Without LTO everything is fine.

The second point is still valid, however.


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

* [Bug target/57333] Wrong detection of LZCNT instruction, -mno-lzcnt has no effect
       [not found] <bug-57333-4@http.gcc.gnu.org/bugzilla/>
  2013-05-19 19:43 ` [Bug target/57333] Wrong detection of LZCNT instruction, -mno-lzcnt has no effect bernhard.hartleb at gmail dot com
@ 2013-05-20  6:33 ` ubizjak at gmail dot com
  2013-05-20  9:37 ` bernhard.hartleb at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2013-05-20  6:33 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tmsriram at google dot com
   Target Milestone|---                         |4.7.4
           Severity|major                       |normal

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
LZCNT insn is part of ABM abi, and is enabled with -mabm. Does LZCNT insn
really cause SIGILL on your target?

The issue with -mno-lzcnt will be fixed as part of patch at [1].

[1] http://gcc.gnu.org/ml/gcc-patches/2013-05/msg01054.html
>From gcc-bugs-return-422610-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon May 20 06:52:26 2013
Return-Path: <gcc-bugs-return-422610-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8511 invoked by alias); 20 May 2013 06:52:25 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 8470 invoked by uid 48); 20 May 2013 06:52:21 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/57331] [4.9 Regression] ICE: tree check: expected integer_type or enumeral_type or boolean_type or real_type or fixed_point_type, have pointer_type in int_fits_type_p, at tree.c:8437
Date: Mon, 20 May 2013 06:52:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57331-4-cwX9DlTIjk@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57331-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57331-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-05/txt/msg01283.txt.bz2
Content-length: 1034

http://gcc.gnu.org/bugzilla/show_bug.cgi?idW331

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase without missing return:
int
foo (int x)
{
  void *p = x ? (void *) 1 : (void *) 0;
  __INTPTR_TYPE__ b = (__INTPTR_TYPE__) p;
  if (b)
    return 0;
  return 1;
}

The problem is that int_fits_type_p doesn't handle POINTER_TYPE_P on rhs.
range_fits_type_p should already ensure that innerop is INTEGER_TYPE_P or
POINTER_TYPE_P.  So, either we can give up for POINTER_TYPE_P (TREE_TYPE
(innerop)) always, or we could handle just the most important pointer constant
(NULL), instead of the unconditional int_fits_type_p do something like
  && (POINTER_TYPE_P (TREE_TYPE (innerop))
      ? integer_zerop (op1)
      : int_fits_type_p (op1, TREE_TYPE (innerop))))
(0 will fit in any pointer type), or we'd need to write larger code to do
essentially what int_fits_type_p does, but using lower_bound_in_type and
upper_bound_in_type instead of TYPE_{MIN,MAX}_VALUE.  I'd say the last one
would be overkill.


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

* [Bug target/57333] Wrong detection of LZCNT instruction, -mno-lzcnt has no effect
       [not found] <bug-57333-4@http.gcc.gnu.org/bugzilla/>
  2013-05-19 19:43 ` [Bug target/57333] Wrong detection of LZCNT instruction, -mno-lzcnt has no effect bernhard.hartleb at gmail dot com
  2013-05-20  6:33 ` ubizjak at gmail dot com
@ 2013-05-20  9:37 ` bernhard.hartleb at gmail dot com
  2014-06-12 13:53 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: bernhard.hartleb at gmail dot com @ 2013-05-20  9:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from bernhard.hartleb at gmail dot com ---
(In reply to Uroš Bizjak from comment #2)
> LZCNT insn is part of ABM abi, and is enabled with -mabm. Does LZCNT insn
> really cause SIGILL on your target?

No sorry, this was an error on my part, because I did not know about -mabm
before.

The compilation of (libQtGui.so.4.8.4) with -march=k8 finished only after
reporting this bug and it still produced the illegal instruction. There is no
problem with LZCNT, other than -mno-lzcnt not working.

My issue is somewhere with LTO, since the build works percectly with LTO
disabled.
But this will be a different bug report.
>From gcc-bugs-return-422617-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon May 20 09:42:27 2013
Return-Path: <gcc-bugs-return-422617-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20091 invoked by alias); 20 May 2013 09:42:27 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 20060 invoked by uid 48); 20 May 2013 09:42:24 -0000
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/10207] Empty structure initialization fails under C++ (but works under C)
Date: Mon, 20 May 2013 09:42:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 3.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: minor
X-Bugzilla-Who: paolo.carlini at oracle dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-10207-4-KlbrF68N8O@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-10207-4@http.gcc.gnu.org/bugzilla/>
References: <bug-10207-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-05/txt/msg01290.txt.bz2
Content-length: 446

http://gcc.gnu.org/bugzilla/show_bug.cgi?id\x10207

Paolo Carlini <paolo.carlini at oracle dot com> changed:

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

--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.9.0.


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

* [Bug target/57333] Wrong detection of LZCNT instruction, -mno-lzcnt has no effect
       [not found] <bug-57333-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-05-20  9:37 ` bernhard.hartleb at gmail dot com
@ 2014-06-12 13:53 ` rguenth at gcc dot gnu.org
  2021-07-30  4:02 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.4                       |---

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Unsetting target milestone of open non-regression bug from version of branch
being closed.


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

* [Bug target/57333] Wrong detection of LZCNT instruction, -mno-lzcnt has no effect
       [not found] <bug-57333-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-06-12 13:53 ` rguenth at gcc dot gnu.org
@ 2021-07-30  4:02 ` pinskia at gcc dot gnu.org
  2021-07-30  4:08 ` pinskia at gcc dot gnu.org
  2021-07-30  4:10 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-30  4:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-linux-gnu
   Last reconfirmed|                            |2021-07-30
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Testcase for the error:
$ echo | gcc -dM -E - -march=amdfam10 -mno-lzcnt | grep LZCNT
#define __LZCNT__ 1


Is broken again on the trunk.

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

* [Bug target/57333] Wrong detection of LZCNT instruction, -mno-lzcnt has no effect
       [not found] <bug-57333-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-07-30  4:02 ` pinskia at gcc dot gnu.org
@ 2021-07-30  4:08 ` pinskia at gcc dot gnu.org
  2021-07-30  4:10 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-30  4:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|1                           |0
             Status|NEW                         |UNCONFIRMED

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

* [Bug target/57333] Wrong detection of LZCNT instruction, -mno-lzcnt has no effect
       [not found] <bug-57333-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2021-07-30  4:08 ` pinskia at gcc dot gnu.org
@ 2021-07-30  4:10 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-30  4:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> Testcase for the error:
> $ echo | gcc -dM -E - -march=amdfam10 -mno-lzcnt | grep LZCNT
> #define __LZCNT__ 1
> 
> 
> Is broken again on the trunk.

Filed PR 101685 for that.


As far as the LTO issue, it might be already fixed a different way; of course
without a testcase it is hard to say why it is broken.

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

end of thread, other threads:[~2021-07-30  4:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-57333-4@http.gcc.gnu.org/bugzilla/>
2013-05-19 19:43 ` [Bug target/57333] Wrong detection of LZCNT instruction, -mno-lzcnt has no effect bernhard.hartleb at gmail dot com
2013-05-20  6:33 ` ubizjak at gmail dot com
2013-05-20  9:37 ` bernhard.hartleb at gmail dot com
2014-06-12 13:53 ` rguenth at gcc dot gnu.org
2021-07-30  4:02 ` pinskia at gcc dot gnu.org
2021-07-30  4:08 ` pinskia at gcc dot gnu.org
2021-07-30  4:10 ` 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).