[llvm] r299336 - [X86][MMX] Simplify tablegen patterns by always combining MOVDQ2Q from v2i64
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 2 09:20:34 PDT 2017
Author: rksimon
Date: Sun Apr 2 11:20:34 2017
New Revision: 299336
URL: http://llvm.org/viewvc/llvm-project?rev=299336&view=rev
Log:
[X86][MMX] Simplify tablegen patterns by always combining MOVDQ2Q from v2i64
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/mmx-cvt.ll
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=299336&r1=299335&r2=299336&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Apr 2 11:20:34 2017
@@ -28965,7 +28965,8 @@ static SDValue combineBitcast(SDNode *N,
isNullConstant(N0.getOperand(1))) {
SDValue N00 = N0->getOperand(0);
if (N00.getValueType().is128BitVector())
- return DAG.getNode(X86ISD::MOVDQ2Q, SDLoc(N00), VT, N00);
+ return DAG.getNode(X86ISD::MOVDQ2Q, SDLoc(N00), VT,
+ DAG.getBitcast(MVT::v2i64, N00));
}
// Convert a bitcasted integer logic operation that has one bitcasted
Modified: llvm/trunk/test/CodeGen/X86/mmx-cvt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/mmx-cvt.ll?rev=299336&r1=299335&r2=299336&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/mmx-cvt.ll (original)
+++ llvm/trunk/test/CodeGen/X86/mmx-cvt.ll Sun Apr 2 11:20:34 2017
@@ -195,8 +195,7 @@ define void @fptosi_v4f32_v4i32(<4 x flo
; X86-NEXT: andl $-8, %esp
; X86-NEXT: subl $8, %esp
; X86-NEXT: movl 8(%ebp), %eax
-; X86-NEXT: cvttps2dq %xmm0, %xmm0
-; X86-NEXT: movdq2q %xmm0, %mm0
+; X86-NEXT: cvttps2pi %xmm0, %mm0
; X86-NEXT: paddd %mm0, %mm0
; X86-NEXT: movq %mm0, (%esp)
; X86-NEXT: movl (%esp), %ecx
@@ -209,8 +208,7 @@ define void @fptosi_v4f32_v4i32(<4 x flo
;
; X64-LABEL: fptosi_v4f32_v4i32:
; X64: # BB#0:
-; X64-NEXT: cvttps2dq %xmm0, %xmm0
-; X64-NEXT: movdq2q %xmm0, %mm0
+; X64-NEXT: cvttps2pi %xmm0, %mm0
; X64-NEXT: paddd %mm0, %mm0
; X64-NEXT: movq %mm0, (%rdi)
; X64-NEXT: retq
More information about the llvm-commits
mailing list