llvm.org GIT mirror llvm / f14ad9a
[X86] Use IMPLICIT_DEF in VEX/EVEX vcvtss2sd/vcvtsd2ss patterns instead of a COPY_TO_REGCLASS. ExeDepsFix pass should take care of making the registers match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317542 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 1 year, 11 months ago
3 changed file(s) with 40 addition(s) and 40 deletion(s). Raw diff Collapse all Expand all
65566556 NotMemoryFoldable;
65576557
65586558 def : Pat<(f64 (fpextend FR32X:$src)),
6559 (VCVTSS2SDZrr (COPY_TO_REGCLASS FR32X:$src, FR64X), FR32X:$src)>,
6559 (VCVTSS2SDZrr (f64 (IMPLICIT_DEF)), FR32X:$src)>,
65606560 Requires<[HasAVX512]>;
65616561 def : Pat<(f64 (fpextend (loadf32 addr:$src))),
65626562 (VCVTSS2SDZrm (f64 (IMPLICIT_DEF)), addr:$src)>,
65716571 Requires<[HasAVX512, OptForSpeed]>;
65726572
65736573 def : Pat<(f32 (fpround FR64X:$src)),
6574 (VCVTSD2SSZrr (COPY_TO_REGCLASS FR64X:$src, FR32X), FR64X:$src)>,
6574 (VCVTSD2SSZrr (f32 (IMPLICIT_DEF)), FR64X:$src)>,
65756575 Requires<[HasAVX512]>;
65766576
65776577 def : Pat<(v4f32 (X86Movss
15181518 }
15191519
15201520 def : Pat<(f32 (fpround FR64:$src)),
1521 (VCVTSD2SSrr (COPY_TO_REGCLASS FR64:$src, FR32), FR64:$src)>,
1521 (VCVTSD2SSrr (f32 (IMPLICIT_DEF)), FR64:$src)>,
15221522 Requires<[UseAVX]>;
15231523
15241524 def CVTSD2SSrr : SDI<0x5A, MRMSrcReg, (outs FR32:$dst), (ins FR64:$src),
15831583 }
15841584
15851585 def : Pat<(f64 (fpextend FR32:$src)),
1586 (VCVTSS2SDrr (COPY_TO_REGCLASS FR32:$src, FR64), FR32:$src)>, Requires<[UseAVX]>;
1586 (VCVTSS2SDrr (f64 (IMPLICIT_DEF)), FR32:$src)>, Requires<[UseAVX]>;
15871587 def : Pat<(fpextend (loadf32 addr:$src)),
15881588 (VCVTSS2SDrm (f64 (IMPLICIT_DEF)), addr:$src)>, Requires<[UseAVX]>;
15891589
15631563 ; AVX1-LABEL: cvt_8i16_to_8f64:
15641564 ; AVX1: # BB#0:
15651565 ; AVX1-NEXT: vmovq %xmm0, %rdx
1566 ; AVX1-NEXT: movq %rdx, %r8
1566 ; AVX1-NEXT: movq %rdx, %r9
15671567 ; AVX1-NEXT: movl %edx, %r10d
1568 ; AVX1-NEXT: movswl %dx, %r9d
1568 ; AVX1-NEXT: movswl %dx, %r8d
15691569 ; AVX1-NEXT: shrq $48, %rdx
1570 ; AVX1-NEXT: shrq $32, %r8
1570 ; AVX1-NEXT: shrq $32, %r9
15711571 ; AVX1-NEXT: shrl $16, %r10d
15721572 ; AVX1-NEXT: vpextrq $1, %xmm0, %rdi
1573 ; AVX1-NEXT: movq %rdi, %rax
1574 ; AVX1-NEXT: movl %edi, %esi
1573 ; AVX1-NEXT: movq %rdi, %rsi
1574 ; AVX1-NEXT: movl %edi, %eax
15751575 ; AVX1-NEXT: movswl %di, %ecx
15761576 ; AVX1-NEXT: shrq $48, %rdi
1577 ; AVX1-NEXT: shrq $32, %rax
1578 ; AVX1-NEXT: shrl $16, %esi
1579 ; AVX1-NEXT: movswl %si, %esi
1580 ; AVX1-NEXT: vmovd %esi, %xmm0
1577 ; AVX1-NEXT: shrq $32, %rsi
1578 ; AVX1-NEXT: shrl $16, %eax
1579 ; AVX1-NEXT: cwtl
1580 ; AVX1-NEXT: vmovd %eax, %xmm0
15811581 ; AVX1-NEXT: vcvtph2ps %xmm0, %xmm1
15821582 ; AVX1-NEXT: vmovd %ecx, %xmm0
15831583 ; AVX1-NEXT: vcvtph2ps %xmm0, %xmm2
1584 ; AVX1-NEXT: cwtl
1584 ; AVX1-NEXT: movswl %si, %eax
15851585 ; AVX1-NEXT: vmovd %eax, %xmm0
15861586 ; AVX1-NEXT: vcvtph2ps %xmm0, %xmm3
15871587 ; AVX1-NEXT: movswl %di, %eax
15901590 ; AVX1-NEXT: movswl %r10w, %eax
15911591 ; AVX1-NEXT: vmovd %eax, %xmm0
15921592 ; AVX1-NEXT: vcvtph2ps %xmm0, %xmm0
1593 ; AVX1-NEXT: vmovd %r9d, %xmm5
1593 ; AVX1-NEXT: vmovd %r8d, %xmm5
15941594 ; AVX1-NEXT: vcvtph2ps %xmm5, %xmm5
1595 ; AVX1-NEXT: movswl %r8w, %eax
1595 ; AVX1-NEXT: movswl %r9w, %eax
15961596 ; AVX1-NEXT: vmovd %eax, %xmm6
15971597 ; AVX1-NEXT: vcvtph2ps %xmm6, %xmm6
15981598 ; AVX1-NEXT: movswl %dx, %eax
16171617 ; AVX2-LABEL: cvt_8i16_to_8f64:
16181618 ; AVX2: # BB#0:
16191619 ; AVX2-NEXT: vmovq %xmm0, %rdx
1620 ; AVX2-NEXT: movq %rdx, %r8
1620 ; AVX2-NEXT: movq %rdx, %r9
16211621 ; AVX2-NEXT: movl %edx, %r10d
1622 ; AVX2-NEXT: movswl %dx, %r9d
1622 ; AVX2-NEXT: movswl %dx, %r8d
16231623 ; AVX2-NEXT: shrq $48, %rdx
1624 ; AVX2-NEXT: shrq $32, %r8
1624 ; AVX2-NEXT: shrq $32, %r9
16251625 ; AVX2-NEXT: shrl $16, %r10d
16261626 ; AVX2-NEXT: vpextrq $1, %xmm0, %rdi
1627 ; AVX2-NEXT: movq %rdi, %rax
1628 ; AVX2-NEXT: movl %edi, %esi
1627 ; AVX2-NEXT: movq %rdi, %rsi
1628 ; AVX2-NEXT: movl %edi, %eax
16291629 ; AVX2-NEXT: movswl %di, %ecx
16301630 ; AVX2-NEXT: shrq $48, %rdi
1631 ; AVX2-NEXT: shrq $32, %rax
1632 ; AVX2-NEXT: shrl $16, %esi
1633 ; AVX2-NEXT: movswl %si, %esi
1634 ; AVX2-NEXT: vmovd %esi, %xmm0
1631 ; AVX2-NEXT: shrq $32, %rsi
1632 ; AVX2-NEXT: shrl $16, %eax
1633 ; AVX2-NEXT: cwtl
1634 ; AVX2-NEXT: vmovd %eax, %xmm0
16351635 ; AVX2-NEXT: vcvtph2ps %xmm0, %xmm1
16361636 ; AVX2-NEXT: vmovd %ecx, %xmm0
16371637 ; AVX2-NEXT: vcvtph2ps %xmm0, %xmm2
1638 ; AVX2-NEXT: cwtl
1638 ; AVX2-NEXT: movswl %si, %eax
16391639 ; AVX2-NEXT: vmovd %eax, %xmm0
16401640 ; AVX2-NEXT: vcvtph2ps %xmm0, %xmm3
16411641 ; AVX2-NEXT: movswl %di, %eax
16441644 ; AVX2-NEXT: movswl %r10w, %eax
16451645 ; AVX2-NEXT: vmovd %eax, %xmm0
16461646 ; AVX2-NEXT: vcvtph2ps %xmm0, %xmm0
1647 ; AVX2-NEXT: vmovd %r9d, %xmm5
1647 ; AVX2-NEXT: vmovd %r8d, %xmm5
16481648 ; AVX2-NEXT: vcvtph2ps %xmm5, %xmm5
1649 ; AVX2-NEXT: movswl %r8w, %eax
1649 ; AVX2-NEXT: movswl %r9w, %eax
16501650 ; AVX2-NEXT: vmovd %eax, %xmm6
16511651 ; AVX2-NEXT: vcvtph2ps %xmm6, %xmm6
16521652 ; AVX2-NEXT: movswl %dx, %eax
16711671 ; AVX512-LABEL: cvt_8i16_to_8f64:
16721672 ; AVX512: # BB#0:
16731673 ; AVX512-NEXT: vpextrq $1, %xmm0, %rdx
1674 ; AVX512-NEXT: movq %rdx, %r8
1674 ; AVX512-NEXT: movq %rdx, %r9
16751675 ; AVX512-NEXT: movl %edx, %r10d
1676 ; AVX512-NEXT: movswl %dx, %r9d
1676 ; AVX512-NEXT: movswl %dx, %r8d
16771677 ; AVX512-NEXT: shrq $48, %rdx
1678 ; AVX512-NEXT: shrq $32, %r8
1678 ; AVX512-NEXT: shrq $32, %r9
16791679 ; AVX512-NEXT: shrl $16, %r10d
16801680 ; AVX512-NEXT: vmovq %xmm0, %rdi
1681 ; AVX512-NEXT: movq %rdi, %rax
1682 ; AVX512-NEXT: movl %edi, %esi
1681 ; AVX512-NEXT: movq %rdi, %rsi
1682 ; AVX512-NEXT: movl %edi, %eax
16831683 ; AVX512-NEXT: movswl %di, %ecx
16841684 ; AVX512-NEXT: shrq $48, %rdi
1685 ; AVX512-NEXT: shrq $32, %rax
1686 ; AVX512-NEXT: shrl $16, %esi
1687 ; AVX512-NEXT: movswl %si, %esi
1688 ; AVX512-NEXT: vmovd %esi, %xmm0
1685 ; AVX512-NEXT: shrq $32, %rsi
1686 ; AVX512-NEXT: shrl $16, %eax
1687 ; AVX512-NEXT: cwtl
1688 ; AVX512-NEXT: vmovd %eax, %xmm0
16891689 ; AVX512-NEXT: vcvtph2ps %xmm0, %xmm0
16901690 ; AVX512-NEXT: vmovd %ecx, %xmm1
16911691 ; AVX512-NEXT: vcvtph2ps %xmm1, %xmm1
1692 ; AVX512-NEXT: cwtl
1692 ; AVX512-NEXT: movswl %si, %eax
16931693 ; AVX512-NEXT: vmovd %eax, %xmm2
16941694 ; AVX512-NEXT: vcvtph2ps %xmm2, %xmm2
16951695 ; AVX512-NEXT: movswl %di, %eax
16981698 ; AVX512-NEXT: movswl %r10w, %eax
16991699 ; AVX512-NEXT: vmovd %eax, %xmm4
17001700 ; AVX512-NEXT: vcvtph2ps %xmm4, %xmm4
1701 ; AVX512-NEXT: vmovd %r9d, %xmm5
1701 ; AVX512-NEXT: vmovd %r8d, %xmm5
17021702 ; AVX512-NEXT: vcvtph2ps %xmm5, %xmm5
1703 ; AVX512-NEXT: movswl %r8w, %eax
1703 ; AVX512-NEXT: movswl %r9w, %eax
17041704 ; AVX512-NEXT: vmovd %eax, %xmm6
17051705 ; AVX512-NEXT: vcvtph2ps %xmm6, %xmm6
17061706 ; AVX512-NEXT: movswl %dx, %eax