Widening-Mul: Support unsigned scalar SAT_MUL 2
For mul_overflow api, we will have PHI node similar as below:
_6 = .MUL_OVERFLOW (a_4(D), b_5(D));
_2 = IMAGPART_EXPR <_6>;
if (_2 != 0)
goto <bb 4>; [35.00%]
else
goto <bb 3>; [65.00%]
<bb 3> [local count:
697932184]:
_1 = REALPART_EXPR <_6>;
<bb 4> [local count:
1073741824]:
# _3 = PHI <
18446744073709551615(2), _1(3)>
Based on the help of match.pd pattern match, the widening-mul will
try to convert it to below:
_3 = .SAT_MUL (a_4(D), b_5(D));
gcc/ChangeLog:
* tree-ssa-math-opts.cc (match_saturation_mul): Add new func
to emit IFN_SAT_MUL if matched.
(math_opts_dom_walker::after_dom_children): Try to match
the phi node for SAT_MUL.
Signed-off-by: Pan Li <pan2.li@intel.com>