[llvm] r331588 - [NFC][DagCombiner] unfoldMaskedMerge(): improve readability.
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Sat May 5 03:39:54 PDT 2018
Author: lebedevri
Date: Sat May 5 03:39:54 2018
New Revision: 331588
URL: http://llvm.org/viewvc/llvm-project?rev=331588&view=rev
Log:
[NFC][DagCombiner] unfoldMaskedMerge(): improve readability.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=331588&r1=331587&r2=331588&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat May 5 03:39:54 2018
@@ -5387,11 +5387,11 @@ SDValue DAGCombiner::unfoldMaskedMerge(S
auto matchAndXor = [&X, &Y, &M](SDValue And, unsigned XorIdx, SDValue Other) {
if (And.getOpcode() != ISD::AND || !And.hasOneUse())
return false;
- if (And.getOperand(XorIdx).getOpcode() != ISD::XOR ||
- !And.getOperand(XorIdx).hasOneUse())
+ SDValue Xor = And.getOperand(XorIdx);
+ if (Xor.getOpcode() != ISD::XOR || !Xor.hasOneUse())
return false;
- SDValue Xor0 = And.getOperand(XorIdx).getOperand(0);
- SDValue Xor1 = And.getOperand(XorIdx).getOperand(1);
+ SDValue Xor0 = Xor.getOperand(0);
+ SDValue Xor1 = Xor.getOperand(1);
if (Other == Xor0)
std::swap(Xor0, Xor1);
if (Other != Xor1)
More information about the llvm-commits
mailing list