public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/97387] New: we are near 2021, add carry intrinsic still does the wrong thing and generates silly code.
@ 2020-10-12 15:33 euloanty at live dot com
  2020-10-13  2:45 ` [Bug rtl-optimization/97387] " euloanty at live dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: euloanty at live dot com @ 2020-10-12 15:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97387

            Bug ID: 97387
           Summary: we are near 2021, add carry intrinsic still does the
                    wrong thing and generates silly code.
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: euloanty at live dot com
  Target Milestone: ---

#include <stdint.h>
#include <x86intrin.h>

void add256(uint64_t a[4], uint64_t b[4]){
  uint8_t carry = 0;
  for (int i = 0; i < 4; ++i)
    carry = _addcarry_u64(carry, a[i], b[i], &a[i]);
}

People have reported the issue for many many times but the carry is still
buggy.

https://gcc.godbolt.org/z/TnM8cv

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

end of thread, other threads:[~2021-09-09  6:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 15:33 [Bug rtl-optimization/97387] New: we are near 2021, add carry intrinsic still does the wrong thing and generates silly code euloanty at live dot com
2020-10-13  2:45 ` [Bug rtl-optimization/97387] " euloanty at live dot com
2020-10-13  3:23 ` crazylht at gmail dot com
2020-10-13  3:25 ` euloanty at live dot com
2020-10-13  6:20 ` rguenth at gcc dot gnu.org
2020-10-13  9:32 ` jakub at gcc dot gnu.org
2020-10-13  9:32 ` [Bug target/97387] " jakub at gcc dot gnu.org
2020-10-13  9:43 ` euloanty at live dot com
2020-10-13 10:24 ` jakub at gcc dot gnu.org
2020-10-13 10:56 ` jakub at gcc dot gnu.org
2020-10-13 12:01 ` jakub at gcc dot gnu.org
2020-10-14 15:29 ` cvs-commit at gcc dot gnu.org
2020-10-14 16:19 ` euloanty at live dot com
2020-10-14 21:56 ` euloanty at live dot com
2020-10-14 21:59 ` euloanty at live dot com
2021-09-09  6:49 ` pinskia 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).