]> git.ipfire.org Git - thirdparty/gcc.git/commit
gimple: Remove special handling of COND_EXPR for COMPARISON_CLASS_P [PR116949, PR114785]
authorAndrew Pinski <quic_apinski@quicinc.com>
Tue, 29 Oct 2024 21:43:42 +0000 (14:43 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Thu, 31 Oct 2024 01:07:24 +0000 (18:07 -0700)
commitb60031e8f9f8fe89ec0cb600d0e3dc5b799c825f
treecca1fc0e04c832e9597831e47b376df2901cecbb
parent717051a6901b1107cc264190b8ebdde21c42f371
gimple: Remove special handling of COND_EXPR for COMPARISON_CLASS_P [PR116949, PR114785]

After r13-707-g68e0063397ba82, COND_EXPR for gimple assign no longer could contain a comparison.
The vectorizer was builting gimple assigns with comparison until r15-4695-gd17e672ce82e69
(which added an assert to make sure it no longer builds it).

So let's remove the special handling COND_EXPR in a few places and add an assert to
gimple_build_assign_1 to make sure we don't build a gimple assign any more with a comparison.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

PR middle-end/114785
PR middle-end/116949
* gimple-match-exports.cc (maybe_push_res_to_seq): Remove special
handling of COMPARISON_CLASS_P in COND_EXPR/VEC_COND_EXPR.
(gimple_extract): Likewise.
* gimple-walk.cc (walk_stmt_load_store_addr_ops): Likewise.
* gimple.cc (gimple_build_assign_1): Add assert for COND_EXPR
so its 1st operand is not a comparison.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/gimple-match-exports.cc
gcc/gimple-walk.cc
gcc/gimple.cc