Mercurial > hg > CbC > CbC_llvm
comparison test/CodeGen/Hexagon/stack-align-reset.ll @ 121:803732b1fca8
LLVM 5.0
author | kono |
---|---|
date | Fri, 27 Oct 2017 17:07:41 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
120:1172e4bd9c6f | 121:803732b1fca8 |
---|---|
1 ; RUN: llc -march=hexagon < %s | FileCheck %s | |
2 ; | |
3 ; This used to crash. | |
4 ; CHECK: call f1 | |
5 | |
6 target triple = "hexagon-unknown--elf" | |
7 | |
8 %struct.0 = type { [5 x i32] } | |
9 %struct.2 = type { i32, i32, i32, %struct.1* } | |
10 %struct.1 = type { i16*, i32, i32, i32 } | |
11 | |
12 @g0 = external hidden unnamed_addr constant [52 x i8], align 1 | |
13 @g1 = external hidden unnamed_addr constant [3 x i8], align 1 | |
14 | |
15 declare extern_weak void @f0(i32, i8*, i32, i8*, ...) #0 | |
16 declare void @f1(%struct.0*, i32) #0 | |
17 | |
18 define void @fred(i8* %a0) #0 { | |
19 b1: | |
20 %v2 = alloca %struct.0, align 4 | |
21 %v3 = alloca %struct.2, i32 undef, align 8 | |
22 br i1 undef, label %b5, label %b4 | |
23 | |
24 b4: ; preds = %b1 | |
25 br label %b7 | |
26 | |
27 b5: ; preds = %b5, %b1 | |
28 %v6 = getelementptr inbounds %struct.2, %struct.2* %v3, i32 undef, i32 3 | |
29 store %struct.1* undef, %struct.1** %v6, align 4 | |
30 br label %b5 | |
31 | |
32 b7: ; preds = %b10, %b4 | |
33 %v8 = call i32 @llvm.hexagon.V6.extractw(<16 x i32> zeroinitializer, i32 0) | |
34 br i1 icmp eq (void (i32, i8*, i32, i8*, ...)* @f0, void (i32, i8*, i32, i8*, ...)* null), label %b11, label %b9 | |
35 | |
36 b9: ; preds = %b7 | |
37 call void (i32, i8*, i32, i8*, ...) @f0(i32 2, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @g0, i32 0, i32 0), i32 2346, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @g1, i32 0, i32 0), i32 %v8) | |
38 unreachable | |
39 | |
40 b10: ; preds = %b11 | |
41 call void @f1(%struct.0* nonnull %v2, i32 28) | |
42 br label %b7 | |
43 | |
44 b11: ; preds = %b11, %b7 | |
45 br i1 undef, label %b10, label %b11 | |
46 } | |
47 | |
48 declare i32 @llvm.hexagon.V6.extractw(<16 x i32>, i32) #1 | |
49 | |
50 attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvxv60,+hvx-length64b" } | |
51 attributes #1 = { nounwind readnone } |