diff options
author | Sirish Pande <spande@codeaurora.org> | 2012-04-23 17:49:28 +0000 |
---|---|---|
committer | Sirish Pande <spande@codeaurora.org> | 2012-04-23 17:49:28 +0000 |
commit | 1bfd24851ef35e754d9652551e1a7abb12fe6738 (patch) | |
tree | cbf6d9ca9b644248eea1e450d29ff96e14e6e54f /test/CodeGen/Hexagon/newvaluejump.ll | |
parent | 0dac3919e52e28308deba555bbcb6286674d5495 (diff) | |
download | external_llvm-1bfd24851ef35e754d9652551e1a7abb12fe6738.zip external_llvm-1bfd24851ef35e754d9652551e1a7abb12fe6738.tar.gz external_llvm-1bfd24851ef35e754d9652551e1a7abb12fe6738.tar.bz2 |
Support for Hexagon architectural feature, new value jump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Hexagon/newvaluejump.ll')
-rw-r--r-- | test/CodeGen/Hexagon/newvaluejump.ll | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/CodeGen/Hexagon/newvaluejump.ll b/test/CodeGen/Hexagon/newvaluejump.ll new file mode 100644 index 0000000..9c7ca55 --- /dev/null +++ b/test/CodeGen/Hexagon/newvaluejump.ll @@ -0,0 +1,33 @@ +; RUN: llc -march=hexagon -mcpu=hexagonv4 < %s | FileCheck %s +; Check that we generate new value jump. + +@i = global i32 0, align 4 +@j = global i32 10, align 4 + +define i32 @foo(i32 %a) nounwind { +entry: +; CHECK: if (cmp.eq(r{{[0-9]+}}.new, #0)) jump{{.}} + %addr1 = alloca i32, align 4 + %addr2 = alloca i32, align 4 + %0 = load i32* @i, align 4 + store i32 %0, i32* %addr1, align 4 + call void @bar(i32 1, i32 2) + %1 = load i32* @j, align 4 + %tobool = icmp ne i32 %1, 0 + br i1 %tobool, label %if.then, label %if.else + +if.then: + call void @baz(i32 1, i32 2) + br label %if.end + +if.else: + call void @guy(i32 10, i32 20) + br label %if.end + +if.end: + ret i32 0 +} + +declare void @guy(i32, i32) +declare void @bar(i32, i32) +declare void @baz(i32, i32) |