annotate test/CodeGen/Hexagon/newify-crash.ll @ 146:3fc4d5c3e21e

set tail call flag for code segment in CGCAll
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 19:23:36 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 ; RUN: llc -march=hexagon < %s | FileCheck %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 ;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 ; Check that this testcase doesn't crash.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 ; CHECK: vadd
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 target triple = "hexagon"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 define void @fred() #0 {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 b0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 br label %b1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 b1: ; preds = %b7, %b0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 %v2 = phi i32 [ 0, %b0 ], [ %v16, %b7 ]
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 %v3 = phi <32 x i32> [ undef, %b0 ], [ %v15, %b7 ]
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 %v4 = icmp slt i32 %v2, undef
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 br i1 %v4, label %b5, label %b7
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 b5: ; preds = %b1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 %v6 = tail call <32 x i32> @llvm.hexagon.V6.vaddhsat.128B(<32 x i32> %v3, <32 x i32> undef)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 br label %b7
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 b7: ; preds = %b5, %b1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 %v8 = phi <32 x i32> [ %v6, %b5 ], [ %v3, %b1 ]
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 %v9 = tail call <32 x i32> @llvm.hexagon.V6.vaddhsat.128B(<32 x i32> %v8, <32 x i32> undef)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 %v10 = tail call <32 x i32> @llvm.hexagon.V6.vaddhsat.128B(<32 x i32> %v9, <32 x i32> undef)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 %v11 = tail call <32 x i32> @llvm.hexagon.V6.vaddhsat.128B(<32 x i32> %v10, <32 x i32> undef)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 %v12 = tail call <32 x i32> @llvm.hexagon.V6.vaddhsat.128B(<32 x i32> %v11, <32 x i32> undef)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 %v13 = tail call <32 x i32> @llvm.hexagon.V6.vaddhsat.128B(<32 x i32> %v12, <32 x i32> zeroinitializer)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 %v14 = tail call <32 x i32> @llvm.hexagon.V6.vaddhsat.128B(<32 x i32> %v13, <32 x i32> undef)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 %v15 = tail call <32 x i32> @llvm.hexagon.V6.vaddhsat.128B(<32 x i32> %v14, <32 x i32> undef)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31 %v16 = add nsw i32 %v2, 8
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32 %v17 = icmp eq i32 %v16, 64
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33 br i1 %v17, label %b18, label %b1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 b18: ; preds = %b7
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 tail call void @f0() #0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40 declare <32 x i32> @llvm.hexagon.V6.vaddhsat.128B(<32 x i32>, <32 x i32>) #1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41 declare void @f0() #0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43 attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length128b" }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 attributes #1 = { nounwind readnone }