brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 38fedc1 Raw
32 lines · plain
1; RUN: opt < %s -passes=loop-vectorize -mtriple=aarch64-unknown-linux-gnu -mcpu=cortex-a57 -S | FileCheck %s2target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"3target triple = "aarch64--linux-gnu"4 5%struct.anon = type { [100 x i32], i32, [100 x i32] }6 7@Foo = common global %struct.anon zeroinitializer, align 48 9; CHECK-LABEL: @foo(10; CHECK: load <4 x i32>, ptr11; CHECK: sdiv <4 x i32>12; CHECK: store <4 x i32>13 14define void @foo(){15entry:16  br label %for.body17 18for.body:                                         ; preds = %for.body, %entry19  %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]20  %arrayidx = getelementptr inbounds %struct.anon, ptr @Foo, i64 0, i32 2, i64 %indvars.iv21  %0 = load i32, ptr %arrayidx, align 422  %div = sdiv i32 %0, 223  %arrayidx2 = getelementptr inbounds %struct.anon, ptr @Foo, i64 0, i32 0, i64 %indvars.iv24  store i32 %div, ptr %arrayidx2, align 425  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 126  %exitcond = icmp eq i64 %indvars.iv.next, 10027  br i1 %exitcond, label %for.end, label %for.body28 29for.end:                                          ; preds = %for.body30  ret void31}32