https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107208
Bug ID: 107208
Summary: [aarch64] llvm generate better code than gcc base on
_Complex type mul
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhongyunde at huawei dot com
Target Milestone: ---
* gcc now generate 2 redundant mov instrunction compared to llvm
```
mul64(unsigned long _Complex, unsigned long _Complex):
mov x4, x1 // redundant ??
mov x5, x0 // redundant ??
mul x6, x1, x2
mul x2, x0, x2
madd x1, x5, x3, x6
msub x0, x4, x3, x2
ret
```
* test case, https://godbolt.org/z/EWE3bc5b3
```
unsigned long _Complex mul64 (unsigned long _Complex mul0,
unsigned long _Complex mul1)
{
return mul0 * mul1;
}
```