1; RUN: opt -S -loop-vectorize -force-vector-width=4 %s | FileCheck %s
2
3; CHECK-LABEL: @test_fshl
4; CHECK-LABEL: vector.body:
5; CHECK-NEXT:    %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
6; CHECK-NEXT:    %0 = add i32 %index, 0
7; CHECK-NEXT:    %1 = call <4 x i16> @llvm.fshl.v4i16(<4 x i16> undef, <4 x i16> undef, <4 x i16> <i16 15, i16 15, i16 15, i16 15>)
8; CHECK-NEXT:    %index.next = add i32 %index, 4
9; CHECK-NEXT:    %2 = icmp eq i32 %index.next, %n.vec
10; CHECK-NEXT:     br i1 %2, label %middle.block, label %vector.body, !llvm.loop !0
11;
12define void @test_fshl(i32 %width) {
13entry:
14  br label %for.body9.us.us
15
16for.cond6.for.cond.cleanup8_crit_edge.us.us:      ; preds = %for.body9.us.us
17  ret void
18
19for.body9.us.us:                                  ; preds = %for.body9.us.us, %entry
20  %x.020.us.us = phi i32 [ 0, %entry ], [ %inc.us.us, %for.body9.us.us ]
21  %conv4.i.us.us = tail call i16 @llvm.fshl.i16(i16 undef, i16 undef, i16 15)
22  %inc.us.us = add nuw i32 %x.020.us.us, 1
23  %exitcond50 = icmp eq i32 %inc.us.us, %width
24  br i1 %exitcond50, label %for.cond6.for.cond.cleanup8_crit_edge.us.us, label %for.body9.us.us
25}
26
27declare i16 @llvm.fshl.i16(i16, i16, i16)
28