1 ; RUN: opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s -loop-vectorize -dce -instcombine -S | FileCheck -check-prefix=GFX9 -check-prefix=GCN %s
2 ; RUN: opt -mtriple=amdgcn-amd-amdhsa -mcpu=fiji < %s -loop-vectorize -dce -instcombine -S | FileCheck -check-prefix=CIVI -check-prefix=GCN %s
3 ; RUN: opt -mtriple=amdgcn-amd-amdhsa -mcpu=hawaii < %s -loop-vectorize -dce -instcombine -S | FileCheck -check-prefix=CIVI -check-prefix=GCN %s
5 ; GCN-LABEL: @vectorize_v2f16_loop(
8 ; GFX9: load <2 x half>
9 ; GFX9: fadd fast <2 x half>
12 ; GFX9: fadd fast <2 x half>
17 define half @vectorize_v2f16_loop(half addrspace(1)* noalias %s) {
22 %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
23 %q.04 = phi half [ 0.0, %entry ], [ %add, %for.body ]
24 %arrayidx = getelementptr inbounds half, half addrspace(1)* %s, i64 %indvars.iv
25 %0 = load half, half addrspace(1)* %arrayidx, align 2
26 %add = fadd fast half %q.04, %0
27 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
28 %exitcond = icmp eq i64 %indvars.iv.next, 256
29 br i1 %exitcond, label %for.end, label %for.body
32 %add.lcssa = phi half [ %add, %for.body ]