summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e91f926)
raw | patch | inline | side by side (parent: e91f926)
author | Richard Osborne <richard@xmos.com> | |
Wed, 13 Jun 2012 17:59:12 +0000 (17:59 +0000) | ||
committer | Richard Osborne <richard@xmos.com> | |
Wed, 13 Jun 2012 17:59:12 +0000 (17:59 +0000) |
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158409 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/XCore/XCoreInstrInfo.td | patch | blob | history | |
test/CodeGen/XCore/mkmsk.ll | [new file with mode: 0644] | patch | blob |
index b25a08d25c1a9fd52189c38a9706b097bdd57df6..b2f060377688e8f271b9e888084d52b25dc8214a 100644 (file)
def MKMSK_2r : _FRUS<(outs GRRegs:$dst), (ins GRRegs:$size),
"mkmsk $dst, $size",
- [(set GRRegs:$dst, (add (shl 1, GRRegs:$size), 0xffffffff))]>;
+ [(set GRRegs:$dst, (add (shl 1, GRRegs:$size), -1))]>;
def GETR_rus : _FRUS<(outs GRRegs:$dst), (ins i32imm:$type),
"getr $dst, $type",
diff --git a/test/CodeGen/XCore/mkmsk.ll b/test/CodeGen/XCore/mkmsk.ll
--- /dev/null
@@ -0,0 +1,11 @@
+; RUN: llc < %s -march=xcore | FileCheck %s
+
+define i32 @f(i32) nounwind {
+; CHECK: f:
+; CHECK: mkmsk r0, r0
+; CHECK-NEXT: retsp 0
+entry:
+ %1 = shl i32 1, %0
+ %2 = add i32 %1, -1
+ ret i32 %2
+}