]> git.ipfire.org Git - thirdparty/gcc.git/commit
phiopt: Use rewrite_to_defined_overflow in move_stmt [PR116938]
authorAndrew Pinski <quic_apinski@quicinc.com>
Thu, 17 Oct 2024 05:30:10 +0000 (05:30 +0000)
committerAndrew Pinski <quic_apinski@quicinc.com>
Thu, 8 May 2025 07:24:47 +0000 (07:24 +0000)
commitbac74b0d0141a440275797a059c2b43978cd9e1c
tree4c8936e20b81aaad07e8d50ab4ba15effd98d62d
parentf2bb7ffe84840d8f4ba6c0e5acdbbad8ca9d3603
phiopt: Use rewrite_to_defined_overflow in move_stmt [PR116938]

As mentioned previously the rewrite in move_stmt should be
using gimple_needing_rewrite_undefined/rewrite_to_defined_unconditional
instead of just rewriting the VCE.
This moves move_stmt over to those APIs.

A few testcases needed to be updated due to ABS_EXPR rewrite that happens.

Bootstrapped and tested on x86_64-linux-gnu.

PR tree-optimization/116938

gcc/ChangeLog:

* tree-ssa-phiopt.cc (move_stmt): Use rewrite_to_defined_overflow
isntead of manually doing the rewrite of the VCE.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/phi-opt-40.c: Update to expect ABSU_EXPR.
* gcc.dg/tree-ssa/phi-opt-41.c: Likewise.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-40.c
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-41.c
gcc/tree-ssa-phiopt.cc