https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104501
Bug ID: 104501
Summary: vector lowering for VEC_COND_EXPR does not consider
smaller vectors
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
The following C++ testcase is decomposed to scalar operations by vector
lowering when compiling with just SSE2 support. But when using a vector size
of 16 we
can produce optimized code.
typedef int vsi __attribute__((vector_size(32)));
vsi res, v1, v2, v3, v4;
void foo ()
{
res = v1 == v2 ? v3 : v4;
}