https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #30 from Markus Trippelsdorf ---
For references, Linus himself fixed the issue:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=474c90156c8dcc2fa815e6716cc9394d7930cb9c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
Markus Trippelsdorf changed:
What|Removed |Added
CC||arnd at linaro dot org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #28 from James Greenhalgh ---
> As far as I can tell the kernel is the only project where this issue ever
> popped up. The fix is straightforward. It just needs to be send to the
> correct kernel maintainer.
Right, but getting the pa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #27 from Markus Trippelsdorf ---
(In reply to James Greenhalgh from comment #26)
> (In reply to dhowe...@redhat.com from comment #21)
> > (In reply to Markus Trippelsdorf from comment #20)
> > > *** Bug 78879 has been marked as a dupl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #26 from James Greenhalgh ---
(In reply to dhowe...@redhat.com from comment #21)
> (In reply to Markus Trippelsdorf from comment #20)
> > *** Bug 78879 has been marked as a duplicate of this bug. ***
>
> Kernel bug or not, it should
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
Markus Trippelsdorf changed:
What|Removed |Added
Status|REOPENED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
ktkachov at gcc dot gnu.org changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Resolution
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
ktkachov at gcc dot gnu.org changed:
What|Removed |Added
CC||ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #22 from Markus Trippelsdorf ---
(In reply to dhowe...@redhat.com from comment #21)
> (In reply to Markus Trippelsdorf from comment #20)
> > *** Bug 78879 has been marked as a duplicate of this bug. ***
>
> Kernel bug or not, it shou
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #21 from dhowells at redhat dot com ---
(In reply to Markus Trippelsdorf from comment #20)
> *** Bug 78879 has been marked as a duplicate of this bug. ***
Kernel bug or not, it should be noted that this means that you cannot use gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
Markus Trippelsdorf changed:
What|Removed |Added
CC||coolypf at qq dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
Markus Trippelsdorf changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
Christophe Lyon changed:
What|Removed |Added
CC||clyon at gcc dot gnu.org
--- Comment #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #17 from dhowells at redhat dot com ---
(In reply to dhowe...@redhat.com from comment #16)
> ...
> 0027 :
> 27: 0f bd c7bsr%edi,%eax
> 2a: 83 f0 1fxor$0x1f,%eax
> 2d: c3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #16 from dhowells at redhat dot com ---
I guess the following could be used:
int clz_ilog2(unsigned long x)
{
return __builtin_clz(x);
}
which compiles to:
0027 :
27: 0f bd c7bsr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #15 from dhowells at redhat dot com ---
(In reply to Jakub Jelinek from comment #14)
> (In reply to dhowe...@redhat.com from comment #13)
> ...
> Ugh, no. Why not just x && (x & -x) == x ? __builtin_ctz (x) : -1
> (or ctzl or ctzll d
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #14 from Jakub Jelinek ---
(In reply to dhowe...@redhat.com from comment #13)
> Another possibility, at least for handling ilog2(), could be to provide
> __builtin_ilog2(unsigned long x) as an alternative.
>
> Note that the kernel il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
dhowells at redhat dot com changed:
What|Removed |Added
CC||dhowells at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #12 from Richard Biener ---
I believe the testcase is simply abusing b_c_p. Can you elaborate on the
"as-if" rule here?
Note we drop all b_c_p to true/false in the first VRP pass (after inlining),
so a less agressive fix would be to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #11 from Jakub Jelinek ---
(In reply to Marc Glisse from comment #9)
> Uh, that's a very strict interpretation. In particular, a function parameter
> can never satisfy it, whereas many users of bcp rely on inlining turning
> parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #10 from Jeffrey A. Law ---
Yes, it's a fairly strict interpretation, but I think it's the right one to be
using in the absence of additional language around the semantics of b_c_p.
In particular refer to c#6 in BZ38789.
Essentially
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #9 from Marc Glisse ---
(In reply to Jeffrey A. Law from comment #8)
> I've spent a goodly part of the morning pondering this BZ. While I think
> the semantics of b_c_p are under/ill defined and they will continue to cause
> problems
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
Jeffrey A. Law changed:
What|Removed |Added
Assignee|unassigned at gcc dot gnu.org |law at redhat dot com
--- Commen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #7 from Marc Glisse ---
(In reply to Jakub Jelinek from comment #2)
> This is undesirable, iftmp.0_2 really isn't constant, so we shouldn't turn
> it into sometimes constant, sometimes non-constant.
I am not sure about that. The way
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #6 from Jeffrey A. Law ---
So this is a very interesting little issue that highlights a deficiency in the
semantics of __builtin_constant_p.
So prior to threading we have:
;; basic block 4, loop depth 0, count 0, freq 1, mayb
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #5 from Andrew Pinski ---
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-October/461597.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
--- Comment #4 from Markus Trippelsdorf ---
(In reply to Jeffrey A. Law from comment #3)
> If someone has a .i file for this issue, it'd be awful handy.
Well, see comment0:
markus@x4 linux % cat timekeeping.i
int a, b;
extern int ilog2_NaN(
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
Jeffrey A. Law changed:
What|Removed |Added
CC||law at redhat dot com
--- Comment #3 fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
Martin Liška changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
Markus Trippelsdorf changed:
What|Removed |Added
Target Milestone|--- |7.0
31 matches
Mail list logo