summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/micromips-addu16.ll
diff options
context:
space:
mode:
authorJozef Kolek <jozef.kolek@imgtec.com>2015-02-18 17:33:56 +0000
committerJozef Kolek <jozef.kolek@imgtec.com>2015-02-18 17:33:56 +0000
commit3c6724f442999faa5b6c9d51182158da49fca1d5 (patch)
tree3851c94f1ad8e369ea67814b7c4b2f7517e0ed99 /llvm/test/CodeGen/Mips/micromips-addu16.ll
parentb5d34aa41941c996e2ab7d679d0c79e1485ccf60 (diff)
downloadbcm5719-llvm-3c6724f442999faa5b6c9d51182158da49fca1d5.tar.gz
bcm5719-llvm-3c6724f442999faa5b6c9d51182158da49fca1d5.zip
[mips][microMIPS] Make usage of ADDU16 and SUBU16 by code generator
Differential Revision: http://reviews.llvm.org/D7609 llvm-svn: 229706
Diffstat (limited to 'llvm/test/CodeGen/Mips/micromips-addu16.ll')
-rw-r--r--llvm/test/CodeGen/Mips/micromips-addu16.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/micromips-addu16.ll b/llvm/test/CodeGen/Mips/micromips-addu16.ll
new file mode 100644
index 00000000000..adebaf03bcf
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/micromips-addu16.ll
@@ -0,0 +1,18 @@
+; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=+micromips \
+; RUN: -relocation-model=pic -O3 < %s | FileCheck %s
+
+define i32 @main() {
+entry:
+ %retval = alloca i32, align 4
+ %a = alloca i32, align 4
+ %b = alloca i32, align 4
+ %c = alloca i32, align 4
+ store i32 0, i32* %retval
+ %0 = load i32* %b, align 4
+ %1 = load i32* %c, align 4
+ %add = add nsw i32 %0, %1
+ store i32 %add, i32* %a, align 4
+ ret i32 0
+}
+
+; CHECK: addu16
OpenPOWER on IntegriCloud