summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/llvm-ir
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@mips.com>2018-06-05 17:53:22 +0000
committerSimon Dardis <simon.dardis@mips.com>2018-06-05 17:53:22 +0000
commit0d95ff03f278e8639b34ed62b48df0ed164659e2 (patch)
tree9e02219d0678998b85c92736cf3a921f7e284494 /llvm/test/CodeGen/Mips/llvm-ir
parenta642f8f343971430bf6d7dc354cfe9de85c418da (diff)
downloadbcm5719-llvm-0d95ff03f278e8639b34ed62b48df0ed164659e2.tar.gz
bcm5719-llvm-0d95ff03f278e8639b34ed62b48df0ed164659e2.zip
[mips] Fix the predicates for arithmetic operations
Reviewers: smaksimovic, atanasyan, abeserminji Differential Revision: https://reviews.llvm.org/D47635 llvm-svn: 334031
Diffstat (limited to 'llvm/test/CodeGen/Mips/llvm-ir')
-rw-r--r--llvm/test/CodeGen/Mips/llvm-ir/isel.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/llvm-ir/isel.ll b/llvm/test/CodeGen/Mips/llvm-ir/isel.ll
new file mode 100644
index 00000000000..cdcd3fd6876
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/llvm-ir/isel.ll
@@ -0,0 +1,16 @@
+; RUN: llc --mtriple=mips-mti-linux-gnu < %s -debug 2>&1 | FileCheck %s --check-prefixes=CHECK,MIPS
+; RUN: llc --mtriple=mips-mti-linux-gnu < %s -mattr=+micromips -debug 2>&1 | FileCheck %s --check-prefixes=CHECK,MM
+
+; REQUIRES: asserts
+
+; Test that the correct mul instruction is selected upfront.
+
+; CHECK-LABEL: Instruction selection ends:
+; MIPS: t{{[0-9]+}}: i32,i32 = MUL t{{[0-9]+}}, t{{[0-9]+}}
+; MM: t{{[0-9]+}}: i32,i32 = MUL_MM t{{[0-9]+}}, t{{[0-9]+}}
+
+define i32 @mul(i32 %a, i32 %b) {
+entry:
+ %0 = mul i32 %a, %b
+ ret i32 %0
+}
OpenPOWER on IntegriCloud