Re: [PATCH][RFC] c/106800 - support vector condition operation in C

2024-07-18 Thread Alexander Monakov
On Thu, 18 Jul 2024, Richard Biener wrote: > > (also, in C op2 and op3 of a ternary operator always have integer promotions > > applied, but for vector selection we should use unpromoted types) > > Yes. So a good testcase would use char typed variable then. It’s > unfortunate C and C++ do no

Re: [PATCH][RFC] c/106800 - support vector condition operation in C

2024-07-18 Thread Richard Biener
> Am 18.07.2024 um 17:37 schrieb Alexander Monakov : > >  > On Thu, 18 Jul 2024, Richard Biener wrote: > >>> If both b and c are scalars and the type of true?b:c has the same size >>> as the element type of a, then b and c are converted to a vector type >>> whose elements have this type

Re: [PATCH][RFC] c/106800 - support vector condition operation in C

2024-07-18 Thread Alexander Monakov
On Thu, 18 Jul 2024, Richard Biener wrote: > >If both b and c are scalars and the type of true?b:c has the same size > >as the element type of a, then b and c are converted to a vector type > >whose elements have this type and with the same number of elements as a. > > > > (in https:

Re: [PATCH][RFC] c/106800 - support vector condition operation in C

2024-07-18 Thread Richard Biener
> Am 18.07.2024 um 16:22 schrieb Alexander Monakov : > >  >> On Thu, 18 Jul 2024, Richard Biener wrote: >> >> The following adds support for vector conditionals in C. The support >> was nearly there already but c_objc_common_truthvalue_conversion >> rejecting vector types. Instead of lettin

Re: [PATCH][RFC] c/106800 - support vector condition operation in C

2024-07-18 Thread Alexander Monakov
On Thu, 18 Jul 2024, Richard Biener wrote: > The following adds support for vector conditionals in C. The support > was nearly there already but c_objc_common_truthvalue_conversion > rejecting vector types. Instead of letting them pass there unchanged > I chose to instead skip it when parsing

[PATCH][RFC] c/106800 - support vector condition operation in C

2024-07-18 Thread Richard Biener
The following adds support for vector conditionals in C. The support was nearly there already but c_objc_common_truthvalue_conversion rejecting vector types. Instead of letting them pass there unchanged I chose to instead skip it when parsing conditionals instead as a variant with less possible f