aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadedge.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-08-18 11:10:30 +0200
committerRichard Biener <rguenther@suse.de>2022-08-18 16:03:58 +0200
commitac68f904fe31baf80fa53218f1d8ee033bd8c79b (patch)
treed6bf88ac9cd015e6908011b4c174d7569d42ed16 /gcc/tree-ssa-threadedge.cc
parent03119249b9cfedb48e910b8df6a832b206cced2b (diff)
downloadgcc-ac68f904fe31baf80fa53218f1d8ee033bd8c79b.zip
gcc-ac68f904fe31baf80fa53218f1d8ee033bd8c79b.tar.gz
gcc-ac68f904fe31baf80fa53218f1d8ee033bd8c79b.tar.bz2
middle-end/106617 - fix fold_binary_op_with_conditional_arg pattern issue
Now that we have parts of fold_binary_op_with_conditional_arg duplicated in match.pd and are using ! to take or throw away the result we have to be careful to not have both implementations play games which each other, causing quadratic behavior. In particular the match.pd implementation requires both arms to simplify while the fold-const.cc is happy with just one arm simplifying (something we cannot express in match.pd). The fix is to simply not enable the match.pd pattern for GENERIC. PR middle-end/106617 * match.pd ((a ? b : c) > d -> a ? (b > d) : (c > d)): Fix guard, disable on GENERIC to not cause quadratic behavior with the fold-const.cc implementation and the use of ! * gcc.dg/pr106617.c: New testcase.
Diffstat (limited to 'gcc/tree-ssa-threadedge.cc')
0 files changed, 0 insertions, 0 deletions