R600/SI: Add pattern to simplify i64 loading

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175356
This commit is contained in:
Christian Konig 2013-02-16 11:28:36 +00:00
parent a881179ffe
commit b559b079b4
2 changed files with 9 additions and 0 deletions

View File

@ -40,6 +40,10 @@ def IMM12bit : ImmLeaf <
[{return isUInt<12>(Imm);}]
>;
class InlineImm <ValueType vt> : ImmLeaf <vt, [{
return -16 <= Imm && Imm <= 64;
}]>;
class InstSI <dag outs, dag ins, string asm, list<dag> pattern> :
AMDGPUInst<outs, ins, asm, pattern> {

View File

@ -1292,6 +1292,11 @@ def : Pat <
(S_MOV_B32 fpimm:$imm)
>;
def : Pat <
(i64 InlineImm<i64>:$imm),
(S_MOV_B64 InlineImm<i64>:$imm)
>;
// i64 immediates aren't supported in hardware, split it into two 32bit values
def : Pat <
(i64 imm:$imm),