summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Blackfin/add-overflow.ll
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-02 17:32:10 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-02 17:32:10 +0000
commit552d8d6618b080f08e0cdf3b5ad430b9f66bbdf5 (patch)
tree22359f7c8105cf32aba235f854c11a639168eaa8 /llvm/test/CodeGen/Blackfin/add-overflow.ll
parent3f323847bc6a270312c615309c3c3f8c16ddbed9 (diff)
downloadbcm5719-llvm-552d8d6618b080f08e0cdf3b5ad430b9f66bbdf5.tar.gz
bcm5719-llvm-552d8d6618b080f08e0cdf3b5ad430b9f66bbdf5.zip
Analog Devices Blackfin back-end.
Generate code for the Blackfin family of DSPs from Analog Devices: http://www.analog.com/en/embedded-processing-dsp/blackfin/processors/index.html We aim to be compatible with the exsisting GNU toolchain found at: http://blackfin.uclinux.org/gf/project/toolchain The back-end is experimental. llvm-svn: 77897
Diffstat (limited to 'llvm/test/CodeGen/Blackfin/add-overflow.ll')
-rw-r--r--llvm/test/CodeGen/Blackfin/add-overflow.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Blackfin/add-overflow.ll b/llvm/test/CodeGen/Blackfin/add-overflow.ll
new file mode 100644
index 00000000000..de80783ac6d
--- /dev/null
+++ b/llvm/test/CodeGen/Blackfin/add-overflow.ll
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | llc -march=bfin -verify-machineinstrs > %t
+
+ type { i24, i1 } ; type %0
+
+define i1 @func2(i24 zeroext %v1, i24 zeroext %v2) nounwind {
+entry:
+ %t = call %0 @llvm.uadd.with.overflow.i24(i24 %v1, i24 %v2) ; <%0> [#uses=1]
+ %obit = extractvalue %0 %t, 1 ; <i1> [#uses=1]
+ br i1 %obit, label %carry, label %normal
+
+normal: ; preds = %entry
+ ret i1 true
+
+carry: ; preds = %entry
+ ret i1 false
+}
+
+declare %0 @llvm.uadd.with.overflow.i24(i24, i24) nounwind
OpenPOWER on IntegriCloud