This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/77399] Poor code generation for vector casts and loads


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77399

--- Comment #9 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 30 Aug 2016, amonakov at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77399
> 
> --- Comment #8 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
> > The extension is closely modeled after openCL
> 
> Hm, that doesn't sound right: gcc had vector types long before OpenCL was even
> a thing; I believe it's modeled after Altivec actually: the discrepancy between
> C-style casts on scalar and vector types definitely comes from Altivec.

Sure, but for later enhancements we decided to follow openCL

> > IIRC openCL uses "intrinsics" for these kind of operations?
> 
> Yes, in OpenCL there's no implicit casts for vector types, and one has to use
> built-in functions like 'convert_float4'.
> 
> Also worth mentioning that Clang provides __builtin_convertvector(arg, type)
> for casting.

Ah, might be useful to support as well.

Of course that's all moot if the optimization possibility results
from other optimization.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]