This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/81346] Missed constant propagation into comparison
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Jul 2017 12:51:03 +0000
- Subject: [Bug tree-optimization/81346] Missed constant propagation into comparison
- Auto-submitted: auto-generated
- References: <bug-81346-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #13 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #12)
> Created attachment 41781 [details]
> gcc8-pr81346-2.patch
>
> Further optimization from build_range_check.
I wonder if "1" is that special, this optimization basically applies to any
range that ends at INT_MAX, turning (X-C1)<=C2 into (signed)X>=C3. Or do we
consider that only the case that yields a simple sign check is a win?