Commit 542e70f9 authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[InstCombine] reassociate subtract-from-constant to add-constant

(C - X) + Y --> (Y - X) + C

Moving the constant operand to an 'add' gives more
flexibility to subsequent reassociation patterns,
and it may be better for codegen on targets that
don't have subtract-from-immediate instructions.
parent a721b6b1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment