Add a missing pattern for movhps so that we get:
authorNate Begeman <natebegeman@mac.com>
Fri, 12 Feb 2010 01:10:45 +0000 (01:10 +0000)
committerNate Begeman <natebegeman@mac.com>
Fri, 12 Feb 2010 01:10:45 +0000 (01:10 +0000)
movq (%ecx,%edx,2), %xmm2
movhps (%ecx,%eax,2), %xmm2

rather than:

movq     (%eax, %edx, 2), %xmm2
movq     (%eax, %ebx, 2), %xmm3
movlhps  %xmm3, %xmm2

Testcase forthcoming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95948 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrSSE.td

index e26c9799b6a2ceecf694a67e70b1e619b3a7bb1a..40aabb4f3764ff0759e1618a5c70b8b61e5dda56 100644 (file)
@@ -762,6 +762,9 @@ let Constraints = "$src1 = $dst" in {
 } // Constraints = "$src1 = $dst"
 
 
+def : Pat<(movlhps VR128:$src1, (bc_v4i32 (v2i64 (X86vzload addr:$src2)))),
+          (MOVHPSrm VR128:$src1, addr:$src2)>;
+
 def MOVLPSmr : PSI<0x13, MRMDestMem, (outs), (ins f64mem:$dst, VR128:$src),
                    "movlps\t{$src, $dst|$dst, $src}",
                    [(store (f64 (vector_extract (bc_v2f64 (v4f32 VR128:$src)),