diff --git a/llvm/lib/Target/R600/SIInstrInfo.td b/llvm/lib/Target/R600/SIInstrInfo.td index efc6015c6814..8c4e5afdeb76 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 : ImmLeaf ; + class InstSI pattern> : AMDGPUInst { diff --git a/llvm/lib/Target/R600/SIInstructions.td b/llvm/lib/Target/R600/SIInstructions.td index 7a83303eef7a..9372993dd440 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:$imm), + (S_MOV_B64 InlineImm:$imm) +>; + // i64 immediates aren't supported in hardware, split it into two 32bit values def : Pat < (i64 imm:$imm),