summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/SIInstructions.td
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-08-14 22:22:14 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-08-14 22:22:14 +0000
commit3494b7ee426bef722baf0b28d19ca82e951b05f7 (patch)
treebbcd1c2163c4560e56222deab04ad08e47967b93 /llvm/lib/Target/R600/SIInstructions.td
parent20ee94f152f9e6c21982d58ec1f22ef92f5e3a51 (diff)
downloadbcm5719-llvm-3494b7ee426bef722baf0b28d19ca82e951b05f7.tar.gz
bcm5719-llvm-3494b7ee426bef722baf0b28d19ca82e951b05f7.zip
R600/SI: Handle MSAA texture targets
Patch by: Marek Olšák Signed-off-by: Marek Olšák <marek.olsak@amd.com> llvm-svn: 188421
Diffstat (limited to 'llvm/lib/Target/R600/SIInstructions.td')
-rw-r--r--llvm/lib/Target/R600/SIInstructions.td19
1 files changed, 18 insertions, 1 deletions
diff --git a/llvm/lib/Target/R600/SIInstructions.td b/llvm/lib/Target/R600/SIInstructions.td
index 82c4b5e9d3d..909c9762369 100644
--- a/llvm/lib/Target/R600/SIInstructions.td
+++ b/llvm/lib/Target/R600/SIInstructions.td
@@ -500,7 +500,7 @@ defm S_BUFFER_LOAD_DWORDX16 : SMRD_Helper <
//def S_MEMTIME : SMRD_ <0x0000001e, "S_MEMTIME", []>;
//def S_DCACHE_INV : SMRD_ <0x0000001f, "S_DCACHE_INV", []>;
-//def IMAGE_LOAD : MIMG_NoPattern_ <"IMAGE_LOAD", 0x00000000>;
+def IMAGE_LOAD : MIMG_NoSampler_Helper <0x00000000, "IMAGE_LOAD">;
def IMAGE_LOAD_MIP : MIMG_NoSampler_Helper <0x00000001, "IMAGE_LOAD_MIP">;
//def IMAGE_LOAD_PCK : MIMG_NoPattern_ <"IMAGE_LOAD_PCK", 0x00000002>;
//def IMAGE_LOAD_PCK_SGN : MIMG_NoPattern_ <"IMAGE_LOAD_PCK_SGN", 0x00000003>;
@@ -1397,9 +1397,21 @@ class ImageLoadArrayPattern<Intrinsic name, MIMG opcode, ValueType addr_type> :
(opcode 0xf, 0, 0, 1, 0, 0, 0, 0, $addr, $rsrc)
>;
+class ImageLoadMSAAPattern<Intrinsic name, MIMG opcode, ValueType addr_type> : Pat <
+ (name addr_type:$addr, v32i8:$rsrc, TEX_MSAA),
+ (opcode 0xf, 0, 0, 0, 0, 0, 0, 0, $addr, $rsrc)
+>;
+
+class ImageLoadArrayMSAAPattern<Intrinsic name, MIMG opcode, ValueType addr_type> : Pat <
+ (name addr_type:$addr, v32i8:$rsrc, TEX_ARRAY_MSAA),
+ (opcode 0xf, 0, 0, 1, 0, 0, 0, 0, $addr, $rsrc)
+>;
+
multiclass ImageLoadPatterns<ValueType addr_type> {
def : ImageLoadPattern <int_SI_imageload, IMAGE_LOAD_MIP, addr_type>;
def : ImageLoadArrayPattern <int_SI_imageload, IMAGE_LOAD_MIP, addr_type>;
+ def : ImageLoadMSAAPattern <int_SI_imageload, IMAGE_LOAD, addr_type>;
+ def : ImageLoadArrayMSAAPattern <int_SI_imageload, IMAGE_LOAD, addr_type>;
}
defm : ImageLoadPatterns<v2i32>;
@@ -1416,6 +1428,11 @@ def : Pat <
(IMAGE_GET_RESINFO 0xf, 0, 0, 1, 0, 0, 0, 0, (V_MOV_B32_e32 $mipid), $rsrc)
>;
+def : Pat <
+ (int_SI_resinfo i32:$mipid, v32i8:$rsrc, TEX_ARRAY_MSAA),
+ (IMAGE_GET_RESINFO 0xf, 0, 0, 1, 0, 0, 0, 0, (V_MOV_B32_e32 $mipid), $rsrc)
+>;
+
/********** ============================================ **********/
/********** Extraction, Insertion, Building and Casting **********/
/********** ============================================ **********/
OpenPOWER on IntegriCloud