summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Hexagon/getBlockAddress.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/Hexagon/getBlockAddress.ll')
-rw-r--r--llvm/test/CodeGen/Hexagon/getBlockAddress.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Hexagon/getBlockAddress.ll b/llvm/test/CodeGen/Hexagon/getBlockAddress.ll
new file mode 100644
index 00000000000..923780edacc
--- /dev/null
+++ b/llvm/test/CodeGen/Hexagon/getBlockAddress.ll
@@ -0,0 +1,19 @@
+; RUN: llc -march=hexagon < %s
+; REQUIRES: asserts
+
+; Function Attrs: nounwind
+define void @f0() #0 {
+b0:
+ call void bitcast (void (...)* @f1 to void (i8*)*)(i8* blockaddress(@f0, %b1))
+ br label %b1
+
+b1: ; preds = %b2, %b0
+ ret void
+
+b2: ; No predecessors!
+ indirectbr i8* undef, [label %b1]
+}
+
+declare void @f1(...)
+
+attributes #0 = { nounwind }
OpenPOWER on IntegriCloud