diff options
author | Andrew Pinski <apinski@marvell.com> | 2021-05-16 10:40:16 -0700 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2021-05-23 08:08:14 +0000 |
commit | 99b76adb94d9363d0ca31a7d34ce850e2ca9ffc5 (patch) | |
tree | cbfa31dec87d011b45c6a5204bc44b3dc707ae73 /gcc/fortran/trans-expr.c | |
parent | 15d30d2f20794d29ceabcfd57d230d6387284115 (diff) | |
download | gcc-99b76adb94d9363d0ca31a7d34ce850e2ca9ffc5.zip gcc-99b76adb94d9363d0ca31a7d34ce850e2ca9ffc5.tar.gz gcc-99b76adb94d9363d0ca31a7d34ce850e2ca9ffc5.tar.bz2 |
Don't simplify (A & C) != 0 ? D : 0 for pointer types.
While rewriting part of PHI-OPT to use match-and-simplify,
I ran into a bug where this pattern in match.pd would hit
and would produce invalid gimple; a shift of a pointer type.
This just disables this simplification for pointer types similarly
to what is already done in PHI-OPT for the generic A ? D : 0 case.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
Thanks,
Andrew Pinski
2021-5-23 Andrew Pinski <apinski@marvell.com>
gcc/
* match.pd ((A & C) != 0 ? D : 0): Limit to non pointer types.
gcc/testsuite/
* gcc.dg/gimplefe-45.c: New test.
Diffstat (limited to 'gcc/fortran/trans-expr.c')
0 files changed, 0 insertions, 0 deletions