summaryrefslogtreecommitdiff
path: root/test/CodeGen/Mips/micromips-zero-mat-uses.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Mips/micromips-zero-mat-uses.ll')
-rw-r--r--test/CodeGen/Mips/micromips-zero-mat-uses.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/micromips-zero-mat-uses.ll b/test/CodeGen/Mips/micromips-zero-mat-uses.ll
new file mode 100644
index 0000000000000..b38747a2d2c2e
--- /dev/null
+++ b/test/CodeGen/Mips/micromips-zero-mat-uses.ll
@@ -0,0 +1,8 @@
+; RUN: llc -march=mips -mcpu=mips32r2 -mattr=+micromips,+nooddspreg -O0 < %s | FileCheck %s
+
+; CHECK: addiu $[[R0:[0-9]+]], $zero, 0
+; CHECK: subu16 $2, $[[R0]], ${{[0-9]+}}
+define i32 @foo() {
+ %1 = sub i32 0, undef
+ ret i32 %1
+}