diff options
author | ckoenig <ckoenig@91177308-0d34-0410-b5e6-96231b3b80d8> | 2013-02-16 11:28:36 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-02-19 15:12:20 +0000 |
commit | 3491c27133db51c9053cddf224878c80dffd60a1 (patch) | |
tree | 9052e6f6a9fc7d8fe56a8d7941874a250f97e538 | |
parent | 700d96d69a46c7b746cbac6f1565b3c5cd6b2e03 (diff) |
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>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175356 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 404ec62807f28de722ee2be0bc14c55c680a6b8d)
-rw-r--r-- | lib/Target/R600/SIInstrInfo.td | 4 | ||||
-rw-r--r-- | lib/Target/R600/SIInstructions.td | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/R600/SIInstrInfo.td b/lib/Target/R600/SIInstrInfo.td index efc6015c681..8c4e5afdeb7 100644 --- a/lib/Target/R600/SIInstrInfo.td +++ b/lib/Target/R600/SIInstrInfo.td @@ -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> { diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td index 7a83303eef7..9372993dd44 100644 --- a/lib/Target/R600/SIInstructions.td +++ b/lib/Target/R600/SIInstructions.td @@ -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), |