1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mipsel < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker@g0 = common global i32 0, align 4 4*9880d681SAndroid Build Coastguard Worker@g1 = common global i32 0, align 4 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker; Check that LSR doesn't choose a solution with a formula "reg + 4*reg". 7*9880d681SAndroid Build Coastguard Worker; 8*9880d681SAndroid Build Coastguard Worker; CHECK: $BB0_2: 9*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: sll ${{[0-9]+}}, ${{[0-9]+}}, 2 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Workerdefine i32 @f0(i32 %n, i32 %m, [256 x i32]* nocapture %a, [256 x i32]* nocapture %b) nounwind readonly { 12*9880d681SAndroid Build Coastguard Workerentry: 13*9880d681SAndroid Build Coastguard Worker br label %for.cond1.preheader 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Workerfor.cond1.preheader: 16*9880d681SAndroid Build Coastguard Worker %s.022 = phi i32 [ 0, %entry ], [ %add7, %for.inc9 ] 17*9880d681SAndroid Build Coastguard Worker %i.021 = phi i32 [ 0, %entry ], [ %add10, %for.inc9 ] 18*9880d681SAndroid Build Coastguard Worker br label %for.body3 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Workerfor.body3: 21*9880d681SAndroid Build Coastguard Worker %s.120 = phi i32 [ %s.022, %for.cond1.preheader ], [ %add7, %for.body3 ] 22*9880d681SAndroid Build Coastguard Worker %j.019 = phi i32 [ 0, %for.cond1.preheader ], [ %add8, %for.body3 ] 23*9880d681SAndroid Build Coastguard Worker %arrayidx4 = getelementptr inbounds [256 x i32], [256 x i32]* %a, i32 %i.021, i32 %j.019 24*9880d681SAndroid Build Coastguard Worker %0 = load i32, i32* %arrayidx4, align 4 25*9880d681SAndroid Build Coastguard Worker %arrayidx6 = getelementptr inbounds [256 x i32], [256 x i32]* %b, i32 %i.021, i32 %j.019 26*9880d681SAndroid Build Coastguard Worker %1 = load i32, i32* %arrayidx6, align 4 27*9880d681SAndroid Build Coastguard Worker %add = add i32 %0, %s.120 28*9880d681SAndroid Build Coastguard Worker %add7 = add i32 %add, %1 29*9880d681SAndroid Build Coastguard Worker %add8 = add nsw i32 %j.019, %m 30*9880d681SAndroid Build Coastguard Worker %cmp2 = icmp slt i32 %add8, 64 31*9880d681SAndroid Build Coastguard Worker br i1 %cmp2, label %for.body3, label %for.inc9 32*9880d681SAndroid Build Coastguard Worker 33*9880d681SAndroid Build Coastguard Workerfor.inc9: 34*9880d681SAndroid Build Coastguard Worker %add10 = add nsw i32 %i.021, %n 35*9880d681SAndroid Build Coastguard Worker %cmp = icmp slt i32 %add10, 64 36*9880d681SAndroid Build Coastguard Worker br i1 %cmp, label %for.cond1.preheader, label %for.end11 37*9880d681SAndroid Build Coastguard Worker 38*9880d681SAndroid Build Coastguard Workerfor.end11: 39*9880d681SAndroid Build Coastguard Worker ret i32 %add7 40*9880d681SAndroid Build Coastguard Worker} 41*9880d681SAndroid Build Coastguard Worker 42