[llvm] r265274 - [X86] Removed duplicate code.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 3 13:40:36 PDT 2016
Author: rksimon
Date: Sun Apr 3 15:40:35 2016
New Revision: 265274
URL: http://llvm.org/viewvc/llvm-project?rev=265274&view=rev
Log:
[X86] Removed duplicate code.
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=265274&r1=265273&r2=265274&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Apr 3 15:40:35 2016
@@ -28507,20 +28507,20 @@ static SDValue combineVectorTruncation(S
static SDValue combineTruncate(SDNode *N, SelectionDAG &DAG,
const X86Subtarget &Subtarget) {
-
+ EVT VT = N->getValueType(0);
SDValue Src = N->getOperand(0);
+ SDLoc DL(N);
// Try to detect AVG pattern first.
- if (SDValue Avg = detectAVGPattern(Src, N->getValueType(0), DAG,
- Subtarget, SDLoc(N)))
+ if (SDValue Avg = detectAVGPattern(Src, VT, DAG, Subtarget, DL))
return Avg;
// The bitcast source is a direct mmx result.
// Detect bitcasts between i32 to x86mmx
- if (Src.getOpcode() == ISD::BITCAST && N->getValueType(0) == MVT::i32) {
+ if (Src.getOpcode() == ISD::BITCAST && VT == MVT::i32) {
SDValue BCSrc = Src.getOperand(0);
if (BCSrc.getValueType() == MVT::x86mmx)
- return DAG.getNode(X86ISD::MMX_MOVD2W, SDLoc(N), MVT::i32, BCSrc);
+ return DAG.getNode(X86ISD::MMX_MOVD2W, DL, MVT::i32, BCSrc);
}
return combineVectorTruncation(N, DAG, Subtarget);
More information about the llvm-commits
mailing list