1 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" 2 ; RUN: opt < %s -bb-vectorize -bb-vectorize-req-chain-depth=3 -S | FileCheck %s 3 4 ; Simple 3-pair chain with loads and stores (with fpmath) 5 define void @test1(double* %a, double* %b, double* %c) nounwind uwtable readonly { 6 entry: 7 %i0 = load double* %a, align 8 8 %i1 = load double* %b, align 8 9 %mul = fmul double %i0, %i1, !fpmath !2 10 %arrayidx3 = getelementptr inbounds double* %a, i64 1 11 %i3 = load double* %arrayidx3, align 8 12 %arrayidx4 = getelementptr inbounds double* %b, i64 1 13 %i4 = load double* %arrayidx4, align 8 14 %mul5 = fmul double %i3, %i4, !fpmath !3 15 store double %mul, double* %c, align 8 16 %arrayidx5 = getelementptr inbounds double* %c, i64 1 17 store double %mul5, double* %arrayidx5, align 8 18 ret void 19 ; CHECK: @test1 20 ; CHECK: !fpmath 21 ; CHECK: ret void 22 } 23 24 ; Simple 3-pair chain with loads and stores (ints with range) 25 define void @test2(i64* %a, i64* %b, i64* %c) nounwind uwtable readonly { 26 entry: 27 %i0 = load i64* %a, align 8, !range !0 28 %i1 = load i64* %b, align 8 29 %mul = mul i64 %i0, %i1 30 %arrayidx3 = getelementptr inbounds i64* %a, i64 1 31 %i3 = load i64* %arrayidx3, align 8, !range !1 32 %arrayidx4 = getelementptr inbounds i64* %b, i64 1 33 %i4 = load i64* %arrayidx4, align 8 34 %mul5 = mul i64 %i3, %i4 35 store i64 %mul, i64* %c, align 8 36 %arrayidx5 = getelementptr inbounds i64* %c, i64 1 37 store i64 %mul5, i64* %arrayidx5, align 8 38 ret void 39 ; CHECK: @test2 40 ; CHECK-NOT: !range 41 ; CHECK: ret void 42 } 43 44 !0 = metadata !{i64 0, i64 2} 45 !1 = metadata !{i64 3, i64 5} 46 47 !2 = metadata !{ float 5.0 } 48 !3 = metadata !{ float 2.5 } 49 50