summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 28ccb2a5a75..e5ef26f52d3 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -5387,11 +5387,11 @@ SDValue DAGCombiner::unfoldMaskedMerge(SDNode *N) {
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)
OpenPOWER on IntegriCloud