This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/77499] [7 Regression] Regression after code-hoisting, due to combine pass failing to evaluate known value range
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Sep 2016 07:43:26 +0000
- Subject: [Bug rtl-optimization/77499] [7 Regression] Regression after code-hoisting, due to combine pass failing to evaluate known value range
- Auto-submitted: auto-generated
- References: <bug-77499-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77499
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Target Milestone|--- |7.0
Summary|Regression after |[7 Regression] Regression
|code-hoisting, due to |after code-hoisting, due to
|combine pass failing to |combine pass failing to
|evaluate known value range |evaluate known value range
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
on x86 the code is if-converted which might help combine (though there is
nothing to combine on x86).
It looks like nonzero_bits never looks at sets of REGs and thus can only work
on expressions. Code hoisting generally makes sub-expressions no longer
single-use (in this case the x >> 1) which means they won't appear as part of
a larger expression (and combine doesn't consider re-combining them unless in
some very specific circumstances). In this case r111:SI is used multiple
times.
It seems with thumb the code is only if-converted after reload for some reason.