1 ; RUN: llc -march=hexagon -O2 -disable-cgp < %s
4 ; Tail duplication can ignore subregister information on PHI nodes, and as
5 ; a result, generate COPY instructions between registers of different classes.
6 ; This could lead to HexagonInstrInfo::copyPhysReg aborting on an unhandled
9 define i32 @foo(i32 %x, i64 %y) nounwind {
11 %a = icmp slt i32 %x, 0
12 %lo = trunc i64 %y to i32
13 br i1 %a, label %next, label %tail
17 %c = icmp eq i32 %x, 0
18 br i1 %c, label %b1, label %tail
21 %hi = trunc i64 %t1 to i32
24 %val = phi i32 [ %hi, %b1 ], [ %lo, %tail ]