https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71753
--- Comment #6 from Łukasz Spintzyk ---
I confirm changing the code to use unsigned int fixed the problem.
Also there is no signed overflow errors.
Thanks a lot.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71753
--- Comment #4 from Łukasz Spintzyk ---
Yes, this code is utilizing overflow, but it is there for a reason to optimize
the code and get rid of branches as they can slow down program execution.
You can refer to http://locklessinc.com/articles/sat
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: lukasz.spintzyk at displaylink dot com
Target Milestone: ---
Created attachment 38830
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38830&action=edit
Code that reproduces the issue
Hi,
The issue is that