diff options
author | Richard Biener <rguenther@suse.de> | 2022-07-21 13:20:47 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-07-21 13:20:47 +0200 |
commit | 375668e0508fbe173af1ed519d8ae2b79f388d94 (patch) | |
tree | f477d9a9880b00e974211c7beb58ff3fd1e73935 /gcc/graphds.cc | |
parent | dc477ffb4aba21e9cf47de22a4df6f2b23849505 (diff) | |
download | gcc-375668e0508fbe173af1ed519d8ae2b79f388d94.zip gcc-375668e0508fbe173af1ed519d8ae2b79f388d94.tar.gz gcc-375668e0508fbe173af1ed519d8ae2b79f388d94.tar.bz2 |
tree-optimization/106379 - add missing ~(a ^ b) folding for _Bool
The following makes sure to fold ~(a ^ b) to a == b for truth
values (but not vectors, we'd have to check for vector support of
equality). That turns the PR106379 testcase into a ranger one.
Note that while we arrive at ~(a ^ b) in a convoluted way from
original !a == !b one can eventually write the expression this
way directly as well.
PR tree-optimization/106379
* match.pd (~(a ^ b) -> a == b): New pattern.
* gcc.dg/pr106379-1.c: New testcase.
Diffstat (limited to 'gcc/graphds.cc')
0 files changed, 0 insertions, 0 deletions