This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/48580] missed optimization: integer overflow checks
- From: "svfuerst at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Apr 2011 17:44:31 +0000
- Subject: [Bug middle-end/48580] missed optimization: integer overflow checks
- Auto-submitted: auto-generated
- References: <bug-48580-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48580
Steven Fuerst <svfuerst at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |svfuerst at gmail dot com
--- Comment #10 from Steven Fuerst <svfuerst at gmail dot com> 2011-04-13 17:44:22 UTC ---
There are C and x86 assembly code fragments showing how to do signed and
unsigned saturating arithmetic here:
http://locklessinc.com/articles/sat_arithmetic/
Although, if there were new intrinsics that allowed direct access to the
overflow and carry flags from arithmetic instructions, they would be quite
useful.