diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-03-12 14:01:28 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-03-12 14:01:28 +0000 |
commit | 046090db5330dd87e54a7b46ec34384dd3b43c31 (patch) | |
tree | 502084412f49f650e9c86e075a1e14f3ad4711be /llvm/test/CodeGen/Hexagon/const-combine.ll | |
parent | 947e0acb6fa0fedac05530df98f589e928456278 (diff) | |
download | bcm5719-llvm-046090db5330dd87e54a7b46ec34384dd3b43c31.tar.gz bcm5719-llvm-046090db5330dd87e54a7b46ec34384dd3b43c31.zip |
[Hexagon] Add more lit tests
llvm-svn: 327271
Diffstat (limited to 'llvm/test/CodeGen/Hexagon/const-combine.ll')
-rw-r--r-- | llvm/test/CodeGen/Hexagon/const-combine.ll | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Hexagon/const-combine.ll b/llvm/test/CodeGen/Hexagon/const-combine.ll new file mode 100644 index 00000000000..90756f1c407 --- /dev/null +++ b/llvm/test/CodeGen/Hexagon/const-combine.ll @@ -0,0 +1,48 @@ +; RUN: llc -march=hexagon -disable-const64=1 < %s | FileCheck %s +; CHECK: combine(##4917,#88) + +target triple = "hexagon" + +%s.1 = type { %s.2 } +%s.2 = type { i32, i8* } + +@g0 = internal constant [61 x i8] c"............................................................\00", align 4 +@g1 = internal constant %s.1 { %s.2 { i32 8, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @g0, i32 0, i32 0) } }, align 4 + +define void @f0(i32 %a0) local_unnamed_addr #0 { +b0: + %v0 = alloca i8*, align 4 + store i8* null, i8** %v0, align 4, !tbaa !0 + call void @f1(i32 88, i16 zeroext 4917, i8** nonnull %v0) #0 + %v1 = load i8*, i8** %v0, align 4, !tbaa !0 + %v2 = icmp eq i8* %v1, null + br i1 %v2, label %b1, label %b2 + +b1: ; preds = %b0 + call void @f2(%s.1* nonnull @g1) #0 + br label %b3 + +b2: ; preds = %b0 + %v3 = call i32 @f3(i8 zeroext 22, i8* null, i8* nonnull %v1, i16 zeroext 88) #0 + %v4 = load i8*, i8** %v0, align 4, !tbaa !0 + call void @f4(i8* %v4, i32 88) #0 + br label %b3 + +b3: ; preds = %b2, %b1 + ret void +} + +declare void @f1(i32, i16 zeroext, i8**) local_unnamed_addr + +declare void @f2(%s.1*) local_unnamed_addr + +declare i32 @f3(i8 zeroext, i8*, i8*, i16 zeroext) local_unnamed_addr + +declare void @f4(i8*, i32) local_unnamed_addr + +attributes #0 = { nounwind optsize } + +!0 = !{!1, !1, i64 0} +!1 = !{!"any pointer", !2} +!2 = !{!"omnipotent char", !3} +!3 = !{!"Simple C/C++ TBAA"} |