annotate test/CodeGen/Hexagon/early-if-vecpred.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 ; REQUIRES: asserts
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 ; Hexagon early if-conversion used to crash on this testcase due to not
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 ; recognizing vector predicate registers.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 target triple = "hexagon"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 ; Check that the early if-conversion has not happened.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 ; CHECK-LABEL: fred
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 ; CHECK: q{{[0-3]}} = not
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 ; CHECK: LBB
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 ; CHECK: if (q{{[0-3]}}) vmem
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 define void @fred(i32 %a0) #0 {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 b1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 %v2 = tail call <1024 x i1> @llvm.hexagon.V6.pred.scalar2.128B(i32 %a0) #2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 br i1 undef, label %b3, label %b5
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 b3: ; preds = %b1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 %v4 = tail call <1024 x i1> @llvm.hexagon.V6.pred.not.128B(<1024 x i1> %v2) #2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 br label %b5
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 b5: ; preds = %b3, %b1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 %v6 = phi <1024 x i1> [ %v4, %b3 ], [ %v2, %b1 ]
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 %v7 = bitcast <1024 x i1> %v6 to <32 x i32>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 tail call void asm sideeffect "if ($0) vmem($1) = $2;", "q,r,v,~{memory}"(<32 x i32> %v7, <32 x i32>* undef, <32 x i32> undef) #2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31 declare <1024 x i1> @llvm.hexagon.V6.pred.scalar2.128B(i32) #1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32 declare <1024 x i1> @llvm.hexagon.V6.pred.not.128B(<1024 x i1>) #1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34 attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length128b" }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 attributes #1 = { nounwind readnone }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 attributes #2 = { nounwind }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37