public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/45397] [4.5/4.6 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-16 13:18 ` rguenth at gcc dot gnu.org
  2011-04-28 15:21 ` [Bug tree-optimization/45397] [4.5/4.6/4.7 " rguenth at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-12-16 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.2                       |4.5.3

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-16 13:03:18 UTC ---
GCC 4.5.2 is being released, adjusting target milestone.


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

* [Bug tree-optimization/45397] [4.5/4.6/4.7 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
  2010-12-16 13:18 ` [Bug tree-optimization/45397] [4.5/4.6 Regression] Issues with integer narrowing conversions rguenth at gcc dot gnu.org
@ 2011-04-28 15:21 ` rguenth at gcc dot gnu.org
  2012-01-02 13:09 ` ktietz at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-28 15:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.3                       |4.5.4

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-28 14:51:32 UTC ---
GCC 4.5.3 is being released, adjusting target milestone.


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

* [Bug tree-optimization/45397] [4.5/4.6/4.7 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
  2010-12-16 13:18 ` [Bug tree-optimization/45397] [4.5/4.6 Regression] Issues with integer narrowing conversions rguenth at gcc dot gnu.org
  2011-04-28 15:21 ` [Bug tree-optimization/45397] [4.5/4.6/4.7 " rguenth at gcc dot gnu.org
@ 2012-01-02 13:09 ` ktietz at gcc dot gnu.org
  2012-01-04 20:14 ` [Bug tree-optimization/45397] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-01-02 13:09 UTC (permalink / raw)
  To: gcc-bugs

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

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

--- Comment #6 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-01-02 13:09:09 UTC ---
Hmm, we could solve this via forward-propagation in gimple, too.
I have a patch which does this, but not sure if it is material for current
stage.  The missing patterns in forward-propagation are:
  - X ==/!= X -> true/false,
  - (type) X ==/!= (type) X -> true/false
  - X code Y ==/!= X code Z -> Y ==/!= Z (with code +, -, or ^).
  - (type) X ==/!= Y & CST -> X ==/!= (type-of-X) (Y & CST) if type-of-X has
smaller, or equal precision as type and is unsigned, and type-of-x and type are
of integral kind,
  and CST fits into type-of-X.
  - (type) (X op CST) -> (type) X op CST' with CST' = (type) X; and type has
smaller or equal precision to type-of-x and both types are of integral kind.
(for op = +,-,&,|,^)
  - (type) ((type2) X op Y) -> X op (type) Y, if type has smaller or equal
precision to type2 and type-of-x is compatible to type, all types are of
integral kind, and op is a +,-,&,|,or ^ expression.


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

* [Bug tree-optimization/45397] [4.5/4.6/4.7/4.8 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2012-01-02 13:09 ` ktietz at gcc dot gnu.org
@ 2012-01-04 20:14 ` jakub at gcc dot gnu.org
  2012-03-02  9:37 ` jakub at gcc dot gnu.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-04 20:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.4                       |4.8.0
            Summary|[4.5/4.6/4.7 Regression]    |[4.5/4.6/4.7/4.8
                   |Issues with integer         |Regression] Issues with
                   |narrowing conversions       |integer narrowing
                   |                            |conversions

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-04 20:13:11 UTC ---
Not a stage4 material.


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

* [Bug tree-optimization/45397] [4.5/4.6/4.7/4.8 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2012-01-04 20:14 ` [Bug tree-optimization/45397] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org
@ 2012-03-02  9:37 ` jakub at gcc dot gnu.org
  2012-03-02  9:40 ` jakub at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-02  9:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-02 09:36:52 UTC ---
Another testcase (lightly based on PR50182), -O3 -mavx:

signed char a[1024], b[1024];

void
foo (void)
{
  int i, s, t;
  for (i = 0; i < 1024; i++)
    { s = a[i]; t = b[i]; s += t; a[i] = s; }
}

void
bar (void)
{
  int i;
  for (i = 0; i < 1024; i++)
    a[i] += b[i];
}

shows terrible code for the first loop and nice for the second one, eventhough
both can be implemented as the second loop.


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

* [Bug tree-optimization/45397] [4.5/4.6/4.7/4.8 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2012-03-02  9:37 ` jakub at gcc dot gnu.org
@ 2012-03-02  9:40 ` jakub at gcc dot gnu.org
  2012-03-02  9:48 ` jakub at gcc dot gnu.org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-02  9:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-02 09:39:16 UTC ---
Note that once can't use signed type in the narrowing + of course, it needs to
be unsigned char addition to avoid overflows.


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

* [Bug tree-optimization/45397] [4.5/4.6/4.7/4.8 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2012-03-02  9:40 ` jakub at gcc dot gnu.org
@ 2012-03-02  9:48 ` jakub at gcc dot gnu.org
  2012-03-06 12:51 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-02  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-02 09:48:17 UTC ---
Another testcase:

signed char a[1024], b[1024];

void
baz (void)
{
  int i, s, t;
  for (i = 0; i < 1024; i++)
    { s = a[i]; t = b[i]; s += t + 0x12345600; a[i] = s; }
}

The addition of constant we should be able to optimize away completely, but we
don't.


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

* [Bug tree-optimization/45397] [4.5/4.6/4.7/4.8 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2012-03-02  9:48 ` jakub at gcc dot gnu.org
@ 2012-03-06 12:51 ` jakub at gcc dot gnu.org
  2013-03-22 14:44 ` [Bug tree-optimization/45397] [4.6/4.7/4.8/4.9 " jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-06 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-06 12:48:19 UTC ---
Related to PR47477.


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

* [Bug tree-optimization/45397] [4.6/4.7/4.8/4.9 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2012-03-06 12:51 ` jakub at gcc dot gnu.org
@ 2013-03-22 14:44 ` jakub at gcc dot gnu.org
  2013-05-31 10:58 ` [Bug tree-optimization/45397] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-22 14:44 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.0                       |4.8.1

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-22 14:43:54 UTC ---
GCC 4.8.0 is being released, adjusting target milestone.


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

* [Bug tree-optimization/45397] [4.7/4.8/4.9 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2013-03-22 14:44 ` [Bug tree-optimization/45397] [4.6/4.7/4.8/4.9 " jakub at gcc dot gnu.org
@ 2013-05-31 10:58 ` jakub at gcc dot gnu.org
  2013-10-16  9:51 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-05-31 10:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.1                       |4.8.2

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.1 has been released.


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

* [Bug tree-optimization/45397] [4.7/4.8/4.9 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2013-05-31 10:58 ` [Bug tree-optimization/45397] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
@ 2013-10-16  9:51 ` jakub at gcc dot gnu.org
  2014-05-22  9:03 ` [Bug tree-optimization/45397] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-10-16  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.2                       |4.8.3

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.2 has been released.


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

* [Bug tree-optimization/45397] [4.7/4.8/4.9/4.10 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2013-10-16  9:51 ` jakub at gcc dot gnu.org
@ 2014-05-22  9:03 ` rguenth at gcc dot gnu.org
  2014-12-19 13:32 ` [Bug tree-optimization/45397] [4.8/4.9/5 " jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-05-22  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.3                       |4.8.4

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 4.8.3 is being released, adjusting target milestone.


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

* [Bug tree-optimization/45397] [4.8/4.9/5 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2014-05-22  9:03 ` [Bug tree-optimization/45397] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
@ 2014-12-19 13:32 ` jakub at gcc dot gnu.org
  2015-06-23  8:25 ` [Bug tree-optimization/45397] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.4                       |4.8.5

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.


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

* [Bug tree-optimization/45397] [4.8/4.9/5/6 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2014-12-19 13:32 ` [Bug tree-optimization/45397] [4.8/4.9/5 " jakub at gcc dot gnu.org
@ 2015-06-23  8:25 ` rguenth at gcc dot gnu.org
  2015-06-26 20:00 ` [Bug tree-optimization/45397] [4.9/5/6 " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23  8:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.5                       |4.9.3

--- Comment #17 from Richard Biener <rguenth at gcc dot gnu.org> ---
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.


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

* [Bug tree-optimization/45397] [4.9/5/6 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2015-06-23  8:25 ` [Bug tree-optimization/45397] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
@ 2015-06-26 20:00 ` jakub at gcc dot gnu.org
  2015-06-26 20:30 ` jakub at gcc dot gnu.org
  2015-10-19 11:39 ` mpolacek at gcc dot gnu.org
  16 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.


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

* [Bug tree-optimization/45397] [4.9/5/6 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2015-06-26 20:00 ` [Bug tree-optimization/45397] [4.9/5/6 " jakub at gcc dot gnu.org
@ 2015-06-26 20:30 ` jakub at gcc dot gnu.org
  2015-10-19 11:39 ` mpolacek at gcc dot gnu.org
  16 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.3                       |4.9.4


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

* [Bug tree-optimization/45397] [4.9/5/6 Regression] Issues with integer narrowing conversions
       [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2015-06-26 20:30 ` jakub at gcc dot gnu.org
@ 2015-10-19 11:39 ` mpolacek at gcc dot gnu.org
  16 siblings, 0 replies; 17+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-10-19 11:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #19 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
When this deficiency is finally resolved, we should be able to remove the code
in convert_to_integer dealing with narrowing operands:

 738         case PLUS_EXPR:
 739         case MINUS_EXPR:
 740         case BIT_AND_EXPR:
 741         case BIT_IOR_EXPR:
 742         case BIT_XOR_EXPR:
 743         trunc1:
 744           {
 ...
 821                     return convert (type,
 822                                     fold_build2 (ex_form, typex,
 823                                                  convert (typex, arg0),
 824                                                  convert (typex, arg1)));


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

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

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-45397-4@http.gcc.gnu.org/bugzilla/>
2010-12-16 13:18 ` [Bug tree-optimization/45397] [4.5/4.6 Regression] Issues with integer narrowing conversions rguenth at gcc dot gnu.org
2011-04-28 15:21 ` [Bug tree-optimization/45397] [4.5/4.6/4.7 " rguenth at gcc dot gnu.org
2012-01-02 13:09 ` ktietz at gcc dot gnu.org
2012-01-04 20:14 ` [Bug tree-optimization/45397] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org
2012-03-02  9:37 ` jakub at gcc dot gnu.org
2012-03-02  9:40 ` jakub at gcc dot gnu.org
2012-03-02  9:48 ` jakub at gcc dot gnu.org
2012-03-06 12:51 ` jakub at gcc dot gnu.org
2013-03-22 14:44 ` [Bug tree-optimization/45397] [4.6/4.7/4.8/4.9 " jakub at gcc dot gnu.org
2013-05-31 10:58 ` [Bug tree-optimization/45397] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2013-10-16  9:51 ` jakub at gcc dot gnu.org
2014-05-22  9:03 ` [Bug tree-optimization/45397] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:32 ` [Bug tree-optimization/45397] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-06-23  8:25 ` [Bug tree-optimization/45397] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 20:00 ` [Bug tree-optimization/45397] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:30 ` jakub at gcc dot gnu.org
2015-10-19 11:39 ` mpolacek 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).