Commit 96798493 authored by Kevin Brodsky's avatar Kevin Brodsky
Browse files

Optimizing: double-negated bitwise operations simplifications

Generic instruction simplifications applying to bitwise operations when
both inputs are Not's. And and Or are handled by De Morgan's laws,
removing one instruction:
~a & ~b -> ~(a | b)
~a | ~b -> ~(a & b)
Xor is handled by this trivial relation, removing two instructions:
~a ^ ~b = a ^ b

The simplifications only happen when neither Not is used by other
instructions.

Change-Id: I5d5187af2f625c475c3e49466af6bc3e87595f8f
parent 7d9f95f2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment