diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/R600/SIInstrInfo.td | 4 | ||||
| -rw-r--r-- | llvm/lib/Target/R600/SIInstructions.td | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/R600/SIInstrInfo.td b/llvm/lib/Target/R600/SIInstrInfo.td index efc6015c681..8c4e5afdeb7 100644 --- a/llvm/lib/Target/R600/SIInstrInfo.td +++ b/llvm/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/llvm/lib/Target/R600/SIInstructions.td b/llvm/lib/Target/R600/SIInstructions.td index 7a83303eef7..9372993dd44 100644 --- a/llvm/lib/Target/R600/SIInstructions.td +++ b/llvm/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), |

