https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101932
Bug ID: 101932
Summary: Vectorizer failed due to argument types differ for
ldexp
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: crazylht at gmail dot com
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-*-* i?86-*-*
This is from PR98309
--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
Although avx512 have vscalefps/d, vectorizer failed at
```
/* We can only handle calls with arguments of the same type. */
if (rhs_type
&& !types_compatible_p (rhs_type, TREE_TYPE (op)))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"argument types differ.\n");
return false;
}
```
since __builtin_ldexp is defined as BT_FN_DOUBLE_DOUBLE_INT with 2 different
type arguments.