brintos

brintos / llvm-project-archived public Read only

0
0
Text · 828 B · 166875d Raw
26 lines · plain
1; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+sse2 -passes=loop-vectorize -debug-only=loop-vectorize -S < %s 2>&1 | FileCheck %s2; REQUIRES: asserts3 4; CHECK: 'foo'5; CHECK: LV: Found an estimated cost of 1 for VF 1 For instruction:   %shift = ashr i32 %val, %k6; 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>8define void @foo(ptr nocapture %p, i32 %k) local_unnamed_addr #0 {9entry:10  br label %body11 12body:13  %i = phi i64 [ 0, %entry ], [ %next, %body ]14  %ptr = getelementptr inbounds i32, ptr %p, i64 %i15  %val = load i32, ptr %ptr, align 416  %shift = ashr i32 %val, %k17  store i32 %shift, ptr %ptr, align 418  %next = add nuw nsw i64 %i, 119  %cmp = icmp eq i64 %next, 1620  br i1 %cmp, label %exit, label %body21 22exit:23  ret void24 25}26