aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/constraint.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-05-11 11:53:53 +0200
committerRichard Biener <rguenther@suse.de>2022-05-11 14:34:30 +0200
commit7f04b0d786e13ff5c1bd952a24fd324224415c9a (patch)
tree1d4fceaf86289ad02d0c2cc2385346569de8e74d /gcc/cp/constraint.cc
parent876ac21b7e796f9efb859dfb46ae2a4126b0b782 (diff)
downloadgcc-7f04b0d786e13ff5c1bd952a24fd324224415c9a.zip
gcc-7f04b0d786e13ff5c1bd952a24fd324224415c9a.tar.gz
gcc-7f04b0d786e13ff5c1bd952a24fd324224415c9a.tar.bz2
Implement some of fold_binary_op_with_conditional_arg in match.pd
The following allows (c != 0 ? 0 : 100) != 0 to be simplified as c != 0 as fold_binary_op_with_conditional_arg would have done via forwprop and GENERIC folding. Likewise it allows to combine (a != 0) != 0 directly via match.pd instead of only via forwprop and again fold_binary_op_with_conditional_arg. The patterns do not fully implement all cases of fold_binary_op_with_conditional_arg, some aspects like "any of the operands simplify" cannot currently be expressed. 2022-05-11 Richard Biener <rguenther@suse.de> * generic-match-head.cc: Include tree-eh.h. * match.pd ((cond ...) cmp X): New simplification inspired by fold_binary_op_with_conditional_arg. (eq/ne (cmp ...) true/false): Likewise. * gcc.dg/tree-ssa/pr61839_1.c: Adjust. * gcc.dg/tree-ssa/vrp24.c: Likewise.
Diffstat (limited to 'gcc/cp/constraint.cc')
0 files changed, 0 insertions, 0 deletions