On PowerPC, Clang will miscompile the following code (compiler explorer):
__float128 _Complex mul_f128(__float128 _Complex a, __float128 _Complex b) {
return a * b;
}
__ibm128 _Complex mul_ibm(__ibm128 _Complex a, __ibm128 _Complex b) {
return a * b;
}
__float128 _Complex div_f128(__float128 _Complex a, __float128 _Complex b) {
return a / b;
}
__ibm128 _Complex div_ibm(__ibm128 _Complex a, __ibm128 _Complex b) {
return a / b;
}
GCC correctly uses the __mulkc3/__divkc3 functions for __float128 and the __multc3/__divtc3 functions for __ibm128, whereas Clang uses __multc3/__divtc3 for both.
On PowerPC, Clang will miscompile the following code (compiler explorer):
GCC correctly uses the
__mulkc3/__divkc3functions for__float128and the__multc3/__divtc3functions for__ibm128, whereas Clang uses__multc3/__divtc3for both.