[Bug target/88234] UBsan and runtime error: signed integer overflow using unsigned vector
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 28 09:39:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88234
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at gcc dot gnu.org,
| |willschm at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I guess it depends on how vec_add is supposed to be defined.
It is certainly expanded as signed int vector addition, already gimple dump
(and original too) has something like:
_1 = VIEW_CONVERT_EXPR<__vector signed int>(a);
_2 = VIEW_CONVERT_EXPR<__vector signed int>(b);
_3 = _1 + _2;
c = VIEW_CONVERT_EXPR<__vector unsigned int>(_3);
_4 = VIEW_CONVERT_EXPR<__vector signed char>(c);
So, either the testcase is wrong (if vec_add is defined to operate on signed
vectors) or the powerpc __builtin_vec_add lowering is incorrect.
More information about the Gcc-bugs
mailing list