[Bug target/30210] Altivec builtins have inaccurate return types

bonzini at gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Dec 20 15:25:00 GMT 2006



------- Comment #7 from bonzini at gnu dot org  2006-12-20 15:25 -------
To make it clearer, there is a fix for this PR other than

>> The way to solve this bug could be to pass the two operands to
>> rs6000_builtin_mul_widen_even, and get back the fully-built tree,
>> including conversions to the appropriate return type.

The solution is exactly to modify __builtin_altivec_vmuloub and friends so that
it has the accurate return types and argument types (unsigned).  This would be,
in practice, a rewrite of the way rs6000.c defines Altivec builtins, because if
you want signed/unsigned information it is not enough to look at the modes in
the RTL patterns.  I don't see any other way to do so, except to use a big
table (possibly a subset of the huge table in rs6000-c.c).

The reason I had closed the bug as invalid, was that pinskia was erroneously
relating it to PR14899, and saying that this would have caused regressions with
Mark Shinwell's patch for stricter conversions between vector types.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30210



More information about the Gcc-bugs mailing list