forked from OSchip/llvm-project
Some dummy cost model for s390x:
- Prefer short-imm instructions over ext-imm, when possible - Prefer Z10 instructions over Z9, when possible This hopefully should fix some dejagnu test fails on solaris llvm-svn: 79741
This commit is contained in:
parent
d1859474a7
commit
f0d31ab7b8
|
@ -94,19 +94,25 @@ class RREI<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
||||||
: I16<op, RREForm, outs, ins, asmstr, pattern>;
|
: I16<op, RREForm, outs, ins, asmstr, pattern>;
|
||||||
|
|
||||||
class RXI<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
class RXI<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
||||||
: I8<op, RXForm, outs, ins, asmstr, pattern>;
|
: I8<op, RXForm, outs, ins, asmstr, pattern> {
|
||||||
|
let AddedComplexity = 1;
|
||||||
|
}
|
||||||
|
|
||||||
class RXYI<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
class RXYI<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
||||||
: I16<op, RXYForm, outs, ins, asmstr, pattern>;
|
: I16<op, RXYForm, outs, ins, asmstr, pattern>;
|
||||||
|
|
||||||
class RSI<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
class RSI<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
||||||
: I8<op, RSForm, outs, ins, asmstr, pattern>;
|
: I8<op, RSForm, outs, ins, asmstr, pattern> {
|
||||||
|
let AddedComplexity = 1;
|
||||||
|
}
|
||||||
|
|
||||||
class RSYI<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
class RSYI<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
||||||
: I16<op, RSYForm, outs, ins, asmstr, pattern>;
|
: I16<op, RSYForm, outs, ins, asmstr, pattern>;
|
||||||
|
|
||||||
class SII<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
class SII<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
||||||
: I8<op, SIForm, outs, ins, asmstr, pattern>;
|
: I8<op, SIForm, outs, ins, asmstr, pattern> {
|
||||||
|
let AddedComplexity = 1;
|
||||||
|
}
|
||||||
|
|
||||||
class SIYI<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
class SIYI<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
|
||||||
: I16<op, SIYForm, outs, ins, asmstr, pattern>;
|
: I16<op, SIYForm, outs, ins, asmstr, pattern>;
|
||||||
|
|
|
@ -324,6 +324,7 @@ def MOV8miy : SIYI<0x52EB,
|
||||||
"mviy\t{$dst, $src}",
|
"mviy\t{$dst, $src}",
|
||||||
[(truncstorei8 (i32 i32immSExt8:$src), riaddr:$dst)]>;
|
[(truncstorei8 (i32 i32immSExt8:$src), riaddr:$dst)]>;
|
||||||
|
|
||||||
|
let AddedComplexity = 2 in {
|
||||||
def MOV16mi : SILI<0xE544,
|
def MOV16mi : SILI<0xE544,
|
||||||
(outs), (ins riaddr12:$dst, s16imm:$src),
|
(outs), (ins riaddr12:$dst, s16imm:$src),
|
||||||
"mvhhi\t{$dst, $src}",
|
"mvhhi\t{$dst, $src}",
|
||||||
|
@ -339,6 +340,7 @@ def MOV64mi16 : SILI<0xE548,
|
||||||
"mvghi\t{$dst, $src}",
|
"mvghi\t{$dst, $src}",
|
||||||
[(store (i64 immSExt16:$src), riaddr12:$dst)]>,
|
[(store (i64 immSExt16:$src), riaddr12:$dst)]>,
|
||||||
Requires<[IsZ10]>;
|
Requires<[IsZ10]>;
|
||||||
|
}
|
||||||
|
|
||||||
// sexts
|
// sexts
|
||||||
def MOVSX32rr8 : RREI<0xB926,
|
def MOVSX32rr8 : RREI<0xB926,
|
||||||
|
@ -856,6 +858,7 @@ def MUL64ri16 : RII<0xA7D,
|
||||||
"mghi\t{$dst, $src2}",
|
"mghi\t{$dst, $src2}",
|
||||||
[(set GR64:$dst, (mul GR64:$src1, immSExt16:$src2))]>;
|
[(set GR64:$dst, (mul GR64:$src1, immSExt16:$src2))]>;
|
||||||
|
|
||||||
|
let AddedComplexity = 2 in {
|
||||||
def MUL32ri : RILI<0xC21,
|
def MUL32ri : RILI<0xC21,
|
||||||
(outs GR32:$dst), (ins GR32:$src1, s32imm:$src2),
|
(outs GR32:$dst), (ins GR32:$src1, s32imm:$src2),
|
||||||
"msfi\t{$dst, $src2}",
|
"msfi\t{$dst, $src2}",
|
||||||
|
@ -866,6 +869,7 @@ def MUL64ri32 : RILI<0xC20,
|
||||||
"msgfi\t{$dst, $src2}",
|
"msgfi\t{$dst, $src2}",
|
||||||
[(set GR64:$dst, (mul GR64:$src1, i64immSExt32:$src2))]>,
|
[(set GR64:$dst, (mul GR64:$src1, i64immSExt32:$src2))]>,
|
||||||
Requires<[IsZ10]>;
|
Requires<[IsZ10]>;
|
||||||
|
}
|
||||||
|
|
||||||
def MUL32rm : RXI<0x71,
|
def MUL32rm : RXI<0x71,
|
||||||
(outs GR32:$dst), (ins GR32:$src1, rriaddr12:$src2),
|
(outs GR32:$dst), (ins GR32:$src1, rriaddr12:$src2),
|
||||||
|
|
Loading…
Reference in New Issue