[Mesa-dev] [PATCH] glsl: Optimize logic operation A || (A && B)

Jordan Justen jljusten at gmail.com
Thu Jul 10 17:18:30 PDT 2014

On Thu, Jul 10, 2014 at 4:12 PM, Brian Paul <brianp at vmware.com> wrote:
> BTW, looking at these algebraic simplifications in general, where do we
> check for operands with side-effects?  For example, in the "1^x == 1"
> optimization, suppose x is a function call which modifies a global. Removing
> x would be invalid, right?

ir_call doesn't implement equals, so it should always return 'not
equals' via ir_instruction::equals. (ir_equals.cpp)

This should prevent optimizations involving calls, right?


More information about the mesa-dev mailing list