[PATCH] D139080: [Instcombine] fold logic ops to select
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 4 07:25:41 PST 2023
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM - see inline comment for a minor adjustment.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2689
+ Value *D,
+ bool SelectNotFalseVal) {
// The potential condition of the select may be bitcasted. In that case, look
----------------
The name "SelectNotFalseVal" is confusing to me. I would prefer to name this "InvertFalseVal". Then adjust the code comment above to say:
/// When InvertFalseVal is set to true, we try to match the pattern
/// where we have peeked through a 'not' op and A and B are the same:
/// (A & C) | ~(A | D) --> (A & C) | (~A & ~D) --> A' ? C : ~D
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139080/new/
https://reviews.llvm.org/D139080
More information about the llvm-commits
mailing list