From b32c9fb8bf958aa941580ad2571290d15e8a863a Mon Sep 17 00:00:00 2001 From: Christian Konig Date: Sat, 16 Feb 2013 11:28:36 +0000 Subject: [PATCH] R600/SI: Add pattern to simplify i64 loading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a candidate for the stable branch. Signed-off-by: Christian König Reviewed-by: Tom Stellard llvm-svn: 175356 --- lib/Target/R600/SIInstrInfo.td | 4 ++++ lib/Target/R600/SIInstructions.td | 5 +++++ 2 files changed, 9 insertions(+) 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 : ImmLeaf ; + class InstSI pattern> : AMDGPUInst { 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:$imm), + (S_MOV_B64 InlineImm:$imm) +>; + // i64 immediates aren't supported in hardware, split it into two 32bit values def : Pat < (i64 imm:$imm),