Bug 57810 - Wasted work in validate_const_int()
Summary: Wasted work in validate_const_int()
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-03 19:00 UTC by Po-Chun Chang
Modified: 2013-07-18 16:09 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Suggested patch (230 bytes, patch)
2013-07-03 20:26 UTC, Po-Chun Chang
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Po-Chun Chang 2013-07-03 19:00:00 UTC
The problem appears in revision 200588 in version 4.9.

In method "validate_const_int()" in gcc/read-rtl.c, the loop on line 804 should break immediately after "valid" is set to "0". All the iterations after "valid" set to "0" do not perform any useful work, at best they just set "valid" again to "0".
Comment 1 Po-Chun Chang 2013-07-03 20:26:22 UTC
Created attachment 30440 [details]
Suggested patch
Comment 2 Po-Chun Chang 2013-07-17 16:46:45 UTC
Patch sent to gcc-patches@:

http://gcc.gnu.org/ml/gcc-patches/2013-07/msg00662.html
Comment 3 Jeffrey A. Law 2013-07-18 16:09:56 UTC
Fixed on trunk.