[PATCH] D72007: [InstCombine] try to pull 'not' of select into compare operands
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 3 17:07:19 PST 2020
xbolva00 added a comment.
Looks good
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:3287
+ // not (select Cond, (cmp TPred, ?, ?), FVal -->
+ // select Cond, (cmp TPred', ?, ?), (not FVal)
+ Value *Cond, *TVal, *FVal;
----------------
InvertedTPred?
I almost missed the “ ‘ “.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:3304
+
+ if (FPred == CmpInst::BAD_ICMP_PREDICATE)
+ FVal = Builder.CreateNot(FVal);
----------------
Maybe small lambda would help here to improve this almost same code?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72007/new/
https://reviews.llvm.org/D72007
More information about the llvm-commits
mailing list