public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107208] New: [aarch64] llvm generate better code than gcc base on _Complex type mul
@ 2022-10-11  3:07 zhongyunde at huawei dot com
  2022-10-11  3:14 ` [Bug rtl-optimization/107208] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zhongyunde at huawei dot com @ 2022-10-11  3:07 UTC (permalink / raw)
  To: gcc-bugs

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;
}
```

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-17 12:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-11  3:07 [Bug c++/107208] New: [aarch64] llvm generate better code than gcc base on _Complex type mul zhongyunde at huawei dot com
2022-10-11  3:14 ` [Bug rtl-optimization/107208] " pinskia at gcc dot gnu.org
2022-10-11  4:30 ` [Bug middle-end/107208] [aarch64] _complex integer return types could be improved pinskia at gcc dot gnu.org
2022-10-13 13:32 ` zhongyunde at huawei dot com
2022-10-17 12:49 ` rearnsha at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).