Common subexpression elimination (CSE)
An expression that appears several times is computed once and the result reused.
If a[i*4+j] appears in three places, i*4+j only needs computing once, provided neither i nor j changed in between. Local CSE works within a basic block. The global version, described by John Cocke in 1970, follows control flow and requires the first computation to have definitely happened on every path that gets there. In SSA form the job is usually done by global value numbering, which also spots that a+b and b+a are the same thing.
It isn't free. The saved value has to live somewhere until it's needed again, and in a function short on registers that can mean spilling it to the stack, which may cost more than just recomputing it.