1 ; RUN: opt < %s -basicaa -slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu -mcpu=cortex-a57 | FileCheck %s 2 target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128" 3 target triple = "aarch64--linux-gnu" 4 5 ; CHECK-LABEL: @test1 6 ; CHECK: load <4 x i32> 7 ; CHECK: add nsw <4 x i32> 8 ; CHECK: sdiv <4 x i32> 9 10 define void @test1(i32* noalias nocapture %a, i32* noalias nocapture readonly %b, i32* noalias nocapture readonly %c) { 11 entry: 12 %0 = load i32, i32* %b, align 4 13 %1 = load i32, i32* %c, align 4 14 %add = add nsw i32 %1, %0 15 %div = sdiv i32 %add, 2 16 store i32 %div, i32* %a, align 4 17 %arrayidx3 = getelementptr inbounds i32, i32* %b, i64 1 18 %2 = load i32, i32* %arrayidx3, align 4 19 %arrayidx4 = getelementptr inbounds i32, i32* %c, i64 1 20 %3 = load i32, i32* %arrayidx4, align 4 21 %add5 = add nsw i32 %3, %2 22 %div6 = sdiv i32 %add5, 2 23 %arrayidx7 = getelementptr inbounds i32, i32* %a, i64 1 24 store i32 %div6, i32* %arrayidx7, align 4 25 %arrayidx8 = getelementptr inbounds i32, i32* %b, i64 2 26 %4 = load i32, i32* %arrayidx8, align 4 27 %arrayidx9 = getelementptr inbounds i32, i32* %c, i64 2 28 %5 = load i32, i32* %arrayidx9, align 4 29 %add10 = add nsw i32 %5, %4 30 %div11 = sdiv i32 %add10, 2 31 %arrayidx12 = getelementptr inbounds i32, i32* %a, i64 2 32 store i32 %div11, i32* %arrayidx12, align 4 33 %arrayidx13 = getelementptr inbounds i32, i32* %b, i64 3 34 %6 = load i32, i32* %arrayidx13, align 4 35 %arrayidx14 = getelementptr inbounds i32, i32* %c, i64 3 36 %7 = load i32, i32* %arrayidx14, align 4 37 %add15 = add nsw i32 %7, %6 38 %div16 = sdiv i32 %add15, 2 39 %arrayidx17 = getelementptr inbounds i32, i32* %a, i64 3 40 store i32 %div16, i32* %arrayidx17, align 4 41 ret void 42 } 43