llvm.org GIT mirror llvm / d09ede4
[X86] Regenerate MMX coalescing test Exposes another extractelement(bitcast(scalartovector())) pattern git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343403 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 1 year, 4 months ago
1 changed file(s) with 26 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
0 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
1 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+mmx,+sse2 | FileCheck %s
12
23 %SA = type <{ %union.anon, i32, [4 x i8], i8*, i8*, i8*, i32, [4 x i8] }>
56 ; Check that extra movd (copy) instructions aren't generated.
67
78 define i32 @test(%SA* %pSA, i16* %A, i32 %B, i32 %C, i32 %D, i8* %E) {
9 ; CHECK-LABEL: test:
10 ; CHECK: # %bb.0: # %entry
11 ; CHECK-NEXT: pshufw $238, (%rdi), %mm0 # mm0 = mem[2,3,2,3]
12 ; CHECK-NEXT: movd %mm0, %eax
13 ; CHECK-NEXT: testl %eax, %eax
14 ; CHECK-NEXT: je .LBB0_1
15 ; CHECK-NEXT: # %bb.2: # %if.B
16 ; CHECK-NEXT: pshufw $238, %mm0, %mm0 # mm0 = mm0[2,3,2,3]
17 ; CHECK-NEXT: movq %mm0, %rax
18 ; CHECK-NEXT: jmp .LBB0_3
19 ; CHECK-NEXT: .LBB0_1: # %if.A
20 ; CHECK-NEXT: movd %edx, %mm1
21 ; CHECK-NEXT: psllq %mm1, %mm0
22 ; CHECK-NEXT: movq %mm0, %rax
23 ; CHECK-NEXT: testq %rax, %rax
24 ; CHECK-NEXT: jne .LBB0_4
25 ; CHECK-NEXT: .LBB0_3: # %if.C
26 ; CHECK-NEXT: movq %rax, %xmm0
27 ; CHECK-NEXT: movd %xmm0, %eax
28 ; CHECK-NEXT: testl %eax, %eax
29 ; CHECK-NEXT: je .LBB0_1
30 ; CHECK-NEXT: .LBB0_4: # %merge
31 ; CHECK-NEXT: pshufw $238, %mm0, %mm0 # mm0 = mm0[2,3,2,3]
32 ; CHECK-NEXT: movd %mm0, %eax
33 ; CHECK-NEXT: retq
834 entry:
9 ; CHECK-LABEL: test
10 ; CHECK: # %bb.0:
11 ; CHECK-NEXT: pshufw
12 ; CHECK-NEXT: movd
13 ; CHECK-NOT: movd
14 ; CHECK-NEXT: testl
1535 %shl = shl i32 1, %B
1636 %shl1 = shl i32 %C, %B
1737 %shl2 = shl i32 1, %D
3555 br i1 %cmp, label %if.A, label %if.B
3656
3757 if.A:
38 ; CHECK: %if.A
39 ; CHECK-NEXT: movd
40 ; CHECK-NEXT: psllq
4158 %pa = phi <1 x i64> [ %v8, %entry ], [ %vx, %if.C ]
4259 %v17 = extractelement <1 x i64> %pa, i32 0
4360 %v18 = bitcast i64 %v17 to x86_mmx
6380 br i1 %cmp2, label %if.A, label %merge
6481
6582 merge:
66 ; CHECK: %merge
67 ; CHECK-NOT: movd
68 ; CHECK-NEXT: pshufw
6983 %vy = phi <1 x i64> [ %v21, %if.A ], [ %vx, %if.C ]
7084 %v130 = bitcast <1 x i64> %vy to <4 x i16>
7185 %v131 = bitcast <4 x i16> %v130 to x86_mmx