]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/110278 - uns < (typeof uns)(uns != 0) is always false
authorRichard Biener <rguenther@suse.de>
Fri, 16 Jun 2023 09:47:45 +0000 (11:47 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 16 Jun 2023 11:46:22 +0000 (13:46 +0200)
commit69b04fe7445c88edafd6983e28353a158e4314b5
treed763afc20a88257f22bafe50bea7f5e7098ac925
parent453cb585f0f8673a5d69d1b420ffd4b3f53aca00
tree-optimization/110278 - uns < (typeof uns)(uns != 0) is always false

The following adds two patterns simplifying comparisons,
uns < (typeof uns)(uns != 0) is always false and x != (typeof x)(x == 0)
is always true.

PR tree-optimization/110278
* match.pd (uns < (typeof uns)(uns != 0) -> false): New.
(x != (typeof x)(x == 0) -> true): Likewise.
gcc/match.pd