Fix SSA corruption due to widening_mul opt on conflict across an abnormal edge [PR111407]
authorQing Zhao <qing.zhao@oracle.com>
Thu, 29 Feb 2024 15:07:49 +0000 (15:07 +0000)
committerQing Zhao <qing.zhao@oracle.com>
Tue, 2 Apr 2024 14:52:06 +0000 (14:52 +0000)
commit5f23f9f141c4b52e8f4a9aadc88b8155cf1959a3
treeb454570cb2593bd3548b6227ee8339d24166ce9a
parent38dd703d368c9e60159e6f19cfc8303ad639b557
Fix SSA corruption due to widening_mul opt on conflict across an abnormal edge [PR111407]

This is a bug in tree-ssa-math-opts.cc, when applying the widening mul
optimization, the compiler needs to check whether the operand is in a
ABNORMAL PHI, if YES, we should avoid the transformation.

PR tree-optimization/111407

gcc/ChangeLog:

* tree-ssa-math-opts.cc (convert_mult_to_widen): Avoid the transform
when one of the operands is subject to abnormal coalescing.

gcc/testsuite/ChangeLog:

* gcc.dg/pr111407.c: New test.

(cherry picked from commit 4aca1cfd6235090e48a53dab734437740671bbf3)
gcc/testsuite/gcc.dg/pr111407.c [new file with mode: 0644]
gcc/tree-ssa-math-opts.cc
This page took 0.089203 seconds and 6 git commands to generate.