[PATCH] D139253: [InstCombine] fold more icmp + select patterns by distributive laws
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 07:47:54 PST 2022
spatel added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:340
+
+ if (TI->getOperand(0) == FI->getOperand(1)) {
OtherOpT = TI->getOperand(1);
----------------
This deserves a code comment to explain the logic. Something like:
// If we are allowing commute or swap of operands, then
// allow a cross-operand match. In that case, MatchIsOpZero
// means that TI's operand 0 (FI's operand 1) is the common op.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139253/new/
https://reviews.llvm.org/D139253
More information about the llvm-commits
mailing list