diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-11-07 09:40:15 -0800 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-11-09 08:20:33 -0800 |
commit | af1277b4d0d274b8c8f6edffcee32b7f39f2df64 (patch) | |
tree | ee20065a5a89ffdd4a0ce95afec4de75b7b8a53f /gcc/function.cc | |
parent | 0284886b8eb6f64676a56c420325ab0a9f911e70 (diff) | |
download | gcc-af1277b4d0d274b8c8f6edffcee32b7f39f2df64.zip gcc-af1277b4d0d274b8c8f6edffcee32b7f39f2df64.tar.gz gcc-af1277b4d0d274b8c8f6edffcee32b7f39f2df64.tar.bz2 |
VN: Canonicalize compares before calling vn_nary_op_lookup_pieces
This is the followup as mentioned in
https://gcc.gnu.org/pipermail/gcc-patches/2024-November/667987.html .
We need to canonicalize the compares using tree_swap_operands_p instead
of checking CONSTANT_CLASS_P.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* tree-ssa-sccvn.cc (visit_phi): Swap the operands
before calling vn_nary_op_lookup_pieces if
tree_swap_operands_p returns true.
(insert_predicates_for_cond): Use tree_swap_operands_p
instead of checking for CONSTANT_CLASS_P.
(process_bb): Swap the comparison and operands
if tree_swap_operands_p returns true.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions