• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
2
3; There was an infinite loop in DAGCombiner from a target build_vector
4; combine and a generic insert_vector_elt combine.
5
6; GCN-LABEL: {{^}}combine_loop:
7; GCN: flat_load_short_d16_hi
8; GCN: flat_store_short
9define amdgpu_kernel void @combine_loop(i16* %arg) #0 {
10bb:
11  br label %bb1
12
13bb1:
14  %tmp = phi <2 x i16> [ <i16 15360, i16 15360>, %bb ], [ %tmp5, %bb1 ]
15  %tmp2 = phi half [ 0xH0000, %bb ], [ %tmp8, %bb1 ]
16  %tmp3 = load volatile half, half* null, align 536870912
17  %tmp4 = bitcast half %tmp3 to i16
18  %tmp5 = insertelement <2 x i16> <i16 0, i16 undef>, i16 %tmp4, i32 1
19  %tmp6 = bitcast i16* %arg to half*
20  store volatile half %tmp2, half* %tmp6, align 2
21  %tmp7 = bitcast <2 x i16> %tmp to <2 x half>
22  %tmp8 = extractelement <2 x half> %tmp7, i32 0
23  br label %bb1
24}
25
26attributes #0 = { nounwind }
27