llvm.org GIT mirror llvm / 38c8926
Revert r133452: "Emit movq for 64-bit register to XMM register moves..." This is breaking compiler-rt and llvm-gcc builds on MacOSX when not using the integrated assembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133524 91177308-0d34-0410-b5e6-96231b3b80d8 Bob Wilson 8 years ago
9 changed file(s) with 16 addition(s) and 57 deletion(s). Raw diff Collapse all Expand all
28492849 [(set VR128:$dst,
28502850 (v4i32 (scalar_to_vector (loadi32 addr:$src))))]>;
28512851 def MOV64toPQIrr : RPDI<0x6E, MRMSrcReg, (outs VR128:$dst), (ins GR64:$src),
2852 "movq\t{$src, $dst|$dst, $src}",
2852 "mov{d|q}\t{$src, $dst|$dst, $src}",
28532853 [(set VR128:$dst,
28542854 (v2i64 (scalar_to_vector GR64:$src)))]>;
28552855 def MOV64toSDrr : RPDI<0x6E, MRMSrcReg, (outs FR64:$dst), (ins GR64:$src),
2856 "movq\t{$src, $dst|$dst, $src}",
2856 "mov{d|q}\t{$src, $dst|$dst, $src}",
28572857 [(set FR64:$dst, (bitconvert GR64:$src))]>;
28582858
28592859
28942894 (iPTR 0))), addr:$dst)]>;
28952895
28962896 def MOVPQIto64rr : RPDI<0x7E, MRMDestReg, (outs GR64:$dst), (ins VR128:$src),
2897 "movq\t{$src, $dst|$dst, $src}",
2897 "mov{d|q}\t{$src, $dst|$dst, $src}",
28982898 [(set GR64:$dst, (vector_extract (v2i64 VR128:$src),
28992899 (iPTR 0)))]>;
29002900 def MOV64toSDrm : S3SI<0x7E, MRMSrcMem, (outs FR64:$dst), (ins i64mem:$src),
29022902 [(set FR64:$dst, (bitconvert (loadi64 addr:$src)))]>;
29032903
29042904 def MOVSDto64rr : RPDI<0x7E, MRMDestReg, (outs GR64:$dst), (ins FR64:$src),
2905 "movq\t{$src, $dst|$dst, $src}",
2905 "mov{d|q}\t{$src, $dst|$dst, $src}",
29062906 [(set GR64:$dst, (bitconvert FR64:$src))]>;
29072907 def MOVSDto64mr : RPDI<0x7E, MRMDestMem, (outs), (ins i64mem:$dst, FR64:$src),
29082908 "movq\t{$src, $dst|$dst, $src}",
29302930 (v4i32 (scalar_to_vector GR32:$src)))))]>,
29312931 VEX;
29322932 def VMOVZQI2PQIrr : VPDI<0x6E, MRMSrcReg, (outs VR128:$dst), (ins GR64:$src),
2933 "movq\t{$src, $dst|$dst, $src}", // X86-64 only
2933 "mov{d|q}\t{$src, $dst|$dst, $src}", // X86-64 only
29342934 [(set VR128:$dst, (v2i64 (X86vzmovl
29352935 (v2i64 (scalar_to_vector GR64:$src)))))]>,
29362936 VEX, VEX_W;
29412941 [(set VR128:$dst, (v4i32 (X86vzmovl
29422942 (v4i32 (scalar_to_vector GR32:$src)))))]>;
29432943 def MOVZQI2PQIrr : RPDI<0x6E, MRMSrcReg, (outs VR128:$dst), (ins GR64:$src),
2944 "movq\t{$src, $dst|$dst, $src}", // X86-64 only
2944 "mov{d|q}\t{$src, $dst|$dst, $src}", // X86-64 only
29452945 [(set VR128:$dst, (v2i64 (X86vzmovl
29462946 (v2i64 (scalar_to_vector GR64:$src)))))]>;
29472947 }
29662966 def : Pat<(v4i32 (X86vzmovl (bc_v4i32 (loadv2i64 addr:$src)))),
29672967 (MOVZDI2PDIrm addr:$src)>;
29682968 }
2969
2970 // We used to emit this syntax to work around a bug in the Darwin assembler,
2971 // so we'll continue to assemble it.
2972 def : InstAlias<"movd\t{$src, $dst|$dst, $src}",
2973 (MOV64toPQIrr VR128:$dst, GR64:$src), 0>;
2974 def : InstAlias<"movd\t{$src, $dst|$dst, $src}",
2975 (MOV64toSDrr FR64:$dst, GR64:$src), 0>;
2976 def : InstAlias<"movd\t{$src, $dst|$dst, $src}",
2977 (MOVPQIto64rr GR64:$dst, VR128:$src), 0>;
2978 def : InstAlias<"movd\t{$src, $dst|$dst, $src}",
2979 (MOVSDto64rr GR64:$dst, FR64:$src), 0>;
2980 def : InstAlias<"movd\t{$src, $dst|$dst, $src}",
2981 (VMOVZQI2PQIrr VR128:$dst, GR64:$src), 0>;
2982 def : InstAlias<"movd\t{$src, $dst|$dst, $src}",
2983 (MOVZQI2PQIrr VR128:$dst, GR64:$src), 0>;
29842969
29852970 //===---------------------------------------------------------------------===//
29862971 // SSE2 - Move Quadword
None ; RUN: llc < %s -march=x86-64 | FileCheck %s
0 ; RUN: llc < %s -march=x86-64 | grep movd | count 2
11 ; RUN: llc < %s -march=x86-64 | not grep rsp
22
33 define i64 @test1(double %A) {
4 ; CHECK: test1
5 ; CHECK: movq
64 %B = bitcast double %A to i64
75 ret i64 %B
86 }
97
108 define double @test2(i64 %A) {
11 ; CHECK: test2
12 ; CHECK: movq
139 %B = bitcast i64 %A to double
1410 ret double %B
1511 }
1612
17 define i32 @test3(float %A) {
18 ; CHECK: test3
19 ; CHECK: movd
20 %B = bitcast float %A to i32
21 ret i32 %B
22 }
23
24 define float @test4(i32 %A) {
25 ; CHECK: test4
26 ; CHECK: movd
27 %B = bitcast i32 %A to float
28 ret float %B
29 }
30
0 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
11 ; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
22 ; CHECK-NOT: movsd
3 ; CHECK: movq {{%rdi|%rcx}}, %xmm0
3 ; CHECK: movd {{%rdi|%rcx}}, %xmm0
44 ; CHECK-NOT: movsd
55
66 define <2 x i64> @test(i64 %i) nounwind {
None ; RUN: llc < %s -march=x86-64 | grep movq | count 1
0 ; RUN: llc < %s -march=x86-64 | grep movd | count 1
11 ; RUN: llc < %s -march=x86-64 | grep {movlhps.*%xmm0, %xmm0}
22
33 define <2 x i64> @test3(i64 %A) nounwind {
0 ; RUN: llc < %s -march=x86 -mattr=+sse2 | grep movq
11 ; RUN: llc < %s -march=x86 -mattr=+sse2 | grep mov | count 1
2 ; RUN: llc < %s -march=x86-64 -mattr=+sse2 | grep movq
2 ; RUN: llc < %s -march=x86-64 -mattr=+sse2 | grep movd
33
44 define <2 x i64> @t1(i64 %x) nounwind {
55 %tmp8 = insertelement <2 x i64> zeroinitializer, i64 %x, i32 0
0 ; RUN: llc < %s -march=x86 -mattr=+sse2
11 ; RUN: llc < %s -march=x86 -mattr=+sse2 | grep movd | count 1
2 ; RUN: llc < %s -march=x86-64 -mattr=+sse2 | grep movd | count 1
3 ; RUN: llc < %s -march=x86-64 -mattr=+sse2 | grep movq | count 4
2 ; RUN: llc < %s -march=x86-64 -mattr=+sse2 | grep movd | count 2
3 ; RUN: llc < %s -march=x86-64 -mattr=+sse2 | grep movq | count 3
44 ; RUN: llc < %s -march=x86 -mattr=+sse2 | not grep xor
55
66 define <4 x i32> @t1(i32 %a) nounwind {
0 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
11 ; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
22 ; CHECK-NOT: xor
3 ; CHECK: movq {{%rdi|%rcx}}, %xmm0
3 ; CHECK: movd {{%rdi|%rcx}}, %xmm0
44 ; CHECK-NOT: xor
55 ; PR2108
66
11271127 // CHECK: strq
11281128 // CHECK: encoding: [0x48,0x0f,0x00,0xc8]
11291129 str %rax
1130
1131 // CHECK: movq %rdi, %xmm0
1132 // CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7]
1133 movq %rdi,%xmm0
1134
1135 // CHECK: movq %rdi, %xmm0
1136 // CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7]
1137 movd %rdi,%xmm0
14431443 // CHECK: encoding: [0xc5,0x79,0x7e,0x30]
14441444 vmovd %xmm14, (%rax)
14451445
1446 // CHECK: vmovd %eax, %xmm14
1447 // CHECK: encoding: [0xc5,0x79,0x6e,0xf0]
1448 vmovd %eax, %xmm14
1446 // CHECK: vmovd %rax, %xmm14
1447 // CHECK: encoding: [0xc4,0x61,0xf9,0x6e,0xf0]
1448 vmovd %rax, %xmm14
14491449
14501450 // CHECK: vmovq %xmm14, (%rax)
14511451 // CHECK: encoding: [0xc5,0x79,0xd6,0x30]