Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 1 | //===-- SystemZISelLowering.h - SystemZ DAG lowering interface --*- C++ -*-===// |
| 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 | // |
| 10 | // This file defines the interfaces that SystemZ uses to lower LLVM code into a |
| 11 | // selection DAG. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 15 | #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZISELLOWERING_H |
| 16 | #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZISELLOWERING_H |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 17 | |
| 18 | #include "SystemZ.h" |
Richard Sandiford | 0fb90ab | 2013-05-28 10:41:11 +0000 | [diff] [blame] | 19 | #include "llvm/CodeGen/MachineBasicBlock.h" |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 20 | #include "llvm/CodeGen/SelectionDAG.h" |
| 21 | #include "llvm/Target/TargetLowering.h" |
| 22 | |
| 23 | namespace llvm { |
| 24 | namespace SystemZISD { |
Matthias Braun | d04893f | 2015-05-07 21:33:59 +0000 | [diff] [blame] | 25 | enum NodeType : unsigned { |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 26 | FIRST_NUMBER = ISD::BUILTIN_OP_END, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 27 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 28 | // Return with a flag operand. Operand 0 is the chain operand. |
| 29 | RET_FLAG, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 30 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 31 | // Calls a function. Operand 0 is the chain operand and operand 1 |
| 32 | // is the target address. The arguments start at operand 2. |
| 33 | // There is an optional glue operand at the end. |
| 34 | CALL, |
| 35 | SIBCALL, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 36 | |
Ulrich Weigand | 7db6918 | 2015-02-18 09:13:27 +0000 | [diff] [blame] | 37 | // TLS calls. Like regular calls, except operand 1 is the TLS symbol. |
| 38 | // (The call target is implicitly __tls_get_offset.) |
| 39 | TLS_GDCALL, |
| 40 | TLS_LDCALL, |
| 41 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 42 | // Wraps a TargetGlobalAddress that should be loaded using PC-relative |
| 43 | // accesses (LARL). Operand 0 is the address. |
| 44 | PCREL_WRAPPER, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 45 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 46 | // Used in cases where an offset is applied to a TargetGlobalAddress. |
| 47 | // Operand 0 is the full TargetGlobalAddress and operand 1 is a |
| 48 | // PCREL_WRAPPER for an anchor point. This is used so that we can |
| 49 | // cheaply refer to either the full address or the anchor point |
| 50 | // as a register base. |
| 51 | PCREL_OFFSET, |
Richard Sandiford | 54b3691 | 2013-09-27 15:14:04 +0000 | [diff] [blame] | 52 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 53 | // Integer absolute. |
| 54 | IABS, |
Richard Sandiford | 5748547 | 2013-12-13 15:35:00 +0000 | [diff] [blame] | 55 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 56 | // Integer comparisons. There are three operands: the two values |
| 57 | // to compare, and an integer of type SystemZICMP. |
| 58 | ICMP, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 59 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 60 | // Floating-point comparisons. The two operands are the values to compare. |
| 61 | FCMP, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 62 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 63 | // Test under mask. The first operand is ANDed with the second operand |
| 64 | // and the condition codes are set on the result. The third operand is |
| 65 | // a boolean that is true if the condition codes need to distinguish |
| 66 | // between CCMASK_TM_MIXED_MSB_0 and CCMASK_TM_MIXED_MSB_1 (which the |
| 67 | // register forms do but the memory forms don't). |
| 68 | TM, |
Richard Sandiford | 35b9be2 | 2013-08-28 10:31:43 +0000 | [diff] [blame] | 69 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 70 | // Branches if a condition is true. Operand 0 is the chain operand; |
| 71 | // operand 1 is the 4-bit condition-code mask, with bit N in |
| 72 | // big-endian order meaning "branch if CC=N"; operand 2 is the |
| 73 | // target block and operand 3 is the flag operand. |
| 74 | BR_CCMASK, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 75 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 76 | // Selects between operand 0 and operand 1. Operand 2 is the |
| 77 | // mask of condition-code values for which operand 0 should be |
| 78 | // chosen over operand 1; it has the same form as BR_CCMASK. |
| 79 | // Operand 3 is the flag operand. |
| 80 | SELECT_CCMASK, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 81 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 82 | // Evaluates to the gap between the stack pointer and the |
| 83 | // base of the dynamically-allocatable area. |
| 84 | ADJDYNALLOC, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 85 | |
Ulrich Weigand | b401218 | 2015-03-31 12:56:33 +0000 | [diff] [blame] | 86 | // Count number of bits set in operand 0 per byte. |
| 87 | POPCNT, |
| 88 | |
Ulrich Weigand | 43579cf | 2017-07-05 13:17:31 +0000 | [diff] [blame^] | 89 | // Wrappers around the ISD opcodes of the same name. The output is GR128. |
| 90 | // Input operands may be GR64 or GR32, depending on the instruction. |
| 91 | UMUL_LOHI, |
| 92 | SDIVREM, |
| 93 | UDIVREM, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 94 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 95 | // Use a series of MVCs to copy bytes from one memory location to another. |
| 96 | // The operands are: |
| 97 | // - the target address |
| 98 | // - the source address |
| 99 | // - the constant length |
| 100 | // |
| 101 | // This isn't a memory opcode because we'd need to attach two |
| 102 | // MachineMemOperands rather than one. |
| 103 | MVC, |
Richard Sandiford | d131ff8 | 2013-07-08 09:35:23 +0000 | [diff] [blame] | 104 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 105 | // Like MVC, but implemented as a loop that handles X*256 bytes |
| 106 | // followed by straight-line code to handle the rest (if any). |
| 107 | // The value of X is passed as an additional operand. |
| 108 | MVC_LOOP, |
Richard Sandiford | 5e318f0 | 2013-08-27 09:54:29 +0000 | [diff] [blame] | 109 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 110 | // Similar to MVC and MVC_LOOP, but for logic operations (AND, OR, XOR). |
| 111 | NC, |
| 112 | NC_LOOP, |
| 113 | OC, |
| 114 | OC_LOOP, |
| 115 | XC, |
| 116 | XC_LOOP, |
Richard Sandiford | 178273a | 2013-09-05 10:36:45 +0000 | [diff] [blame] | 117 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 118 | // Use CLC to compare two blocks of memory, with the same comments |
| 119 | // as for MVC and MVC_LOOP. |
| 120 | CLC, |
| 121 | CLC_LOOP, |
Richard Sandiford | 761703a | 2013-08-12 10:17:33 +0000 | [diff] [blame] | 122 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 123 | // Use an MVST-based sequence to implement stpcpy(). |
| 124 | STPCPY, |
Richard Sandiford | bb83a50 | 2013-08-16 11:29:37 +0000 | [diff] [blame] | 125 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 126 | // Use a CLST-based sequence to implement strcmp(). The two input operands |
| 127 | // are the addresses of the strings to compare. |
| 128 | STRCMP, |
Richard Sandiford | ca23271 | 2013-08-16 11:21:54 +0000 | [diff] [blame] | 129 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 130 | // Use an SRST-based sequence to search a block of memory. The first |
| 131 | // operand is the end address, the second is the start, and the third |
| 132 | // is the character to search for. CC is set to 1 on success and 2 |
| 133 | // on failure. |
| 134 | SEARCH_STRING, |
Richard Sandiford | 0dec06a | 2013-08-16 11:41:43 +0000 | [diff] [blame] | 135 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 136 | // Store the CC value in bits 29 and 28 of an integer. |
| 137 | IPM, |
Richard Sandiford | 564681c | 2013-08-12 10:28:10 +0000 | [diff] [blame] | 138 | |
Ulrich Weigand | a9ac6d6 | 2016-04-04 12:45:44 +0000 | [diff] [blame] | 139 | // Compiler barrier only; generate a no-op. |
| 140 | MEMBARRIER, |
| 141 | |
Ulrich Weigand | 57c85f5 | 2015-04-01 12:51:43 +0000 | [diff] [blame] | 142 | // Transaction begin. The first operand is the chain, the second |
| 143 | // the TDB pointer, and the third the immediate control field. |
| 144 | // Returns chain and glue. |
| 145 | TBEGIN, |
| 146 | TBEGIN_NOFLOAT, |
| 147 | |
| 148 | // Transaction end. Just the chain operand. Returns chain and glue. |
| 149 | TEND, |
| 150 | |
Ulrich Weigand | ce4c109 | 2015-05-05 19:25:42 +0000 | [diff] [blame] | 151 | // Create a vector constant by filling byte N of the result with bit |
| 152 | // 15-N of the single operand. |
| 153 | BYTE_MASK, |
| 154 | |
| 155 | // Create a vector constant by replicating an element-sized RISBG-style mask. |
| 156 | // The first operand specifies the starting set bit and the second operand |
| 157 | // specifies the ending set bit. Both operands count from the MSB of the |
| 158 | // element. |
| 159 | ROTATE_MASK, |
| 160 | |
| 161 | // Replicate a GPR scalar value into all elements of a vector. |
| 162 | REPLICATE, |
| 163 | |
| 164 | // Create a vector from two i64 GPRs. |
| 165 | JOIN_DWORDS, |
| 166 | |
| 167 | // Replicate one element of a vector into all elements. The first operand |
| 168 | // is the vector and the second is the index of the element to replicate. |
| 169 | SPLAT, |
| 170 | |
| 171 | // Interleave elements from the high half of operand 0 and the high half |
| 172 | // of operand 1. |
| 173 | MERGE_HIGH, |
| 174 | |
| 175 | // Likewise for the low halves. |
| 176 | MERGE_LOW, |
| 177 | |
| 178 | // Concatenate the vectors in the first two operands, shift them left |
| 179 | // by the third operand, and take the first half of the result. |
| 180 | SHL_DOUBLE, |
| 181 | |
| 182 | // Take one element of the first v2i64 operand and the one element of |
| 183 | // the second v2i64 operand and concatenate them to form a v2i64 result. |
| 184 | // The third operand is a 4-bit value of the form 0A0B, where A and B |
| 185 | // are the element selectors for the first operand and second operands |
| 186 | // respectively. |
| 187 | PERMUTE_DWORDS, |
| 188 | |
| 189 | // Perform a general vector permute on vector operands 0 and 1. |
| 190 | // Each byte of operand 2 controls the corresponding byte of the result, |
| 191 | // in the same way as a byte-level VECTOR_SHUFFLE mask. |
| 192 | PERMUTE, |
| 193 | |
| 194 | // Pack vector operands 0 and 1 into a single vector with half-sized elements. |
| 195 | PACK, |
| 196 | |
Ulrich Weigand | c1708b2 | 2015-05-05 19:31:09 +0000 | [diff] [blame] | 197 | // Likewise, but saturate the result and set CC. PACKS_CC does signed |
| 198 | // saturation and PACKLS_CC does unsigned saturation. |
| 199 | PACKS_CC, |
| 200 | PACKLS_CC, |
| 201 | |
Ulrich Weigand | cd2a1b5 | 2015-05-05 19:29:21 +0000 | [diff] [blame] | 202 | // Unpack the first half of vector operand 0 into double-sized elements. |
| 203 | // UNPACK_HIGH sign-extends and UNPACKL_HIGH zero-extends. |
| 204 | UNPACK_HIGH, |
| 205 | UNPACKL_HIGH, |
| 206 | |
| 207 | // Likewise for the second half. |
| 208 | UNPACK_LOW, |
| 209 | UNPACKL_LOW, |
| 210 | |
Ulrich Weigand | ce4c109 | 2015-05-05 19:25:42 +0000 | [diff] [blame] | 211 | // Shift each element of vector operand 0 by the number of bits specified |
| 212 | // by scalar operand 1. |
| 213 | VSHL_BY_SCALAR, |
| 214 | VSRL_BY_SCALAR, |
| 215 | VSRA_BY_SCALAR, |
| 216 | |
| 217 | // For each element of the output type, sum across all sub-elements of |
| 218 | // operand 0 belonging to the corresponding element, and add in the |
| 219 | // rightmost sub-element of the corresponding element of operand 1. |
| 220 | VSUM, |
| 221 | |
| 222 | // Compare integer vector operands 0 and 1 to produce the usual 0/-1 |
| 223 | // vector result. VICMPE is for equality, VICMPH for "signed greater than" |
| 224 | // and VICMPHL for "unsigned greater than". |
| 225 | VICMPE, |
| 226 | VICMPH, |
| 227 | VICMPHL, |
| 228 | |
Ulrich Weigand | c1708b2 | 2015-05-05 19:31:09 +0000 | [diff] [blame] | 229 | // Likewise, but also set the condition codes on the result. |
| 230 | VICMPES, |
| 231 | VICMPHS, |
| 232 | VICMPHLS, |
| 233 | |
Ulrich Weigand | cd80823 | 2015-05-05 19:26:48 +0000 | [diff] [blame] | 234 | // Compare floating-point vector operands 0 and 1 to preoduce the usual 0/-1 |
| 235 | // vector result. VFCMPE is for "ordered and equal", VFCMPH for "ordered and |
| 236 | // greater than" and VFCMPHE for "ordered and greater than or equal to". |
| 237 | VFCMPE, |
| 238 | VFCMPH, |
| 239 | VFCMPHE, |
| 240 | |
Ulrich Weigand | c1708b2 | 2015-05-05 19:31:09 +0000 | [diff] [blame] | 241 | // Likewise, but also set the condition codes on the result. |
| 242 | VFCMPES, |
| 243 | VFCMPHS, |
| 244 | VFCMPHES, |
| 245 | |
| 246 | // Test floating-point data class for vectors. |
| 247 | VFTCI, |
| 248 | |
Ulrich Weigand | 80b3af7 | 2015-05-05 19:27:45 +0000 | [diff] [blame] | 249 | // Extend the even f32 elements of vector operand 0 to produce a vector |
| 250 | // of f64 elements. |
| 251 | VEXTEND, |
| 252 | |
| 253 | // Round the f64 elements of vector operand 0 to f32s and store them in the |
| 254 | // even elements of the result. |
| 255 | VROUND, |
| 256 | |
Ulrich Weigand | c1708b2 | 2015-05-05 19:31:09 +0000 | [diff] [blame] | 257 | // AND the two vector operands together and set CC based on the result. |
| 258 | VTM, |
| 259 | |
| 260 | // String operations that set CC as a side-effect. |
| 261 | VFAE_CC, |
| 262 | VFAEZ_CC, |
| 263 | VFEE_CC, |
| 264 | VFEEZ_CC, |
| 265 | VFENE_CC, |
| 266 | VFENEZ_CC, |
| 267 | VISTR_CC, |
| 268 | VSTRC_CC, |
| 269 | VSTRCZ_CC, |
| 270 | |
Marcin Koscielnicki | 32e8734 | 2016-07-02 02:20:40 +0000 | [diff] [blame] | 271 | // Test Data Class. |
| 272 | // |
| 273 | // Operand 0: the value to test |
| 274 | // Operand 1: the bit mask |
| 275 | TDC, |
| 276 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 277 | // Wrappers around the inner loop of an 8- or 16-bit ATOMIC_SWAP or |
| 278 | // ATOMIC_LOAD_<op>. |
| 279 | // |
| 280 | // Operand 0: the address of the containing 32-bit-aligned field |
| 281 | // Operand 1: the second operand of <op>, in the high bits of an i32 |
| 282 | // for everything except ATOMIC_SWAPW |
| 283 | // Operand 2: how many bits to rotate the i32 left to bring the first |
| 284 | // operand into the high bits |
| 285 | // Operand 3: the negative of operand 2, for rotating the other way |
| 286 | // Operand 4: the width of the field in bits (8 or 16) |
| 287 | ATOMIC_SWAPW = ISD::FIRST_TARGET_MEMORY_OPCODE, |
| 288 | ATOMIC_LOADW_ADD, |
| 289 | ATOMIC_LOADW_SUB, |
| 290 | ATOMIC_LOADW_AND, |
| 291 | ATOMIC_LOADW_OR, |
| 292 | ATOMIC_LOADW_XOR, |
| 293 | ATOMIC_LOADW_NAND, |
| 294 | ATOMIC_LOADW_MIN, |
| 295 | ATOMIC_LOADW_MAX, |
| 296 | ATOMIC_LOADW_UMIN, |
| 297 | ATOMIC_LOADW_UMAX, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 298 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 299 | // A wrapper around the inner loop of an ATOMIC_CMP_SWAP. |
| 300 | // |
| 301 | // Operand 0: the address of the containing 32-bit-aligned field |
| 302 | // Operand 1: the compare value, in the low bits of an i32 |
| 303 | // Operand 2: the swap value, in the low bits of an i32 |
| 304 | // Operand 3: how many bits to rotate the i32 left to bring the first |
| 305 | // operand into the high bits |
| 306 | // Operand 4: the negative of operand 2, for rotating the other way |
| 307 | // Operand 5: the width of the field in bits (8 or 16) |
| 308 | ATOMIC_CMP_SWAPW, |
Richard Sandiford | 0348133 | 2013-08-23 11:36:42 +0000 | [diff] [blame] | 309 | |
Bryan Chan | 28b759c | 2016-05-16 20:32:22 +0000 | [diff] [blame] | 310 | // Byte swapping load. |
| 311 | // |
| 312 | // Operand 0: the address to load from |
| 313 | // Operand 1: the type of load (i16, i32, i64) |
| 314 | LRV, |
| 315 | |
| 316 | // Byte swapping store. |
| 317 | // |
| 318 | // Operand 0: the value to store |
| 319 | // Operand 1: the address to store to |
| 320 | // Operand 2: the type of store (i16, i32, i64) |
| 321 | STRV, |
| 322 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 323 | // Prefetch from the second operand using the 4-bit control code in |
| 324 | // the first operand. The code is 1 for a load prefetch and 2 for |
| 325 | // a store prefetch. |
| 326 | PREFETCH |
| 327 | }; |
Richard Sandiford | 54b3691 | 2013-09-27 15:14:04 +0000 | [diff] [blame] | 328 | |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 329 | // Return true if OPCODE is some kind of PC-relative address. |
| 330 | inline bool isPCREL(unsigned Opcode) { |
| 331 | return Opcode == PCREL_WRAPPER || Opcode == PCREL_OFFSET; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 332 | } |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 333 | } // end namespace SystemZISD |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 334 | |
Richard Sandiford | 5bc670b | 2013-09-06 11:51:39 +0000 | [diff] [blame] | 335 | namespace SystemZICMP { |
Richard Sandiford | c231269 | 2014-03-06 10:38:30 +0000 | [diff] [blame] | 336 | // Describes whether an integer comparison needs to be signed or unsigned, |
| 337 | // or whether either type is OK. |
| 338 | enum { |
| 339 | Any, |
| 340 | UnsignedOnly, |
| 341 | SignedOnly |
| 342 | }; |
| 343 | } // end namespace SystemZICMP |
Richard Sandiford | 5bc670b | 2013-09-06 11:51:39 +0000 | [diff] [blame] | 344 | |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 345 | class SystemZSubtarget; |
| 346 | class SystemZTargetMachine; |
| 347 | |
| 348 | class SystemZTargetLowering : public TargetLowering { |
| 349 | public: |
Eric Christopher | a673417 | 2015-01-31 00:06:45 +0000 | [diff] [blame] | 350 | explicit SystemZTargetLowering(const TargetMachine &TM, |
| 351 | const SystemZSubtarget &STI); |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 352 | |
| 353 | // Override TargetLowering. |
Mehdi Amini | eaabc51 | 2015-07-09 15:12:23 +0000 | [diff] [blame] | 354 | MVT getScalarShiftAmountTy(const DataLayout &, EVT) const override { |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 355 | return MVT::i32; |
| 356 | } |
Mehdi Amini | 44ede33 | 2015-07-09 02:09:04 +0000 | [diff] [blame] | 357 | MVT getVectorIdxTy(const DataLayout &DL) const override { |
Ulrich Weigand | ce4c109 | 2015-05-05 19:25:42 +0000 | [diff] [blame] | 358 | // Only the lower 12 bits of an element index are used, so we don't |
| 359 | // want to clobber the upper 32 bits of a GPR unnecessarily. |
| 360 | return MVT::i32; |
| 361 | } |
Ulrich Weigand | cd2a1b5 | 2015-05-05 19:29:21 +0000 | [diff] [blame] | 362 | TargetLoweringBase::LegalizeTypeAction getPreferredVectorAction(EVT VT) |
| 363 | const override { |
| 364 | // Widen subvectors to the full width rather than promoting integer |
| 365 | // elements. This is better because: |
| 366 | // |
| 367 | // (a) it means that we can handle the ABI for passing and returning |
| 368 | // sub-128 vectors without having to handle them as legal types. |
| 369 | // |
| 370 | // (b) we don't have instructions to extend on load and truncate on store, |
| 371 | // so promoting the integers is less efficient. |
| 372 | // |
| 373 | // (c) there are no multiplication instructions for the widest integer |
| 374 | // type (v2i64). |
Sanjay Patel | 1ed771f | 2016-09-14 16:37:15 +0000 | [diff] [blame] | 375 | if (VT.getScalarSizeInBits() % 8 == 0) |
Ulrich Weigand | cd2a1b5 | 2015-05-05 19:29:21 +0000 | [diff] [blame] | 376 | return TypeWidenVector; |
| 377 | return TargetLoweringBase::getPreferredVectorAction(VT); |
| 378 | } |
Mehdi Amini | 44ede33 | 2015-07-09 02:09:04 +0000 | [diff] [blame] | 379 | EVT getSetCCResultType(const DataLayout &DL, LLVMContext &, |
| 380 | EVT) const override; |
Richard Sandiford | b4d67b5 | 2014-03-06 12:03:36 +0000 | [diff] [blame] | 381 | bool isFMAFasterThanFMulAndFAdd(EVT VT) const override; |
| 382 | bool isFPImmLegal(const APFloat &Imm, EVT VT) const override; |
Ulrich Weigand | 1f6666a | 2015-03-31 12:52:27 +0000 | [diff] [blame] | 383 | bool isLegalICmpImmediate(int64_t Imm) const override; |
| 384 | bool isLegalAddImmediate(int64_t Imm) const override; |
Mehdi Amini | 0cdec1e | 2015-07-09 02:09:40 +0000 | [diff] [blame] | 385 | bool isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM, Type *Ty, |
Matt Arsenault | bd7d80a | 2015-06-01 05:31:59 +0000 | [diff] [blame] | 386 | unsigned AS) const override; |
Jonas Paulsson | 7a79422 | 2016-08-17 13:24:19 +0000 | [diff] [blame] | 387 | bool isFoldableMemAccessOffset(Instruction *I, int64_t Offset) const override; |
Matt Arsenault | 6f2a526 | 2014-07-27 17:46:40 +0000 | [diff] [blame] | 388 | bool allowsMisalignedMemoryAccesses(EVT VT, unsigned AS, |
| 389 | unsigned Align, |
| 390 | bool *Fast) const override; |
Richard Sandiford | b4d67b5 | 2014-03-06 12:03:36 +0000 | [diff] [blame] | 391 | bool isTruncateFree(Type *, Type *) const override; |
| 392 | bool isTruncateFree(EVT, EVT) const override; |
| 393 | const char *getTargetNodeName(unsigned Opcode) const override; |
| 394 | std::pair<unsigned, const TargetRegisterClass *> |
Eric Christopher | 11e4df7 | 2015-02-26 22:38:43 +0000 | [diff] [blame] | 395 | getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, |
Benjamin Kramer | 9bfb627 | 2015-07-05 19:29:18 +0000 | [diff] [blame] | 396 | StringRef Constraint, MVT VT) const override; |
Richard Sandiford | b4d67b5 | 2014-03-06 12:03:36 +0000 | [diff] [blame] | 397 | TargetLowering::ConstraintType |
Benjamin Kramer | 9bfb627 | 2015-07-05 19:29:18 +0000 | [diff] [blame] | 398 | getConstraintType(StringRef Constraint) const override; |
Richard Sandiford | b4d67b5 | 2014-03-06 12:03:36 +0000 | [diff] [blame] | 399 | TargetLowering::ConstraintWeight |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 400 | getSingleConstraintMatchWeight(AsmOperandInfo &info, |
Craig Topper | 7315602 | 2014-03-02 09:09:27 +0000 | [diff] [blame] | 401 | const char *constraint) const override; |
Richard Sandiford | b4d67b5 | 2014-03-06 12:03:36 +0000 | [diff] [blame] | 402 | void LowerAsmOperandForConstraint(SDValue Op, |
| 403 | std::string &Constraint, |
| 404 | std::vector<SDValue> &Ops, |
| 405 | SelectionDAG &DAG) const override; |
Daniel Sanders | bf5b80f | 2015-03-16 13:13:41 +0000 | [diff] [blame] | 406 | |
Benjamin Kramer | 9bfb627 | 2015-07-05 19:29:18 +0000 | [diff] [blame] | 407 | unsigned getInlineAsmMemConstraint(StringRef ConstraintCode) const override { |
Daniel Sanders | 2eeace2 | 2015-03-17 16:16:14 +0000 | [diff] [blame] | 408 | if (ConstraintCode.size() == 1) { |
| 409 | switch(ConstraintCode[0]) { |
| 410 | default: |
| 411 | break; |
| 412 | case 'Q': |
| 413 | return InlineAsm::Constraint_Q; |
| 414 | case 'R': |
| 415 | return InlineAsm::Constraint_R; |
| 416 | case 'S': |
| 417 | return InlineAsm::Constraint_S; |
| 418 | case 'T': |
| 419 | return InlineAsm::Constraint_T; |
| 420 | } |
| 421 | } |
| 422 | return TargetLowering::getInlineAsmMemConstraint(ConstraintCode); |
Daniel Sanders | bf5b80f | 2015-03-16 13:13:41 +0000 | [diff] [blame] | 423 | } |
| 424 | |
Joseph Tremoulet | f748c89 | 2015-11-07 01:11:31 +0000 | [diff] [blame] | 425 | /// If a physical register, this returns the register that receives the |
| 426 | /// exception address on entry to an EH pad. |
| 427 | unsigned |
| 428 | getExceptionPointerRegister(const Constant *PersonalityFn) const override { |
| 429 | return SystemZ::R6D; |
| 430 | } |
| 431 | |
| 432 | /// If a physical register, this returns the register that receives the |
| 433 | /// exception typeid on entry to a landing pad. |
| 434 | unsigned |
| 435 | getExceptionSelectorRegister(const Constant *PersonalityFn) const override { |
| 436 | return SystemZ::R7D; |
| 437 | } |
| 438 | |
Marcin Koscielnicki | aef3b5b | 2016-04-24 13:57:49 +0000 | [diff] [blame] | 439 | /// Override to support customized stack guard loading. |
| 440 | bool useLoadStackGuardNode() const override { |
| 441 | return true; |
| 442 | } |
| 443 | void insertSSPDeclarations(Module &M) const override { |
| 444 | } |
| 445 | |
Duncan P. N. Exon Smith | e4f5e4f | 2016-06-30 22:52:52 +0000 | [diff] [blame] | 446 | MachineBasicBlock * |
| 447 | EmitInstrWithCustomInserter(MachineInstr &MI, |
| 448 | MachineBasicBlock *BB) const override; |
Richard Sandiford | b4d67b5 | 2014-03-06 12:03:36 +0000 | [diff] [blame] | 449 | SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override; |
| 450 | bool allowTruncateForTailCall(Type *, Type *) const override; |
Matt Arsenault | 3138075 | 2017-04-18 21:16:46 +0000 | [diff] [blame] | 451 | bool mayBeEmittedAsTailCall(const CallInst *CI) const override; |
Richard Sandiford | b4d67b5 | 2014-03-06 12:03:36 +0000 | [diff] [blame] | 452 | SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, |
| 453 | bool isVarArg, |
| 454 | const SmallVectorImpl<ISD::InputArg> &Ins, |
Benjamin Kramer | bdc4956 | 2016-06-12 15:39:02 +0000 | [diff] [blame] | 455 | const SDLoc &DL, SelectionDAG &DAG, |
Richard Sandiford | b4d67b5 | 2014-03-06 12:03:36 +0000 | [diff] [blame] | 456 | SmallVectorImpl<SDValue> &InVals) const override; |
| 457 | SDValue LowerCall(CallLoweringInfo &CLI, |
| 458 | SmallVectorImpl<SDValue> &InVals) const override; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 459 | |
Ulrich Weigand | a887f06 | 2015-08-13 13:37:06 +0000 | [diff] [blame] | 460 | bool CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF, |
| 461 | bool isVarArg, |
| 462 | const SmallVectorImpl<ISD::OutputArg> &Outs, |
| 463 | LLVMContext &Context) const override; |
Richard Sandiford | b4d67b5 | 2014-03-06 12:03:36 +0000 | [diff] [blame] | 464 | SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, |
| 465 | const SmallVectorImpl<ISD::OutputArg> &Outs, |
Benjamin Kramer | bdc4956 | 2016-06-12 15:39:02 +0000 | [diff] [blame] | 466 | const SmallVectorImpl<SDValue> &OutVals, const SDLoc &DL, |
| 467 | SelectionDAG &DAG) const override; |
Richard Sandiford | 95bc5f9 | 2014-03-07 11:34:35 +0000 | [diff] [blame] | 468 | SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const override; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 469 | |
Marcin Koscielnicki | bbac890 | 2016-05-10 16:49:04 +0000 | [diff] [blame] | 470 | ISD::NodeType getExtendForAtomicOps() const override { |
| 471 | return ISD::ANY_EXTEND; |
| 472 | } |
| 473 | |
Bryan Chan | 893110e | 2016-04-28 00:17:23 +0000 | [diff] [blame] | 474 | bool supportSwiftError() const override { |
| 475 | return true; |
| 476 | } |
| 477 | |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 478 | private: |
| 479 | const SystemZSubtarget &Subtarget; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 480 | |
| 481 | // Implement LowerOperation for individual opcodes. |
Richard Sandiford | f722a8e30 | 2013-10-16 11:10:55 +0000 | [diff] [blame] | 482 | SDValue lowerSETCC(SDValue Op, SelectionDAG &DAG) const; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 483 | SDValue lowerBR_CC(SDValue Op, SelectionDAG &DAG) const; |
| 484 | SDValue lowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const; |
| 485 | SDValue lowerGlobalAddress(GlobalAddressSDNode *Node, |
| 486 | SelectionDAG &DAG) const; |
Ulrich Weigand | 7db6918 | 2015-02-18 09:13:27 +0000 | [diff] [blame] | 487 | SDValue lowerTLSGetOffset(GlobalAddressSDNode *Node, |
| 488 | SelectionDAG &DAG, unsigned Opcode, |
| 489 | SDValue GOTOffset) const; |
Marcin Koscielnicki | f12609c | 2016-04-20 01:03:48 +0000 | [diff] [blame] | 490 | SDValue lowerThreadPointer(const SDLoc &DL, SelectionDAG &DAG) const; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 491 | SDValue lowerGlobalTLSAddress(GlobalAddressSDNode *Node, |
| 492 | SelectionDAG &DAG) const; |
| 493 | SDValue lowerBlockAddress(BlockAddressSDNode *Node, |
| 494 | SelectionDAG &DAG) const; |
| 495 | SDValue lowerJumpTable(JumpTableSDNode *JT, SelectionDAG &DAG) const; |
| 496 | SDValue lowerConstantPool(ConstantPoolSDNode *CP, SelectionDAG &DAG) const; |
Ulrich Weigand | f557d08 | 2016-04-04 12:44:55 +0000 | [diff] [blame] | 497 | SDValue lowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const; |
| 498 | SDValue lowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 499 | SDValue lowerVASTART(SDValue Op, SelectionDAG &DAG) const; |
| 500 | SDValue lowerVACOPY(SDValue Op, SelectionDAG &DAG) const; |
| 501 | SDValue lowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG) const; |
Marcin Koscielnicki | 9de88d9 | 2016-05-04 23:31:26 +0000 | [diff] [blame] | 502 | SDValue lowerGET_DYNAMIC_AREA_OFFSET(SDValue Op, SelectionDAG &DAG) const; |
Richard Sandiford | 7d86e47 | 2013-08-21 09:34:56 +0000 | [diff] [blame] | 503 | SDValue lowerSMUL_LOHI(SDValue Op, SelectionDAG &DAG) const; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 504 | SDValue lowerUMUL_LOHI(SDValue Op, SelectionDAG &DAG) const; |
| 505 | SDValue lowerSDIVREM(SDValue Op, SelectionDAG &DAG) const; |
| 506 | SDValue lowerUDIVREM(SDValue Op, SelectionDAG &DAG) const; |
| 507 | SDValue lowerBITCAST(SDValue Op, SelectionDAG &DAG) const; |
| 508 | SDValue lowerOR(SDValue Op, SelectionDAG &DAG) const; |
Ulrich Weigand | b401218 | 2015-03-31 12:56:33 +0000 | [diff] [blame] | 509 | SDValue lowerCTPOP(SDValue Op, SelectionDAG &DAG) const; |
Ulrich Weigand | a9ac6d6 | 2016-04-04 12:45:44 +0000 | [diff] [blame] | 510 | SDValue lowerATOMIC_FENCE(SDValue Op, SelectionDAG &DAG) const; |
Richard Sandiford | bef3d7a | 2013-12-10 10:49:34 +0000 | [diff] [blame] | 511 | SDValue lowerATOMIC_LOAD(SDValue Op, SelectionDAG &DAG) const; |
| 512 | SDValue lowerATOMIC_STORE(SDValue Op, SelectionDAG &DAG) const; |
| 513 | SDValue lowerATOMIC_LOAD_OP(SDValue Op, SelectionDAG &DAG, |
| 514 | unsigned Opcode) const; |
Richard Sandiford | 41350a5 | 2013-12-24 15:18:04 +0000 | [diff] [blame] | 515 | SDValue lowerATOMIC_LOAD_SUB(SDValue Op, SelectionDAG &DAG) const; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 516 | SDValue lowerATOMIC_CMP_SWAP(SDValue Op, SelectionDAG &DAG) const; |
| 517 | SDValue lowerSTACKSAVE(SDValue Op, SelectionDAG &DAG) const; |
| 518 | SDValue lowerSTACKRESTORE(SDValue Op, SelectionDAG &DAG) const; |
Richard Sandiford | 0348133 | 2013-08-23 11:36:42 +0000 | [diff] [blame] | 519 | SDValue lowerPREFETCH(SDValue Op, SelectionDAG &DAG) const; |
Ulrich Weigand | 57c85f5 | 2015-04-01 12:51:43 +0000 | [diff] [blame] | 520 | SDValue lowerINTRINSIC_W_CHAIN(SDValue Op, SelectionDAG &DAG) const; |
Ulrich Weigand | c1708b2 | 2015-05-05 19:31:09 +0000 | [diff] [blame] | 521 | SDValue lowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const; |
Ulrich Weigand | ce4c109 | 2015-05-05 19:25:42 +0000 | [diff] [blame] | 522 | SDValue lowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const; |
| 523 | SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const; |
| 524 | SDValue lowerSCALAR_TO_VECTOR(SDValue Op, SelectionDAG &DAG) const; |
Ulrich Weigand | cd80823 | 2015-05-05 19:26:48 +0000 | [diff] [blame] | 525 | SDValue lowerINSERT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const; |
| 526 | SDValue lowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const; |
Ulrich Weigand | cd2a1b5 | 2015-05-05 19:29:21 +0000 | [diff] [blame] | 527 | SDValue lowerExtendVectorInreg(SDValue Op, SelectionDAG &DAG, |
NAKAMURA Takumi | 0a7d0ad | 2015-09-22 11:15:07 +0000 | [diff] [blame] | 528 | unsigned UnpackHigh) const; |
Ulrich Weigand | ce4c109 | 2015-05-05 19:25:42 +0000 | [diff] [blame] | 529 | SDValue lowerShift(SDValue Op, SelectionDAG &DAG, unsigned ByScalar) const; |
| 530 | |
Jonas Paulsson | cad72ef | 2017-04-07 12:35:11 +0000 | [diff] [blame] | 531 | bool canTreatAsByteVector(EVT VT) const; |
Benjamin Kramer | bdc4956 | 2016-06-12 15:39:02 +0000 | [diff] [blame] | 532 | SDValue combineExtract(const SDLoc &DL, EVT ElemVT, EVT VecVT, SDValue OrigOp, |
Ulrich Weigand | ce4c109 | 2015-05-05 19:25:42 +0000 | [diff] [blame] | 533 | unsigned Index, DAGCombinerInfo &DCI, |
| 534 | bool Force) const; |
Benjamin Kramer | bdc4956 | 2016-06-12 15:39:02 +0000 | [diff] [blame] | 535 | SDValue combineTruncateExtract(const SDLoc &DL, EVT TruncVT, SDValue Op, |
Ulrich Weigand | ce4c109 | 2015-05-05 19:25:42 +0000 | [diff] [blame] | 536 | DAGCombinerInfo &DCI) const; |
Marcin Koscielnicki | 68747ac | 2016-06-30 00:08:54 +0000 | [diff] [blame] | 537 | SDValue combineSIGN_EXTEND(SDNode *N, DAGCombinerInfo &DCI) const; |
| 538 | SDValue combineMERGE(SDNode *N, DAGCombinerInfo &DCI) const; |
| 539 | SDValue combineSTORE(SDNode *N, DAGCombinerInfo &DCI) const; |
| 540 | SDValue combineEXTRACT_VECTOR_ELT(SDNode *N, DAGCombinerInfo &DCI) const; |
| 541 | SDValue combineJOIN_DWORDS(SDNode *N, DAGCombinerInfo &DCI) const; |
| 542 | SDValue combineFP_ROUND(SDNode *N, DAGCombinerInfo &DCI) const; |
| 543 | SDValue combineBSWAP(SDNode *N, DAGCombinerInfo &DCI) const; |
Elliot Colp | bc2cfc2 | 2016-07-06 18:13:11 +0000 | [diff] [blame] | 544 | SDValue combineSHIFTROT(SDNode *N, DAGCombinerInfo &DCI) const; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 545 | |
Richard Sandiford | 0fb90ab | 2013-05-28 10:41:11 +0000 | [diff] [blame] | 546 | // If the last instruction before MBBI in MBB was some form of COMPARE, |
| 547 | // try to replace it with a COMPARE AND BRANCH just before MBBI. |
| 548 | // CCMask and Target are the BRC-like operands for the branch. |
| 549 | // Return true if the change was made. |
| 550 | bool convertPrevCompareToBranch(MachineBasicBlock *MBB, |
| 551 | MachineBasicBlock::iterator MBBI, |
| 552 | unsigned CCMask, |
| 553 | MachineBasicBlock *Target) const; |
| 554 | |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 555 | // Implement EmitInstrWithCustomInserter for individual operation types. |
Ulrich Weigand | 524f276 | 2016-11-28 13:34:08 +0000 | [diff] [blame] | 556 | MachineBasicBlock *emitSelect(MachineInstr &MI, MachineBasicBlock *BB, |
| 557 | unsigned LOCROpcode) const; |
Duncan P. N. Exon Smith | e4f5e4f | 2016-06-30 22:52:52 +0000 | [diff] [blame] | 558 | MachineBasicBlock *emitCondStore(MachineInstr &MI, MachineBasicBlock *BB, |
Richard Sandiford | a68e6f5 | 2013-07-25 08:57:02 +0000 | [diff] [blame] | 559 | unsigned StoreOpcode, unsigned STOCOpcode, |
| 560 | bool Invert) const; |
Duncan P. N. Exon Smith | e4f5e4f | 2016-06-30 22:52:52 +0000 | [diff] [blame] | 561 | MachineBasicBlock *emitExt128(MachineInstr &MI, MachineBasicBlock *MBB, |
Ulrich Weigand | 43579cf | 2017-07-05 13:17:31 +0000 | [diff] [blame^] | 562 | bool ClearEven) const; |
Duncan P. N. Exon Smith | e4f5e4f | 2016-06-30 22:52:52 +0000 | [diff] [blame] | 563 | MachineBasicBlock *emitAtomicLoadBinary(MachineInstr &MI, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 564 | MachineBasicBlock *BB, |
| 565 | unsigned BinOpcode, unsigned BitSize, |
| 566 | bool Invert = false) const; |
Duncan P. N. Exon Smith | e4f5e4f | 2016-06-30 22:52:52 +0000 | [diff] [blame] | 567 | MachineBasicBlock *emitAtomicLoadMinMax(MachineInstr &MI, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 568 | MachineBasicBlock *MBB, |
| 569 | unsigned CompareOpcode, |
| 570 | unsigned KeepOldMask, |
| 571 | unsigned BitSize) const; |
Duncan P. N. Exon Smith | e4f5e4f | 2016-06-30 22:52:52 +0000 | [diff] [blame] | 572 | MachineBasicBlock *emitAtomicCmpSwapW(MachineInstr &MI, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 573 | MachineBasicBlock *BB) const; |
Duncan P. N. Exon Smith | e4f5e4f | 2016-06-30 22:52:52 +0000 | [diff] [blame] | 574 | MachineBasicBlock *emitMemMemWrapper(MachineInstr &MI, MachineBasicBlock *BB, |
Richard Sandiford | 564681c | 2013-08-12 10:28:10 +0000 | [diff] [blame] | 575 | unsigned Opcode) const; |
Duncan P. N. Exon Smith | e4f5e4f | 2016-06-30 22:52:52 +0000 | [diff] [blame] | 576 | MachineBasicBlock *emitStringWrapper(MachineInstr &MI, MachineBasicBlock *BB, |
Richard Sandiford | ca23271 | 2013-08-16 11:21:54 +0000 | [diff] [blame] | 577 | unsigned Opcode) const; |
Duncan P. N. Exon Smith | e4f5e4f | 2016-06-30 22:52:52 +0000 | [diff] [blame] | 578 | MachineBasicBlock *emitTransactionBegin(MachineInstr &MI, |
Ulrich Weigand | 57c85f5 | 2015-04-01 12:51:43 +0000 | [diff] [blame] | 579 | MachineBasicBlock *MBB, |
Duncan P. N. Exon Smith | e4f5e4f | 2016-06-30 22:52:52 +0000 | [diff] [blame] | 580 | unsigned Opcode, bool NoFloat) const; |
| 581 | MachineBasicBlock *emitLoadAndTestCmp0(MachineInstr &MI, |
NAKAMURA Takumi | 50df0c2 | 2015-11-02 01:38:12 +0000 | [diff] [blame] | 582 | MachineBasicBlock *MBB, |
| 583 | unsigned Opcode) const; |
Jonas Paulsson | 11d251c | 2017-05-10 13:03:25 +0000 | [diff] [blame] | 584 | |
| 585 | const TargetRegisterClass *getRepRegClassFor(MVT VT) const override; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 586 | }; |
| 587 | } // end namespace llvm |
| 588 | |
Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 589 | #endif |