search for: simple_select

Displaying 2 results from an estimated 2 matches for "simple_select".

2013 Aug 20
2
[LLVMdev] Failure to optimize vector select
Hi, I've found a case I would expect would optimize easily, but it doesn't. A simple implementation of vector select: float4 simple_select(float4 a, float4 b, int4 c) { float4 result; result.x = c.x ? a.x : b.x; result.y = c.y ? a.y : b.y; result.z = c.z ? a.z : b.z; result.w = c.w ? a.w : b.w; return result; } I would expect this would be optimized to %bool = icmp eq <4 x i32> %c, 0 %result = select...
2013 Aug 20
0
[LLVMdev] Failure to optimize vector select
...ing SLP vectorizer pass (-vectorize-slp)? Eugene On Mon, Aug 19, 2013 at 9:04 PM, Matt Arsenault <arsenm2 at gmail.com> wrote: > Hi, > > I've found a case I would expect would optimize easily, but it doesn't. A > simple implementation of vector select: > > float4 simple_select(float4 a, float4 b, int4 c) > { > float4 result; > > result.x = c.x ? a.x : b.x; > result.y = c.y ? a.y : b.y; > result.z = c.z ? a.z : b.z; > result.w = c.w ? a.w : b.w; > > return result; > } > > I would expect this would be optimized to...