Mercurial > hg > CbC > CbC_llvm
comparison test/CodeGen/Hexagon/tail-dup-subreg-abort.ll @ 100:7d135dc70f03 LLVM 3.9
LLVM 3.9
author | Miyagi Mitsuki <e135756@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Jan 2016 22:53:40 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
96:6418606d0ead | 100:7d135dc70f03 |
---|---|
1 ; RUN: llc -march=hexagon -O2 -disable-cgp < %s | |
2 ; REQUIRES: asserts | |
3 ; | |
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 | |
7 ; src/dst combination. | |
8 ; | |
9 define i32 @foo(i32 %x, i64 %y) nounwind { | |
10 entry: | |
11 %a = icmp slt i32 %x, 0 | |
12 %lo = trunc i64 %y to i32 | |
13 br i1 %a, label %next, label %tail | |
14 tail: | |
15 br label %join | |
16 next: | |
17 %c = icmp eq i32 %x, 0 | |
18 br i1 %c, label %b1, label %tail | |
19 b1: | |
20 %t1 = lshr i64 %y, 32 | |
21 %hi = trunc i64 %t1 to i32 | |
22 br label %join | |
23 join: | |
24 %val = phi i32 [ %hi, %b1 ], [ %lo, %tail ] | |
25 ret i32 %val | |
26 } | |
27 | |
28 |