[PATCH] D112754: X86: Fold masked merge pattern when and-not is not available
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 7 05:30:05 PST 2021
RKSimon added a comment.
A minor style comments
Does anyone else have any comments?
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:46388
+ std::swap(And1_R, And1_L);
+ }
+ // (~(NotOp) & And0_R) | (NotOp & And1_R)
----------------
(style) remove unnecessary braces
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:46391
+ // --> ((And0_R ^ And1_R) & NotOp) ^ And1_R
+ if (NotOp == And1_L) {
+ EVT VT = And1_L->getValueType(0);
----------------
(style)
```
if (NotOp != And1_L)
return SDValue();
```
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:46406
+/// "and-not" operation. This function is intended to be called from a
+/// `TargetLowering::PerformDAGCombing` callback on `ISD::OR` nodes.
+static SDValue foldMaskedMerge(SDNode *Node, SelectionDAG &DAG) {
----------------
PerformDAGCombing ?
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:46410
+ // normalized to OR by InstCombine so we only check for OR.
+ assert(Node->getOpcode() == ISD::OR);
+ SDValue N0 = Node->getOperand(0);
----------------
assert message
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:46531
+ return R;
+ }
+
----------------
(style) remove braces
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112754/new/
https://reviews.llvm.org/D112754
More information about the llvm-commits
mailing list