Summary: | Missed min/max pattern using xor+and+less | ||
---|---|---|---|
Product: | gcc | Reporter: | Gabriel Ravier <gabravier> |
Component: | tree-optimization | Assignee: | Jakub Jelinek <jakub> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gabravier, jakub |
Priority: | P3 | Keywords: | easyhack, missed-optimization |
Version: | 10.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2020-04-27 00:00:00 | |
Attachments: | gcc11-pr94786.patch |
Description
Gabriel Ravier
2020-04-27 08:11:06 UTC
Confirmed. Created attachment 48475 [details] gcc11-pr94786.patch Untested fix. The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:1595a1cb7bfac8d5a6026d5d6f3a495be0391506 commit r11-198-g1595a1cb7bfac8d5a6026d5d6f3a495be0391506 Author: Jakub Jelinek <jakub@redhat.com> Date: Fri May 8 10:52:47 2020 +0200 match.pd: A ^ ((A ^ B) & -(C cmp D)) -> (C cmp D) ? B : A simplification [PR94786] We already have x - ((x - y) & -(z < w)) and x + ((y - x) & -(z < w)) simplifications, this one adds x ^ ((x ^ y) & -(z < w)) (not merged using for because of the :c that can be present on bit_xor and can't on minus). 2020-05-08 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/94786 * match.pd (A ^ ((A ^ B) & -(C cmp D)) -> (C cmp D) ? B : A): New simplification. * gcc.dg/tree-ssa/pr94786.c: New test. Fixed. |