summaryrefslogtreecommitdiff
path: root/lib/Target/R600/SIInstructions.td
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-08-14 23:24:24 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-08-14 23:24:24 +0000
commit636298ba64fd07d4ddcae6005e7fc1db43eb5335 (patch)
treea65b1daaa89c1589cf37ebe806c871b8e5b3b705 /lib/Target/R600/SIInstructions.td
parentdf4626ef15ba0eb5f571a3ee6314e5c388258927 (diff)
downloadllvm-636298ba64fd07d4ddcae6005e7fc1db43eb5335.tar.gz
llvm-636298ba64fd07d4ddcae6005e7fc1db43eb5335.tar.bz2
llvm-636298ba64fd07d4ddcae6005e7fc1db43eb5335.tar.xz
R600/SI: Choose the correct MOV instruction for copying immediates
The instruction selector will now try to infer the destination register so it can decided whether to use V_MOV_B32 or S_MOV_B32 when copying immediates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188426 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600/SIInstructions.td')
-rw-r--r--lib/Target/R600/SIInstructions.td10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
index 5fbd68f3e7..b20d7c0533 100644
--- a/lib/Target/R600/SIInstructions.td
+++ b/lib/Target/R600/SIInstructions.td
@@ -1583,6 +1583,16 @@ def : Pat <
/********** ================== **********/
def : Pat <
+ (SGPRImm<(i32 imm)>:$imm),
+ (S_MOV_B32 imm:$imm)
+>;
+
+def : Pat <
+ (SGPRImm<(f32 fpimm)>:$imm),
+ (S_MOV_B32 fpimm:$imm)
+>;
+
+def : Pat <
(i32 imm:$imm),
(V_MOV_B32_e32 imm:$imm)
>;