source: icGREP/icgrep-devel/llvm-3.5.0.src/lib/Target/R600/VIInstructions.td @ 4574

Last change on this file since 4574 was 4574, checked in by cameron, 4 years ago

Updating to LLVM 3.6

File size: 2.0 KB
Line 
1//===-- VIInstructions.td - VI Instruction Defintions ---------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9// Instruction definitions for VI and newer.
10//===----------------------------------------------------------------------===//
11
12let SubtargetPredicate = isVI in {
13
14defm BUFFER_LOAD_DWORD_VI : MUBUF_Load_Helper_vi <
15  0x14, "buffer_load_dword", VGPR_32, i32, global_load
16>;
17
18defm BUFFER_LOAD_FORMAT_XYZW_VI : MUBUF_Load_Helper_vi <
19  0x03, "buffer_load_format_xyzw", VReg_128
20>;
21
22} // End SubtargetPredicate = isVI
23
24
25//===----------------------------------------------------------------------===//
26// SMEM Patterns
27//===----------------------------------------------------------------------===//
28
29let Predicates = [isVI] in {
30
31// 1. Offset as 8bit DWORD immediate
32def : Pat <
33  (SIload_constant v4i32:$sbase, IMM20bit:$offset),
34  (S_BUFFER_LOAD_DWORD_IMM $sbase, (as_i32imm $offset))
35>;
36
37//===----------------------------------------------------------------------===//
38// MUBUF Patterns
39//===----------------------------------------------------------------------===//
40
41// Offset in an 32Bit VGPR
42def : Pat <
43  (SIload_constant v4i32:$sbase, i32:$voff),
44  (BUFFER_LOAD_DWORD_VI_OFFEN $sbase, $voff, 0, 0, 0, 0, 0)
45>;
46
47// Offset in an 32Bit VGPR
48def : Pat <
49  (SIload_constant v4i32:$sbase, i32:$voff),
50  (BUFFER_LOAD_DWORD_VI_OFFEN $sbase, $voff, 0, 0, 0, 0, 0)
51>;
52
53/* int_SI_vs_load_input */
54def : Pat<
55  (SIload_input v4i32:$tlst, imm:$attr_offset, i32:$buf_idx_vgpr),
56  (BUFFER_LOAD_FORMAT_XYZW_VI_IDXEN $tlst, $buf_idx_vgpr, imm:$attr_offset, 0, 0, 0, 0)
57>;
58
59defm : MUBUF_Load_Dword <i32, BUFFER_LOAD_DWORD_VI_OFFSET,
60                         BUFFER_LOAD_DWORD_VI_OFFEN,
61                         BUFFER_LOAD_DWORD_VI_IDXEN,
62                         BUFFER_LOAD_DWORD_VI_BOTHEN>;
63
64} // End Predicates = [isVI]
Note: See TracBrowser for help on using the repository browser.