public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/56049] New: [4.8 Regression] Simplification to constants not done
Date: Sun, 20 Jan 2013 10:23:00 -0000 [thread overview]
Message-ID: <bug-56049-4@http.gcc.gnu.org/bugzilla/> (raw)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56049
Bug #: 56049
Summary: [4.8 Regression] Simplification to constants not done
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: tkoenig@gcc.gnu.org
>From http://gcc.gnu.org/ml/fortran/2013-01/msg00158.html :
program inline
integer i
integer a(8,8), b(8,8)
a = 0
do i = 1, 10000000
call add(b, a, 1)
a = b
end do
print *, a
contains
subroutine add(b, a, o)
integer, intent(inout) :: b(8,8)
integer, intent(in) :: a(8,8), o
b = a + o
end subroutine add
end program inline
is simplified all the way to the final constant with 4.6 and
4.7 (example for 4.6.2):
;; Function inline (MAIN__) (executed once)
inline ()
{
struct array2_integer(kind=4) parm.3;
struct __st_parameter_dt dt_parm.2;
integer(kind=4) a[64];
<bb 2>:
a = {};
MEM[(integer(kind=4)[64] *)&a] = 10000000;
MEM[(integer(kind=4)[64] *)&a + 4B] = 10000000;
MEM[(integer(kind=4)[64] *)&a + 8B] = 10000000;
MEM[(integer(kind=4)[64] *)&a + 12B] = 10000000;
MEM[(integer(kind=4)[64] *)&a + 16B] = 10000000;
MEM[(integer(kind=4)[64] *)&a + 20B] = 10000000;
MEM[(integer(kind=4)[64] *)&a + 24B] = 10000000;
MEM[(integer(kind=4)[64] *)&a + 28B] = 10000000;
MEM[(integer(kind=4)[64] *)&a + 32B] = 10000000;
... and so on. Current trunk converts this to
;; Function inline (MAIN__, funcdef_no=0, decl_uid=1874, cgraph_uid=1)
(executed once)
inline ()
{
vector(4) integer(kind=4) vect_var_.16;
vector(4) integer(kind=4) vect_var_.15;
vector(4) integer(kind=4) vect_var_.14;
struct array2_integer(kind=4) parm.3;
struct __st_parameter_dt dt_parm.2;
integer(kind=4) b[64];
integer(kind=4) a[64];
unsigned int ivtmp_153;
unsigned int ivtmp_154;
<bb 2>:
a = {};
<bb 3>:
# ivtmp_154 = PHI <10000000(2), ivtmp_153(4)>
vect_var_.14_1 = MEM[(integer(kind=4)[64] *)&a];
vect_var_.15_42 = MEM[(integer(kind=4)[64] *)&a + 16B];
vect_var_.16_43 = vect_var_.14_1 + { 1, 1, 1, 1 };
vect_var_.16_44 = vect_var_.15_42 + { 1, 1, 1, 1 };
MEM[(integer(kind=4)[64] *)&b] = vect_var_.16_43;
MEM[(integer(kind=4)[64] *)&b + 16B] = vect_var_.16_44;
vect_var_.14_71 = MEM[(integer(kind=4)[64] *)&a + 32B];
vect_var_.15_77 = MEM[(integer(kind=4)[64] *)&a + 48B];
vect_var_.16_78 = vect_var_.14_71 + { 1, 1, 1, 1 };
vect_var_.16_79 = vect_var_.15_77 + { 1, 1, 1, 1 };
next reply other threads:[~2013-01-20 10:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-20 10:23 tkoenig at gcc dot gnu.org [this message]
2013-01-20 10:28 ` [Bug tree-optimization/56049] " tkoenig at gcc dot gnu.org
2013-01-20 10:32 ` dominiq at lps dot ens.fr
2013-01-20 17:42 ` jakub at gcc dot gnu.org
2013-01-21 13:30 ` rguenth at gcc dot gnu.org
2013-02-08 15:11 ` rguenth at gcc dot gnu.org
2013-02-11 22:02 ` aldyh at gcc dot gnu.org
2013-02-11 22:56 ` hubicka at gcc dot gnu.org
2013-02-12 11:07 ` rguenther at suse dot de
2013-02-12 14:22 ` aldyh at gcc dot gnu.org
2013-02-12 14:28 ` jakub at gcc dot gnu.org
2013-03-22 14:43 ` [Bug tree-optimization/56049] [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:48 ` jakub at gcc dot gnu.org
2014-05-22 9:01 ` [Bug tree-optimization/56049] [4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:25 ` [Bug tree-optimization/56049] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-06-23 8:14 ` [Bug tree-optimization/56049] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 19:53 ` [Bug tree-optimization/56049] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:26 ` jakub at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-56049-4@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).