|
16 | 16 |
|
17 | 17 | #include "MCTargetDesc/VEMCTargetDesc.h"
|
18 | 18 | #include "llvm/ADT/StringSwitch.h"
|
19 |
| -#include "llvm/CodeGen/ISDOpcodes.h" |
20 |
| -#include "llvm/CodeGen/SelectionDAGNodes.h" |
21 | 19 | #include "llvm/Support/ErrorHandling.h"
|
22 | 20 | #include "llvm/Target/TargetMachine.h"
|
23 | 21 |
|
@@ -204,80 +202,6 @@ inline static unsigned VECondCodeToVal(VECC::CondCode CC) {
|
204 | 202 | }
|
205 | 203 | }
|
206 | 204 |
|
207 |
| -/// Convert a DAG integer condition code to a VE ICC condition. |
208 |
| -inline static VECC::CondCode intCondCode2Icc(ISD::CondCode CC) { |
209 |
| - switch (CC) { |
210 |
| - default: |
211 |
| - llvm_unreachable("Unknown integer condition code!"); |
212 |
| - case ISD::SETEQ: |
213 |
| - return VECC::CC_IEQ; |
214 |
| - case ISD::SETNE: |
215 |
| - return VECC::CC_INE; |
216 |
| - case ISD::SETLT: |
217 |
| - return VECC::CC_IL; |
218 |
| - case ISD::SETGT: |
219 |
| - return VECC::CC_IG; |
220 |
| - case ISD::SETLE: |
221 |
| - return VECC::CC_ILE; |
222 |
| - case ISD::SETGE: |
223 |
| - return VECC::CC_IGE; |
224 |
| - case ISD::SETULT: |
225 |
| - return VECC::CC_IL; |
226 |
| - case ISD::SETULE: |
227 |
| - return VECC::CC_ILE; |
228 |
| - case ISD::SETUGT: |
229 |
| - return VECC::CC_IG; |
230 |
| - case ISD::SETUGE: |
231 |
| - return VECC::CC_IGE; |
232 |
| - } |
233 |
| -} |
234 |
| - |
235 |
| -/// Convert a DAG floating point condition code to a VE FCC condition. |
236 |
| -inline static VECC::CondCode fpCondCode2Fcc(ISD::CondCode CC) { |
237 |
| - switch (CC) { |
238 |
| - default: |
239 |
| - llvm_unreachable("Unknown fp condition code!"); |
240 |
| - case ISD::SETFALSE: |
241 |
| - return VECC::CC_AF; |
242 |
| - case ISD::SETEQ: |
243 |
| - case ISD::SETOEQ: |
244 |
| - return VECC::CC_EQ; |
245 |
| - case ISD::SETNE: |
246 |
| - case ISD::SETONE: |
247 |
| - return VECC::CC_NE; |
248 |
| - case ISD::SETLT: |
249 |
| - case ISD::SETOLT: |
250 |
| - return VECC::CC_L; |
251 |
| - case ISD::SETGT: |
252 |
| - case ISD::SETOGT: |
253 |
| - return VECC::CC_G; |
254 |
| - case ISD::SETLE: |
255 |
| - case ISD::SETOLE: |
256 |
| - return VECC::CC_LE; |
257 |
| - case ISD::SETGE: |
258 |
| - case ISD::SETOGE: |
259 |
| - return VECC::CC_GE; |
260 |
| - case ISD::SETO: |
261 |
| - return VECC::CC_NUM; |
262 |
| - case ISD::SETUO: |
263 |
| - return VECC::CC_NAN; |
264 |
| - case ISD::SETUEQ: |
265 |
| - return VECC::CC_EQNAN; |
266 |
| - case ISD::SETUNE: |
267 |
| - return VECC::CC_NENAN; |
268 |
| - case ISD::SETULT: |
269 |
| - return VECC::CC_LNAN; |
270 |
| - case ISD::SETUGT: |
271 |
| - return VECC::CC_GNAN; |
272 |
| - case ISD::SETULE: |
273 |
| - return VECC::CC_LENAN; |
274 |
| - case ISD::SETUGE: |
275 |
| - return VECC::CC_GENAN; |
276 |
| - case ISD::SETTRUE: |
277 |
| - return VECC::CC_AT; |
278 |
| - } |
279 |
| -} |
280 |
| - |
281 | 205 | inline static VECC::CondCode VEValToCondCode(unsigned Val, bool IsInteger) {
|
282 | 206 | if (IsInteger) {
|
283 | 207 | switch (Val) {
|
@@ -402,22 +326,6 @@ inline static VERD::RoundingMode VEValToRD(unsigned Val) {
|
402 | 326 | llvm_unreachable("Invalid branch predicates");
|
403 | 327 | }
|
404 | 328 |
|
405 |
| -/// getImmVal - get immediate representation of integer value |
406 |
| -inline static uint64_t getImmVal(const ConstantSDNode *N) { |
407 |
| - return N->getSExtValue(); |
408 |
| -} |
409 |
| - |
410 |
| -/// getFpImmVal - get immediate representation of floating point value |
411 |
| -inline static uint64_t getFpImmVal(const ConstantFPSDNode *N) { |
412 |
| - const APInt &Imm = N->getValueAPF().bitcastToAPInt(); |
413 |
| - uint64_t Val = Imm.getZExtValue(); |
414 |
| - if (Imm.getBitWidth() == 32) { |
415 |
| - // Immediate value of float place places at higher bits on VE. |
416 |
| - Val <<= 32; |
417 |
| - } |
418 |
| - return Val; |
419 |
| -} |
420 |
| - |
421 | 329 | // MImm - Special immediate value of sequential bit stream of 0 or 1.
|
422 | 330 | // See VEInstrInfo.td for details.
|
423 | 331 | inline static bool isMImmVal(uint64_t Val) {
|
|
0 commit comments