[PATCH] D35451: [InstCombine] Improve the expansion in SimplifyUsingDistributiveLaws to handle cases where one side doesn't simplify, but the other side resolves to an identity value
Noel Grandin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 15 08:42:47 PDT 2017
grandinj added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:653
+ if (L && L == ConstantExpr::getBinOpIdentity(InnerOpcode, L->getType())) {
+ // The do! Return "B op C".
+ ++NumExpand;
----------------
the do -> they do
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:662
+ if (R && R == ConstantExpr::getBinOpIdentity(InnerOpcode, R->getType())) {
+ // The do! Return "A op C".
+ ++NumExpand;
----------------
the do -> they do
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:690
+ if (L && L == ConstantExpr::getBinOpIdentity(InnerOpcode, L->getType())) {
+ // The do! Return "A op C".
+ ++NumExpand;
----------------
ditto
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:699
+ if (R && R == ConstantExpr::getBinOpIdentity(InnerOpcode, R->getType())) {
+ // The do! Return "A op B".
+ ++NumExpand;
----------------
ditto
https://reviews.llvm.org/D35451
More information about the llvm-commits
mailing list