Tim Northover | 69fa84a | 2016-10-14 22:18:18 +0000 | [diff] [blame] | 1 | //===- AArch64LegalizerInfo.cpp ----------------------------------*- C++ -*-==// |
Tim Northover | 33b07d6 | 2016-07-22 20:03:43 +0000 | [diff] [blame] | 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 | /// \file |
| 10 | /// This file implements the targeting of the Machinelegalizer class for |
| 11 | /// AArch64. |
| 12 | /// \todo This should be generated by TableGen. |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Tim Northover | 69fa84a | 2016-10-14 22:18:18 +0000 | [diff] [blame] | 15 | #include "AArch64LegalizerInfo.h" |
Tim Northover | 33b07d6 | 2016-07-22 20:03:43 +0000 | [diff] [blame] | 16 | #include "llvm/CodeGen/ValueTypes.h" |
| 17 | #include "llvm/IR/Type.h" |
| 18 | #include "llvm/IR/DerivedTypes.h" |
| 19 | #include "llvm/Target/TargetOpcodes.h" |
| 20 | |
| 21 | using namespace llvm; |
| 22 | |
| 23 | #ifndef LLVM_BUILD_GLOBAL_ISEL |
| 24 | #error "You shouldn't build this" |
| 25 | #endif |
| 26 | |
Tim Northover | 69fa84a | 2016-10-14 22:18:18 +0000 | [diff] [blame] | 27 | AArch64LegalizerInfo::AArch64LegalizerInfo() { |
Ahmed Bougacha | ad30db3 | 2016-08-02 15:10:28 +0000 | [diff] [blame] | 28 | using namespace TargetOpcode; |
Tim Northover | 5ae8350 | 2016-09-15 09:20:34 +0000 | [diff] [blame] | 29 | const LLT p0 = LLT::pointer(0, 64); |
Tim Northover | ea904f9 | 2016-08-19 22:40:00 +0000 | [diff] [blame] | 30 | const LLT s1 = LLT::scalar(1); |
Tim Northover | 9656f14 | 2016-08-04 20:54:13 +0000 | [diff] [blame] | 31 | const LLT s8 = LLT::scalar(8); |
| 32 | const LLT s16 = LLT::scalar(16); |
Ahmed Bougacha | ad30db3 | 2016-08-02 15:10:28 +0000 | [diff] [blame] | 33 | const LLT s32 = LLT::scalar(32); |
| 34 | const LLT s64 = LLT::scalar(64); |
| 35 | const LLT v2s32 = LLT::vector(2, 32); |
| 36 | const LLT v4s32 = LLT::vector(4, 32); |
| 37 | const LLT v2s64 = LLT::vector(2, 64); |
| 38 | |
Quentin Colombet | 24203cf | 2017-01-27 01:13:30 +0000 | [diff] [blame] | 39 | for (unsigned BinOp : {G_ADD, G_SUB, G_MUL, G_AND, G_OR, G_XOR, G_SHL}) { |
Tim Northover | fe880a8 | 2016-08-25 17:37:39 +0000 | [diff] [blame] | 40 | // These operations naturally get the right answer when used on |
| 41 | // GPR32, even if the actual type is narrower. |
Ahmed Bougacha | cfb384d | 2017-01-23 21:10:05 +0000 | [diff] [blame] | 42 | for (auto Ty : {s32, s64, v2s32, v4s32, v2s64}) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 43 | setAction({BinOp, Ty}, Legal); |
Ahmed Bougacha | cfb384d | 2017-01-23 21:10:05 +0000 | [diff] [blame] | 44 | |
| 45 | for (auto Ty : {s1, s8, s16}) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 46 | setAction({BinOp, Ty}, WidenScalar); |
Tim Northover | 9656f14 | 2016-08-04 20:54:13 +0000 | [diff] [blame] | 47 | } |
| 48 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 49 | setAction({G_GEP, p0}, Legal); |
| 50 | setAction({G_GEP, 1, s64}, Legal); |
Tim Northover | 22d82cf | 2016-09-15 11:02:19 +0000 | [diff] [blame] | 51 | |
| 52 | for (auto Ty : {s1, s8, s16, s32}) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 53 | setAction({G_GEP, 1, Ty}, WidenScalar); |
Tim Northover | 22d82cf | 2016-09-15 11:02:19 +0000 | [diff] [blame] | 54 | |
Quentin Colombet | 24203cf | 2017-01-27 01:13:30 +0000 | [diff] [blame] | 55 | for (unsigned BinOp : {G_LSHR, G_ASHR, G_SDIV, G_UDIV}) { |
Ahmed Bougacha | 2ac5bf9 | 2016-08-16 14:02:47 +0000 | [diff] [blame] | 56 | for (auto Ty : {s32, s64}) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 57 | setAction({BinOp, Ty}, Legal); |
Ahmed Bougacha | 2ac5bf9 | 2016-08-16 14:02:47 +0000 | [diff] [blame] | 58 | |
Tim Northover | 7a753d9 | 2016-08-26 17:46:06 +0000 | [diff] [blame] | 59 | for (auto Ty : {s1, s8, s16}) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 60 | setAction({BinOp, Ty}, WidenScalar); |
Tim Northover | 7a753d9 | 2016-08-26 17:46:06 +0000 | [diff] [blame] | 61 | } |
| 62 | |
Quentin Colombet | 24203cf | 2017-01-27 01:13:30 +0000 | [diff] [blame] | 63 | for (unsigned BinOp : {G_SREM, G_UREM}) |
Tim Northover | cecee56 | 2016-08-26 17:46:13 +0000 | [diff] [blame] | 64 | for (auto Ty : { s1, s8, s16, s32, s64 }) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 65 | setAction({BinOp, Ty}, Lower); |
Tim Northover | cecee56 | 2016-08-26 17:46:13 +0000 | [diff] [blame] | 66 | |
Tim Northover | 0a9b279 | 2017-02-08 21:22:15 +0000 | [diff] [blame] | 67 | for (unsigned Op : {G_SMULO, G_UMULO}) |
| 68 | setAction({Op, s64}, Lower); |
| 69 | |
| 70 | for (unsigned Op : {G_UADDE, G_USUBE, G_SADDO, G_SSUBO, G_SMULH, G_UMULH}) { |
Tim Northover | 438c77c | 2016-08-25 17:37:32 +0000 | [diff] [blame] | 71 | for (auto Ty : { s32, s64 }) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 72 | setAction({Op, Ty}, Legal); |
Tim Northover | 438c77c | 2016-08-25 17:37:32 +0000 | [diff] [blame] | 73 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 74 | setAction({Op, 1, s1}, Legal); |
Tim Northover | d8a6d7c | 2016-08-25 17:37:41 +0000 | [diff] [blame] | 75 | } |
| 76 | |
Quentin Colombet | 24203cf | 2017-01-27 01:13:30 +0000 | [diff] [blame] | 77 | for (unsigned BinOp : {G_FADD, G_FSUB, G_FMUL, G_FDIV}) |
Ahmed Bougacha | 33e19fe | 2016-08-18 16:05:11 +0000 | [diff] [blame] | 78 | for (auto Ty : {s32, s64}) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 79 | setAction({BinOp, Ty}, Legal); |
Ahmed Bougacha | 33e19fe | 2016-08-18 16:05:11 +0000 | [diff] [blame] | 80 | |
Tim Northover | e041841 | 2017-02-08 23:23:39 +0000 | [diff] [blame^] | 81 | for (unsigned BinOp : {G_FREM, G_FPOW}) { |
| 82 | setAction({BinOp, s32}, Libcall); |
| 83 | setAction({BinOp, s64}, Libcall); |
| 84 | } |
Tim Northover | edb3c8c | 2016-08-29 19:07:16 +0000 | [diff] [blame] | 85 | |
Tim Northover | 0e6afbd | 2017-02-06 21:56:47 +0000 | [diff] [blame] | 86 | // FIXME: what should we do about G_INSERTs with more than one source value? |
| 87 | // For now the default of not specifying means we'll fall back. |
| 88 | for (auto Ty : {s32, s64}) { |
| 89 | setAction({G_INSERT, Ty}, Legal); |
| 90 | setAction({G_INSERT, 1, Ty}, Legal); |
| 91 | } |
| 92 | for (auto Ty : {s1, s8, s16}) { |
| 93 | setAction({G_INSERT, Ty}, WidenScalar); |
| 94 | // FIXME: Can't widen the sources because that violates the constraints on |
| 95 | // G_INSERT (It seems entirely reasonable that inputs shouldn't overlap). |
| 96 | } |
| 97 | |
Quentin Colombet | 24203cf | 2017-01-27 01:13:30 +0000 | [diff] [blame] | 98 | for (unsigned MemOp : {G_LOAD, G_STORE}) { |
Quentin Colombet | d3126d5 | 2016-10-11 00:21:08 +0000 | [diff] [blame] | 99 | for (auto Ty : {s8, s16, s32, s64, p0, v2s32}) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 100 | setAction({MemOp, Ty}, Legal); |
Ahmed Bougacha | ad30db3 | 2016-08-02 15:10:28 +0000 | [diff] [blame] | 101 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 102 | setAction({MemOp, s1}, WidenScalar); |
Tim Northover | a01bece | 2016-08-23 19:30:42 +0000 | [diff] [blame] | 103 | |
| 104 | // And everything's fine in addrspace 0. |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 105 | setAction({MemOp, 1, p0}, Legal); |
Tim Northover | 3c73e36 | 2016-08-23 18:20:09 +0000 | [diff] [blame] | 106 | } |
| 107 | |
Tim Northover | b3a0be4 | 2016-08-23 21:01:20 +0000 | [diff] [blame] | 108 | // Constants |
Tim Northover | ea904f9 | 2016-08-19 22:40:00 +0000 | [diff] [blame] | 109 | for (auto Ty : {s32, s64}) { |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 110 | setAction({TargetOpcode::G_CONSTANT, Ty}, Legal); |
| 111 | setAction({TargetOpcode::G_FCONSTANT, Ty}, Legal); |
Tim Northover | ea904f9 | 2016-08-19 22:40:00 +0000 | [diff] [blame] | 112 | } |
| 113 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 114 | setAction({G_CONSTANT, p0}, Legal); |
Tim Northover | 7a1ec01 | 2016-08-25 17:37:35 +0000 | [diff] [blame] | 115 | |
Tim Northover | ea904f9 | 2016-08-19 22:40:00 +0000 | [diff] [blame] | 116 | for (auto Ty : {s1, s8, s16}) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 117 | setAction({TargetOpcode::G_CONSTANT, Ty}, WidenScalar); |
Tim Northover | ea904f9 | 2016-08-19 22:40:00 +0000 | [diff] [blame] | 118 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 119 | setAction({TargetOpcode::G_FCONSTANT, s16}, WidenScalar); |
Tim Northover | 9656f14 | 2016-08-04 20:54:13 +0000 | [diff] [blame] | 120 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 121 | setAction({G_ICMP, s1}, Legal); |
| 122 | setAction({G_ICMP, 1, s32}, Legal); |
| 123 | setAction({G_ICMP, 1, s64}, Legal); |
| 124 | setAction({G_ICMP, 1, p0}, Legal); |
Tim Northover | 6cd4b23 | 2016-08-23 21:01:26 +0000 | [diff] [blame] | 125 | |
Tim Northover | 051b8ad | 2016-08-26 17:46:17 +0000 | [diff] [blame] | 126 | for (auto Ty : {s1, s8, s16}) { |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 127 | setAction({G_ICMP, 1, Ty}, WidenScalar); |
Tim Northover | 6cd4b23 | 2016-08-23 21:01:26 +0000 | [diff] [blame] | 128 | } |
| 129 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 130 | setAction({G_FCMP, s1}, Legal); |
| 131 | setAction({G_FCMP, 1, s32}, Legal); |
| 132 | setAction({G_FCMP, 1, s64}, Legal); |
Tim Northover | 30bd36e | 2016-08-26 17:46:19 +0000 | [diff] [blame] | 133 | |
Tim Northover | 2c4a838 | 2016-08-25 17:37:25 +0000 | [diff] [blame] | 134 | // Extensions |
| 135 | for (auto Ty : { s1, s8, s16, s32, s64 }) { |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 136 | setAction({G_ZEXT, Ty}, Legal); |
| 137 | setAction({G_SEXT, Ty}, Legal); |
| 138 | setAction({G_ANYEXT, Ty}, Legal); |
Tim Northover | 2c4a838 | 2016-08-25 17:37:25 +0000 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | for (auto Ty : { s1, s8, s16, s32 }) { |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 142 | setAction({G_ZEXT, 1, Ty}, Legal); |
| 143 | setAction({G_SEXT, 1, Ty}, Legal); |
| 144 | setAction({G_ANYEXT, 1, Ty}, Legal); |
Tim Northover | 2c4a838 | 2016-08-25 17:37:25 +0000 | [diff] [blame] | 145 | } |
| 146 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 147 | setAction({G_FPEXT, s64}, Legal); |
| 148 | setAction({G_FPEXT, 1, s32}, Legal); |
Tim Northover | bc1701c | 2016-08-26 17:46:22 +0000 | [diff] [blame] | 149 | |
Tim Northover | 438c77c | 2016-08-25 17:37:32 +0000 | [diff] [blame] | 150 | // Truncations |
| 151 | for (auto Ty : { s16, s32 }) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 152 | setAction({G_FPTRUNC, Ty}, Legal); |
Tim Northover | 438c77c | 2016-08-25 17:37:32 +0000 | [diff] [blame] | 153 | |
| 154 | for (auto Ty : { s32, s64 }) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 155 | setAction({G_FPTRUNC, 1, Ty}, Legal); |
Tim Northover | 438c77c | 2016-08-25 17:37:32 +0000 | [diff] [blame] | 156 | |
| 157 | for (auto Ty : { s1, s8, s16, s32 }) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 158 | setAction({G_TRUNC, Ty}, Legal); |
Tim Northover | 438c77c | 2016-08-25 17:37:32 +0000 | [diff] [blame] | 159 | |
| 160 | for (auto Ty : { s8, s16, s32, s64 }) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 161 | setAction({G_TRUNC, 1, Ty}, Legal); |
Tim Northover | 438c77c | 2016-08-25 17:37:32 +0000 | [diff] [blame] | 162 | |
Tim Northover | 5d0eaa4 | 2016-08-26 17:45:58 +0000 | [diff] [blame] | 163 | // Conversions |
Ahmed Bougacha | d294823 | 2017-01-20 01:37:24 +0000 | [diff] [blame] | 164 | for (auto Ty : { s32, s64 }) { |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 165 | setAction({G_FPTOSI, 0, Ty}, Legal); |
| 166 | setAction({G_FPTOUI, 0, Ty}, Legal); |
| 167 | setAction({G_SITOFP, 1, Ty}, Legal); |
| 168 | setAction({G_UITOFP, 1, Ty}, Legal); |
Tim Northover | 5d0eaa4 | 2016-08-26 17:45:58 +0000 | [diff] [blame] | 169 | } |
Ahmed Bougacha | d294823 | 2017-01-20 01:37:24 +0000 | [diff] [blame] | 170 | for (auto Ty : { s1, s8, s16 }) { |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 171 | setAction({G_FPTOSI, 0, Ty}, WidenScalar); |
| 172 | setAction({G_FPTOUI, 0, Ty}, WidenScalar); |
| 173 | setAction({G_SITOFP, 1, Ty}, WidenScalar); |
| 174 | setAction({G_UITOFP, 1, Ty}, WidenScalar); |
Ahmed Bougacha | d294823 | 2017-01-20 01:37:24 +0000 | [diff] [blame] | 175 | } |
Tim Northover | 5d0eaa4 | 2016-08-26 17:45:58 +0000 | [diff] [blame] | 176 | |
| 177 | for (auto Ty : { s32, s64 }) { |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 178 | setAction({G_FPTOSI, 1, Ty}, Legal); |
| 179 | setAction({G_FPTOUI, 1, Ty}, Legal); |
| 180 | setAction({G_SITOFP, 0, Ty}, Legal); |
| 181 | setAction({G_UITOFP, 0, Ty}, Legal); |
Tim Northover | 5d0eaa4 | 2016-08-26 17:45:58 +0000 | [diff] [blame] | 182 | } |
Tim Northover | 438c77c | 2016-08-25 17:37:32 +0000 | [diff] [blame] | 183 | |
Tim Northover | b3a0be4 | 2016-08-23 21:01:20 +0000 | [diff] [blame] | 184 | // Control-flow |
Tim Northover | 6aacd27 | 2016-10-12 22:48:36 +0000 | [diff] [blame] | 185 | for (auto Ty : {s1, s8, s16, s32}) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 186 | setAction({G_BRCOND, Ty}, Legal); |
Kristof Beyls | 65a12c0 | 2017-01-30 09:13:18 +0000 | [diff] [blame] | 187 | setAction({G_BRINDIRECT, p0}, Legal); |
Ahmed Bougacha | ad30db3 | 2016-08-02 15:10:28 +0000 | [diff] [blame] | 188 | |
Tim Northover | 1d18a99 | 2016-08-26 17:46:03 +0000 | [diff] [blame] | 189 | // Select |
Tim Northover | 868332d | 2017-02-06 23:41:27 +0000 | [diff] [blame] | 190 | for (auto Ty : {s1, s8, s16}) |
| 191 | setAction({G_SELECT, Ty}, WidenScalar); |
| 192 | |
| 193 | for (auto Ty : {s32, s64, p0}) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 194 | setAction({G_SELECT, Ty}, Legal); |
Tim Northover | 1d18a99 | 2016-08-26 17:46:03 +0000 | [diff] [blame] | 195 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 196 | setAction({G_SELECT, 1, s1}, Legal); |
Tim Northover | 1d18a99 | 2016-08-26 17:46:03 +0000 | [diff] [blame] | 197 | |
Tim Northover | b3a0be4 | 2016-08-23 21:01:20 +0000 | [diff] [blame] | 198 | // Pointer-handling |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 199 | setAction({G_FRAME_INDEX, p0}, Legal); |
| 200 | setAction({G_GLOBAL_VALUE, p0}, Legal); |
Ahmed Bougacha | 0306b5e | 2016-08-16 14:02:42 +0000 | [diff] [blame] | 201 | |
Tim Northover | 037af52c | 2016-10-31 18:31:09 +0000 | [diff] [blame] | 202 | for (auto Ty : {s1, s8, s16, s32, s64}) |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 203 | setAction({G_PTRTOINT, 0, Ty}, Legal); |
Tim Northover | 037af52c | 2016-10-31 18:31:09 +0000 | [diff] [blame] | 204 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 205 | setAction({G_PTRTOINT, 1, p0}, Legal); |
Tim Northover | a01bece | 2016-08-23 19:30:42 +0000 | [diff] [blame] | 206 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 207 | setAction({G_INTTOPTR, 0, p0}, Legal); |
| 208 | setAction({G_INTTOPTR, 1, s64}, Legal); |
Tim Northover | 456a3c0 | 2016-08-23 19:30:38 +0000 | [diff] [blame] | 209 | |
Quentin Colombet | 404e435 | 2016-10-12 03:57:43 +0000 | [diff] [blame] | 210 | // Casts for 32 and 64-bit width type are just copies. |
Tim Northover | c1d8c2b | 2016-10-11 22:29:23 +0000 | [diff] [blame] | 211 | for (auto Ty : {s1, s8, s16, s32, s64}) { |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 212 | setAction({G_BITCAST, 0, Ty}, Legal); |
| 213 | setAction({G_BITCAST, 1, Ty}, Legal); |
Tim Northover | c1d8c2b | 2016-10-11 22:29:23 +0000 | [diff] [blame] | 214 | } |
| 215 | |
Quentin Colombet | db643d9 | 2016-10-13 00:12:01 +0000 | [diff] [blame] | 216 | // For the sake of copying bits around, the type does not really |
| 217 | // matter as long as it fits a register. |
Tim Northover | c1d8c2b | 2016-10-11 22:29:23 +0000 | [diff] [blame] | 218 | for (int EltSize = 8; EltSize <= 64; EltSize *= 2) { |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 219 | setAction({G_BITCAST, 0, LLT::vector(128/EltSize, EltSize)}, Legal); |
| 220 | setAction({G_BITCAST, 1, LLT::vector(128/EltSize, EltSize)}, Legal); |
Quentin Colombet | db643d9 | 2016-10-13 00:12:01 +0000 | [diff] [blame] | 221 | if (EltSize >= 64) |
Tim Northover | c1d8c2b | 2016-10-11 22:29:23 +0000 | [diff] [blame] | 222 | continue; |
| 223 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 224 | setAction({G_BITCAST, 0, LLT::vector(64/EltSize, EltSize)}, Legal); |
| 225 | setAction({G_BITCAST, 1, LLT::vector(64/EltSize, EltSize)}, Legal); |
Quentin Colombet | db643d9 | 2016-10-13 00:12:01 +0000 | [diff] [blame] | 226 | if (EltSize >= 32) |
| 227 | continue; |
| 228 | |
Quentin Colombet | e15e460 | 2017-01-27 01:13:25 +0000 | [diff] [blame] | 229 | setAction({G_BITCAST, 0, LLT::vector(32/EltSize, EltSize)}, Legal); |
| 230 | setAction({G_BITCAST, 1, LLT::vector(32/EltSize, EltSize)}, Legal); |
Tim Northover | c1d8c2b | 2016-10-11 22:29:23 +0000 | [diff] [blame] | 231 | } |
| 232 | |
Tim Northover | e9600d8 | 2017-02-08 17:57:27 +0000 | [diff] [blame] | 233 | setAction({G_VASTART, p0}, Legal); |
| 234 | |
Tim Northover | 33b07d6 | 2016-07-22 20:03:43 +0000 | [diff] [blame] | 235 | computeTables(); |
| 236 | } |