[llvm] r364420 - [X86][Codegen] X86DAGToDAGISel::matchBitExtract(): consistently capture lambdas by value
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 05:19:52 PDT 2019
Author: lebedevri
Date: Wed Jun 26 05:19:52 2019
New Revision: 364420
URL: http://llvm.org/viewvc/llvm-project?rev=364420&view=rev
Log:
[X86][Codegen] X86DAGToDAGISel::matchBitExtract(): consistently capture lambdas by value
Modified:
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=364420&r1=364419&r2=364420&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Jun 26 05:19:52 2019
@@ -3159,7 +3159,7 @@ bool X86DAGToDAGISel::matchBitExtract(SD
};
// a) x & ((1 << nbits) + (-1))
- auto matchPatternA = [&checkOneUse, peekThroughOneUseTruncation,
+ auto matchPatternA = [checkOneUse, peekThroughOneUseTruncation,
&NBits](SDValue Mask) -> bool {
// Match `add`. Must only have one use!
if (Mask->getOpcode() != ISD::ADD || !checkOneUse(Mask))
@@ -3185,7 +3185,7 @@ bool X86DAGToDAGISel::matchBitExtract(SD
};
// b) x & ~(-1 << nbits)
- auto matchPatternB = [&checkOneUse, isAllOnes, &peekThroughOneUseTruncation,
+ auto matchPatternB = [checkOneUse, isAllOnes, peekThroughOneUseTruncation,
&NBits](SDValue Mask) -> bool {
// Match `~()`. Must only have one use!
if (Mask.getOpcode() != ISD::XOR || !checkOneUse(Mask))
@@ -3225,7 +3225,7 @@ bool X86DAGToDAGISel::matchBitExtract(SD
};
// c) x & (-1 >> (32 - y))
- auto matchPatternC = [&checkOneUse, &peekThroughOneUseTruncation,
+ auto matchPatternC = [checkOneUse, peekThroughOneUseTruncation,
matchShiftAmt](SDValue Mask) -> bool {
// The mask itself may be truncated.
Mask = peekThroughOneUseTruncation(Mask);
@@ -3246,7 +3246,7 @@ bool X86DAGToDAGISel::matchBitExtract(SD
SDValue X;
// d) x << (32 - y) >> (32 - y)
- auto matchPatternD = [&checkOneUse, &checkTwoUse, matchShiftAmt,
+ auto matchPatternD = [checkOneUse, checkTwoUse, matchShiftAmt,
&X](SDNode *Node) -> bool {
if (Node->getOpcode() != ISD::SRL)
return false;
@@ -3266,9 +3266,8 @@ bool X86DAGToDAGISel::matchBitExtract(SD
return true;
};
- auto matchLowBitMask = [&matchPatternA, &matchPatternB,
- &matchPatternC](SDValue Mask) -> bool {
- // FIXME: pattern c.
+ auto matchLowBitMask = [matchPatternA, matchPatternB,
+ matchPatternC](SDValue Mask) -> bool {
return matchPatternA(Mask) || matchPatternB(Mask) || matchPatternC(Mask);
};
More information about the llvm-commits
mailing list