On Tue, 29 Dec 2020, Richard Biener via Gcc wrote: > >I think clang follows gcc and uses the type of the first operand. > > The desired behavior is the one that OpenCL specifies. If it is implementation > defined we should document behavior. I agree symmetry is nice but eventually > the current C behavior is what OpenCL specifies.
Where does OpenCL specify that? Checking the 1.2 OpenCL standard I see the opposite (the code would fail to compile): 6.2.1 Implicit Conversions [...] Implicit conversions between built-in vector data types are disallowed. Alexander