gnu /
gcc /
a7f1b00ed69810ce7f000d385a60e148d0228d48 tree-optimization/116057 - wrong code with CCP and vector CTORs
The following fixes an issue with CCPs likely_value when faced with
a vector CTOR containing undef SSA names and constants. This should
be classified as CONSTANT and not UNDEFINED.
PR tree-optimization/116057
* tree-ssa-ccp.cc (likely_value): Also walk CTORs in stmt
operands to look for constants.
* gcc.dg/torture/pr116057.c: New testcase.
(cherry picked from commit 1ea551514b9c285d801ac5ab8d78b22483ff65af)
2 files changed