• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=x86_64-linux -mcpu=corei7 | FileCheck %s
3
4; This fixes a missing cases in the MI scheduler's constrainLocalCopy exposed by
5; PR21792
6
7@stuff = external constant [256 x double], align 16
8
9define void @func(<4 x float> %vx) {
10; CHECK-LABEL: func:
11; CHECK:       # %bb.0: # %entry
12; CHECK-NEXT:    pushq %rax
13; CHECK-NEXT:    .cfi_def_cfa_offset 16
14; CHECK-NEXT:    pand {{.*}}(%rip), %xmm0
15; CHECK-NEXT:    movd %xmm0, %r8d
16; CHECK-NEXT:    leaq stuff(%r8), %rdi
17; CHECK-NEXT:    pextrd $1, %xmm0, %eax
18; CHECK-NEXT:    leaq stuff(%rax), %rsi
19; CHECK-NEXT:    pextrd $2, %xmm0, %edx
20; CHECK-NEXT:    pextrd $3, %xmm0, %ecx
21; CHECK-NEXT:    leaq stuff(%rdx), %rdx
22; CHECK-NEXT:    leaq stuff(%rcx), %rcx
23; CHECK-NEXT:    leaq stuff+8(%r8), %r8
24; CHECK-NEXT:    leaq stuff+8(%rax), %r9
25; CHECK-NEXT:    callq toto
26; CHECK-NEXT:    popq %rax
27; CHECK-NEXT:    .cfi_def_cfa_offset 8
28; CHECK-NEXT:    retq
29entry:
30  %tmp2 = bitcast <4 x float> %vx to <2 x i64>
31  %and.i = and <2 x i64> %tmp2, <i64 8727373547504, i64 8727373547504>
32  %tmp3 = bitcast <2 x i64> %and.i to <4 x i32>
33  %index.sroa.0.0.vec.extract = extractelement <4 x i32> %tmp3, i32 0
34  %idx.ext = sext i32 %index.sroa.0.0.vec.extract to i64
35  %add.ptr = getelementptr inbounds i8, i8* bitcast ([256 x double]* @stuff to i8*), i64 %idx.ext
36  %tmp4 = bitcast i8* %add.ptr to double*
37  %index.sroa.0.4.vec.extract = extractelement <4 x i32> %tmp3, i32 1
38  %idx.ext5 = sext i32 %index.sroa.0.4.vec.extract to i64
39  %add.ptr6 = getelementptr inbounds i8, i8* bitcast ([256 x double]* @stuff to i8*), i64 %idx.ext5
40  %tmp5 = bitcast i8* %add.ptr6 to double*
41  %index.sroa.0.8.vec.extract = extractelement <4 x i32> %tmp3, i32 2
42  %idx.ext14 = sext i32 %index.sroa.0.8.vec.extract to i64
43  %add.ptr15 = getelementptr inbounds i8, i8* bitcast ([256 x double]* @stuff to i8*), i64 %idx.ext14
44  %tmp6 = bitcast i8* %add.ptr15 to double*
45  %index.sroa.0.12.vec.extract = extractelement <4 x i32> %tmp3, i32 3
46  %idx.ext19 = sext i32 %index.sroa.0.12.vec.extract to i64
47  %add.ptr20 = getelementptr inbounds i8, i8* bitcast ([256 x double]* @stuff to i8*), i64 %idx.ext19
48  %tmp7 = bitcast i8* %add.ptr20 to double*
49  %add.ptr46 = getelementptr inbounds i8, i8* bitcast (double* getelementptr inbounds ([256 x double], [256 x double]* @stuff, i64 0, i64 1) to i8*), i64 %idx.ext
50  %tmp16 = bitcast i8* %add.ptr46 to double*
51  %add.ptr51 = getelementptr inbounds i8, i8* bitcast (double* getelementptr inbounds ([256 x double], [256 x double]* @stuff, i64 0, i64 1) to i8*), i64 %idx.ext5
52  %tmp17 = bitcast i8* %add.ptr51 to double*
53  call void @toto(double* %tmp4, double* %tmp5, double* %tmp6, double* %tmp7, double* %tmp16, double* %tmp17)
54  ret void
55}
56
57declare void @toto(double*, double*, double*, double*, double*, double*)
58