[PATCH] D32596: [InstCombine] Transform fmul X, +2.0 --> fadd X, X.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 11:34:27 PDT 2017
efriedma added a comment.
I would guess we should prefer fmul as the canonical form, for the same reason we prefer "shl %x, 1" over "add %x, %x": we optimize instructions where hasOneUse() is true more aggressively. I guess it doesn't make a big difference either way, though.
Either way, please add a testcase for "fadd %x, %x", to confirm that we canonicalize both fadd and fmul to the same form.
https://reviews.llvm.org/D32596
More information about the llvm-commits
mailing list