AMDGPU/SDAG: Factor out the fold (add (mul x, y), y) --> mad_[iu]64_[iu]32
Refactor to simplify a follow-up change. No functional change intended. However, there is a rather subtle logic change: the subsequent combines (e.g. reassociation) are skipped *always* when one of the operands of the add is a mul, instead of only when additionally mad64_32 etc. are available. This change makes sense because the subsequent combines should never apply when one of the operands is a mul. Differential Revision: https://reviews.llvm.org/D123833
Loading
Please sign in to comment