1 ; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+sse2 -passes=loop-vectorize -debug-only=loop-vectorize -S < %s 2>&1 | FileCheck %s
5 ; CHECK: LV: Found an estimated cost of 1 for VF 1 For instruction: %shift = ashr i32 %val, %k
6 ; CHECK: Cost of 2 for VF 2: WIDEN ir<%shift> = ashr ir<%val>, ir<%k>
7 ; CHECK: Cost of 2 for VF 4: WIDEN ir<%shift> = ashr ir<%val>, ir<%k>
8 define void @foo(ptr nocapture %p, i32 %k) local_unnamed_addr #0 {
13 %i = phi i64 [ 0, %entry ], [ %next, %body ]
14 %ptr = getelementptr inbounds i32, ptr %p, i64 %i
15 %val = load i32, ptr %ptr, align 4
16 %shift = ashr i32 %val, %k
17 store i32 %shift, ptr %ptr, align 4
18 %next = add nuw nsw i64 %i, 1
19 %cmp = icmp eq i64 %next, 16
20 br i1 %cmp, label %exit, label %body