This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32309] Unnecessary conversion from short to unsigend short breaks vectorization
- From: "ian at airs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jun 2007 18:25:29 -0000
- Subject: [Bug tree-optimization/32309] Unnecessary conversion from short to unsigend short breaks vectorization
- References: <bug-32309-14687@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from ian at airs dot com 2007-06-12 18:25 -------
Undefined signed overflow is a language issue, not a processor issue. When
signed overflow is undefined, the compiler can and does make certain
assumptions about the results of operations. For example, it assumes that a +
1 > a is always true.
In this case gcc is trying to optimize by doing the computation in short rather
than int. But since the language requires that the computation be done in int,
gcc has to make sure to get the same result. If the computation were done in
short, and if later compilation passes could prove that the computation
overflowed in short, then the result would be different than if the computation
were done in int.
--
ian at airs dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32309