Commit e14dc86d authored by Anton Kirilov's avatar Anton Kirilov
Browse files

Simplification for associative and commutative operations on constants

The purpose of this change is to enable the instruction simplifier
to recognize patterns such as

OP y, x, const1
OP z, y, const2

where OP is both an associative and a commutative operation on integral
types, and replace them with

OP z, x, const3

Since subtraction on integral types is equivalent to addition with a
negated operand, it receives a similar treatment, even though it is
not commutative.

Change-Id: I278cac39bd39bc843d250a976931cb000876ea88
parent 1fdb340d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment