mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-24 20:30:06 +00:00
Fix pattern for MKMSK instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158409 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e91f926f3b
commit
aa08c8b2ba
@ -796,7 +796,7 @@ def MKMSK_rus : _FRUS<(outs GRRegs:$dst), (ins i32imm:$size),
|
||||
|
||||
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",
|
||||
|
11
test/CodeGen/XCore/mkmsk.ll
Normal file
11
test/CodeGen/XCore/mkmsk.ll
Normal file
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user