Re: [Mesa-dev] [PATCH] nv50/ir: skip optimizing ADD+SHL to SHLADD when src(1) is 0

2017-05-01 Thread Ilia Mirkin
On Mon, May 1, 2017 at 12:09 PM, Samuel Pitoiset wrote: > On 05/01/2017 05:59 PM, Ilia Mirkin wrote: >> >> I think this is off. It shouldn't matter what the code sequence is, >> it's all representable. You need to teach replaceZero to not mess >> things up for SHLADD's src(1). > > > It's represent

Re: [Mesa-dev] [PATCH] nv50/ir: skip optimizing ADD+SHL to SHLADD when src(1) is 0

2017-05-01 Thread Samuel Pitoiset
On 05/01/2017 05:59 PM, Ilia Mirkin wrote: I think this is off. It shouldn't matter what the code sequence is, it's all representable. You need to teach replaceZero to not mess things up for SHLADD's src(1). It's representable but stupid to do it. We should keep the ADD there and this also a

Re: [Mesa-dev] [PATCH] nv50/ir: skip optimizing ADD+SHL to SHLADD when src(1) is 0

2017-05-01 Thread Ilia Mirkin
I think this is off. It shouldn't matter what the code sequence is, it's all representable. You need to teach replaceZero to not mess things up for SHLADD's src(1). On Sat, Apr 29, 2017 at 12:01 PM, Samuel Pitoiset wrote: > Doing '(a << b) + c' when b is 0 is dumb, ADD should be used > instead. >

[Mesa-dev] [PATCH] nv50/ir: skip optimizing ADD+SHL to SHLADD when src(1) is 0

2017-04-29 Thread Samuel Pitoiset
Doing '(a << b) + c' when b is 0 is dumb, ADD should be used instead. This fixes a compilation error with Alien Isolation because src(1) is expected to be an immediate value, and the replaceZero logic will transform 0 to $r63 (or $r255). Signed-off-by: Samuel Pitoiset Cc: "13.0 17.0 17.1" ---