[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 --- Comment #7 from Jiu Fu Guo --- A comment https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111303#c7 should be attached here.

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 Jiu Fu Guo changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 --- Comment #5 from Jiu Fu Guo --- (In reply to Andrew Pinski from comment #2) > Confirmed. > > So using the local range in this case is ok. There might be only a few times > we don't want to use it though in match. Agree, "get_range_query"

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 --- Comment #4 from Jiu Fu Guo --- (In reply to Jiu Fu Guo from comment #3) > A patch is posted: > https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629534.html It is not for this PR. Sorry for typo.

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-10 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 --- Comment #3 from Jiu Fu Guo --- A patch is posted: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629534.html

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-07 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 --- Comment #1 from Jiu Fu Guo --- In match.pd, there is a pattern: /* Simplify (t * 2) / 2) -> t. */ (for div (trunc_div ceil_div floor_div round_div exact_div) (simplify (div (mult:c @0 @1) @1) (if (ANY_INTEGRAL_TYPE_P (type)) (if