• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=x86_64-linux -mcpu=corei7 < %s | FileCheck %s
2; This fixes a missing cases in the MI scheduler's constrainLocalCopy exposed by
3; PR21792
4
5@stuff = external constant [256 x double], align 16
6
7define void @func(<4 x float> %vx) {
8entry:
9  %tmp2 = bitcast <4 x float> %vx to <2 x i64>
10  %and.i = and <2 x i64> %tmp2, <i64 8727373547504, i64 8727373547504>
11  %tmp3 = bitcast <2 x i64> %and.i to <4 x i32>
12  %index.sroa.0.0.vec.extract = extractelement <4 x i32> %tmp3, i32 0
13  %idx.ext = sext i32 %index.sroa.0.0.vec.extract to i64
14  %add.ptr = getelementptr inbounds i8, i8* bitcast ([256 x double]* @stuff to i8*), i64 %idx.ext
15  %tmp4 = bitcast i8* %add.ptr to double*
16  %index.sroa.0.4.vec.extract = extractelement <4 x i32> %tmp3, i32 1
17  %idx.ext5 = sext i32 %index.sroa.0.4.vec.extract to i64
18  %add.ptr6 = getelementptr inbounds i8, i8* bitcast ([256 x double]* @stuff to i8*), i64 %idx.ext5
19  %tmp5 = bitcast i8* %add.ptr6 to double*
20  %index.sroa.0.8.vec.extract = extractelement <4 x i32> %tmp3, i32 2
21  %idx.ext14 = sext i32 %index.sroa.0.8.vec.extract to i64
22  %add.ptr15 = getelementptr inbounds i8, i8* bitcast ([256 x double]* @stuff to i8*), i64 %idx.ext14
23  %tmp6 = bitcast i8* %add.ptr15 to double*
24  %index.sroa.0.12.vec.extract = extractelement <4 x i32> %tmp3, i32 3
25  %idx.ext19 = sext i32 %index.sroa.0.12.vec.extract to i64
26  %add.ptr20 = getelementptr inbounds i8, i8* bitcast ([256 x double]* @stuff to i8*), i64 %idx.ext19
27  %tmp7 = bitcast i8* %add.ptr20 to double*
28  %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
29  %tmp16 = bitcast i8* %add.ptr46 to double*
30  %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
31  %tmp17 = bitcast i8* %add.ptr51 to double*
32  call void @toto(double* %tmp4, double* %tmp5, double* %tmp6, double* %tmp7, double* %tmp16, double* %tmp17)
33  ret void
34; CHECK-LABEL: func:
35; CHECK: pextrq  $1, %xmm0,
36; CHECK-NEXT: movd    %xmm0, %r[[AX:..]]
37; CHECK-NEXT: movslq  %e[[AX]],
38; CHECK-NEXT: sarq    $32, %r[[AX]]
39}
40
41declare void @toto(double*, double*, double*, double*, double*, double*)
42