[llvm] r321463 - [X86] Return SDValue(N, 0) instead of an SDValue() after a successful combine.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 26 14:22:58 PST 2017
Author: ctopper
Date: Tue Dec 26 14:22:58 2017
New Revision: 321463
URL: http://llvm.org/viewvc/llvm-project?rev=321463&view=rev
Log:
[X86] Return SDValue(N, 0) instead of an SDValue() after a successful combine.
Returning SDValue() means nothing changed, SDValue(N,0) means there was a change but the worklist management was taken care of.
I don't know if this has a real effect other than making sure the combine counter in the DAG combiner gets updated, but it is the correct thing to do.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=321463&r1=321462&r2=321463&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Dec 26 14:22:58 2017
@@ -31003,8 +31003,8 @@ static SDValue combineExtractVectorElt(S
DAG.ReplaceAllUsesOfValueWith(SDValue(Extract, 0), Vals[IdxVal]);
}
- // The replacement was made in place; don't return anything.
- return SDValue();
+ // The replacement was made in place; return N so it won't be revisited.
+ return SDValue(N, 0);
}
/// If a vector select has an operand that is -1 or 0, try to simplify the
More information about the llvm-commits
mailing list