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