aboutsummaryrefslogtreecommitdiff
path: root/libcpp/generated_cpp_wcwidth.h
diff options
context:
space:
mode:
authorPan Li <pan2.li@intel.com>2024-10-08 11:06:23 +0800
committerPan Li <pan2.li@intel.com>2024-10-08 22:24:21 +0800
commit2291739ec432abc01c7afc5a07443c575539316a (patch)
tree8883a2e18f61c980de0c79bbb79e4fec6df78766 /libcpp/generated_cpp_wcwidth.h
parentf9f57df85a5411dce201165a42f4b9d57489bed9 (diff)
downloadgcc-2291739ec432abc01c7afc5a07443c575539316a.zip
gcc-2291739ec432abc01c7afc5a07443c575539316a.tar.gz
gcc-2291739ec432abc01c7afc5a07443c575539316a.tar.bz2
Widening-Mul: Fix one bug of consume after phi node released
When try to matching saturation related pattern on PHI node, we may have to try each pattern for all phi node of bb. Aka: for each PHI node in bb: gphi *phi = xxx; try_match_sat_add (, phi); try_match_sat_sub (, phi); try_match_sat_trunc (, phi); The PHI node will be removed if one of the above 3 sat patterns are matched. There will be a problem that, for example, sat_add is matched and then the phi is removed(freed), and the next 2 sat_sub and sat_trunc will depend on the removed(freed) phi node. This patch would like to fix this consume after phi node released issue. To ensure at most one pattern of the above will be matched. The below test suites are passed for this patch. * The rv64gcv fully regression test. * The x86 bootstrap test. * The x86 fully regression test. gcc/ChangeLog: * tree-ssa-math-opts.cc (build_saturation_binary_arith_call): Rename to... (build_saturation_binary_arith_call_and_replace): ...this. (build_saturation_binary_arith_call_and_insert): ...this. (match_unsigned_saturation_add): Leverage renamed func. (match_unsigned_saturation_sub): Ditto. (match_saturation_add): Return bool on matched and leverage renamed func. (match_saturation_sub): Ditto. (match_saturation_trunc): Ditto. (math_opts_dom_walker::after_dom_children): Ensure at most one pattern will be matched for each phi node. Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'libcpp/generated_cpp_wcwidth.h')
0 files changed, 0 insertions, 0 deletions