xref: /llvm-project/llvm/test/Transforms/LoopVectorize/AArch64/pr56627.ll (revision d1cee3539fdf766e544fa783e7db1cd9ec8de801)
1; RUN: opt < %s -S -passes=loop-vectorize | FileCheck %s
2
3; Check that we can vectorize this loop without crashing.
4
5target triple = "aarch64-none-linux-gnu"
6define float @quux() {
7; CHECK: @quux
8bb:
9  br label %bb1
10
11bb1:
12  %tmp = phi i64 [ %tmp3, %bb1 ], [ 0, %bb ]
13  %tmp2 = phi float [ %tmp5, %bb1 ], [ 0.000000e+00, %bb ]
14  %tmp3 = add nsw i64 %tmp, 1
15  %tmp5 = fadd float %tmp2, 3.000000e+00
16  %tmp6 = mul i32 0, 0
17  %tmp7 = icmp sgt i64 %tmp, 0
18  br i1 %tmp7, label %bb8, label %bb1
19
20bb8:
21  %tmp9 = phi float [ %tmp5, %bb1 ]
22  ret float %tmp9
23}