10b57cec5SDimitry Andric//===-- ARMInstrNEON.td - NEON support for ARM -------------*- tablegen -*-===// 20b57cec5SDimitry Andric// 30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric// 70b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric// 90b57cec5SDimitry Andric// This file describes the ARM NEON instruction set. 100b57cec5SDimitry Andric// 110b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 120b57cec5SDimitry Andric 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 150b57cec5SDimitry Andric// NEON-specific Operands. 160b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 170b57cec5SDimitry Andricdef nModImm : Operand<i32> { 188bcb0991SDimitry Andric let PrintMethod = "printVMOVModImmOperand"; 190b57cec5SDimitry Andric} 200b57cec5SDimitry Andric 210b57cec5SDimitry Andricdef nImmSplatI8AsmOperand : AsmOperandClass { let Name = "NEONi8splat"; } 220b57cec5SDimitry Andricdef nImmSplatI8 : Operand<i32> { 238bcb0991SDimitry Andric let PrintMethod = "printVMOVModImmOperand"; 240b57cec5SDimitry Andric let ParserMatchClass = nImmSplatI8AsmOperand; 250b57cec5SDimitry Andric} 260b57cec5SDimitry Andricdef nImmSplatI16AsmOperand : AsmOperandClass { let Name = "NEONi16splat"; } 270b57cec5SDimitry Andricdef nImmSplatI16 : Operand<i32> { 288bcb0991SDimitry Andric let PrintMethod = "printVMOVModImmOperand"; 290b57cec5SDimitry Andric let ParserMatchClass = nImmSplatI16AsmOperand; 300b57cec5SDimitry Andric} 310b57cec5SDimitry Andricdef nImmSplatI32AsmOperand : AsmOperandClass { let Name = "NEONi32splat"; } 320b57cec5SDimitry Andricdef nImmSplatI32 : Operand<i32> { 338bcb0991SDimitry Andric let PrintMethod = "printVMOVModImmOperand"; 340b57cec5SDimitry Andric let ParserMatchClass = nImmSplatI32AsmOperand; 350b57cec5SDimitry Andric} 360b57cec5SDimitry Andricdef nImmSplatNotI16AsmOperand : AsmOperandClass { let Name = "NEONi16splatNot"; } 370b57cec5SDimitry Andricdef nImmSplatNotI16 : Operand<i32> { 380b57cec5SDimitry Andric let ParserMatchClass = nImmSplatNotI16AsmOperand; 390b57cec5SDimitry Andric} 400b57cec5SDimitry Andricdef nImmSplatNotI32AsmOperand : AsmOperandClass { let Name = "NEONi32splatNot"; } 410b57cec5SDimitry Andricdef nImmSplatNotI32 : Operand<i32> { 420b57cec5SDimitry Andric let ParserMatchClass = nImmSplatNotI32AsmOperand; 430b57cec5SDimitry Andric} 440b57cec5SDimitry Andricdef nImmVMOVI32AsmOperand : AsmOperandClass { let Name = "NEONi32vmov"; } 450b57cec5SDimitry Andricdef nImmVMOVI32 : Operand<i32> { 468bcb0991SDimitry Andric let PrintMethod = "printVMOVModImmOperand"; 470b57cec5SDimitry Andric let ParserMatchClass = nImmVMOVI32AsmOperand; 480b57cec5SDimitry Andric} 490b57cec5SDimitry Andric 500b57cec5SDimitry Andricclass nImmVMOVIAsmOperandReplicate<ValueType From, ValueType To> 510b57cec5SDimitry Andric : AsmOperandClass { 520b57cec5SDimitry Andric let Name = "NEONi" # To.Size # "vmovi" # From.Size # "Replicate"; 530b57cec5SDimitry Andric let PredicateMethod = "isNEONmovReplicate<" # From.Size # ", " # To.Size # ">"; 540b57cec5SDimitry Andric let RenderMethod = "addNEONvmovi" # From.Size # "ReplicateOperands"; 550b57cec5SDimitry Andric} 560b57cec5SDimitry Andric 570b57cec5SDimitry Andricclass nImmVINVIAsmOperandReplicate<ValueType From, ValueType To> 580b57cec5SDimitry Andric : AsmOperandClass { 590b57cec5SDimitry Andric let Name = "NEONi" # To.Size # "invi" # From.Size # "Replicate"; 600b57cec5SDimitry Andric let PredicateMethod = "isNEONinvReplicate<" # From.Size # ", " # To.Size # ">"; 610b57cec5SDimitry Andric let RenderMethod = "addNEONinvi" # From.Size # "ReplicateOperands"; 620b57cec5SDimitry Andric} 630b57cec5SDimitry Andric 640b57cec5SDimitry Andricclass nImmVMOVIReplicate<ValueType From, ValueType To> : Operand<i32> { 658bcb0991SDimitry Andric let PrintMethod = "printVMOVModImmOperand"; 660b57cec5SDimitry Andric let ParserMatchClass = nImmVMOVIAsmOperandReplicate<From, To>; 670b57cec5SDimitry Andric} 680b57cec5SDimitry Andric 690b57cec5SDimitry Andricclass nImmVINVIReplicate<ValueType From, ValueType To> : Operand<i32> { 708bcb0991SDimitry Andric let PrintMethod = "printVMOVModImmOperand"; 710b57cec5SDimitry Andric let ParserMatchClass = nImmVINVIAsmOperandReplicate<From, To>; 720b57cec5SDimitry Andric} 730b57cec5SDimitry Andric 740b57cec5SDimitry Andricdef nImmVMOVI32NegAsmOperand : AsmOperandClass { let Name = "NEONi32vmovNeg"; } 750b57cec5SDimitry Andricdef nImmVMOVI32Neg : Operand<i32> { 768bcb0991SDimitry Andric let PrintMethod = "printVMOVModImmOperand"; 770b57cec5SDimitry Andric let ParserMatchClass = nImmVMOVI32NegAsmOperand; 780b57cec5SDimitry Andric} 790b57cec5SDimitry Andricdef nImmVMOVF32 : Operand<i32> { 800b57cec5SDimitry Andric let PrintMethod = "printFPImmOperand"; 810b57cec5SDimitry Andric let ParserMatchClass = FPImmOperand; 820b57cec5SDimitry Andric} 830b57cec5SDimitry Andricdef nImmSplatI64AsmOperand : AsmOperandClass { let Name = "NEONi64splat"; } 840b57cec5SDimitry Andricdef nImmSplatI64 : Operand<i32> { 858bcb0991SDimitry Andric let PrintMethod = "printVMOVModImmOperand"; 860b57cec5SDimitry Andric let ParserMatchClass = nImmSplatI64AsmOperand; 870b57cec5SDimitry Andric} 880b57cec5SDimitry Andric 890b57cec5SDimitry Andricdef VectorIndex8Operand : AsmOperandClass { let Name = "VectorIndex8"; } 900b57cec5SDimitry Andricdef VectorIndex16Operand : AsmOperandClass { let Name = "VectorIndex16"; } 910b57cec5SDimitry Andricdef VectorIndex32Operand : AsmOperandClass { let Name = "VectorIndex32"; } 920b57cec5SDimitry Andricdef VectorIndex64Operand : AsmOperandClass { let Name = "VectorIndex64"; } 930b57cec5SDimitry Andricdef VectorIndex8 : Operand<i32>, ImmLeaf<i32, [{ 940b57cec5SDimitry Andric return ((uint64_t)Imm) < 8; 950b57cec5SDimitry Andric}]> { 960b57cec5SDimitry Andric let ParserMatchClass = VectorIndex8Operand; 970b57cec5SDimitry Andric let PrintMethod = "printVectorIndex"; 980b57cec5SDimitry Andric let MIOperandInfo = (ops i32imm); 990b57cec5SDimitry Andric} 1000b57cec5SDimitry Andricdef VectorIndex16 : Operand<i32>, ImmLeaf<i32, [{ 1010b57cec5SDimitry Andric return ((uint64_t)Imm) < 4; 1020b57cec5SDimitry Andric}]> { 1030b57cec5SDimitry Andric let ParserMatchClass = VectorIndex16Operand; 1040b57cec5SDimitry Andric let PrintMethod = "printVectorIndex"; 1050b57cec5SDimitry Andric let MIOperandInfo = (ops i32imm); 1060b57cec5SDimitry Andric} 1070b57cec5SDimitry Andricdef VectorIndex32 : Operand<i32>, ImmLeaf<i32, [{ 1080b57cec5SDimitry Andric return ((uint64_t)Imm) < 2; 1090b57cec5SDimitry Andric}]> { 1100b57cec5SDimitry Andric let ParserMatchClass = VectorIndex32Operand; 1110b57cec5SDimitry Andric let PrintMethod = "printVectorIndex"; 1120b57cec5SDimitry Andric let MIOperandInfo = (ops i32imm); 1130b57cec5SDimitry Andric} 1140b57cec5SDimitry Andricdef VectorIndex64 : Operand<i32>, ImmLeaf<i32, [{ 1150b57cec5SDimitry Andric return ((uint64_t)Imm) < 1; 1160b57cec5SDimitry Andric}]> { 1170b57cec5SDimitry Andric let ParserMatchClass = VectorIndex64Operand; 1180b57cec5SDimitry Andric let PrintMethod = "printVectorIndex"; 1190b57cec5SDimitry Andric let MIOperandInfo = (ops i32imm); 1200b57cec5SDimitry Andric} 1210b57cec5SDimitry Andric 1220b57cec5SDimitry Andric// Register list of one D register. 1230b57cec5SDimitry Andricdef VecListOneDAsmOperand : AsmOperandClass { 1240b57cec5SDimitry Andric let Name = "VecListOneD"; 1250b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 1260b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 1270b57cec5SDimitry Andric} 1280b57cec5SDimitry Andricdef VecListOneD : RegisterOperand<DPR, "printVectorListOne"> { 1290b57cec5SDimitry Andric let ParserMatchClass = VecListOneDAsmOperand; 1300b57cec5SDimitry Andric} 1310b57cec5SDimitry Andric// Register list of two sequential D registers. 1320b57cec5SDimitry Andricdef VecListDPairAsmOperand : AsmOperandClass { 1330b57cec5SDimitry Andric let Name = "VecListDPair"; 1340b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 1350b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 1360b57cec5SDimitry Andric} 1370b57cec5SDimitry Andricdef VecListDPair : RegisterOperand<DPair, "printVectorListTwo"> { 1380b57cec5SDimitry Andric let ParserMatchClass = VecListDPairAsmOperand; 1390b57cec5SDimitry Andric} 1400b57cec5SDimitry Andric// Register list of three sequential D registers. 1410b57cec5SDimitry Andricdef VecListThreeDAsmOperand : AsmOperandClass { 1420b57cec5SDimitry Andric let Name = "VecListThreeD"; 1430b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 1440b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 1450b57cec5SDimitry Andric} 1460b57cec5SDimitry Andricdef VecListThreeD : RegisterOperand<DPR, "printVectorListThree"> { 1470b57cec5SDimitry Andric let ParserMatchClass = VecListThreeDAsmOperand; 1480b57cec5SDimitry Andric} 1490b57cec5SDimitry Andric// Register list of four sequential D registers. 1500b57cec5SDimitry Andricdef VecListFourDAsmOperand : AsmOperandClass { 1510b57cec5SDimitry Andric let Name = "VecListFourD"; 1520b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 1530b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 1540b57cec5SDimitry Andric} 1550b57cec5SDimitry Andricdef VecListFourD : RegisterOperand<DPR, "printVectorListFour"> { 1560b57cec5SDimitry Andric let ParserMatchClass = VecListFourDAsmOperand; 1570b57cec5SDimitry Andric} 1580b57cec5SDimitry Andric// Register list of two D registers spaced by 2 (two sequential Q registers). 1590b57cec5SDimitry Andricdef VecListDPairSpacedAsmOperand : AsmOperandClass { 1600b57cec5SDimitry Andric let Name = "VecListDPairSpaced"; 1610b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 1620b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 1630b57cec5SDimitry Andric} 1640b57cec5SDimitry Andricdef VecListDPairSpaced : RegisterOperand<DPair, "printVectorListTwoSpaced"> { 1650b57cec5SDimitry Andric let ParserMatchClass = VecListDPairSpacedAsmOperand; 1660b57cec5SDimitry Andric} 1670b57cec5SDimitry Andric// Register list of three D registers spaced by 2 (three Q registers). 1680b57cec5SDimitry Andricdef VecListThreeQAsmOperand : AsmOperandClass { 1690b57cec5SDimitry Andric let Name = "VecListThreeQ"; 1700b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 1710b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 1720b57cec5SDimitry Andric} 1730b57cec5SDimitry Andricdef VecListThreeQ : RegisterOperand<DPR, "printVectorListThreeSpaced"> { 1740b57cec5SDimitry Andric let ParserMatchClass = VecListThreeQAsmOperand; 1750b57cec5SDimitry Andric} 1760b57cec5SDimitry Andric// Register list of three D registers spaced by 2 (three Q registers). 1770b57cec5SDimitry Andricdef VecListFourQAsmOperand : AsmOperandClass { 1780b57cec5SDimitry Andric let Name = "VecListFourQ"; 1790b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 1800b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 1810b57cec5SDimitry Andric} 1820b57cec5SDimitry Andricdef VecListFourQ : RegisterOperand<DPR, "printVectorListFourSpaced"> { 1830b57cec5SDimitry Andric let ParserMatchClass = VecListFourQAsmOperand; 1840b57cec5SDimitry Andric} 1850b57cec5SDimitry Andric 1860b57cec5SDimitry Andric// Register list of one D register, with "all lanes" subscripting. 1870b57cec5SDimitry Andricdef VecListOneDAllLanesAsmOperand : AsmOperandClass { 1880b57cec5SDimitry Andric let Name = "VecListOneDAllLanes"; 1890b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 1900b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 1910b57cec5SDimitry Andric} 1920b57cec5SDimitry Andricdef VecListOneDAllLanes : RegisterOperand<DPR, "printVectorListOneAllLanes"> { 1930b57cec5SDimitry Andric let ParserMatchClass = VecListOneDAllLanesAsmOperand; 1940b57cec5SDimitry Andric} 1950b57cec5SDimitry Andric// Register list of two D registers, with "all lanes" subscripting. 1960b57cec5SDimitry Andricdef VecListDPairAllLanesAsmOperand : AsmOperandClass { 1970b57cec5SDimitry Andric let Name = "VecListDPairAllLanes"; 1980b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 1990b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 2000b57cec5SDimitry Andric} 2010b57cec5SDimitry Andricdef VecListDPairAllLanes : RegisterOperand<DPair, 2020b57cec5SDimitry Andric "printVectorListTwoAllLanes"> { 2030b57cec5SDimitry Andric let ParserMatchClass = VecListDPairAllLanesAsmOperand; 2040b57cec5SDimitry Andric} 2050b57cec5SDimitry Andric// Register list of two D registers spaced by 2 (two sequential Q registers). 2060b57cec5SDimitry Andricdef VecListDPairSpacedAllLanesAsmOperand : AsmOperandClass { 2070b57cec5SDimitry Andric let Name = "VecListDPairSpacedAllLanes"; 2080b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 2090b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 2100b57cec5SDimitry Andric} 2110b57cec5SDimitry Andricdef VecListDPairSpacedAllLanes : RegisterOperand<DPairSpc, 2120b57cec5SDimitry Andric "printVectorListTwoSpacedAllLanes"> { 2130b57cec5SDimitry Andric let ParserMatchClass = VecListDPairSpacedAllLanesAsmOperand; 2140b57cec5SDimitry Andric} 2150b57cec5SDimitry Andric// Register list of three D registers, with "all lanes" subscripting. 2160b57cec5SDimitry Andricdef VecListThreeDAllLanesAsmOperand : AsmOperandClass { 2170b57cec5SDimitry Andric let Name = "VecListThreeDAllLanes"; 2180b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 2190b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 2200b57cec5SDimitry Andric} 2210b57cec5SDimitry Andricdef VecListThreeDAllLanes : RegisterOperand<DPR, 2220b57cec5SDimitry Andric "printVectorListThreeAllLanes"> { 2230b57cec5SDimitry Andric let ParserMatchClass = VecListThreeDAllLanesAsmOperand; 2240b57cec5SDimitry Andric} 2250b57cec5SDimitry Andric// Register list of three D registers spaced by 2 (three sequential Q regs). 2260b57cec5SDimitry Andricdef VecListThreeQAllLanesAsmOperand : AsmOperandClass { 2270b57cec5SDimitry Andric let Name = "VecListThreeQAllLanes"; 2280b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 2290b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 2300b57cec5SDimitry Andric} 2310b57cec5SDimitry Andricdef VecListThreeQAllLanes : RegisterOperand<DPR, 2320b57cec5SDimitry Andric "printVectorListThreeSpacedAllLanes"> { 2330b57cec5SDimitry Andric let ParserMatchClass = VecListThreeQAllLanesAsmOperand; 2340b57cec5SDimitry Andric} 2350b57cec5SDimitry Andric// Register list of four D registers, with "all lanes" subscripting. 2360b57cec5SDimitry Andricdef VecListFourDAllLanesAsmOperand : AsmOperandClass { 2370b57cec5SDimitry Andric let Name = "VecListFourDAllLanes"; 2380b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 2390b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 2400b57cec5SDimitry Andric} 2410b57cec5SDimitry Andricdef VecListFourDAllLanes : RegisterOperand<DPR, "printVectorListFourAllLanes"> { 2420b57cec5SDimitry Andric let ParserMatchClass = VecListFourDAllLanesAsmOperand; 2430b57cec5SDimitry Andric} 2440b57cec5SDimitry Andric// Register list of four D registers spaced by 2 (four sequential Q regs). 2450b57cec5SDimitry Andricdef VecListFourQAllLanesAsmOperand : AsmOperandClass { 2460b57cec5SDimitry Andric let Name = "VecListFourQAllLanes"; 2470b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 2480b57cec5SDimitry Andric let RenderMethod = "addVecListOperands"; 2490b57cec5SDimitry Andric} 2500b57cec5SDimitry Andricdef VecListFourQAllLanes : RegisterOperand<DPR, 2510b57cec5SDimitry Andric "printVectorListFourSpacedAllLanes"> { 2520b57cec5SDimitry Andric let ParserMatchClass = VecListFourQAllLanesAsmOperand; 2530b57cec5SDimitry Andric} 2540b57cec5SDimitry Andric 2550b57cec5SDimitry Andric 2560b57cec5SDimitry Andric// Register list of one D register, with byte lane subscripting. 2570b57cec5SDimitry Andricdef VecListOneDByteIndexAsmOperand : AsmOperandClass { 2580b57cec5SDimitry Andric let Name = "VecListOneDByteIndexed"; 2590b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 2600b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 2610b57cec5SDimitry Andric} 2620b57cec5SDimitry Andricdef VecListOneDByteIndexed : Operand<i32> { 2630b57cec5SDimitry Andric let ParserMatchClass = VecListOneDByteIndexAsmOperand; 2640b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 2650b57cec5SDimitry Andric} 2660b57cec5SDimitry Andric// ...with half-word lane subscripting. 2670b57cec5SDimitry Andricdef VecListOneDHWordIndexAsmOperand : AsmOperandClass { 2680b57cec5SDimitry Andric let Name = "VecListOneDHWordIndexed"; 2690b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 2700b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 2710b57cec5SDimitry Andric} 2720b57cec5SDimitry Andricdef VecListOneDHWordIndexed : Operand<i32> { 2730b57cec5SDimitry Andric let ParserMatchClass = VecListOneDHWordIndexAsmOperand; 2740b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 2750b57cec5SDimitry Andric} 2760b57cec5SDimitry Andric// ...with word lane subscripting. 2770b57cec5SDimitry Andricdef VecListOneDWordIndexAsmOperand : AsmOperandClass { 2780b57cec5SDimitry Andric let Name = "VecListOneDWordIndexed"; 2790b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 2800b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 2810b57cec5SDimitry Andric} 2820b57cec5SDimitry Andricdef VecListOneDWordIndexed : Operand<i32> { 2830b57cec5SDimitry Andric let ParserMatchClass = VecListOneDWordIndexAsmOperand; 2840b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 2850b57cec5SDimitry Andric} 2860b57cec5SDimitry Andric 2870b57cec5SDimitry Andric// Register list of two D registers with byte lane subscripting. 2880b57cec5SDimitry Andricdef VecListTwoDByteIndexAsmOperand : AsmOperandClass { 2890b57cec5SDimitry Andric let Name = "VecListTwoDByteIndexed"; 2900b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 2910b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 2920b57cec5SDimitry Andric} 2930b57cec5SDimitry Andricdef VecListTwoDByteIndexed : Operand<i32> { 2940b57cec5SDimitry Andric let ParserMatchClass = VecListTwoDByteIndexAsmOperand; 2950b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 2960b57cec5SDimitry Andric} 2970b57cec5SDimitry Andric// ...with half-word lane subscripting. 2980b57cec5SDimitry Andricdef VecListTwoDHWordIndexAsmOperand : AsmOperandClass { 2990b57cec5SDimitry Andric let Name = "VecListTwoDHWordIndexed"; 3000b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 3010b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 3020b57cec5SDimitry Andric} 3030b57cec5SDimitry Andricdef VecListTwoDHWordIndexed : Operand<i32> { 3040b57cec5SDimitry Andric let ParserMatchClass = VecListTwoDHWordIndexAsmOperand; 3050b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 3060b57cec5SDimitry Andric} 3070b57cec5SDimitry Andric// ...with word lane subscripting. 3080b57cec5SDimitry Andricdef VecListTwoDWordIndexAsmOperand : AsmOperandClass { 3090b57cec5SDimitry Andric let Name = "VecListTwoDWordIndexed"; 3100b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 3110b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 3120b57cec5SDimitry Andric} 3130b57cec5SDimitry Andricdef VecListTwoDWordIndexed : Operand<i32> { 3140b57cec5SDimitry Andric let ParserMatchClass = VecListTwoDWordIndexAsmOperand; 3150b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 3160b57cec5SDimitry Andric} 3170b57cec5SDimitry Andric// Register list of two Q registers with half-word lane subscripting. 3180b57cec5SDimitry Andricdef VecListTwoQHWordIndexAsmOperand : AsmOperandClass { 3190b57cec5SDimitry Andric let Name = "VecListTwoQHWordIndexed"; 3200b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 3210b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 3220b57cec5SDimitry Andric} 3230b57cec5SDimitry Andricdef VecListTwoQHWordIndexed : Operand<i32> { 3240b57cec5SDimitry Andric let ParserMatchClass = VecListTwoQHWordIndexAsmOperand; 3250b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 3260b57cec5SDimitry Andric} 3270b57cec5SDimitry Andric// ...with word lane subscripting. 3280b57cec5SDimitry Andricdef VecListTwoQWordIndexAsmOperand : AsmOperandClass { 3290b57cec5SDimitry Andric let Name = "VecListTwoQWordIndexed"; 3300b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 3310b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 3320b57cec5SDimitry Andric} 3330b57cec5SDimitry Andricdef VecListTwoQWordIndexed : Operand<i32> { 3340b57cec5SDimitry Andric let ParserMatchClass = VecListTwoQWordIndexAsmOperand; 3350b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 3360b57cec5SDimitry Andric} 3370b57cec5SDimitry Andric 3380b57cec5SDimitry Andric 3390b57cec5SDimitry Andric// Register list of three D registers with byte lane subscripting. 3400b57cec5SDimitry Andricdef VecListThreeDByteIndexAsmOperand : AsmOperandClass { 3410b57cec5SDimitry Andric let Name = "VecListThreeDByteIndexed"; 3420b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 3430b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 3440b57cec5SDimitry Andric} 3450b57cec5SDimitry Andricdef VecListThreeDByteIndexed : Operand<i32> { 3460b57cec5SDimitry Andric let ParserMatchClass = VecListThreeDByteIndexAsmOperand; 3470b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 3480b57cec5SDimitry Andric} 3490b57cec5SDimitry Andric// ...with half-word lane subscripting. 3500b57cec5SDimitry Andricdef VecListThreeDHWordIndexAsmOperand : AsmOperandClass { 3510b57cec5SDimitry Andric let Name = "VecListThreeDHWordIndexed"; 3520b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 3530b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 3540b57cec5SDimitry Andric} 3550b57cec5SDimitry Andricdef VecListThreeDHWordIndexed : Operand<i32> { 3560b57cec5SDimitry Andric let ParserMatchClass = VecListThreeDHWordIndexAsmOperand; 3570b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 3580b57cec5SDimitry Andric} 3590b57cec5SDimitry Andric// ...with word lane subscripting. 3600b57cec5SDimitry Andricdef VecListThreeDWordIndexAsmOperand : AsmOperandClass { 3610b57cec5SDimitry Andric let Name = "VecListThreeDWordIndexed"; 3620b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 3630b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 3640b57cec5SDimitry Andric} 3650b57cec5SDimitry Andricdef VecListThreeDWordIndexed : Operand<i32> { 3660b57cec5SDimitry Andric let ParserMatchClass = VecListThreeDWordIndexAsmOperand; 3670b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 3680b57cec5SDimitry Andric} 3690b57cec5SDimitry Andric// Register list of three Q registers with half-word lane subscripting. 3700b57cec5SDimitry Andricdef VecListThreeQHWordIndexAsmOperand : AsmOperandClass { 3710b57cec5SDimitry Andric let Name = "VecListThreeQHWordIndexed"; 3720b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 3730b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 3740b57cec5SDimitry Andric} 3750b57cec5SDimitry Andricdef VecListThreeQHWordIndexed : Operand<i32> { 3760b57cec5SDimitry Andric let ParserMatchClass = VecListThreeQHWordIndexAsmOperand; 3770b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 3780b57cec5SDimitry Andric} 3790b57cec5SDimitry Andric// ...with word lane subscripting. 3800b57cec5SDimitry Andricdef VecListThreeQWordIndexAsmOperand : AsmOperandClass { 3810b57cec5SDimitry Andric let Name = "VecListThreeQWordIndexed"; 3820b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 3830b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 3840b57cec5SDimitry Andric} 3850b57cec5SDimitry Andricdef VecListThreeQWordIndexed : Operand<i32> { 3860b57cec5SDimitry Andric let ParserMatchClass = VecListThreeQWordIndexAsmOperand; 3870b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 3880b57cec5SDimitry Andric} 3890b57cec5SDimitry Andric 3900b57cec5SDimitry Andric// Register list of four D registers with byte lane subscripting. 3910b57cec5SDimitry Andricdef VecListFourDByteIndexAsmOperand : AsmOperandClass { 3920b57cec5SDimitry Andric let Name = "VecListFourDByteIndexed"; 3930b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 3940b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 3950b57cec5SDimitry Andric} 3960b57cec5SDimitry Andricdef VecListFourDByteIndexed : Operand<i32> { 3970b57cec5SDimitry Andric let ParserMatchClass = VecListFourDByteIndexAsmOperand; 3980b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 3990b57cec5SDimitry Andric} 4000b57cec5SDimitry Andric// ...with half-word lane subscripting. 4010b57cec5SDimitry Andricdef VecListFourDHWordIndexAsmOperand : AsmOperandClass { 4020b57cec5SDimitry Andric let Name = "VecListFourDHWordIndexed"; 4030b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 4040b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 4050b57cec5SDimitry Andric} 4060b57cec5SDimitry Andricdef VecListFourDHWordIndexed : Operand<i32> { 4070b57cec5SDimitry Andric let ParserMatchClass = VecListFourDHWordIndexAsmOperand; 4080b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 4090b57cec5SDimitry Andric} 4100b57cec5SDimitry Andric// ...with word lane subscripting. 4110b57cec5SDimitry Andricdef VecListFourDWordIndexAsmOperand : AsmOperandClass { 4120b57cec5SDimitry Andric let Name = "VecListFourDWordIndexed"; 4130b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 4140b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 4150b57cec5SDimitry Andric} 4160b57cec5SDimitry Andricdef VecListFourDWordIndexed : Operand<i32> { 4170b57cec5SDimitry Andric let ParserMatchClass = VecListFourDWordIndexAsmOperand; 4180b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 4190b57cec5SDimitry Andric} 4200b57cec5SDimitry Andric// Register list of four Q registers with half-word lane subscripting. 4210b57cec5SDimitry Andricdef VecListFourQHWordIndexAsmOperand : AsmOperandClass { 4220b57cec5SDimitry Andric let Name = "VecListFourQHWordIndexed"; 4230b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 4240b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 4250b57cec5SDimitry Andric} 4260b57cec5SDimitry Andricdef VecListFourQHWordIndexed : Operand<i32> { 4270b57cec5SDimitry Andric let ParserMatchClass = VecListFourQHWordIndexAsmOperand; 4280b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 4290b57cec5SDimitry Andric} 4300b57cec5SDimitry Andric// ...with word lane subscripting. 4310b57cec5SDimitry Andricdef VecListFourQWordIndexAsmOperand : AsmOperandClass { 4320b57cec5SDimitry Andric let Name = "VecListFourQWordIndexed"; 4330b57cec5SDimitry Andric let ParserMethod = "parseVectorList"; 4340b57cec5SDimitry Andric let RenderMethod = "addVecListIndexedOperands"; 4350b57cec5SDimitry Andric} 4360b57cec5SDimitry Andricdef VecListFourQWordIndexed : Operand<i32> { 4370b57cec5SDimitry Andric let ParserMatchClass = VecListFourQWordIndexAsmOperand; 4380b57cec5SDimitry Andric let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx); 4390b57cec5SDimitry Andric} 4400b57cec5SDimitry Andric 4410b57cec5SDimitry Andricdef dword_alignedload : PatFrag<(ops node:$ptr), (load node:$ptr), [{ 4420b57cec5SDimitry Andric return cast<LoadSDNode>(N)->getAlignment() >= 8; 4430b57cec5SDimitry Andric}]>; 4440b57cec5SDimitry Andricdef dword_alignedstore : PatFrag<(ops node:$val, node:$ptr), 4450b57cec5SDimitry Andric (store node:$val, node:$ptr), [{ 4460b57cec5SDimitry Andric return cast<StoreSDNode>(N)->getAlignment() >= 8; 4470b57cec5SDimitry Andric}]>; 4480b57cec5SDimitry Andricdef word_alignedload : PatFrag<(ops node:$ptr), (load node:$ptr), [{ 4490b57cec5SDimitry Andric return cast<LoadSDNode>(N)->getAlignment() == 4; 4500b57cec5SDimitry Andric}]>; 4510b57cec5SDimitry Andricdef word_alignedstore : PatFrag<(ops node:$val, node:$ptr), 4520b57cec5SDimitry Andric (store node:$val, node:$ptr), [{ 4530b57cec5SDimitry Andric return cast<StoreSDNode>(N)->getAlignment() == 4; 4540b57cec5SDimitry Andric}]>; 4550b57cec5SDimitry Andricdef hword_alignedload : PatFrag<(ops node:$ptr), (load node:$ptr), [{ 4560b57cec5SDimitry Andric return cast<LoadSDNode>(N)->getAlignment() == 2; 4570b57cec5SDimitry Andric}]>; 4580b57cec5SDimitry Andricdef hword_alignedstore : PatFrag<(ops node:$val, node:$ptr), 4590b57cec5SDimitry Andric (store node:$val, node:$ptr), [{ 4600b57cec5SDimitry Andric return cast<StoreSDNode>(N)->getAlignment() == 2; 4610b57cec5SDimitry Andric}]>; 4620b57cec5SDimitry Andricdef byte_alignedload : PatFrag<(ops node:$ptr), (load node:$ptr), [{ 4630b57cec5SDimitry Andric return cast<LoadSDNode>(N)->getAlignment() == 1; 4640b57cec5SDimitry Andric}]>; 4650b57cec5SDimitry Andricdef byte_alignedstore : PatFrag<(ops node:$val, node:$ptr), 4660b57cec5SDimitry Andric (store node:$val, node:$ptr), [{ 4670b57cec5SDimitry Andric return cast<StoreSDNode>(N)->getAlignment() == 1; 4680b57cec5SDimitry Andric}]>; 4690b57cec5SDimitry Andricdef non_word_alignedload : PatFrag<(ops node:$ptr), (load node:$ptr), [{ 4700b57cec5SDimitry Andric return cast<LoadSDNode>(N)->getAlignment() < 4; 4710b57cec5SDimitry Andric}]>; 4720b57cec5SDimitry Andricdef non_word_alignedstore : PatFrag<(ops node:$val, node:$ptr), 4730b57cec5SDimitry Andric (store node:$val, node:$ptr), [{ 4740b57cec5SDimitry Andric return cast<StoreSDNode>(N)->getAlignment() < 4; 4750b57cec5SDimitry Andric}]>; 4760b57cec5SDimitry Andric 4770b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4780b57cec5SDimitry Andric// NEON-specific DAG Nodes. 4790b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4800b57cec5SDimitry Andric 4818bcb0991SDimitry Andricdef SDTARMVTST : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisSameAs<1, 2>]>; 4828bcb0991SDimitry Andricdef NEONvtst : SDNode<"ARMISD::VTST", SDTARMVTST>; 4830b57cec5SDimitry Andric 4840b57cec5SDimitry Andric// Types for vector shift by immediates. The "SHX" version is for long and 4850b57cec5SDimitry Andric// narrow operations where the source and destination vectors have different 4860b57cec5SDimitry Andric// types. The "SHINS" version is for shift and insert operations. 4870b57cec5SDimitry Andricdef SDTARMVSHXIMM : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisInt<1>, 4880b57cec5SDimitry Andric SDTCisVT<2, i32>]>; 4890b57cec5SDimitry Andricdef SDTARMVSHINSIMM : SDTypeProfile<1, 3, [SDTCisInt<0>, SDTCisSameAs<0, 1>, 4900b57cec5SDimitry Andric SDTCisSameAs<0, 2>, SDTCisVT<3, i32>]>; 4910b57cec5SDimitry Andric 4920b57cec5SDimitry Andricdef NEONvshrnImm : SDNode<"ARMISD::VSHRNIMM", SDTARMVSHXIMM>; 4930b57cec5SDimitry Andric 4940b57cec5SDimitry Andricdef NEONvrshrsImm : SDNode<"ARMISD::VRSHRsIMM", SDTARMVSHIMM>; 4950b57cec5SDimitry Andricdef NEONvrshruImm : SDNode<"ARMISD::VRSHRuIMM", SDTARMVSHIMM>; 4960b57cec5SDimitry Andricdef NEONvrshrnImm : SDNode<"ARMISD::VRSHRNIMM", SDTARMVSHXIMM>; 4970b57cec5SDimitry Andric 4980b57cec5SDimitry Andricdef NEONvqshlsImm : SDNode<"ARMISD::VQSHLsIMM", SDTARMVSHIMM>; 4990b57cec5SDimitry Andricdef NEONvqshluImm : SDNode<"ARMISD::VQSHLuIMM", SDTARMVSHIMM>; 5000b57cec5SDimitry Andricdef NEONvqshlsuImm : SDNode<"ARMISD::VQSHLsuIMM", SDTARMVSHIMM>; 5010b57cec5SDimitry Andricdef NEONvqshrnsImm : SDNode<"ARMISD::VQSHRNsIMM", SDTARMVSHXIMM>; 5020b57cec5SDimitry Andricdef NEONvqshrnuImm : SDNode<"ARMISD::VQSHRNuIMM", SDTARMVSHXIMM>; 5030b57cec5SDimitry Andricdef NEONvqshrnsuImm : SDNode<"ARMISD::VQSHRNsuIMM", SDTARMVSHXIMM>; 5040b57cec5SDimitry Andric 5050b57cec5SDimitry Andricdef NEONvqrshrnsImm : SDNode<"ARMISD::VQRSHRNsIMM", SDTARMVSHXIMM>; 5060b57cec5SDimitry Andricdef NEONvqrshrnuImm : SDNode<"ARMISD::VQRSHRNuIMM", SDTARMVSHXIMM>; 5070b57cec5SDimitry Andricdef NEONvqrshrnsuImm : SDNode<"ARMISD::VQRSHRNsuIMM", SDTARMVSHXIMM>; 5080b57cec5SDimitry Andric 5090b57cec5SDimitry Andricdef NEONvsliImm : SDNode<"ARMISD::VSLIIMM", SDTARMVSHINSIMM>; 5100b57cec5SDimitry Andricdef NEONvsriImm : SDNode<"ARMISD::VSRIIMM", SDTARMVSHINSIMM>; 5110b57cec5SDimitry Andric 5120b57cec5SDimitry Andricdef SDTARMVORRIMM : SDTypeProfile<1, 2, [SDTCisVec<0>, SDTCisSameAs<0, 1>, 5130b57cec5SDimitry Andric SDTCisVT<2, i32>]>; 5140b57cec5SDimitry Andricdef NEONvorrImm : SDNode<"ARMISD::VORRIMM", SDTARMVORRIMM>; 5150b57cec5SDimitry Andricdef NEONvbicImm : SDNode<"ARMISD::VBICIMM", SDTARMVORRIMM>; 5160b57cec5SDimitry Andric 5170b57cec5SDimitry Andricdef NEONvbsl : SDNode<"ARMISD::VBSL", 5180b57cec5SDimitry Andric SDTypeProfile<1, 3, [SDTCisVec<0>, 5190b57cec5SDimitry Andric SDTCisSameAs<0, 1>, 5200b57cec5SDimitry Andric SDTCisSameAs<0, 2>, 5210b57cec5SDimitry Andric SDTCisSameAs<0, 3>]>>; 5220b57cec5SDimitry Andric 5230b57cec5SDimitry Andricdef SDTARMVEXT : SDTypeProfile<1, 3, [SDTCisVec<0>, SDTCisSameAs<0, 1>, 5240b57cec5SDimitry Andric SDTCisSameAs<0, 2>, SDTCisVT<3, i32>]>; 5250b57cec5SDimitry Andricdef NEONvext : SDNode<"ARMISD::VEXT", SDTARMVEXT>; 5260b57cec5SDimitry Andric 5270b57cec5SDimitry Andricdef SDTARMVSHUF2 : SDTypeProfile<2, 2, [SDTCisVec<0>, SDTCisSameAs<0, 1>, 5280b57cec5SDimitry Andric SDTCisSameAs<0, 2>, 5290b57cec5SDimitry Andric SDTCisSameAs<0, 3>]>; 5300b57cec5SDimitry Andricdef NEONzip : SDNode<"ARMISD::VZIP", SDTARMVSHUF2>; 5310b57cec5SDimitry Andricdef NEONuzp : SDNode<"ARMISD::VUZP", SDTARMVSHUF2>; 5320b57cec5SDimitry Andricdef NEONtrn : SDNode<"ARMISD::VTRN", SDTARMVSHUF2>; 5330b57cec5SDimitry Andric 5340b57cec5SDimitry Andricdef SDTARMVMULL : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisInt<1>, 5350b57cec5SDimitry Andric SDTCisSameAs<1, 2>]>; 5360b57cec5SDimitry Andricdef NEONvmulls : SDNode<"ARMISD::VMULLs", SDTARMVMULL>; 5370b57cec5SDimitry Andricdef NEONvmullu : SDNode<"ARMISD::VMULLu", SDTARMVMULL>; 5380b57cec5SDimitry Andric 5390b57cec5SDimitry Andricdef SDTARMVTBL1 : SDTypeProfile<1, 2, [SDTCisVT<0, v8i8>, SDTCisVT<1, v8i8>, 5400b57cec5SDimitry Andric SDTCisVT<2, v8i8>]>; 5410b57cec5SDimitry Andricdef SDTARMVTBL2 : SDTypeProfile<1, 3, [SDTCisVT<0, v8i8>, SDTCisVT<1, v8i8>, 5420b57cec5SDimitry Andric SDTCisVT<2, v8i8>, SDTCisVT<3, v8i8>]>; 5430b57cec5SDimitry Andricdef NEONvtbl1 : SDNode<"ARMISD::VTBL1", SDTARMVTBL1>; 5440b57cec5SDimitry Andricdef NEONvtbl2 : SDNode<"ARMISD::VTBL2", SDTARMVTBL2>; 5450b57cec5SDimitry Andric 5460b57cec5SDimitry Andric 5470b57cec5SDimitry Andricdef NEONimmAllZerosV: PatLeaf<(ARMvmovImm (i32 timm)), [{ 5480b57cec5SDimitry Andric ConstantSDNode *ConstVal = cast<ConstantSDNode>(N->getOperand(0)); 5490b57cec5SDimitry Andric unsigned EltBits = 0; 5508bcb0991SDimitry Andric uint64_t EltVal = ARM_AM::decodeVMOVModImm(ConstVal->getZExtValue(), EltBits); 5510b57cec5SDimitry Andric return (EltBits == 32 && EltVal == 0); 5520b57cec5SDimitry Andric}]>; 5530b57cec5SDimitry Andric 5540b57cec5SDimitry Andricdef NEONimmAllOnesV: PatLeaf<(ARMvmovImm (i32 timm)), [{ 5550b57cec5SDimitry Andric ConstantSDNode *ConstVal = cast<ConstantSDNode>(N->getOperand(0)); 5560b57cec5SDimitry Andric unsigned EltBits = 0; 5578bcb0991SDimitry Andric uint64_t EltVal = ARM_AM::decodeVMOVModImm(ConstVal->getZExtValue(), EltBits); 5580b57cec5SDimitry Andric return (EltBits == 8 && EltVal == 0xff); 5590b57cec5SDimitry Andric}]>; 5600b57cec5SDimitry Andric 5610b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 5620b57cec5SDimitry Andric// NEON load / store instructions 5630b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 5640b57cec5SDimitry Andric 5650b57cec5SDimitry Andric// Use VLDM to load a Q register as a D register pair. 5660b57cec5SDimitry Andric// This is a pseudo instruction that is expanded to VLDMD after reg alloc. 5670b57cec5SDimitry Andricdef VLDMQIA 5680b57cec5SDimitry Andric : PseudoVFPLdStM<(outs DPair:$dst), (ins GPR:$Rn), 5690b57cec5SDimitry Andric IIC_fpLoad_m, "", 5700b57cec5SDimitry Andric [(set DPair:$dst, (v2f64 (word_alignedload GPR:$Rn)))]>; 5710b57cec5SDimitry Andric 5720b57cec5SDimitry Andric// Use VSTM to store a Q register as a D register pair. 5730b57cec5SDimitry Andric// This is a pseudo instruction that is expanded to VSTMD after reg alloc. 5740b57cec5SDimitry Andricdef VSTMQIA 5750b57cec5SDimitry Andric : PseudoVFPLdStM<(outs), (ins DPair:$src, GPR:$Rn), 5760b57cec5SDimitry Andric IIC_fpStore_m, "", 5770b57cec5SDimitry Andric [(word_alignedstore (v2f64 DPair:$src), GPR:$Rn)]>; 5780b57cec5SDimitry Andric 5790b57cec5SDimitry Andric// Classes for VLD* pseudo-instructions with multi-register operands. 5800b57cec5SDimitry Andric// These are expanded to real instructions after register allocation. 5810b57cec5SDimitry Andricclass VLDQPseudo<InstrItinClass itin> 5820b57cec5SDimitry Andric : PseudoNLdSt<(outs QPR:$dst), (ins addrmode6:$addr), itin, "">; 5830b57cec5SDimitry Andricclass VLDQWBPseudo<InstrItinClass itin> 5840b57cec5SDimitry Andric : PseudoNLdSt<(outs QPR:$dst, GPR:$wb), 5850b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset), itin, 5860b57cec5SDimitry Andric "$addr.addr = $wb">; 5870b57cec5SDimitry Andricclass VLDQWBfixedPseudo<InstrItinClass itin> 5880b57cec5SDimitry Andric : PseudoNLdSt<(outs QPR:$dst, GPR:$wb), 5890b57cec5SDimitry Andric (ins addrmode6:$addr), itin, 5900b57cec5SDimitry Andric "$addr.addr = $wb">; 5910b57cec5SDimitry Andricclass VLDQWBregisterPseudo<InstrItinClass itin> 5920b57cec5SDimitry Andric : PseudoNLdSt<(outs QPR:$dst, GPR:$wb), 5930b57cec5SDimitry Andric (ins addrmode6:$addr, rGPR:$offset), itin, 5940b57cec5SDimitry Andric "$addr.addr = $wb">; 5950b57cec5SDimitry Andric 5960b57cec5SDimitry Andricclass VLDQQPseudo<InstrItinClass itin> 5970b57cec5SDimitry Andric : PseudoNLdSt<(outs QQPR:$dst), (ins addrmode6:$addr), itin, "">; 5980b57cec5SDimitry Andricclass VLDQQWBPseudo<InstrItinClass itin> 5990b57cec5SDimitry Andric : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb), 6000b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset), itin, 6010b57cec5SDimitry Andric "$addr.addr = $wb">; 6020b57cec5SDimitry Andricclass VLDQQWBfixedPseudo<InstrItinClass itin> 6030b57cec5SDimitry Andric : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb), 6040b57cec5SDimitry Andric (ins addrmode6:$addr), itin, 6050b57cec5SDimitry Andric "$addr.addr = $wb">; 6060b57cec5SDimitry Andricclass VLDQQWBregisterPseudo<InstrItinClass itin> 6070b57cec5SDimitry Andric : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb), 6080b57cec5SDimitry Andric (ins addrmode6:$addr, rGPR:$offset), itin, 6090b57cec5SDimitry Andric "$addr.addr = $wb">; 6100b57cec5SDimitry Andric 6110b57cec5SDimitry Andric 6120b57cec5SDimitry Andricclass VLDQQQQPseudo<InstrItinClass itin> 6130b57cec5SDimitry Andric : PseudoNLdSt<(outs QQQQPR:$dst), (ins addrmode6:$addr, QQQQPR:$src),itin, 6140b57cec5SDimitry Andric "$src = $dst">; 6150b57cec5SDimitry Andricclass VLDQQQQWBPseudo<InstrItinClass itin> 6160b57cec5SDimitry Andric : PseudoNLdSt<(outs QQQQPR:$dst, GPR:$wb), 6170b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src), itin, 6180b57cec5SDimitry Andric "$addr.addr = $wb, $src = $dst">; 6190b57cec5SDimitry Andric 6200b57cec5SDimitry Andriclet mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1 in { 6210b57cec5SDimitry Andric 6220b57cec5SDimitry Andric// VLD1 : Vector Load (multiple single elements) 6230b57cec5SDimitry Andricclass VLD1D<bits<4> op7_4, string Dt, Operand AddrMode> 6240b57cec5SDimitry Andric : NLdSt<0,0b10,0b0111,op7_4, (outs VecListOneD:$Vd), 6250b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD1, 6260b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn", "", []>, Sched<[WriteVLD1]> { 6270b57cec5SDimitry Andric let Rm = 0b1111; 6280b57cec5SDimitry Andric let Inst{4} = Rn{4}; 6290b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 6300b57cec5SDimitry Andric} 6310b57cec5SDimitry Andricclass VLD1Q<bits<4> op7_4, string Dt, Operand AddrMode> 6320b57cec5SDimitry Andric : NLdSt<0,0b10,0b1010,op7_4, (outs VecListDPair:$Vd), 6330b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD1x2, 6340b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn", "", []>, Sched<[WriteVLD2]> { 6350b57cec5SDimitry Andric let Rm = 0b1111; 6360b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 6370b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 6380b57cec5SDimitry Andric} 6390b57cec5SDimitry Andric 6400b57cec5SDimitry Andricdef VLD1d8 : VLD1D<{0,0,0,?}, "8", addrmode6align64>; 6410b57cec5SDimitry Andricdef VLD1d16 : VLD1D<{0,1,0,?}, "16", addrmode6align64>; 6420b57cec5SDimitry Andricdef VLD1d32 : VLD1D<{1,0,0,?}, "32", addrmode6align64>; 6430b57cec5SDimitry Andricdef VLD1d64 : VLD1D<{1,1,0,?}, "64", addrmode6align64>; 6440b57cec5SDimitry Andric 6450b57cec5SDimitry Andricdef VLD1q8 : VLD1Q<{0,0,?,?}, "8", addrmode6align64or128>; 6460b57cec5SDimitry Andricdef VLD1q16 : VLD1Q<{0,1,?,?}, "16", addrmode6align64or128>; 6470b57cec5SDimitry Andricdef VLD1q32 : VLD1Q<{1,0,?,?}, "32", addrmode6align64or128>; 6480b57cec5SDimitry Andricdef VLD1q64 : VLD1Q<{1,1,?,?}, "64", addrmode6align64or128>; 6490b57cec5SDimitry Andric 6500b57cec5SDimitry Andric// ...with address register writeback: 6510b57cec5SDimitry Andricmulticlass VLD1DWB<bits<4> op7_4, string Dt, Operand AddrMode> { 6520b57cec5SDimitry Andric def _fixed : NLdSt<0,0b10, 0b0111,op7_4, (outs VecListOneD:$Vd, GPR:$wb), 6530b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD1u, 6540b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn!", 6550b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD1]> { 6560b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 6570b57cec5SDimitry Andric let Inst{4} = Rn{4}; 6580b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 6590b57cec5SDimitry Andric } 6600b57cec5SDimitry Andric def _register : NLdSt<0,0b10,0b0111,op7_4, (outs VecListOneD:$Vd, GPR:$wb), 6610b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1u, 6620b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn, $Rm", 6630b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD1]> { 6640b57cec5SDimitry Andric let Inst{4} = Rn{4}; 6650b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 6660b57cec5SDimitry Andric } 6670b57cec5SDimitry Andric} 6680b57cec5SDimitry Andricmulticlass VLD1QWB<bits<4> op7_4, string Dt, Operand AddrMode> { 6690b57cec5SDimitry Andric def _fixed : NLdSt<0,0b10,0b1010,op7_4, (outs VecListDPair:$Vd, GPR:$wb), 6700b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD1x2u, 6710b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn!", 6720b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD2]> { 6730b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 6740b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 6750b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 6760b57cec5SDimitry Andric } 6770b57cec5SDimitry Andric def _register : NLdSt<0,0b10,0b1010,op7_4, (outs VecListDPair:$Vd, GPR:$wb), 6780b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1x2u, 6790b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn, $Rm", 6800b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD2]> { 6810b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 6820b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 6830b57cec5SDimitry Andric } 6840b57cec5SDimitry Andric} 6850b57cec5SDimitry Andric 6860b57cec5SDimitry Andricdefm VLD1d8wb : VLD1DWB<{0,0,0,?}, "8", addrmode6align64>; 6870b57cec5SDimitry Andricdefm VLD1d16wb : VLD1DWB<{0,1,0,?}, "16", addrmode6align64>; 6880b57cec5SDimitry Andricdefm VLD1d32wb : VLD1DWB<{1,0,0,?}, "32", addrmode6align64>; 6890b57cec5SDimitry Andricdefm VLD1d64wb : VLD1DWB<{1,1,0,?}, "64", addrmode6align64>; 6900b57cec5SDimitry Andricdefm VLD1q8wb : VLD1QWB<{0,0,?,?}, "8", addrmode6align64or128>; 6910b57cec5SDimitry Andricdefm VLD1q16wb : VLD1QWB<{0,1,?,?}, "16", addrmode6align64or128>; 6920b57cec5SDimitry Andricdefm VLD1q32wb : VLD1QWB<{1,0,?,?}, "32", addrmode6align64or128>; 6930b57cec5SDimitry Andricdefm VLD1q64wb : VLD1QWB<{1,1,?,?}, "64", addrmode6align64or128>; 6940b57cec5SDimitry Andric 6950b57cec5SDimitry Andric// ...with 3 registers 6960b57cec5SDimitry Andricclass VLD1D3<bits<4> op7_4, string Dt, Operand AddrMode> 6970b57cec5SDimitry Andric : NLdSt<0,0b10,0b0110,op7_4, (outs VecListThreeD:$Vd), 6980b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD1x3, "vld1", Dt, 6990b57cec5SDimitry Andric "$Vd, $Rn", "", []>, Sched<[WriteVLD3]> { 7000b57cec5SDimitry Andric let Rm = 0b1111; 7010b57cec5SDimitry Andric let Inst{4} = Rn{4}; 7020b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 7030b57cec5SDimitry Andric} 7040b57cec5SDimitry Andricmulticlass VLD1D3WB<bits<4> op7_4, string Dt, Operand AddrMode> { 7050b57cec5SDimitry Andric def _fixed : NLdSt<0,0b10,0b0110, op7_4, (outs VecListThreeD:$Vd, GPR:$wb), 7060b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD1x2u, 7070b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn!", 7080b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD3]> { 7090b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 7100b57cec5SDimitry Andric let Inst{4} = Rn{4}; 7110b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 7120b57cec5SDimitry Andric } 7130b57cec5SDimitry Andric def _register : NLdSt<0,0b10,0b0110,op7_4, (outs VecListThreeD:$Vd, GPR:$wb), 7140b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1x2u, 7150b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn, $Rm", 7160b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD3]> { 7170b57cec5SDimitry Andric let Inst{4} = Rn{4}; 7180b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 7190b57cec5SDimitry Andric } 7200b57cec5SDimitry Andric} 7210b57cec5SDimitry Andric 7220b57cec5SDimitry Andricdef VLD1d8T : VLD1D3<{0,0,0,?}, "8", addrmode6align64>; 7230b57cec5SDimitry Andricdef VLD1d16T : VLD1D3<{0,1,0,?}, "16", addrmode6align64>; 7240b57cec5SDimitry Andricdef VLD1d32T : VLD1D3<{1,0,0,?}, "32", addrmode6align64>; 7250b57cec5SDimitry Andricdef VLD1d64T : VLD1D3<{1,1,0,?}, "64", addrmode6align64>; 7260b57cec5SDimitry Andric 7270b57cec5SDimitry Andricdefm VLD1d8Twb : VLD1D3WB<{0,0,0,?}, "8", addrmode6align64>; 7280b57cec5SDimitry Andricdefm VLD1d16Twb : VLD1D3WB<{0,1,0,?}, "16", addrmode6align64>; 7290b57cec5SDimitry Andricdefm VLD1d32Twb : VLD1D3WB<{1,0,0,?}, "32", addrmode6align64>; 7300b57cec5SDimitry Andricdefm VLD1d64Twb : VLD1D3WB<{1,1,0,?}, "64", addrmode6align64>; 7310b57cec5SDimitry Andric 7320b57cec5SDimitry Andricdef VLD1d8TPseudo : VLDQQPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7330b57cec5SDimitry Andricdef VLD1d16TPseudo : VLDQQPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7340b57cec5SDimitry Andricdef VLD1d32TPseudo : VLDQQPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7350b57cec5SDimitry Andricdef VLD1d64TPseudo : VLDQQPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7360b57cec5SDimitry Andricdef VLD1d64TPseudoWB_fixed : VLDQQWBfixedPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7370b57cec5SDimitry Andricdef VLD1d64TPseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7380b57cec5SDimitry Andric 7390b57cec5SDimitry Andricdef VLD1q8HighTPseudo : VLDQQQQPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7400b57cec5SDimitry Andricdef VLD1q8LowTPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7410b57cec5SDimitry Andricdef VLD1q16HighTPseudo : VLDQQQQPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7420b57cec5SDimitry Andricdef VLD1q16LowTPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7430b57cec5SDimitry Andricdef VLD1q32HighTPseudo : VLDQQQQPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7440b57cec5SDimitry Andricdef VLD1q32LowTPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7450b57cec5SDimitry Andricdef VLD1q64HighTPseudo : VLDQQQQPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7460b57cec5SDimitry Andricdef VLD1q64LowTPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD1x3>, Sched<[WriteVLD3]>; 7470b57cec5SDimitry Andric 7480b57cec5SDimitry Andric// ...with 4 registers 7490b57cec5SDimitry Andricclass VLD1D4<bits<4> op7_4, string Dt, Operand AddrMode> 7500b57cec5SDimitry Andric : NLdSt<0, 0b10, 0b0010, op7_4, (outs VecListFourD:$Vd), 7510b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD1x4, "vld1", Dt, 7520b57cec5SDimitry Andric "$Vd, $Rn", "", []>, Sched<[WriteVLD4]> { 7530b57cec5SDimitry Andric let Rm = 0b1111; 7540b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 7550b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 7560b57cec5SDimitry Andric} 7570b57cec5SDimitry Andricmulticlass VLD1D4WB<bits<4> op7_4, string Dt, Operand AddrMode> { 7580b57cec5SDimitry Andric def _fixed : NLdSt<0,0b10,0b0010, op7_4, (outs VecListFourD:$Vd, GPR:$wb), 7590b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD1x2u, 7600b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn!", 7610b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD4]> { 7620b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 7630b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 7640b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 7650b57cec5SDimitry Andric } 7660b57cec5SDimitry Andric def _register : NLdSt<0,0b10,0b0010,op7_4, (outs VecListFourD:$Vd, GPR:$wb), 7670b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1x2u, 7680b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn, $Rm", 7690b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD4]> { 7700b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 7710b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 7720b57cec5SDimitry Andric } 7730b57cec5SDimitry Andric} 7740b57cec5SDimitry Andric 7750b57cec5SDimitry Andricdef VLD1d8Q : VLD1D4<{0,0,?,?}, "8", addrmode6align64or128or256>; 7760b57cec5SDimitry Andricdef VLD1d16Q : VLD1D4<{0,1,?,?}, "16", addrmode6align64or128or256>; 7770b57cec5SDimitry Andricdef VLD1d32Q : VLD1D4<{1,0,?,?}, "32", addrmode6align64or128or256>; 7780b57cec5SDimitry Andricdef VLD1d64Q : VLD1D4<{1,1,?,?}, "64", addrmode6align64or128or256>; 7790b57cec5SDimitry Andric 7800b57cec5SDimitry Andricdefm VLD1d8Qwb : VLD1D4WB<{0,0,?,?}, "8", addrmode6align64or128or256>; 7810b57cec5SDimitry Andricdefm VLD1d16Qwb : VLD1D4WB<{0,1,?,?}, "16", addrmode6align64or128or256>; 7820b57cec5SDimitry Andricdefm VLD1d32Qwb : VLD1D4WB<{1,0,?,?}, "32", addrmode6align64or128or256>; 7830b57cec5SDimitry Andricdefm VLD1d64Qwb : VLD1D4WB<{1,1,?,?}, "64", addrmode6align64or128or256>; 7840b57cec5SDimitry Andric 7850b57cec5SDimitry Andricdef VLD1d8QPseudo : VLDQQPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7860b57cec5SDimitry Andricdef VLD1d16QPseudo : VLDQQPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7870b57cec5SDimitry Andricdef VLD1d32QPseudo : VLDQQPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7880b57cec5SDimitry Andricdef VLD1d64QPseudo : VLDQQPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7890b57cec5SDimitry Andricdef VLD1d64QPseudoWB_fixed : VLDQQWBfixedPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7900b57cec5SDimitry Andricdef VLD1d64QPseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7910b57cec5SDimitry Andric 7920b57cec5SDimitry Andricdef VLD1q8LowQPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7930b57cec5SDimitry Andricdef VLD1q8HighQPseudo : VLDQQQQPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7940b57cec5SDimitry Andricdef VLD1q16LowQPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7950b57cec5SDimitry Andricdef VLD1q16HighQPseudo : VLDQQQQPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7960b57cec5SDimitry Andricdef VLD1q32LowQPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7970b57cec5SDimitry Andricdef VLD1q32HighQPseudo : VLDQQQQPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7980b57cec5SDimitry Andricdef VLD1q64LowQPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 7990b57cec5SDimitry Andricdef VLD1q64HighQPseudo : VLDQQQQPseudo<IIC_VLD1x4>, Sched<[WriteVLD4]>; 8000b57cec5SDimitry Andric 8010b57cec5SDimitry Andric// VLD2 : Vector Load (multiple 2-element structures) 8020b57cec5SDimitry Andricclass VLD2<bits<4> op11_8, bits<4> op7_4, string Dt, RegisterOperand VdTy, 8030b57cec5SDimitry Andric InstrItinClass itin, Operand AddrMode> 8040b57cec5SDimitry Andric : NLdSt<0, 0b10, op11_8, op7_4, (outs VdTy:$Vd), 8050b57cec5SDimitry Andric (ins AddrMode:$Rn), itin, 8060b57cec5SDimitry Andric "vld2", Dt, "$Vd, $Rn", "", []> { 8070b57cec5SDimitry Andric let Rm = 0b1111; 8080b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 8090b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST2Instruction"; 8100b57cec5SDimitry Andric} 8110b57cec5SDimitry Andric 8120b57cec5SDimitry Andricdef VLD2d8 : VLD2<0b1000, {0,0,?,?}, "8", VecListDPair, IIC_VLD2, 8130b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8140b57cec5SDimitry Andricdef VLD2d16 : VLD2<0b1000, {0,1,?,?}, "16", VecListDPair, IIC_VLD2, 8150b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8160b57cec5SDimitry Andricdef VLD2d32 : VLD2<0b1000, {1,0,?,?}, "32", VecListDPair, IIC_VLD2, 8170b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8180b57cec5SDimitry Andric 8190b57cec5SDimitry Andricdef VLD2q8 : VLD2<0b0011, {0,0,?,?}, "8", VecListFourD, IIC_VLD2x2, 8200b57cec5SDimitry Andric addrmode6align64or128or256>, Sched<[WriteVLD4]>; 8210b57cec5SDimitry Andricdef VLD2q16 : VLD2<0b0011, {0,1,?,?}, "16", VecListFourD, IIC_VLD2x2, 8220b57cec5SDimitry Andric addrmode6align64or128or256>, Sched<[WriteVLD4]>; 8230b57cec5SDimitry Andricdef VLD2q32 : VLD2<0b0011, {1,0,?,?}, "32", VecListFourD, IIC_VLD2x2, 8240b57cec5SDimitry Andric addrmode6align64or128or256>, Sched<[WriteVLD4]>; 8250b57cec5SDimitry Andric 8260b57cec5SDimitry Andricdef VLD2q8Pseudo : VLDQQPseudo<IIC_VLD2x2>, Sched<[WriteVLD4]>; 8270b57cec5SDimitry Andricdef VLD2q16Pseudo : VLDQQPseudo<IIC_VLD2x2>, Sched<[WriteVLD4]>; 8280b57cec5SDimitry Andricdef VLD2q32Pseudo : VLDQQPseudo<IIC_VLD2x2>, Sched<[WriteVLD4]>; 8290b57cec5SDimitry Andric 8300b57cec5SDimitry Andric// ...with address register writeback: 8310b57cec5SDimitry Andricmulticlass VLD2WB<bits<4> op11_8, bits<4> op7_4, string Dt, 8320b57cec5SDimitry Andric RegisterOperand VdTy, InstrItinClass itin, Operand AddrMode> { 8330b57cec5SDimitry Andric def _fixed : NLdSt<0, 0b10, op11_8, op7_4, (outs VdTy:$Vd, GPR:$wb), 8340b57cec5SDimitry Andric (ins AddrMode:$Rn), itin, 8350b57cec5SDimitry Andric "vld2", Dt, "$Vd, $Rn!", 8360b57cec5SDimitry Andric "$Rn.addr = $wb", []> { 8370b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 8380b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 8390b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST2Instruction"; 8400b57cec5SDimitry Andric } 8410b57cec5SDimitry Andric def _register : NLdSt<0, 0b10, op11_8, op7_4, (outs VdTy:$Vd, GPR:$wb), 8420b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm), itin, 8430b57cec5SDimitry Andric "vld2", Dt, "$Vd, $Rn, $Rm", 8440b57cec5SDimitry Andric "$Rn.addr = $wb", []> { 8450b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 8460b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST2Instruction"; 8470b57cec5SDimitry Andric } 8480b57cec5SDimitry Andric} 8490b57cec5SDimitry Andric 8500b57cec5SDimitry Andricdefm VLD2d8wb : VLD2WB<0b1000, {0,0,?,?}, "8", VecListDPair, IIC_VLD2u, 8510b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8520b57cec5SDimitry Andricdefm VLD2d16wb : VLD2WB<0b1000, {0,1,?,?}, "16", VecListDPair, IIC_VLD2u, 8530b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8540b57cec5SDimitry Andricdefm VLD2d32wb : VLD2WB<0b1000, {1,0,?,?}, "32", VecListDPair, IIC_VLD2u, 8550b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8560b57cec5SDimitry Andric 8570b57cec5SDimitry Andricdefm VLD2q8wb : VLD2WB<0b0011, {0,0,?,?}, "8", VecListFourD, IIC_VLD2x2u, 8580b57cec5SDimitry Andric addrmode6align64or128or256>, Sched<[WriteVLD4]>; 8590b57cec5SDimitry Andricdefm VLD2q16wb : VLD2WB<0b0011, {0,1,?,?}, "16", VecListFourD, IIC_VLD2x2u, 8600b57cec5SDimitry Andric addrmode6align64or128or256>, Sched<[WriteVLD4]>; 8610b57cec5SDimitry Andricdefm VLD2q32wb : VLD2WB<0b0011, {1,0,?,?}, "32", VecListFourD, IIC_VLD2x2u, 8620b57cec5SDimitry Andric addrmode6align64or128or256>, Sched<[WriteVLD4]>; 8630b57cec5SDimitry Andric 8640b57cec5SDimitry Andricdef VLD2q8PseudoWB_fixed : VLDQQWBfixedPseudo<IIC_VLD2x2u>, Sched<[WriteVLD4]>; 8650b57cec5SDimitry Andricdef VLD2q16PseudoWB_fixed : VLDQQWBfixedPseudo<IIC_VLD2x2u>, Sched<[WriteVLD4]>; 8660b57cec5SDimitry Andricdef VLD2q32PseudoWB_fixed : VLDQQWBfixedPseudo<IIC_VLD2x2u>, Sched<[WriteVLD4]>; 8670b57cec5SDimitry Andricdef VLD2q8PseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD2x2u>, Sched<[WriteVLD4]>; 8680b57cec5SDimitry Andricdef VLD2q16PseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD2x2u>, Sched<[WriteVLD4]>; 8690b57cec5SDimitry Andricdef VLD2q32PseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD2x2u>, Sched<[WriteVLD4]>; 8700b57cec5SDimitry Andric 8710b57cec5SDimitry Andric// ...with double-spaced registers 8720b57cec5SDimitry Andricdef VLD2b8 : VLD2<0b1001, {0,0,?,?}, "8", VecListDPairSpaced, IIC_VLD2, 8730b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8740b57cec5SDimitry Andricdef VLD2b16 : VLD2<0b1001, {0,1,?,?}, "16", VecListDPairSpaced, IIC_VLD2, 8750b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8760b57cec5SDimitry Andricdef VLD2b32 : VLD2<0b1001, {1,0,?,?}, "32", VecListDPairSpaced, IIC_VLD2, 8770b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8780b57cec5SDimitry Andricdefm VLD2b8wb : VLD2WB<0b1001, {0,0,?,?}, "8", VecListDPairSpaced, IIC_VLD2u, 8790b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8800b57cec5SDimitry Andricdefm VLD2b16wb : VLD2WB<0b1001, {0,1,?,?}, "16", VecListDPairSpaced, IIC_VLD2u, 8810b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8820b57cec5SDimitry Andricdefm VLD2b32wb : VLD2WB<0b1001, {1,0,?,?}, "32", VecListDPairSpaced, IIC_VLD2u, 8830b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVLD2]>; 8840b57cec5SDimitry Andric 8850b57cec5SDimitry Andric// VLD3 : Vector Load (multiple 3-element structures) 8860b57cec5SDimitry Andricclass VLD3D<bits<4> op11_8, bits<4> op7_4, string Dt> 8870b57cec5SDimitry Andric : NLdSt<0, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3), 8880b57cec5SDimitry Andric (ins addrmode6:$Rn), IIC_VLD3, 8890b57cec5SDimitry Andric "vld3", Dt, "\\{$Vd, $dst2, $dst3\\}, $Rn", "", []>, Sched<[WriteVLD3]> { 8900b57cec5SDimitry Andric let Rm = 0b1111; 8910b57cec5SDimitry Andric let Inst{4} = Rn{4}; 8920b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST3Instruction"; 8930b57cec5SDimitry Andric} 8940b57cec5SDimitry Andric 8950b57cec5SDimitry Andricdef VLD3d8 : VLD3D<0b0100, {0,0,0,?}, "8">; 8960b57cec5SDimitry Andricdef VLD3d16 : VLD3D<0b0100, {0,1,0,?}, "16">; 8970b57cec5SDimitry Andricdef VLD3d32 : VLD3D<0b0100, {1,0,0,?}, "32">; 8980b57cec5SDimitry Andric 8990b57cec5SDimitry Andricdef VLD3d8Pseudo : VLDQQPseudo<IIC_VLD3>, Sched<[WriteVLD3]>; 9000b57cec5SDimitry Andricdef VLD3d16Pseudo : VLDQQPseudo<IIC_VLD3>, Sched<[WriteVLD3]>; 9010b57cec5SDimitry Andricdef VLD3d32Pseudo : VLDQQPseudo<IIC_VLD3>, Sched<[WriteVLD3]>; 9020b57cec5SDimitry Andric 9030b57cec5SDimitry Andric// ...with address register writeback: 9040b57cec5SDimitry Andricclass VLD3DWB<bits<4> op11_8, bits<4> op7_4, string Dt> 9050b57cec5SDimitry Andric : NLdSt<0, 0b10, op11_8, op7_4, 9060b57cec5SDimitry Andric (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, GPR:$wb), 9070b57cec5SDimitry Andric (ins addrmode6:$Rn, am6offset:$Rm), IIC_VLD3u, 9080b57cec5SDimitry Andric "vld3", Dt, "\\{$Vd, $dst2, $dst3\\}, $Rn$Rm", 9090b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD3]> { 9100b57cec5SDimitry Andric let Inst{4} = Rn{4}; 9110b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST3Instruction"; 9120b57cec5SDimitry Andric} 9130b57cec5SDimitry Andric 9140b57cec5SDimitry Andricdef VLD3d8_UPD : VLD3DWB<0b0100, {0,0,0,?}, "8">; 9150b57cec5SDimitry Andricdef VLD3d16_UPD : VLD3DWB<0b0100, {0,1,0,?}, "16">; 9160b57cec5SDimitry Andricdef VLD3d32_UPD : VLD3DWB<0b0100, {1,0,0,?}, "32">; 9170b57cec5SDimitry Andric 9180b57cec5SDimitry Andricdef VLD3d8Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3u>, Sched<[WriteVLD3]>; 9190b57cec5SDimitry Andricdef VLD3d16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3u>, Sched<[WriteVLD3]>; 9200b57cec5SDimitry Andricdef VLD3d32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3u>, Sched<[WriteVLD3]>; 9210b57cec5SDimitry Andric 9220b57cec5SDimitry Andric// ...with double-spaced registers: 9230b57cec5SDimitry Andricdef VLD3q8 : VLD3D<0b0101, {0,0,0,?}, "8">; 9240b57cec5SDimitry Andricdef VLD3q16 : VLD3D<0b0101, {0,1,0,?}, "16">; 9250b57cec5SDimitry Andricdef VLD3q32 : VLD3D<0b0101, {1,0,0,?}, "32">; 9260b57cec5SDimitry Andricdef VLD3q8_UPD : VLD3DWB<0b0101, {0,0,0,?}, "8">; 9270b57cec5SDimitry Andricdef VLD3q16_UPD : VLD3DWB<0b0101, {0,1,0,?}, "16">; 9280b57cec5SDimitry Andricdef VLD3q32_UPD : VLD3DWB<0b0101, {1,0,0,?}, "32">; 9290b57cec5SDimitry Andric 9300b57cec5SDimitry Andricdef VLD3q8Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>, Sched<[WriteVLD3]>; 9310b57cec5SDimitry Andricdef VLD3q16Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>, Sched<[WriteVLD3]>; 9320b57cec5SDimitry Andricdef VLD3q32Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>, Sched<[WriteVLD3]>; 9330b57cec5SDimitry Andric 9340b57cec5SDimitry Andric// ...alternate versions to be allocated odd register numbers: 9350b57cec5SDimitry Andricdef VLD3q8oddPseudo : VLDQQQQPseudo<IIC_VLD3>, Sched<[WriteVLD3]>; 9360b57cec5SDimitry Andricdef VLD3q16oddPseudo : VLDQQQQPseudo<IIC_VLD3>, Sched<[WriteVLD3]>; 9370b57cec5SDimitry Andricdef VLD3q32oddPseudo : VLDQQQQPseudo<IIC_VLD3>, Sched<[WriteVLD3]>; 9380b57cec5SDimitry Andric 9390b57cec5SDimitry Andricdef VLD3q8oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>, Sched<[WriteVLD3]>; 9400b57cec5SDimitry Andricdef VLD3q16oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>, Sched<[WriteVLD3]>; 9410b57cec5SDimitry Andricdef VLD3q32oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>, Sched<[WriteVLD3]>; 9420b57cec5SDimitry Andric 9430b57cec5SDimitry Andric// VLD4 : Vector Load (multiple 4-element structures) 9440b57cec5SDimitry Andricclass VLD4D<bits<4> op11_8, bits<4> op7_4, string Dt> 9450b57cec5SDimitry Andric : NLdSt<0, 0b10, op11_8, op7_4, 9460b57cec5SDimitry Andric (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4), 9470b57cec5SDimitry Andric (ins addrmode6:$Rn), IIC_VLD4, 9480b57cec5SDimitry Andric "vld4", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn", "", []>, 9490b57cec5SDimitry Andric Sched<[WriteVLD4]> { 9500b57cec5SDimitry Andric let Rm = 0b1111; 9510b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 9520b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST4Instruction"; 9530b57cec5SDimitry Andric} 9540b57cec5SDimitry Andric 9550b57cec5SDimitry Andricdef VLD4d8 : VLD4D<0b0000, {0,0,?,?}, "8">; 9560b57cec5SDimitry Andricdef VLD4d16 : VLD4D<0b0000, {0,1,?,?}, "16">; 9570b57cec5SDimitry Andricdef VLD4d32 : VLD4D<0b0000, {1,0,?,?}, "32">; 9580b57cec5SDimitry Andric 9590b57cec5SDimitry Andricdef VLD4d8Pseudo : VLDQQPseudo<IIC_VLD4>, Sched<[WriteVLD4]>; 9600b57cec5SDimitry Andricdef VLD4d16Pseudo : VLDQQPseudo<IIC_VLD4>, Sched<[WriteVLD4]>; 9610b57cec5SDimitry Andricdef VLD4d32Pseudo : VLDQQPseudo<IIC_VLD4>, Sched<[WriteVLD4]>; 9620b57cec5SDimitry Andric 9630b57cec5SDimitry Andric// ...with address register writeback: 9640b57cec5SDimitry Andricclass VLD4DWB<bits<4> op11_8, bits<4> op7_4, string Dt> 9650b57cec5SDimitry Andric : NLdSt<0, 0b10, op11_8, op7_4, 9660b57cec5SDimitry Andric (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), 9670b57cec5SDimitry Andric (ins addrmode6:$Rn, am6offset:$Rm), IIC_VLD4u, 9680b57cec5SDimitry Andric "vld4", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn$Rm", 9690b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD4]> { 9700b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 9710b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST4Instruction"; 9720b57cec5SDimitry Andric} 9730b57cec5SDimitry Andric 9740b57cec5SDimitry Andricdef VLD4d8_UPD : VLD4DWB<0b0000, {0,0,?,?}, "8">; 9750b57cec5SDimitry Andricdef VLD4d16_UPD : VLD4DWB<0b0000, {0,1,?,?}, "16">; 9760b57cec5SDimitry Andricdef VLD4d32_UPD : VLD4DWB<0b0000, {1,0,?,?}, "32">; 9770b57cec5SDimitry Andric 9780b57cec5SDimitry Andricdef VLD4d8Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4u>, Sched<[WriteVLD4]>; 9790b57cec5SDimitry Andricdef VLD4d16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4u>, Sched<[WriteVLD4]>; 9800b57cec5SDimitry Andricdef VLD4d32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4u>, Sched<[WriteVLD4]>; 9810b57cec5SDimitry Andric 9820b57cec5SDimitry Andric// ...with double-spaced registers: 9830b57cec5SDimitry Andricdef VLD4q8 : VLD4D<0b0001, {0,0,?,?}, "8">; 9840b57cec5SDimitry Andricdef VLD4q16 : VLD4D<0b0001, {0,1,?,?}, "16">; 9850b57cec5SDimitry Andricdef VLD4q32 : VLD4D<0b0001, {1,0,?,?}, "32">; 9860b57cec5SDimitry Andricdef VLD4q8_UPD : VLD4DWB<0b0001, {0,0,?,?}, "8">; 9870b57cec5SDimitry Andricdef VLD4q16_UPD : VLD4DWB<0b0001, {0,1,?,?}, "16">; 9880b57cec5SDimitry Andricdef VLD4q32_UPD : VLD4DWB<0b0001, {1,0,?,?}, "32">; 9890b57cec5SDimitry Andric 9900b57cec5SDimitry Andricdef VLD4q8Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>, Sched<[WriteVLD4]>; 9910b57cec5SDimitry Andricdef VLD4q16Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>, Sched<[WriteVLD4]>; 9920b57cec5SDimitry Andricdef VLD4q32Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>, Sched<[WriteVLD4]>; 9930b57cec5SDimitry Andric 9940b57cec5SDimitry Andric// ...alternate versions to be allocated odd register numbers: 9950b57cec5SDimitry Andricdef VLD4q8oddPseudo : VLDQQQQPseudo<IIC_VLD4>, Sched<[WriteVLD4]>; 9960b57cec5SDimitry Andricdef VLD4q16oddPseudo : VLDQQQQPseudo<IIC_VLD4>, Sched<[WriteVLD4]>; 9970b57cec5SDimitry Andricdef VLD4q32oddPseudo : VLDQQQQPseudo<IIC_VLD4>, Sched<[WriteVLD4]>; 9980b57cec5SDimitry Andric 9990b57cec5SDimitry Andricdef VLD4q8oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>, Sched<[WriteVLD4]>; 10000b57cec5SDimitry Andricdef VLD4q16oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>, Sched<[WriteVLD4]>; 10010b57cec5SDimitry Andricdef VLD4q32oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>, Sched<[WriteVLD4]>; 10020b57cec5SDimitry Andric 10030b57cec5SDimitry Andric} // mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1 10040b57cec5SDimitry Andric 10050b57cec5SDimitry Andric// Classes for VLD*LN pseudo-instructions with multi-register operands. 10060b57cec5SDimitry Andric// These are expanded to real instructions after register allocation. 10070b57cec5SDimitry Andricclass VLDQLNPseudo<InstrItinClass itin> 10080b57cec5SDimitry Andric : PseudoNLdSt<(outs QPR:$dst), 10090b57cec5SDimitry Andric (ins addrmode6:$addr, QPR:$src, nohash_imm:$lane), 10100b57cec5SDimitry Andric itin, "$src = $dst">; 10110b57cec5SDimitry Andricclass VLDQLNWBPseudo<InstrItinClass itin> 10120b57cec5SDimitry Andric : PseudoNLdSt<(outs QPR:$dst, GPR:$wb), 10130b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset, QPR:$src, 10140b57cec5SDimitry Andric nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">; 10150b57cec5SDimitry Andricclass VLDQQLNPseudo<InstrItinClass itin> 10160b57cec5SDimitry Andric : PseudoNLdSt<(outs QQPR:$dst), 10170b57cec5SDimitry Andric (ins addrmode6:$addr, QQPR:$src, nohash_imm:$lane), 10180b57cec5SDimitry Andric itin, "$src = $dst">; 10190b57cec5SDimitry Andricclass VLDQQLNWBPseudo<InstrItinClass itin> 10200b57cec5SDimitry Andric : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb), 10210b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset, QQPR:$src, 10220b57cec5SDimitry Andric nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">; 10230b57cec5SDimitry Andricclass VLDQQQQLNPseudo<InstrItinClass itin> 10240b57cec5SDimitry Andric : PseudoNLdSt<(outs QQQQPR:$dst), 10250b57cec5SDimitry Andric (ins addrmode6:$addr, QQQQPR:$src, nohash_imm:$lane), 10260b57cec5SDimitry Andric itin, "$src = $dst">; 10270b57cec5SDimitry Andricclass VLDQQQQLNWBPseudo<InstrItinClass itin> 10280b57cec5SDimitry Andric : PseudoNLdSt<(outs QQQQPR:$dst, GPR:$wb), 10290b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src, 10300b57cec5SDimitry Andric nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">; 10310b57cec5SDimitry Andric 10320b57cec5SDimitry Andric// VLD1LN : Vector Load (single element to one lane) 10330b57cec5SDimitry Andricclass VLD1LN<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty, 10340b57cec5SDimitry Andric PatFrag LoadOp> 10350b57cec5SDimitry Andric : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd), 10360b57cec5SDimitry Andric (ins addrmode6:$Rn, DPR:$src, nohash_imm:$lane), 10370b57cec5SDimitry Andric IIC_VLD1ln, "vld1", Dt, "\\{$Vd[$lane]\\}, $Rn", 10380b57cec5SDimitry Andric "$src = $Vd", 10390b57cec5SDimitry Andric [(set DPR:$Vd, (vector_insert (Ty DPR:$src), 10400b57cec5SDimitry Andric (i32 (LoadOp addrmode6:$Rn)), 10410b57cec5SDimitry Andric imm:$lane))]> { 10420b57cec5SDimitry Andric let Rm = 0b1111; 10430b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD1LN"; 10440b57cec5SDimitry Andric} 10450b57cec5SDimitry Andricclass VLD1LN32<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty, 10460b57cec5SDimitry Andric PatFrag LoadOp> 10470b57cec5SDimitry Andric : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd), 10480b57cec5SDimitry Andric (ins addrmode6oneL32:$Rn, DPR:$src, nohash_imm:$lane), 10490b57cec5SDimitry Andric IIC_VLD1ln, "vld1", Dt, "\\{$Vd[$lane]\\}, $Rn", 10500b57cec5SDimitry Andric "$src = $Vd", 10510b57cec5SDimitry Andric [(set DPR:$Vd, (vector_insert (Ty DPR:$src), 10520b57cec5SDimitry Andric (i32 (LoadOp addrmode6oneL32:$Rn)), 10530b57cec5SDimitry Andric imm:$lane))]>, Sched<[WriteVLD1]> { 10540b57cec5SDimitry Andric let Rm = 0b1111; 10550b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD1LN"; 10560b57cec5SDimitry Andric} 10570b57cec5SDimitry Andricclass VLD1QLNPseudo<ValueType Ty, PatFrag LoadOp> : VLDQLNPseudo<IIC_VLD1ln>, 10580b57cec5SDimitry Andric Sched<[WriteVLD1]> { 10590b57cec5SDimitry Andric let Pattern = [(set QPR:$dst, (vector_insert (Ty QPR:$src), 10600b57cec5SDimitry Andric (i32 (LoadOp addrmode6:$addr)), 10610b57cec5SDimitry Andric imm:$lane))]; 10620b57cec5SDimitry Andric} 10630b57cec5SDimitry Andric 10640b57cec5SDimitry Andricdef VLD1LNd8 : VLD1LN<0b0000, {?,?,?,0}, "8", v8i8, extloadi8> { 10650b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 10660b57cec5SDimitry Andric} 10670b57cec5SDimitry Andricdef VLD1LNd16 : VLD1LN<0b0100, {?,?,0,?}, "16", v4i16, extloadi16> { 10680b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 10690b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 10700b57cec5SDimitry Andric} 10710b57cec5SDimitry Andricdef VLD1LNd32 : VLD1LN32<0b1000, {?,0,?,?}, "32", v2i32, load> { 10720b57cec5SDimitry Andric let Inst{7} = lane{0}; 10730b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 10740b57cec5SDimitry Andric} 10750b57cec5SDimitry Andric 10760b57cec5SDimitry Andricdef VLD1LNq8Pseudo : VLD1QLNPseudo<v16i8, extloadi8>; 10770b57cec5SDimitry Andricdef VLD1LNq16Pseudo : VLD1QLNPseudo<v8i16, extloadi16>; 10780b57cec5SDimitry Andricdef VLD1LNq32Pseudo : VLD1QLNPseudo<v4i32, load>; 10790b57cec5SDimitry Andric 10800b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 10810b57cec5SDimitry Andricdef : Pat<(vector_insert (v4f16 DPR:$src), 10820b57cec5SDimitry Andric (f16 (load addrmode6:$addr)), imm:$lane), 10830b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, DPR:$src, imm:$lane)>; 10840b57cec5SDimitry Andricdef : Pat<(vector_insert (v8f16 QPR:$src), 10850b57cec5SDimitry Andric (f16 (load addrmode6:$addr)), imm:$lane), 10860b57cec5SDimitry Andric (VLD1LNq16Pseudo addrmode6:$addr, QPR:$src, imm:$lane)>; 10870b57cec5SDimitry Andricdef : Pat<(vector_insert (v2f32 DPR:$src), 10880b57cec5SDimitry Andric (f32 (load addrmode6:$addr)), imm:$lane), 10890b57cec5SDimitry Andric (VLD1LNd32 addrmode6:$addr, DPR:$src, imm:$lane)>; 10900b57cec5SDimitry Andricdef : Pat<(vector_insert (v4f32 QPR:$src), 10910b57cec5SDimitry Andric (f32 (load addrmode6:$addr)), imm:$lane), 10920b57cec5SDimitry Andric (VLD1LNq32Pseudo addrmode6:$addr, QPR:$src, imm:$lane)>; 10930b57cec5SDimitry Andric 10940b57cec5SDimitry Andric// A 64-bit subvector insert to the first 128-bit vector position 10950b57cec5SDimitry Andric// is a subregister copy that needs no instruction. 10960b57cec5SDimitry Andricdef : Pat<(insert_subvector undef, (v1i64 DPR:$src), (i32 0)), 10970b57cec5SDimitry Andric (INSERT_SUBREG (v2i64 (IMPLICIT_DEF)), DPR:$src, dsub_0)>; 10980b57cec5SDimitry Andricdef : Pat<(insert_subvector undef, (v2i32 DPR:$src), (i32 0)), 10990b57cec5SDimitry Andric (INSERT_SUBREG (v4i32 (IMPLICIT_DEF)), DPR:$src, dsub_0)>; 11000b57cec5SDimitry Andricdef : Pat<(insert_subvector undef, (v2f32 DPR:$src), (i32 0)), 11010b57cec5SDimitry Andric (INSERT_SUBREG (v4f32 (IMPLICIT_DEF)), DPR:$src, dsub_0)>; 11020b57cec5SDimitry Andricdef : Pat<(insert_subvector undef, (v4i16 DPR:$src), (i32 0)), 11030b57cec5SDimitry Andric (INSERT_SUBREG (v8i16 (IMPLICIT_DEF)), DPR:$src, dsub_0)>; 11040b57cec5SDimitry Andricdef : Pat<(insert_subvector undef, (v4f16 DPR:$src), (i32 0)), 11050b57cec5SDimitry Andric (INSERT_SUBREG (v8f16 (IMPLICIT_DEF)), DPR:$src, dsub_0)>; 11060b57cec5SDimitry Andricdef : Pat<(insert_subvector (v16i8 undef), (v8i8 DPR:$src), (i32 0)), 11070b57cec5SDimitry Andric (INSERT_SUBREG (v16i8 (IMPLICIT_DEF)), DPR:$src, dsub_0)>; 11080b57cec5SDimitry Andric} 11090b57cec5SDimitry Andric 11100b57cec5SDimitry Andric 11110b57cec5SDimitry Andriclet mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1 in { 11120b57cec5SDimitry Andric 11130b57cec5SDimitry Andric// ...with address register writeback: 11140b57cec5SDimitry Andricclass VLD1LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> 11150b57cec5SDimitry Andric : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, GPR:$wb), 11160b57cec5SDimitry Andric (ins addrmode6:$Rn, am6offset:$Rm, 11170b57cec5SDimitry Andric DPR:$src, nohash_imm:$lane), IIC_VLD1lnu, "vld1", Dt, 11180b57cec5SDimitry Andric "\\{$Vd[$lane]\\}, $Rn$Rm", 11190b57cec5SDimitry Andric "$src = $Vd, $Rn.addr = $wb", []>, Sched<[WriteVLD1]> { 11200b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD1LN"; 11210b57cec5SDimitry Andric} 11220b57cec5SDimitry Andric 11230b57cec5SDimitry Andricdef VLD1LNd8_UPD : VLD1LNWB<0b0000, {?,?,?,0}, "8"> { 11240b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 11250b57cec5SDimitry Andric} 11260b57cec5SDimitry Andricdef VLD1LNd16_UPD : VLD1LNWB<0b0100, {?,?,0,?}, "16"> { 11270b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 11280b57cec5SDimitry Andric let Inst{4} = Rn{4}; 11290b57cec5SDimitry Andric} 11300b57cec5SDimitry Andricdef VLD1LNd32_UPD : VLD1LNWB<0b1000, {?,0,?,?}, "32"> { 11310b57cec5SDimitry Andric let Inst{7} = lane{0}; 11320b57cec5SDimitry Andric let Inst{5} = Rn{4}; 11330b57cec5SDimitry Andric let Inst{4} = Rn{4}; 11340b57cec5SDimitry Andric} 11350b57cec5SDimitry Andric 11360b57cec5SDimitry Andricdef VLD1LNq8Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD1lnu>, Sched<[WriteVLD1]>; 11370b57cec5SDimitry Andricdef VLD1LNq16Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD1lnu>, Sched<[WriteVLD1]>; 11380b57cec5SDimitry Andricdef VLD1LNq32Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD1lnu>, Sched<[WriteVLD1]>; 11390b57cec5SDimitry Andric 11400b57cec5SDimitry Andric// VLD2LN : Vector Load (single 2-element structure to one lane) 11410b57cec5SDimitry Andricclass VLD2LN<bits<4> op11_8, bits<4> op7_4, string Dt> 11420b57cec5SDimitry Andric : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2), 11430b57cec5SDimitry Andric (ins addrmode6:$Rn, DPR:$src1, DPR:$src2, nohash_imm:$lane), 11440b57cec5SDimitry Andric IIC_VLD2ln, "vld2", Dt, "\\{$Vd[$lane], $dst2[$lane]\\}, $Rn", 11450b57cec5SDimitry Andric "$src1 = $Vd, $src2 = $dst2", []>, Sched<[WriteVLD1]> { 11460b57cec5SDimitry Andric let Rm = 0b1111; 11470b57cec5SDimitry Andric let Inst{4} = Rn{4}; 11480b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD2LN"; 11490b57cec5SDimitry Andric} 11500b57cec5SDimitry Andric 11510b57cec5SDimitry Andricdef VLD2LNd8 : VLD2LN<0b0001, {?,?,?,?}, "8"> { 11520b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 11530b57cec5SDimitry Andric} 11540b57cec5SDimitry Andricdef VLD2LNd16 : VLD2LN<0b0101, {?,?,0,?}, "16"> { 11550b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 11560b57cec5SDimitry Andric} 11570b57cec5SDimitry Andricdef VLD2LNd32 : VLD2LN<0b1001, {?,0,0,?}, "32"> { 11580b57cec5SDimitry Andric let Inst{7} = lane{0}; 11590b57cec5SDimitry Andric} 11600b57cec5SDimitry Andric 11610b57cec5SDimitry Andricdef VLD2LNd8Pseudo : VLDQLNPseudo<IIC_VLD2ln>, Sched<[WriteVLD1]>; 11620b57cec5SDimitry Andricdef VLD2LNd16Pseudo : VLDQLNPseudo<IIC_VLD2ln>, Sched<[WriteVLD1]>; 11630b57cec5SDimitry Andricdef VLD2LNd32Pseudo : VLDQLNPseudo<IIC_VLD2ln>, Sched<[WriteVLD1]>; 11640b57cec5SDimitry Andric 11650b57cec5SDimitry Andric// ...with double-spaced registers: 11660b57cec5SDimitry Andricdef VLD2LNq16 : VLD2LN<0b0101, {?,?,1,?}, "16"> { 11670b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 11680b57cec5SDimitry Andric} 11690b57cec5SDimitry Andricdef VLD2LNq32 : VLD2LN<0b1001, {?,1,0,?}, "32"> { 11700b57cec5SDimitry Andric let Inst{7} = lane{0}; 11710b57cec5SDimitry Andric} 11720b57cec5SDimitry Andric 11730b57cec5SDimitry Andricdef VLD2LNq16Pseudo : VLDQQLNPseudo<IIC_VLD2ln>, Sched<[WriteVLD1]>; 11740b57cec5SDimitry Andricdef VLD2LNq32Pseudo : VLDQQLNPseudo<IIC_VLD2ln>, Sched<[WriteVLD1]>; 11750b57cec5SDimitry Andric 11760b57cec5SDimitry Andric// ...with address register writeback: 11770b57cec5SDimitry Andricclass VLD2LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> 11780b57cec5SDimitry Andric : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2, GPR:$wb), 11790b57cec5SDimitry Andric (ins addrmode6:$Rn, am6offset:$Rm, 11800b57cec5SDimitry Andric DPR:$src1, DPR:$src2, nohash_imm:$lane), IIC_VLD2lnu, "vld2", Dt, 11810b57cec5SDimitry Andric "\\{$Vd[$lane], $dst2[$lane]\\}, $Rn$Rm", 11820b57cec5SDimitry Andric "$src1 = $Vd, $src2 = $dst2, $Rn.addr = $wb", []> { 11830b57cec5SDimitry Andric let Inst{4} = Rn{4}; 11840b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD2LN"; 11850b57cec5SDimitry Andric} 11860b57cec5SDimitry Andric 11870b57cec5SDimitry Andricdef VLD2LNd8_UPD : VLD2LNWB<0b0001, {?,?,?,?}, "8"> { 11880b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 11890b57cec5SDimitry Andric} 11900b57cec5SDimitry Andricdef VLD2LNd16_UPD : VLD2LNWB<0b0101, {?,?,0,?}, "16"> { 11910b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 11920b57cec5SDimitry Andric} 11930b57cec5SDimitry Andricdef VLD2LNd32_UPD : VLD2LNWB<0b1001, {?,0,0,?}, "32"> { 11940b57cec5SDimitry Andric let Inst{7} = lane{0}; 11950b57cec5SDimitry Andric} 11960b57cec5SDimitry Andric 11970b57cec5SDimitry Andricdef VLD2LNd8Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD2lnu>, Sched<[WriteVLD1]>; 11980b57cec5SDimitry Andricdef VLD2LNd16Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD2lnu>, Sched<[WriteVLD1]>; 11990b57cec5SDimitry Andricdef VLD2LNd32Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD2lnu>, Sched<[WriteVLD1]>; 12000b57cec5SDimitry Andric 12010b57cec5SDimitry Andricdef VLD2LNq16_UPD : VLD2LNWB<0b0101, {?,?,1,?}, "16"> { 12020b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 12030b57cec5SDimitry Andric} 12040b57cec5SDimitry Andricdef VLD2LNq32_UPD : VLD2LNWB<0b1001, {?,1,0,?}, "32"> { 12050b57cec5SDimitry Andric let Inst{7} = lane{0}; 12060b57cec5SDimitry Andric} 12070b57cec5SDimitry Andric 12080b57cec5SDimitry Andricdef VLD2LNq16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD2lnu>, Sched<[WriteVLD1]>; 12090b57cec5SDimitry Andricdef VLD2LNq32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD2lnu>, Sched<[WriteVLD1]>; 12100b57cec5SDimitry Andric 12110b57cec5SDimitry Andric// VLD3LN : Vector Load (single 3-element structure to one lane) 12120b57cec5SDimitry Andricclass VLD3LN<bits<4> op11_8, bits<4> op7_4, string Dt> 12130b57cec5SDimitry Andric : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3), 12140b57cec5SDimitry Andric (ins addrmode6:$Rn, DPR:$src1, DPR:$src2, DPR:$src3, 12150b57cec5SDimitry Andric nohash_imm:$lane), IIC_VLD3ln, "vld3", Dt, 12160b57cec5SDimitry Andric "\\{$Vd[$lane], $dst2[$lane], $dst3[$lane]\\}, $Rn", 12170b57cec5SDimitry Andric "$src1 = $Vd, $src2 = $dst2, $src3 = $dst3", []>, Sched<[WriteVLD2]> { 12180b57cec5SDimitry Andric let Rm = 0b1111; 12190b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD3LN"; 12200b57cec5SDimitry Andric} 12210b57cec5SDimitry Andric 12220b57cec5SDimitry Andricdef VLD3LNd8 : VLD3LN<0b0010, {?,?,?,0}, "8"> { 12230b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 12240b57cec5SDimitry Andric} 12250b57cec5SDimitry Andricdef VLD3LNd16 : VLD3LN<0b0110, {?,?,0,0}, "16"> { 12260b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 12270b57cec5SDimitry Andric} 12280b57cec5SDimitry Andricdef VLD3LNd32 : VLD3LN<0b1010, {?,0,0,0}, "32"> { 12290b57cec5SDimitry Andric let Inst{7} = lane{0}; 12300b57cec5SDimitry Andric} 12310b57cec5SDimitry Andric 12320b57cec5SDimitry Andricdef VLD3LNd8Pseudo : VLDQQLNPseudo<IIC_VLD3ln>, Sched<[WriteVLD2]>; 12330b57cec5SDimitry Andricdef VLD3LNd16Pseudo : VLDQQLNPseudo<IIC_VLD3ln>, Sched<[WriteVLD2]>; 12340b57cec5SDimitry Andricdef VLD3LNd32Pseudo : VLDQQLNPseudo<IIC_VLD3ln>, Sched<[WriteVLD2]>; 12350b57cec5SDimitry Andric 12360b57cec5SDimitry Andric// ...with double-spaced registers: 12370b57cec5SDimitry Andricdef VLD3LNq16 : VLD3LN<0b0110, {?,?,1,0}, "16"> { 12380b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 12390b57cec5SDimitry Andric} 12400b57cec5SDimitry Andricdef VLD3LNq32 : VLD3LN<0b1010, {?,1,0,0}, "32"> { 12410b57cec5SDimitry Andric let Inst{7} = lane{0}; 12420b57cec5SDimitry Andric} 12430b57cec5SDimitry Andric 12440b57cec5SDimitry Andricdef VLD3LNq16Pseudo : VLDQQQQLNPseudo<IIC_VLD3ln>, Sched<[WriteVLD2]>; 12450b57cec5SDimitry Andricdef VLD3LNq32Pseudo : VLDQQQQLNPseudo<IIC_VLD3ln>, Sched<[WriteVLD2]>; 12460b57cec5SDimitry Andric 12470b57cec5SDimitry Andric// ...with address register writeback: 12480b57cec5SDimitry Andricclass VLD3LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> 12490b57cec5SDimitry Andric : NLdStLn<1, 0b10, op11_8, op7_4, 12500b57cec5SDimitry Andric (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, GPR:$wb), 12510b57cec5SDimitry Andric (ins addrmode6:$Rn, am6offset:$Rm, 12520b57cec5SDimitry Andric DPR:$src1, DPR:$src2, DPR:$src3, nohash_imm:$lane), 12530b57cec5SDimitry Andric IIC_VLD3lnu, "vld3", Dt, 12540b57cec5SDimitry Andric "\\{$Vd[$lane], $dst2[$lane], $dst3[$lane]\\}, $Rn$Rm", 12550b57cec5SDimitry Andric "$src1 = $Vd, $src2 = $dst2, $src3 = $dst3, $Rn.addr = $wb", 12560b57cec5SDimitry Andric []>, Sched<[WriteVLD2]> { 12570b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD3LN"; 12580b57cec5SDimitry Andric} 12590b57cec5SDimitry Andric 12600b57cec5SDimitry Andricdef VLD3LNd8_UPD : VLD3LNWB<0b0010, {?,?,?,0}, "8"> { 12610b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 12620b57cec5SDimitry Andric} 12630b57cec5SDimitry Andricdef VLD3LNd16_UPD : VLD3LNWB<0b0110, {?,?,0,0}, "16"> { 12640b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 12650b57cec5SDimitry Andric} 12660b57cec5SDimitry Andricdef VLD3LNd32_UPD : VLD3LNWB<0b1010, {?,0,0,0}, "32"> { 12670b57cec5SDimitry Andric let Inst{7} = lane{0}; 12680b57cec5SDimitry Andric} 12690b57cec5SDimitry Andric 12700b57cec5SDimitry Andricdef VLD3LNd8Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD3lnu>, Sched<[WriteVLD2]>; 12710b57cec5SDimitry Andricdef VLD3LNd16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD3lnu>, Sched<[WriteVLD2]>; 12720b57cec5SDimitry Andricdef VLD3LNd32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD3lnu>, Sched<[WriteVLD2]>; 12730b57cec5SDimitry Andric 12740b57cec5SDimitry Andricdef VLD3LNq16_UPD : VLD3LNWB<0b0110, {?,?,1,0}, "16"> { 12750b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 12760b57cec5SDimitry Andric} 12770b57cec5SDimitry Andricdef VLD3LNq32_UPD : VLD3LNWB<0b1010, {?,1,0,0}, "32"> { 12780b57cec5SDimitry Andric let Inst{7} = lane{0}; 12790b57cec5SDimitry Andric} 12800b57cec5SDimitry Andric 12810b57cec5SDimitry Andricdef VLD3LNq16Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD3lnu>, Sched<[WriteVLD2]>; 12820b57cec5SDimitry Andricdef VLD3LNq32Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD3lnu>, Sched<[WriteVLD2]>; 12830b57cec5SDimitry Andric 12840b57cec5SDimitry Andric// VLD4LN : Vector Load (single 4-element structure to one lane) 12850b57cec5SDimitry Andricclass VLD4LN<bits<4> op11_8, bits<4> op7_4, string Dt> 12860b57cec5SDimitry Andric : NLdStLn<1, 0b10, op11_8, op7_4, 12870b57cec5SDimitry Andric (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4), 12880b57cec5SDimitry Andric (ins addrmode6:$Rn, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, 12890b57cec5SDimitry Andric nohash_imm:$lane), IIC_VLD4ln, "vld4", Dt, 12900b57cec5SDimitry Andric "\\{$Vd[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $Rn", 12910b57cec5SDimitry Andric "$src1 = $Vd, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4", []>, 12920b57cec5SDimitry Andric Sched<[WriteVLD2]> { 12930b57cec5SDimitry Andric let Rm = 0b1111; 12940b57cec5SDimitry Andric let Inst{4} = Rn{4}; 12950b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD4LN"; 12960b57cec5SDimitry Andric} 12970b57cec5SDimitry Andric 12980b57cec5SDimitry Andricdef VLD4LNd8 : VLD4LN<0b0011, {?,?,?,?}, "8"> { 12990b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 13000b57cec5SDimitry Andric} 13010b57cec5SDimitry Andricdef VLD4LNd16 : VLD4LN<0b0111, {?,?,0,?}, "16"> { 13020b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 13030b57cec5SDimitry Andric} 13040b57cec5SDimitry Andricdef VLD4LNd32 : VLD4LN<0b1011, {?,0,?,?}, "32"> { 13050b57cec5SDimitry Andric let Inst{7} = lane{0}; 13060b57cec5SDimitry Andric let Inst{5} = Rn{5}; 13070b57cec5SDimitry Andric} 13080b57cec5SDimitry Andric 13090b57cec5SDimitry Andricdef VLD4LNd8Pseudo : VLDQQLNPseudo<IIC_VLD4ln>, Sched<[WriteVLD2]>; 13100b57cec5SDimitry Andricdef VLD4LNd16Pseudo : VLDQQLNPseudo<IIC_VLD4ln>, Sched<[WriteVLD2]>; 13110b57cec5SDimitry Andricdef VLD4LNd32Pseudo : VLDQQLNPseudo<IIC_VLD4ln>, Sched<[WriteVLD2]>; 13120b57cec5SDimitry Andric 13130b57cec5SDimitry Andric// ...with double-spaced registers: 13140b57cec5SDimitry Andricdef VLD4LNq16 : VLD4LN<0b0111, {?,?,1,?}, "16"> { 13150b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 13160b57cec5SDimitry Andric} 13170b57cec5SDimitry Andricdef VLD4LNq32 : VLD4LN<0b1011, {?,1,?,?}, "32"> { 13180b57cec5SDimitry Andric let Inst{7} = lane{0}; 13190b57cec5SDimitry Andric let Inst{5} = Rn{5}; 13200b57cec5SDimitry Andric} 13210b57cec5SDimitry Andric 13220b57cec5SDimitry Andricdef VLD4LNq16Pseudo : VLDQQQQLNPseudo<IIC_VLD4ln>, Sched<[WriteVLD2]>; 13230b57cec5SDimitry Andricdef VLD4LNq32Pseudo : VLDQQQQLNPseudo<IIC_VLD4ln>, Sched<[WriteVLD2]>; 13240b57cec5SDimitry Andric 13250b57cec5SDimitry Andric// ...with address register writeback: 13260b57cec5SDimitry Andricclass VLD4LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> 13270b57cec5SDimitry Andric : NLdStLn<1, 0b10, op11_8, op7_4, 13280b57cec5SDimitry Andric (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), 13290b57cec5SDimitry Andric (ins addrmode6:$Rn, am6offset:$Rm, 13300b57cec5SDimitry Andric DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, nohash_imm:$lane), 13310b57cec5SDimitry Andric IIC_VLD4lnu, "vld4", Dt, 13320b57cec5SDimitry Andric"\\{$Vd[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $Rn$Rm", 13330b57cec5SDimitry Andric"$src1 = $Vd, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4, $Rn.addr = $wb", 13340b57cec5SDimitry Andric []> { 13350b57cec5SDimitry Andric let Inst{4} = Rn{4}; 13360b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD4LN" ; 13370b57cec5SDimitry Andric} 13380b57cec5SDimitry Andric 13390b57cec5SDimitry Andricdef VLD4LNd8_UPD : VLD4LNWB<0b0011, {?,?,?,?}, "8"> { 13400b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 13410b57cec5SDimitry Andric} 13420b57cec5SDimitry Andricdef VLD4LNd16_UPD : VLD4LNWB<0b0111, {?,?,0,?}, "16"> { 13430b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 13440b57cec5SDimitry Andric} 13450b57cec5SDimitry Andricdef VLD4LNd32_UPD : VLD4LNWB<0b1011, {?,0,?,?}, "32"> { 13460b57cec5SDimitry Andric let Inst{7} = lane{0}; 13470b57cec5SDimitry Andric let Inst{5} = Rn{5}; 13480b57cec5SDimitry Andric} 13490b57cec5SDimitry Andric 13500b57cec5SDimitry Andricdef VLD4LNd8Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD4lnu>, Sched<[WriteVLD2]>; 13510b57cec5SDimitry Andricdef VLD4LNd16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD4lnu>, Sched<[WriteVLD2]>; 13520b57cec5SDimitry Andricdef VLD4LNd32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD4lnu>, Sched<[WriteVLD2]>; 13530b57cec5SDimitry Andric 13540b57cec5SDimitry Andricdef VLD4LNq16_UPD : VLD4LNWB<0b0111, {?,?,1,?}, "16"> { 13550b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 13560b57cec5SDimitry Andric} 13570b57cec5SDimitry Andricdef VLD4LNq32_UPD : VLD4LNWB<0b1011, {?,1,?,?}, "32"> { 13580b57cec5SDimitry Andric let Inst{7} = lane{0}; 13590b57cec5SDimitry Andric let Inst{5} = Rn{5}; 13600b57cec5SDimitry Andric} 13610b57cec5SDimitry Andric 13620b57cec5SDimitry Andricdef VLD4LNq16Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD4lnu>, Sched<[WriteVLD2]>; 13630b57cec5SDimitry Andricdef VLD4LNq32Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD4lnu>, Sched<[WriteVLD2]>; 13640b57cec5SDimitry Andric 13650b57cec5SDimitry Andric} // mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1 13660b57cec5SDimitry Andric 13670b57cec5SDimitry Andric// VLD1DUP : Vector Load (single element to all lanes) 13680b57cec5SDimitry Andricclass VLD1DUP<bits<4> op7_4, string Dt, ValueType Ty, PatFrag LoadOp, 13690b57cec5SDimitry Andric Operand AddrMode> 13700b57cec5SDimitry Andric : NLdSt<1, 0b10, 0b1100, op7_4, (outs VecListOneDAllLanes:$Vd), 13710b57cec5SDimitry Andric (ins AddrMode:$Rn), 13720b57cec5SDimitry Andric IIC_VLD1dup, "vld1", Dt, "$Vd, $Rn", "", 13730b57cec5SDimitry Andric [(set VecListOneDAllLanes:$Vd, 13740b57cec5SDimitry Andric (Ty (ARMvdup (i32 (LoadOp AddrMode:$Rn)))))]>, 13750b57cec5SDimitry Andric Sched<[WriteVLD2]> { 13760b57cec5SDimitry Andric let Rm = 0b1111; 13770b57cec5SDimitry Andric let Inst{4} = Rn{4}; 13780b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD1DupInstruction"; 13790b57cec5SDimitry Andric} 13800b57cec5SDimitry Andricdef VLD1DUPd8 : VLD1DUP<{0,0,0,?}, "8", v8i8, extloadi8, 13810b57cec5SDimitry Andric addrmode6dupalignNone>; 13820b57cec5SDimitry Andricdef VLD1DUPd16 : VLD1DUP<{0,1,0,?}, "16", v4i16, extloadi16, 13830b57cec5SDimitry Andric addrmode6dupalign16>; 13840b57cec5SDimitry Andricdef VLD1DUPd32 : VLD1DUP<{1,0,0,?}, "32", v2i32, load, 13850b57cec5SDimitry Andric addrmode6dupalign32>; 13860b57cec5SDimitry Andric 13870b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 13880b57cec5SDimitry Andricdef : Pat<(v2f32 (ARMvdup (f32 (load addrmode6dup:$addr)))), 13890b57cec5SDimitry Andric (VLD1DUPd32 addrmode6:$addr)>; 13900b57cec5SDimitry Andric} 13910b57cec5SDimitry Andric 13920b57cec5SDimitry Andricclass VLD1QDUP<bits<4> op7_4, string Dt, ValueType Ty, PatFrag LoadOp, 13930b57cec5SDimitry Andric Operand AddrMode> 13940b57cec5SDimitry Andric : NLdSt<1, 0b10, 0b1100, op7_4, (outs VecListDPairAllLanes:$Vd), 13950b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD1dup, 13960b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn", "", 13970b57cec5SDimitry Andric [(set VecListDPairAllLanes:$Vd, 13980b57cec5SDimitry Andric (Ty (ARMvdup (i32 (LoadOp AddrMode:$Rn)))))]> { 13990b57cec5SDimitry Andric let Rm = 0b1111; 14000b57cec5SDimitry Andric let Inst{4} = Rn{4}; 14010b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD1DupInstruction"; 14020b57cec5SDimitry Andric} 14030b57cec5SDimitry Andric 14040b57cec5SDimitry Andricdef VLD1DUPq8 : VLD1QDUP<{0,0,1,0}, "8", v16i8, extloadi8, 14050b57cec5SDimitry Andric addrmode6dupalignNone>; 14060b57cec5SDimitry Andricdef VLD1DUPq16 : VLD1QDUP<{0,1,1,?}, "16", v8i16, extloadi16, 14070b57cec5SDimitry Andric addrmode6dupalign16>; 14080b57cec5SDimitry Andricdef VLD1DUPq32 : VLD1QDUP<{1,0,1,?}, "32", v4i32, load, 14090b57cec5SDimitry Andric addrmode6dupalign32>; 14100b57cec5SDimitry Andric 14110b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 14120b57cec5SDimitry Andricdef : Pat<(v4f32 (ARMvdup (f32 (load addrmode6dup:$addr)))), 14130b57cec5SDimitry Andric (VLD1DUPq32 addrmode6:$addr)>; 14140b57cec5SDimitry Andric} 14150b57cec5SDimitry Andric 14160b57cec5SDimitry Andriclet mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1 in { 14170b57cec5SDimitry Andric// ...with address register writeback: 14180b57cec5SDimitry Andricmulticlass VLD1DUPWB<bits<4> op7_4, string Dt, Operand AddrMode> { 14190b57cec5SDimitry Andric def _fixed : NLdSt<1, 0b10, 0b1100, op7_4, 14200b57cec5SDimitry Andric (outs VecListOneDAllLanes:$Vd, GPR:$wb), 14210b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD1dupu, 14220b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn!", 14230b57cec5SDimitry Andric "$Rn.addr = $wb", []> { 14240b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 14250b57cec5SDimitry Andric let Inst{4} = Rn{4}; 14260b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD1DupInstruction"; 14270b57cec5SDimitry Andric } 14280b57cec5SDimitry Andric def _register : NLdSt<1, 0b10, 0b1100, op7_4, 14290b57cec5SDimitry Andric (outs VecListOneDAllLanes:$Vd, GPR:$wb), 14300b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1dupu, 14310b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn, $Rm", 14320b57cec5SDimitry Andric "$Rn.addr = $wb", []> { 14330b57cec5SDimitry Andric let Inst{4} = Rn{4}; 14340b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD1DupInstruction"; 14350b57cec5SDimitry Andric } 14360b57cec5SDimitry Andric} 14370b57cec5SDimitry Andricmulticlass VLD1QDUPWB<bits<4> op7_4, string Dt, Operand AddrMode> { 14380b57cec5SDimitry Andric def _fixed : NLdSt<1, 0b10, 0b1100, op7_4, 14390b57cec5SDimitry Andric (outs VecListDPairAllLanes:$Vd, GPR:$wb), 14400b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD1dupu, 14410b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn!", 14420b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD1]> { 14430b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 14440b57cec5SDimitry Andric let Inst{4} = Rn{4}; 14450b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD1DupInstruction"; 14460b57cec5SDimitry Andric } 14470b57cec5SDimitry Andric def _register : NLdSt<1, 0b10, 0b1100, op7_4, 14480b57cec5SDimitry Andric (outs VecListDPairAllLanes:$Vd, GPR:$wb), 14490b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1dupu, 14500b57cec5SDimitry Andric "vld1", Dt, "$Vd, $Rn, $Rm", 14510b57cec5SDimitry Andric "$Rn.addr = $wb", []> { 14520b57cec5SDimitry Andric let Inst{4} = Rn{4}; 14530b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD1DupInstruction"; 14540b57cec5SDimitry Andric } 14550b57cec5SDimitry Andric} 14560b57cec5SDimitry Andric 14570b57cec5SDimitry Andricdefm VLD1DUPd8wb : VLD1DUPWB<{0,0,0,0}, "8", addrmode6dupalignNone>; 14580b57cec5SDimitry Andricdefm VLD1DUPd16wb : VLD1DUPWB<{0,1,0,?}, "16", addrmode6dupalign16>; 14590b57cec5SDimitry Andricdefm VLD1DUPd32wb : VLD1DUPWB<{1,0,0,?}, "32", addrmode6dupalign32>; 14600b57cec5SDimitry Andric 14610b57cec5SDimitry Andricdefm VLD1DUPq8wb : VLD1QDUPWB<{0,0,1,0}, "8", addrmode6dupalignNone>; 14620b57cec5SDimitry Andricdefm VLD1DUPq16wb : VLD1QDUPWB<{0,1,1,?}, "16", addrmode6dupalign16>; 14630b57cec5SDimitry Andricdefm VLD1DUPq32wb : VLD1QDUPWB<{1,0,1,?}, "32", addrmode6dupalign32>; 14640b57cec5SDimitry Andric 14650b57cec5SDimitry Andric// VLD2DUP : Vector Load (single 2-element structure to all lanes) 14660b57cec5SDimitry Andricclass VLD2DUP<bits<4> op7_4, string Dt, RegisterOperand VdTy, Operand AddrMode> 14670b57cec5SDimitry Andric : NLdSt<1, 0b10, 0b1101, op7_4, (outs VdTy:$Vd), 14680b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD2dup, 14690b57cec5SDimitry Andric "vld2", Dt, "$Vd, $Rn", "", []> { 14700b57cec5SDimitry Andric let Rm = 0b1111; 14710b57cec5SDimitry Andric let Inst{4} = Rn{4}; 14720b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD2DupInstruction"; 14730b57cec5SDimitry Andric} 14740b57cec5SDimitry Andric 14750b57cec5SDimitry Andricdef VLD2DUPd8 : VLD2DUP<{0,0,0,?}, "8", VecListDPairAllLanes, 14760b57cec5SDimitry Andric addrmode6dupalign16>; 14770b57cec5SDimitry Andricdef VLD2DUPd16 : VLD2DUP<{0,1,0,?}, "16", VecListDPairAllLanes, 14780b57cec5SDimitry Andric addrmode6dupalign32>; 14790b57cec5SDimitry Andricdef VLD2DUPd32 : VLD2DUP<{1,0,0,?}, "32", VecListDPairAllLanes, 14800b57cec5SDimitry Andric addrmode6dupalign64>; 14810b57cec5SDimitry Andric 14820b57cec5SDimitry Andric// HACK this one, VLD2DUPd8x2 must be changed at the same time with VLD2b8 or 14830b57cec5SDimitry Andric// "vld2.8 {d0[], d2[]}, [r4:32]" will become "vld2.8 {d0, d2}, [r4:32]". 14840b57cec5SDimitry Andric// ...with double-spaced registers 14850b57cec5SDimitry Andricdef VLD2DUPd8x2 : VLD2DUP<{0,0,1,?}, "8", VecListDPairSpacedAllLanes, 14860b57cec5SDimitry Andric addrmode6dupalign16>; 14870b57cec5SDimitry Andricdef VLD2DUPd16x2 : VLD2DUP<{0,1,1,?}, "16", VecListDPairSpacedAllLanes, 14880b57cec5SDimitry Andric addrmode6dupalign32>; 14890b57cec5SDimitry Andricdef VLD2DUPd32x2 : VLD2DUP<{1,0,1,?}, "32", VecListDPairSpacedAllLanes, 14900b57cec5SDimitry Andric addrmode6dupalign64>; 14910b57cec5SDimitry Andric 14920b57cec5SDimitry Andricdef VLD2DUPq8EvenPseudo : VLDQQPseudo<IIC_VLD2dup>, Sched<[WriteVLD2]>; 14930b57cec5SDimitry Andricdef VLD2DUPq8OddPseudo : VLDQQPseudo<IIC_VLD2dup>, Sched<[WriteVLD2]>; 14940b57cec5SDimitry Andricdef VLD2DUPq16EvenPseudo : VLDQQPseudo<IIC_VLD2dup>, Sched<[WriteVLD2]>; 14950b57cec5SDimitry Andricdef VLD2DUPq16OddPseudo : VLDQQPseudo<IIC_VLD2dup>, Sched<[WriteVLD2]>; 14960b57cec5SDimitry Andricdef VLD2DUPq32EvenPseudo : VLDQQPseudo<IIC_VLD2dup>, Sched<[WriteVLD2]>; 14970b57cec5SDimitry Andricdef VLD2DUPq32OddPseudo : VLDQQPseudo<IIC_VLD2dup>, Sched<[WriteVLD2]>; 14980b57cec5SDimitry Andric 14990b57cec5SDimitry Andric// ...with address register writeback: 15000b57cec5SDimitry Andricmulticlass VLD2DUPWB<bits<4> op7_4, string Dt, RegisterOperand VdTy, 15010b57cec5SDimitry Andric Operand AddrMode> { 15020b57cec5SDimitry Andric def _fixed : NLdSt<1, 0b10, 0b1101, op7_4, 15030b57cec5SDimitry Andric (outs VdTy:$Vd, GPR:$wb), 15040b57cec5SDimitry Andric (ins AddrMode:$Rn), IIC_VLD2dupu, 15050b57cec5SDimitry Andric "vld2", Dt, "$Vd, $Rn!", 15060b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD1]> { 15070b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 15080b57cec5SDimitry Andric let Inst{4} = Rn{4}; 15090b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD2DupInstruction"; 15100b57cec5SDimitry Andric } 15110b57cec5SDimitry Andric def _register : NLdSt<1, 0b10, 0b1101, op7_4, 15120b57cec5SDimitry Andric (outs VdTy:$Vd, GPR:$wb), 15130b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD2dupu, 15140b57cec5SDimitry Andric "vld2", Dt, "$Vd, $Rn, $Rm", 15150b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD1]> { 15160b57cec5SDimitry Andric let Inst{4} = Rn{4}; 15170b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD2DupInstruction"; 15180b57cec5SDimitry Andric } 15190b57cec5SDimitry Andric} 15200b57cec5SDimitry Andric 15210b57cec5SDimitry Andricdefm VLD2DUPd8wb : VLD2DUPWB<{0,0,0,0}, "8", VecListDPairAllLanes, 15220b57cec5SDimitry Andric addrmode6dupalign16>; 15230b57cec5SDimitry Andricdefm VLD2DUPd16wb : VLD2DUPWB<{0,1,0,?}, "16", VecListDPairAllLanes, 15240b57cec5SDimitry Andric addrmode6dupalign32>; 15250b57cec5SDimitry Andricdefm VLD2DUPd32wb : VLD2DUPWB<{1,0,0,?}, "32", VecListDPairAllLanes, 15260b57cec5SDimitry Andric addrmode6dupalign64>; 15270b57cec5SDimitry Andric 15280b57cec5SDimitry Andricdefm VLD2DUPd8x2wb : VLD2DUPWB<{0,0,1,0}, "8", VecListDPairSpacedAllLanes, 15290b57cec5SDimitry Andric addrmode6dupalign16>; 15300b57cec5SDimitry Andricdefm VLD2DUPd16x2wb : VLD2DUPWB<{0,1,1,?}, "16", VecListDPairSpacedAllLanes, 15310b57cec5SDimitry Andric addrmode6dupalign32>; 15320b57cec5SDimitry Andricdefm VLD2DUPd32x2wb : VLD2DUPWB<{1,0,1,?}, "32", VecListDPairSpacedAllLanes, 15330b57cec5SDimitry Andric addrmode6dupalign64>; 15340b57cec5SDimitry Andric 15350b57cec5SDimitry Andric// VLD3DUP : Vector Load (single 3-element structure to all lanes) 15360b57cec5SDimitry Andricclass VLD3DUP<bits<4> op7_4, string Dt> 15370b57cec5SDimitry Andric : NLdSt<1, 0b10, 0b1110, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3), 15380b57cec5SDimitry Andric (ins addrmode6dup:$Rn), IIC_VLD3dup, 15390b57cec5SDimitry Andric "vld3", Dt, "\\{$Vd[], $dst2[], $dst3[]\\}, $Rn", "", []>, 15400b57cec5SDimitry Andric Sched<[WriteVLD2]> { 15410b57cec5SDimitry Andric let Rm = 0b1111; 15420b57cec5SDimitry Andric let Inst{4} = 0; 15430b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD3DupInstruction"; 15440b57cec5SDimitry Andric} 15450b57cec5SDimitry Andric 15460b57cec5SDimitry Andricdef VLD3DUPd8 : VLD3DUP<{0,0,0,?}, "8">; 15470b57cec5SDimitry Andricdef VLD3DUPd16 : VLD3DUP<{0,1,0,?}, "16">; 15480b57cec5SDimitry Andricdef VLD3DUPd32 : VLD3DUP<{1,0,0,?}, "32">; 15490b57cec5SDimitry Andric 15500b57cec5SDimitry Andricdef VLD3DUPd8Pseudo : VLDQQPseudo<IIC_VLD3dup>, Sched<[WriteVLD2]>; 15510b57cec5SDimitry Andricdef VLD3DUPd16Pseudo : VLDQQPseudo<IIC_VLD3dup>, Sched<[WriteVLD2]>; 15520b57cec5SDimitry Andricdef VLD3DUPd32Pseudo : VLDQQPseudo<IIC_VLD3dup>, Sched<[WriteVLD2]>; 15530b57cec5SDimitry Andric 15540b57cec5SDimitry Andric// ...with double-spaced registers (not used for codegen): 15550b57cec5SDimitry Andricdef VLD3DUPq8 : VLD3DUP<{0,0,1,?}, "8">; 15560b57cec5SDimitry Andricdef VLD3DUPq16 : VLD3DUP<{0,1,1,?}, "16">; 15570b57cec5SDimitry Andricdef VLD3DUPq32 : VLD3DUP<{1,0,1,?}, "32">; 15580b57cec5SDimitry Andric 15590b57cec5SDimitry Andricdef VLD3DUPq8EvenPseudo : VLDQQQQPseudo<IIC_VLD3dup>, Sched<[WriteVLD2]>; 15600b57cec5SDimitry Andricdef VLD3DUPq8OddPseudo : VLDQQQQPseudo<IIC_VLD3dup>, Sched<[WriteVLD2]>; 15610b57cec5SDimitry Andricdef VLD3DUPq16EvenPseudo : VLDQQQQPseudo<IIC_VLD3dup>, Sched<[WriteVLD2]>; 15620b57cec5SDimitry Andricdef VLD3DUPq16OddPseudo : VLDQQQQPseudo<IIC_VLD3dup>, Sched<[WriteVLD2]>; 15630b57cec5SDimitry Andricdef VLD3DUPq32EvenPseudo : VLDQQQQPseudo<IIC_VLD3dup>, Sched<[WriteVLD2]>; 15640b57cec5SDimitry Andricdef VLD3DUPq32OddPseudo : VLDQQQQPseudo<IIC_VLD3dup>, Sched<[WriteVLD2]>; 15650b57cec5SDimitry Andric 15660b57cec5SDimitry Andric// ...with address register writeback: 15670b57cec5SDimitry Andricclass VLD3DUPWB<bits<4> op7_4, string Dt, Operand AddrMode> 15680b57cec5SDimitry Andric : NLdSt<1, 0b10, 0b1110, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, GPR:$wb), 15690b57cec5SDimitry Andric (ins AddrMode:$Rn, am6offset:$Rm), IIC_VLD3dupu, 15700b57cec5SDimitry Andric "vld3", Dt, "\\{$Vd[], $dst2[], $dst3[]\\}, $Rn$Rm", 15710b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD2]> { 15720b57cec5SDimitry Andric let Inst{4} = 0; 15730b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD3DupInstruction"; 15740b57cec5SDimitry Andric} 15750b57cec5SDimitry Andric 15760b57cec5SDimitry Andricdef VLD3DUPd8_UPD : VLD3DUPWB<{0,0,0,0}, "8", addrmode6dupalign64>; 15770b57cec5SDimitry Andricdef VLD3DUPd16_UPD : VLD3DUPWB<{0,1,0,?}, "16", addrmode6dupalign64>; 15780b57cec5SDimitry Andricdef VLD3DUPd32_UPD : VLD3DUPWB<{1,0,0,?}, "32", addrmode6dupalign64>; 15790b57cec5SDimitry Andric 15800b57cec5SDimitry Andricdef VLD3DUPq8_UPD : VLD3DUPWB<{0,0,1,0}, "8", addrmode6dupalign64>; 15810b57cec5SDimitry Andricdef VLD3DUPq16_UPD : VLD3DUPWB<{0,1,1,?}, "16", addrmode6dupalign64>; 15820b57cec5SDimitry Andricdef VLD3DUPq32_UPD : VLD3DUPWB<{1,0,1,?}, "32", addrmode6dupalign64>; 15830b57cec5SDimitry Andric 15840b57cec5SDimitry Andricdef VLD3DUPd8Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3dupu>, Sched<[WriteVLD2]>; 15850b57cec5SDimitry Andricdef VLD3DUPd16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3dupu>, Sched<[WriteVLD2]>; 15860b57cec5SDimitry Andricdef VLD3DUPd32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3dupu>, Sched<[WriteVLD2]>; 15870b57cec5SDimitry Andric 15880b57cec5SDimitry Andric// VLD4DUP : Vector Load (single 4-element structure to all lanes) 15890b57cec5SDimitry Andricclass VLD4DUP<bits<4> op7_4, string Dt> 15900b57cec5SDimitry Andric : NLdSt<1, 0b10, 0b1111, op7_4, 15910b57cec5SDimitry Andric (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4), 15920b57cec5SDimitry Andric (ins addrmode6dup:$Rn), IIC_VLD4dup, 15930b57cec5SDimitry Andric "vld4", Dt, "\\{$Vd[], $dst2[], $dst3[], $dst4[]\\}, $Rn", "", []> { 15940b57cec5SDimitry Andric let Rm = 0b1111; 15950b57cec5SDimitry Andric let Inst{4} = Rn{4}; 15960b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD4DupInstruction"; 15970b57cec5SDimitry Andric} 15980b57cec5SDimitry Andric 15990b57cec5SDimitry Andricdef VLD4DUPd8 : VLD4DUP<{0,0,0,?}, "8">; 16000b57cec5SDimitry Andricdef VLD4DUPd16 : VLD4DUP<{0,1,0,?}, "16">; 16010b57cec5SDimitry Andricdef VLD4DUPd32 : VLD4DUP<{1,?,0,?}, "32"> { let Inst{6} = Rn{5}; } 16020b57cec5SDimitry Andric 16030b57cec5SDimitry Andricdef VLD4DUPd8Pseudo : VLDQQPseudo<IIC_VLD4dup>, Sched<[WriteVLD2]>; 16040b57cec5SDimitry Andricdef VLD4DUPd16Pseudo : VLDQQPseudo<IIC_VLD4dup>, Sched<[WriteVLD2]>; 16050b57cec5SDimitry Andricdef VLD4DUPd32Pseudo : VLDQQPseudo<IIC_VLD4dup>, Sched<[WriteVLD2]>; 16060b57cec5SDimitry Andric 16070b57cec5SDimitry Andric// ...with double-spaced registers (not used for codegen): 16080b57cec5SDimitry Andricdef VLD4DUPq8 : VLD4DUP<{0,0,1,?}, "8">; 16090b57cec5SDimitry Andricdef VLD4DUPq16 : VLD4DUP<{0,1,1,?}, "16">; 16100b57cec5SDimitry Andricdef VLD4DUPq32 : VLD4DUP<{1,?,1,?}, "32"> { let Inst{6} = Rn{5}; } 16110b57cec5SDimitry Andric 16120b57cec5SDimitry Andricdef VLD4DUPq8EvenPseudo : VLDQQQQPseudo<IIC_VLD4dup>, Sched<[WriteVLD2]>; 16130b57cec5SDimitry Andricdef VLD4DUPq8OddPseudo : VLDQQQQPseudo<IIC_VLD4dup>, Sched<[WriteVLD2]>; 16140b57cec5SDimitry Andricdef VLD4DUPq16EvenPseudo : VLDQQQQPseudo<IIC_VLD4dup>, Sched<[WriteVLD2]>; 16150b57cec5SDimitry Andricdef VLD4DUPq16OddPseudo : VLDQQQQPseudo<IIC_VLD4dup>, Sched<[WriteVLD2]>; 16160b57cec5SDimitry Andricdef VLD4DUPq32EvenPseudo : VLDQQQQPseudo<IIC_VLD4dup>, Sched<[WriteVLD2]>; 16170b57cec5SDimitry Andricdef VLD4DUPq32OddPseudo : VLDQQQQPseudo<IIC_VLD4dup>, Sched<[WriteVLD2]>; 16180b57cec5SDimitry Andric 16190b57cec5SDimitry Andric// ...with address register writeback: 16200b57cec5SDimitry Andricclass VLD4DUPWB<bits<4> op7_4, string Dt> 16210b57cec5SDimitry Andric : NLdSt<1, 0b10, 0b1111, op7_4, 16220b57cec5SDimitry Andric (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), 16230b57cec5SDimitry Andric (ins addrmode6dup:$Rn, am6offset:$Rm), IIC_VLD4dupu, 16240b57cec5SDimitry Andric "vld4", Dt, "\\{$Vd[], $dst2[], $dst3[], $dst4[]\\}, $Rn$Rm", 16250b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVLD2]> { 16260b57cec5SDimitry Andric let Inst{4} = Rn{4}; 16270b57cec5SDimitry Andric let DecoderMethod = "DecodeVLD4DupInstruction"; 16280b57cec5SDimitry Andric} 16290b57cec5SDimitry Andric 16300b57cec5SDimitry Andricdef VLD4DUPd8_UPD : VLD4DUPWB<{0,0,0,0}, "8">; 16310b57cec5SDimitry Andricdef VLD4DUPd16_UPD : VLD4DUPWB<{0,1,0,?}, "16">; 16320b57cec5SDimitry Andricdef VLD4DUPd32_UPD : VLD4DUPWB<{1,?,0,?}, "32"> { let Inst{6} = Rn{5}; } 16330b57cec5SDimitry Andric 16340b57cec5SDimitry Andricdef VLD4DUPq8_UPD : VLD4DUPWB<{0,0,1,0}, "8">; 16350b57cec5SDimitry Andricdef VLD4DUPq16_UPD : VLD4DUPWB<{0,1,1,?}, "16">; 16360b57cec5SDimitry Andricdef VLD4DUPq32_UPD : VLD4DUPWB<{1,?,1,?}, "32"> { let Inst{6} = Rn{5}; } 16370b57cec5SDimitry Andric 16380b57cec5SDimitry Andricdef VLD4DUPd8Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4dupu>, Sched<[WriteVLD2]>; 16390b57cec5SDimitry Andricdef VLD4DUPd16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4dupu>, Sched<[WriteVLD2]>; 16400b57cec5SDimitry Andricdef VLD4DUPd32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4dupu>, Sched<[WriteVLD2]>; 16410b57cec5SDimitry Andric 16420b57cec5SDimitry Andric} // mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1 16430b57cec5SDimitry Andric 16440b57cec5SDimitry Andriclet mayStore = 1, hasSideEffects = 0, hasExtraSrcRegAllocReq = 1 in { 16450b57cec5SDimitry Andric 16460b57cec5SDimitry Andric// Classes for VST* pseudo-instructions with multi-register operands. 16470b57cec5SDimitry Andric// These are expanded to real instructions after register allocation. 16480b57cec5SDimitry Andricclass VSTQPseudo<InstrItinClass itin> 16490b57cec5SDimitry Andric : PseudoNLdSt<(outs), (ins addrmode6:$addr, QPR:$src), itin, "">; 16500b57cec5SDimitry Andricclass VSTQWBPseudo<InstrItinClass itin> 16510b57cec5SDimitry Andric : PseudoNLdSt<(outs GPR:$wb), 16520b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset, QPR:$src), itin, 16530b57cec5SDimitry Andric "$addr.addr = $wb">; 16540b57cec5SDimitry Andricclass VSTQWBfixedPseudo<InstrItinClass itin> 16550b57cec5SDimitry Andric : PseudoNLdSt<(outs GPR:$wb), 16560b57cec5SDimitry Andric (ins addrmode6:$addr, QPR:$src), itin, 16570b57cec5SDimitry Andric "$addr.addr = $wb">; 16580b57cec5SDimitry Andricclass VSTQWBregisterPseudo<InstrItinClass itin> 16590b57cec5SDimitry Andric : PseudoNLdSt<(outs GPR:$wb), 16600b57cec5SDimitry Andric (ins addrmode6:$addr, rGPR:$offset, QPR:$src), itin, 16610b57cec5SDimitry Andric "$addr.addr = $wb">; 16620b57cec5SDimitry Andricclass VSTQQPseudo<InstrItinClass itin> 16630b57cec5SDimitry Andric : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQPR:$src), itin, "">; 16640b57cec5SDimitry Andricclass VSTQQWBPseudo<InstrItinClass itin> 16650b57cec5SDimitry Andric : PseudoNLdSt<(outs GPR:$wb), 16660b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset, QQPR:$src), itin, 16670b57cec5SDimitry Andric "$addr.addr = $wb">; 16680b57cec5SDimitry Andricclass VSTQQWBfixedPseudo<InstrItinClass itin> 16690b57cec5SDimitry Andric : PseudoNLdSt<(outs GPR:$wb), 16700b57cec5SDimitry Andric (ins addrmode6:$addr, QQPR:$src), itin, 16710b57cec5SDimitry Andric "$addr.addr = $wb">; 16720b57cec5SDimitry Andricclass VSTQQWBregisterPseudo<InstrItinClass itin> 16730b57cec5SDimitry Andric : PseudoNLdSt<(outs GPR:$wb), 16740b57cec5SDimitry Andric (ins addrmode6:$addr, rGPR:$offset, QQPR:$src), itin, 16750b57cec5SDimitry Andric "$addr.addr = $wb">; 16760b57cec5SDimitry Andric 16770b57cec5SDimitry Andricclass VSTQQQQPseudo<InstrItinClass itin> 16780b57cec5SDimitry Andric : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQQQPR:$src), itin, "">; 16790b57cec5SDimitry Andricclass VSTQQQQWBPseudo<InstrItinClass itin> 16800b57cec5SDimitry Andric : PseudoNLdSt<(outs GPR:$wb), 16810b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src), itin, 16820b57cec5SDimitry Andric "$addr.addr = $wb">; 16830b57cec5SDimitry Andric 16840b57cec5SDimitry Andric// VST1 : Vector Store (multiple single elements) 16850b57cec5SDimitry Andricclass VST1D<bits<4> op7_4, string Dt, Operand AddrMode> 16860b57cec5SDimitry Andric : NLdSt<0,0b00,0b0111,op7_4, (outs), (ins AddrMode:$Rn, VecListOneD:$Vd), 16870b57cec5SDimitry Andric IIC_VST1, "vst1", Dt, "$Vd, $Rn", "", []>, Sched<[WriteVST1]> { 16880b57cec5SDimitry Andric let Rm = 0b1111; 16890b57cec5SDimitry Andric let Inst{4} = Rn{4}; 16900b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 16910b57cec5SDimitry Andric} 16920b57cec5SDimitry Andricclass VST1Q<bits<4> op7_4, string Dt, Operand AddrMode> 16930b57cec5SDimitry Andric : NLdSt<0,0b00,0b1010,op7_4, (outs), (ins AddrMode:$Rn, VecListDPair:$Vd), 16940b57cec5SDimitry Andric IIC_VST1x2, "vst1", Dt, "$Vd, $Rn", "", []>, Sched<[WriteVST2]> { 16950b57cec5SDimitry Andric let Rm = 0b1111; 16960b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 16970b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 16980b57cec5SDimitry Andric} 16990b57cec5SDimitry Andric 17000b57cec5SDimitry Andricdef VST1d8 : VST1D<{0,0,0,?}, "8", addrmode6align64>; 17010b57cec5SDimitry Andricdef VST1d16 : VST1D<{0,1,0,?}, "16", addrmode6align64>; 17020b57cec5SDimitry Andricdef VST1d32 : VST1D<{1,0,0,?}, "32", addrmode6align64>; 17030b57cec5SDimitry Andricdef VST1d64 : VST1D<{1,1,0,?}, "64", addrmode6align64>; 17040b57cec5SDimitry Andric 17050b57cec5SDimitry Andricdef VST1q8 : VST1Q<{0,0,?,?}, "8", addrmode6align64or128>; 17060b57cec5SDimitry Andricdef VST1q16 : VST1Q<{0,1,?,?}, "16", addrmode6align64or128>; 17070b57cec5SDimitry Andricdef VST1q32 : VST1Q<{1,0,?,?}, "32", addrmode6align64or128>; 17080b57cec5SDimitry Andricdef VST1q64 : VST1Q<{1,1,?,?}, "64", addrmode6align64or128>; 17090b57cec5SDimitry Andric 17100b57cec5SDimitry Andric// ...with address register writeback: 17110b57cec5SDimitry Andricmulticlass VST1DWB<bits<4> op7_4, string Dt, Operand AddrMode> { 17120b57cec5SDimitry Andric def _fixed : NLdSt<0,0b00, 0b0111,op7_4, (outs GPR:$wb), 17130b57cec5SDimitry Andric (ins AddrMode:$Rn, VecListOneD:$Vd), IIC_VLD1u, 17140b57cec5SDimitry Andric "vst1", Dt, "$Vd, $Rn!", 17150b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST1]> { 17160b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 17170b57cec5SDimitry Andric let Inst{4} = Rn{4}; 17180b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 17190b57cec5SDimitry Andric } 17200b57cec5SDimitry Andric def _register : NLdSt<0,0b00,0b0111,op7_4, (outs GPR:$wb), 17210b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm, VecListOneD:$Vd), 17220b57cec5SDimitry Andric IIC_VLD1u, 17230b57cec5SDimitry Andric "vst1", Dt, "$Vd, $Rn, $Rm", 17240b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST1]> { 17250b57cec5SDimitry Andric let Inst{4} = Rn{4}; 17260b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 17270b57cec5SDimitry Andric } 17280b57cec5SDimitry Andric} 17290b57cec5SDimitry Andricmulticlass VST1QWB<bits<4> op7_4, string Dt, Operand AddrMode> { 17300b57cec5SDimitry Andric def _fixed : NLdSt<0,0b00,0b1010,op7_4, (outs GPR:$wb), 17310b57cec5SDimitry Andric (ins AddrMode:$Rn, VecListDPair:$Vd), IIC_VLD1x2u, 17320b57cec5SDimitry Andric "vst1", Dt, "$Vd, $Rn!", 17330b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST2]> { 17340b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 17350b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 17360b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 17370b57cec5SDimitry Andric } 17380b57cec5SDimitry Andric def _register : NLdSt<0,0b00,0b1010,op7_4, (outs GPR:$wb), 17390b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm, VecListDPair:$Vd), 17400b57cec5SDimitry Andric IIC_VLD1x2u, 17410b57cec5SDimitry Andric "vst1", Dt, "$Vd, $Rn, $Rm", 17420b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST2]> { 17430b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 17440b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 17450b57cec5SDimitry Andric } 17460b57cec5SDimitry Andric} 17470b57cec5SDimitry Andric 17480b57cec5SDimitry Andricdefm VST1d8wb : VST1DWB<{0,0,0,?}, "8", addrmode6align64>; 17490b57cec5SDimitry Andricdefm VST1d16wb : VST1DWB<{0,1,0,?}, "16", addrmode6align64>; 17500b57cec5SDimitry Andricdefm VST1d32wb : VST1DWB<{1,0,0,?}, "32", addrmode6align64>; 17510b57cec5SDimitry Andricdefm VST1d64wb : VST1DWB<{1,1,0,?}, "64", addrmode6align64>; 17520b57cec5SDimitry Andric 17530b57cec5SDimitry Andricdefm VST1q8wb : VST1QWB<{0,0,?,?}, "8", addrmode6align64or128>; 17540b57cec5SDimitry Andricdefm VST1q16wb : VST1QWB<{0,1,?,?}, "16", addrmode6align64or128>; 17550b57cec5SDimitry Andricdefm VST1q32wb : VST1QWB<{1,0,?,?}, "32", addrmode6align64or128>; 17560b57cec5SDimitry Andricdefm VST1q64wb : VST1QWB<{1,1,?,?}, "64", addrmode6align64or128>; 17570b57cec5SDimitry Andric 17580b57cec5SDimitry Andric// ...with 3 registers 17590b57cec5SDimitry Andricclass VST1D3<bits<4> op7_4, string Dt, Operand AddrMode> 17600b57cec5SDimitry Andric : NLdSt<0, 0b00, 0b0110, op7_4, (outs), 17610b57cec5SDimitry Andric (ins AddrMode:$Rn, VecListThreeD:$Vd), 17620b57cec5SDimitry Andric IIC_VST1x3, "vst1", Dt, "$Vd, $Rn", "", []>, Sched<[WriteVST3]> { 17630b57cec5SDimitry Andric let Rm = 0b1111; 17640b57cec5SDimitry Andric let Inst{4} = Rn{4}; 17650b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 17660b57cec5SDimitry Andric} 17670b57cec5SDimitry Andricmulticlass VST1D3WB<bits<4> op7_4, string Dt, Operand AddrMode> { 17680b57cec5SDimitry Andric def _fixed : NLdSt<0,0b00,0b0110,op7_4, (outs GPR:$wb), 17690b57cec5SDimitry Andric (ins AddrMode:$Rn, VecListThreeD:$Vd), IIC_VLD1x3u, 17700b57cec5SDimitry Andric "vst1", Dt, "$Vd, $Rn!", 17710b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST3]> { 17720b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 17730b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 17740b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 17750b57cec5SDimitry Andric } 17760b57cec5SDimitry Andric def _register : NLdSt<0,0b00,0b0110,op7_4, (outs GPR:$wb), 17770b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm, VecListThreeD:$Vd), 17780b57cec5SDimitry Andric IIC_VLD1x3u, 17790b57cec5SDimitry Andric "vst1", Dt, "$Vd, $Rn, $Rm", 17800b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST3]> { 17810b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 17820b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 17830b57cec5SDimitry Andric } 17840b57cec5SDimitry Andric} 17850b57cec5SDimitry Andric 17860b57cec5SDimitry Andricdef VST1d8T : VST1D3<{0,0,0,?}, "8", addrmode6align64>; 17870b57cec5SDimitry Andricdef VST1d16T : VST1D3<{0,1,0,?}, "16", addrmode6align64>; 17880b57cec5SDimitry Andricdef VST1d32T : VST1D3<{1,0,0,?}, "32", addrmode6align64>; 17890b57cec5SDimitry Andricdef VST1d64T : VST1D3<{1,1,0,?}, "64", addrmode6align64>; 17900b57cec5SDimitry Andric 17910b57cec5SDimitry Andricdefm VST1d8Twb : VST1D3WB<{0,0,0,?}, "8", addrmode6align64>; 17920b57cec5SDimitry Andricdefm VST1d16Twb : VST1D3WB<{0,1,0,?}, "16", addrmode6align64>; 17930b57cec5SDimitry Andricdefm VST1d32Twb : VST1D3WB<{1,0,0,?}, "32", addrmode6align64>; 17940b57cec5SDimitry Andricdefm VST1d64Twb : VST1D3WB<{1,1,0,?}, "64", addrmode6align64>; 17950b57cec5SDimitry Andric 17960b57cec5SDimitry Andricdef VST1d8TPseudo : VSTQQPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 17970b57cec5SDimitry Andricdef VST1d16TPseudo : VSTQQPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 17980b57cec5SDimitry Andricdef VST1d32TPseudo : VSTQQPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 17990b57cec5SDimitry Andricdef VST1d64TPseudo : VSTQQPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 18000b57cec5SDimitry Andricdef VST1d64TPseudoWB_fixed : VSTQQWBfixedPseudo<IIC_VST1x3u>, Sched<[WriteVST3]>; 18010b57cec5SDimitry Andricdef VST1d64TPseudoWB_register : VSTQQWBPseudo<IIC_VST1x3u>, Sched<[WriteVST3]>; 18020b57cec5SDimitry Andric 18030b57cec5SDimitry Andricdef VST1q8HighTPseudo : VSTQQQQPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 18040b57cec5SDimitry Andricdef VST1q8LowTPseudo_UPD : VSTQQQQWBPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 18050b57cec5SDimitry Andricdef VST1q16HighTPseudo : VSTQQQQPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 18060b57cec5SDimitry Andricdef VST1q16LowTPseudo_UPD : VSTQQQQWBPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 18070b57cec5SDimitry Andricdef VST1q32HighTPseudo : VSTQQQQPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 18080b57cec5SDimitry Andricdef VST1q32LowTPseudo_UPD : VSTQQQQWBPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 18090b57cec5SDimitry Andricdef VST1q64HighTPseudo : VSTQQQQPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 18100b57cec5SDimitry Andricdef VST1q64LowTPseudo_UPD : VSTQQQQWBPseudo<IIC_VST1x3>, Sched<[WriteVST3]>; 18110b57cec5SDimitry Andric 18120b57cec5SDimitry Andric// ...with 4 registers 18130b57cec5SDimitry Andricclass VST1D4<bits<4> op7_4, string Dt, Operand AddrMode> 18140b57cec5SDimitry Andric : NLdSt<0, 0b00, 0b0010, op7_4, (outs), 18150b57cec5SDimitry Andric (ins AddrMode:$Rn, VecListFourD:$Vd), 18160b57cec5SDimitry Andric IIC_VST1x4, "vst1", Dt, "$Vd, $Rn", "", 18170b57cec5SDimitry Andric []>, Sched<[WriteVST4]> { 18180b57cec5SDimitry Andric let Rm = 0b1111; 18190b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 18200b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 18210b57cec5SDimitry Andric} 18220b57cec5SDimitry Andricmulticlass VST1D4WB<bits<4> op7_4, string Dt, Operand AddrMode> { 18230b57cec5SDimitry Andric def _fixed : NLdSt<0,0b00,0b0010,op7_4, (outs GPR:$wb), 18240b57cec5SDimitry Andric (ins AddrMode:$Rn, VecListFourD:$Vd), IIC_VLD1x4u, 18250b57cec5SDimitry Andric "vst1", Dt, "$Vd, $Rn!", 18260b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST4]> { 18270b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 18280b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 18290b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 18300b57cec5SDimitry Andric } 18310b57cec5SDimitry Andric def _register : NLdSt<0,0b00,0b0010,op7_4, (outs GPR:$wb), 18320b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm, VecListFourD:$Vd), 18330b57cec5SDimitry Andric IIC_VLD1x4u, 18340b57cec5SDimitry Andric "vst1", Dt, "$Vd, $Rn, $Rm", 18350b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST4]> { 18360b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 18370b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST1Instruction"; 18380b57cec5SDimitry Andric } 18390b57cec5SDimitry Andric} 18400b57cec5SDimitry Andric 18410b57cec5SDimitry Andricdef VST1d8Q : VST1D4<{0,0,?,?}, "8", addrmode6align64or128or256>; 18420b57cec5SDimitry Andricdef VST1d16Q : VST1D4<{0,1,?,?}, "16", addrmode6align64or128or256>; 18430b57cec5SDimitry Andricdef VST1d32Q : VST1D4<{1,0,?,?}, "32", addrmode6align64or128or256>; 18440b57cec5SDimitry Andricdef VST1d64Q : VST1D4<{1,1,?,?}, "64", addrmode6align64or128or256>; 18450b57cec5SDimitry Andric 18460b57cec5SDimitry Andricdefm VST1d8Qwb : VST1D4WB<{0,0,?,?}, "8", addrmode6align64or128or256>; 18470b57cec5SDimitry Andricdefm VST1d16Qwb : VST1D4WB<{0,1,?,?}, "16", addrmode6align64or128or256>; 18480b57cec5SDimitry Andricdefm VST1d32Qwb : VST1D4WB<{1,0,?,?}, "32", addrmode6align64or128or256>; 18490b57cec5SDimitry Andricdefm VST1d64Qwb : VST1D4WB<{1,1,?,?}, "64", addrmode6align64or128or256>; 18500b57cec5SDimitry Andric 18510b57cec5SDimitry Andricdef VST1d8QPseudo : VSTQQPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18520b57cec5SDimitry Andricdef VST1d16QPseudo : VSTQQPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18530b57cec5SDimitry Andricdef VST1d32QPseudo : VSTQQPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18540b57cec5SDimitry Andricdef VST1d64QPseudo : VSTQQPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18550b57cec5SDimitry Andricdef VST1d64QPseudoWB_fixed : VSTQQWBfixedPseudo<IIC_VST1x4u>, Sched<[WriteVST4]>; 18560b57cec5SDimitry Andricdef VST1d64QPseudoWB_register : VSTQQWBPseudo<IIC_VST1x4u>, Sched<[WriteVST4]>; 18570b57cec5SDimitry Andric 18580b57cec5SDimitry Andricdef VST1q8HighQPseudo : VSTQQQQPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18590b57cec5SDimitry Andricdef VST1q8LowQPseudo_UPD : VSTQQQQWBPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18600b57cec5SDimitry Andricdef VST1q16HighQPseudo : VSTQQQQPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18610b57cec5SDimitry Andricdef VST1q16LowQPseudo_UPD : VSTQQQQWBPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18620b57cec5SDimitry Andricdef VST1q32HighQPseudo : VSTQQQQPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18630b57cec5SDimitry Andricdef VST1q32LowQPseudo_UPD : VSTQQQQWBPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18640b57cec5SDimitry Andricdef VST1q64HighQPseudo : VSTQQQQPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18650b57cec5SDimitry Andricdef VST1q64LowQPseudo_UPD : VSTQQQQWBPseudo<IIC_VST1x4>, Sched<[WriteVST4]>; 18660b57cec5SDimitry Andric 18670b57cec5SDimitry Andric// VST2 : Vector Store (multiple 2-element structures) 18680b57cec5SDimitry Andricclass VST2<bits<4> op11_8, bits<4> op7_4, string Dt, RegisterOperand VdTy, 18690b57cec5SDimitry Andric InstrItinClass itin, Operand AddrMode> 18700b57cec5SDimitry Andric : NLdSt<0, 0b00, op11_8, op7_4, (outs), (ins AddrMode:$Rn, VdTy:$Vd), 18710b57cec5SDimitry Andric itin, "vst2", Dt, "$Vd, $Rn", "", []> { 18720b57cec5SDimitry Andric let Rm = 0b1111; 18730b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 18740b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST2Instruction"; 18750b57cec5SDimitry Andric} 18760b57cec5SDimitry Andric 18770b57cec5SDimitry Andricdef VST2d8 : VST2<0b1000, {0,0,?,?}, "8", VecListDPair, IIC_VST2, 18780b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVST2]>; 18790b57cec5SDimitry Andricdef VST2d16 : VST2<0b1000, {0,1,?,?}, "16", VecListDPair, IIC_VST2, 18800b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVST2]>; 18810b57cec5SDimitry Andricdef VST2d32 : VST2<0b1000, {1,0,?,?}, "32", VecListDPair, IIC_VST2, 18820b57cec5SDimitry Andric addrmode6align64or128>, Sched<[WriteVST2]>; 18830b57cec5SDimitry Andric 18840b57cec5SDimitry Andricdef VST2q8 : VST2<0b0011, {0,0,?,?}, "8", VecListFourD, IIC_VST2x2, 18850b57cec5SDimitry Andric addrmode6align64or128or256>, Sched<[WriteVST4]>; 18860b57cec5SDimitry Andricdef VST2q16 : VST2<0b0011, {0,1,?,?}, "16", VecListFourD, IIC_VST2x2, 18870b57cec5SDimitry Andric addrmode6align64or128or256>, Sched<[WriteVST4]>; 18880b57cec5SDimitry Andricdef VST2q32 : VST2<0b0011, {1,0,?,?}, "32", VecListFourD, IIC_VST2x2, 18890b57cec5SDimitry Andric addrmode6align64or128or256>, Sched<[WriteVST4]>; 18900b57cec5SDimitry Andric 18910b57cec5SDimitry Andricdef VST2q8Pseudo : VSTQQPseudo<IIC_VST2x2>, Sched<[WriteVST4]>; 18920b57cec5SDimitry Andricdef VST2q16Pseudo : VSTQQPseudo<IIC_VST2x2>, Sched<[WriteVST4]>; 18930b57cec5SDimitry Andricdef VST2q32Pseudo : VSTQQPseudo<IIC_VST2x2>, Sched<[WriteVST4]>; 18940b57cec5SDimitry Andric 18950b57cec5SDimitry Andric// ...with address register writeback: 18960b57cec5SDimitry Andricmulticlass VST2DWB<bits<4> op11_8, bits<4> op7_4, string Dt, 18970b57cec5SDimitry Andric RegisterOperand VdTy, Operand AddrMode> { 18980b57cec5SDimitry Andric def _fixed : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb), 18990b57cec5SDimitry Andric (ins AddrMode:$Rn, VdTy:$Vd), IIC_VLD1u, 19000b57cec5SDimitry Andric "vst2", Dt, "$Vd, $Rn!", 19010b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST2]> { 19020b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 19030b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 19040b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST2Instruction"; 19050b57cec5SDimitry Andric } 19060b57cec5SDimitry Andric def _register : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb), 19070b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm, VdTy:$Vd), IIC_VLD1u, 19080b57cec5SDimitry Andric "vst2", Dt, "$Vd, $Rn, $Rm", 19090b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST2]> { 19100b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 19110b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST2Instruction"; 19120b57cec5SDimitry Andric } 19130b57cec5SDimitry Andric} 19140b57cec5SDimitry Andricmulticlass VST2QWB<bits<4> op7_4, string Dt, Operand AddrMode> { 19150b57cec5SDimitry Andric def _fixed : NLdSt<0, 0b00, 0b0011, op7_4, (outs GPR:$wb), 19160b57cec5SDimitry Andric (ins AddrMode:$Rn, VecListFourD:$Vd), IIC_VLD1u, 19170b57cec5SDimitry Andric "vst2", Dt, "$Vd, $Rn!", 19180b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST4]> { 19190b57cec5SDimitry Andric let Rm = 0b1101; // NLdSt will assign to the right encoding bits. 19200b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 19210b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST2Instruction"; 19220b57cec5SDimitry Andric } 19230b57cec5SDimitry Andric def _register : NLdSt<0, 0b00, 0b0011, op7_4, (outs GPR:$wb), 19240b57cec5SDimitry Andric (ins AddrMode:$Rn, rGPR:$Rm, VecListFourD:$Vd), 19250b57cec5SDimitry Andric IIC_VLD1u, 19260b57cec5SDimitry Andric "vst2", Dt, "$Vd, $Rn, $Rm", 19270b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST4]> { 19280b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 19290b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST2Instruction"; 19300b57cec5SDimitry Andric } 19310b57cec5SDimitry Andric} 19320b57cec5SDimitry Andric 19330b57cec5SDimitry Andricdefm VST2d8wb : VST2DWB<0b1000, {0,0,?,?}, "8", VecListDPair, 19340b57cec5SDimitry Andric addrmode6align64or128>; 19350b57cec5SDimitry Andricdefm VST2d16wb : VST2DWB<0b1000, {0,1,?,?}, "16", VecListDPair, 19360b57cec5SDimitry Andric addrmode6align64or128>; 19370b57cec5SDimitry Andricdefm VST2d32wb : VST2DWB<0b1000, {1,0,?,?}, "32", VecListDPair, 19380b57cec5SDimitry Andric addrmode6align64or128>; 19390b57cec5SDimitry Andric 19400b57cec5SDimitry Andricdefm VST2q8wb : VST2QWB<{0,0,?,?}, "8", addrmode6align64or128or256>; 19410b57cec5SDimitry Andricdefm VST2q16wb : VST2QWB<{0,1,?,?}, "16", addrmode6align64or128or256>; 19420b57cec5SDimitry Andricdefm VST2q32wb : VST2QWB<{1,0,?,?}, "32", addrmode6align64or128or256>; 19430b57cec5SDimitry Andric 19440b57cec5SDimitry Andricdef VST2q8PseudoWB_fixed : VSTQQWBfixedPseudo<IIC_VST2x2u>, Sched<[WriteVST4]>; 19450b57cec5SDimitry Andricdef VST2q16PseudoWB_fixed : VSTQQWBfixedPseudo<IIC_VST2x2u>, Sched<[WriteVST4]>; 19460b57cec5SDimitry Andricdef VST2q32PseudoWB_fixed : VSTQQWBfixedPseudo<IIC_VST2x2u>, Sched<[WriteVST4]>; 19470b57cec5SDimitry Andricdef VST2q8PseudoWB_register : VSTQQWBregisterPseudo<IIC_VST2x2u>, Sched<[WriteVST4]>; 19480b57cec5SDimitry Andricdef VST2q16PseudoWB_register : VSTQQWBregisterPseudo<IIC_VST2x2u>, Sched<[WriteVST4]>; 19490b57cec5SDimitry Andricdef VST2q32PseudoWB_register : VSTQQWBregisterPseudo<IIC_VST2x2u>, Sched<[WriteVST4]>; 19500b57cec5SDimitry Andric 19510b57cec5SDimitry Andric// ...with double-spaced registers 19520b57cec5SDimitry Andricdef VST2b8 : VST2<0b1001, {0,0,?,?}, "8", VecListDPairSpaced, IIC_VST2, 19530b57cec5SDimitry Andric addrmode6align64or128>; 19540b57cec5SDimitry Andricdef VST2b16 : VST2<0b1001, {0,1,?,?}, "16", VecListDPairSpaced, IIC_VST2, 19550b57cec5SDimitry Andric addrmode6align64or128>; 19560b57cec5SDimitry Andricdef VST2b32 : VST2<0b1001, {1,0,?,?}, "32", VecListDPairSpaced, IIC_VST2, 19570b57cec5SDimitry Andric addrmode6align64or128>; 19580b57cec5SDimitry Andricdefm VST2b8wb : VST2DWB<0b1001, {0,0,?,?}, "8", VecListDPairSpaced, 19590b57cec5SDimitry Andric addrmode6align64or128>; 19600b57cec5SDimitry Andricdefm VST2b16wb : VST2DWB<0b1001, {0,1,?,?}, "16", VecListDPairSpaced, 19610b57cec5SDimitry Andric addrmode6align64or128>; 19620b57cec5SDimitry Andricdefm VST2b32wb : VST2DWB<0b1001, {1,0,?,?}, "32", VecListDPairSpaced, 19630b57cec5SDimitry Andric addrmode6align64or128>; 19640b57cec5SDimitry Andric 19650b57cec5SDimitry Andric// VST3 : Vector Store (multiple 3-element structures) 19660b57cec5SDimitry Andricclass VST3D<bits<4> op11_8, bits<4> op7_4, string Dt> 19670b57cec5SDimitry Andric : NLdSt<0, 0b00, op11_8, op7_4, (outs), 19680b57cec5SDimitry Andric (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3), IIC_VST3, 19690b57cec5SDimitry Andric "vst3", Dt, "\\{$Vd, $src2, $src3\\}, $Rn", "", []>, Sched<[WriteVST3]> { 19700b57cec5SDimitry Andric let Rm = 0b1111; 19710b57cec5SDimitry Andric let Inst{4} = Rn{4}; 19720b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST3Instruction"; 19730b57cec5SDimitry Andric} 19740b57cec5SDimitry Andric 19750b57cec5SDimitry Andricdef VST3d8 : VST3D<0b0100, {0,0,0,?}, "8">; 19760b57cec5SDimitry Andricdef VST3d16 : VST3D<0b0100, {0,1,0,?}, "16">; 19770b57cec5SDimitry Andricdef VST3d32 : VST3D<0b0100, {1,0,0,?}, "32">; 19780b57cec5SDimitry Andric 19790b57cec5SDimitry Andricdef VST3d8Pseudo : VSTQQPseudo<IIC_VST3>, Sched<[WriteVST3]>; 19800b57cec5SDimitry Andricdef VST3d16Pseudo : VSTQQPseudo<IIC_VST3>, Sched<[WriteVST3]>; 19810b57cec5SDimitry Andricdef VST3d32Pseudo : VSTQQPseudo<IIC_VST3>, Sched<[WriteVST3]>; 19820b57cec5SDimitry Andric 19830b57cec5SDimitry Andric// ...with address register writeback: 19840b57cec5SDimitry Andricclass VST3DWB<bits<4> op11_8, bits<4> op7_4, string Dt> 19850b57cec5SDimitry Andric : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb), 19860b57cec5SDimitry Andric (ins addrmode6:$Rn, am6offset:$Rm, 19870b57cec5SDimitry Andric DPR:$Vd, DPR:$src2, DPR:$src3), IIC_VST3u, 19880b57cec5SDimitry Andric "vst3", Dt, "\\{$Vd, $src2, $src3\\}, $Rn$Rm", 19890b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST3]> { 19900b57cec5SDimitry Andric let Inst{4} = Rn{4}; 19910b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST3Instruction"; 19920b57cec5SDimitry Andric} 19930b57cec5SDimitry Andric 19940b57cec5SDimitry Andricdef VST3d8_UPD : VST3DWB<0b0100, {0,0,0,?}, "8">; 19950b57cec5SDimitry Andricdef VST3d16_UPD : VST3DWB<0b0100, {0,1,0,?}, "16">; 19960b57cec5SDimitry Andricdef VST3d32_UPD : VST3DWB<0b0100, {1,0,0,?}, "32">; 19970b57cec5SDimitry Andric 19980b57cec5SDimitry Andricdef VST3d8Pseudo_UPD : VSTQQWBPseudo<IIC_VST3u>, Sched<[WriteVST3]>; 19990b57cec5SDimitry Andricdef VST3d16Pseudo_UPD : VSTQQWBPseudo<IIC_VST3u>, Sched<[WriteVST3]>; 20000b57cec5SDimitry Andricdef VST3d32Pseudo_UPD : VSTQQWBPseudo<IIC_VST3u>, Sched<[WriteVST3]>; 20010b57cec5SDimitry Andric 20020b57cec5SDimitry Andric// ...with double-spaced registers: 20030b57cec5SDimitry Andricdef VST3q8 : VST3D<0b0101, {0,0,0,?}, "8">; 20040b57cec5SDimitry Andricdef VST3q16 : VST3D<0b0101, {0,1,0,?}, "16">; 20050b57cec5SDimitry Andricdef VST3q32 : VST3D<0b0101, {1,0,0,?}, "32">; 20060b57cec5SDimitry Andricdef VST3q8_UPD : VST3DWB<0b0101, {0,0,0,?}, "8">; 20070b57cec5SDimitry Andricdef VST3q16_UPD : VST3DWB<0b0101, {0,1,0,?}, "16">; 20080b57cec5SDimitry Andricdef VST3q32_UPD : VST3DWB<0b0101, {1,0,0,?}, "32">; 20090b57cec5SDimitry Andric 20100b57cec5SDimitry Andricdef VST3q8Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>, Sched<[WriteVST3]>; 20110b57cec5SDimitry Andricdef VST3q16Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>, Sched<[WriteVST3]>; 20120b57cec5SDimitry Andricdef VST3q32Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>, Sched<[WriteVST3]>; 20130b57cec5SDimitry Andric 20140b57cec5SDimitry Andric// ...alternate versions to be allocated odd register numbers: 20150b57cec5SDimitry Andricdef VST3q8oddPseudo : VSTQQQQPseudo<IIC_VST3>, Sched<[WriteVST3]>; 20160b57cec5SDimitry Andricdef VST3q16oddPseudo : VSTQQQQPseudo<IIC_VST3>, Sched<[WriteVST3]>; 20170b57cec5SDimitry Andricdef VST3q32oddPseudo : VSTQQQQPseudo<IIC_VST3>, Sched<[WriteVST3]>; 20180b57cec5SDimitry Andric 20190b57cec5SDimitry Andricdef VST3q8oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>, Sched<[WriteVST3]>; 20200b57cec5SDimitry Andricdef VST3q16oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>, Sched<[WriteVST3]>; 20210b57cec5SDimitry Andricdef VST3q32oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>, Sched<[WriteVST3]>; 20220b57cec5SDimitry Andric 20230b57cec5SDimitry Andric// VST4 : Vector Store (multiple 4-element structures) 20240b57cec5SDimitry Andricclass VST4D<bits<4> op11_8, bits<4> op7_4, string Dt> 20250b57cec5SDimitry Andric : NLdSt<0, 0b00, op11_8, op7_4, (outs), 20260b57cec5SDimitry Andric (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4), 20270b57cec5SDimitry Andric IIC_VST4, "vst4", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn", 20280b57cec5SDimitry Andric "", []>, Sched<[WriteVST4]> { 20290b57cec5SDimitry Andric let Rm = 0b1111; 20300b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 20310b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST4Instruction"; 20320b57cec5SDimitry Andric} 20330b57cec5SDimitry Andric 20340b57cec5SDimitry Andricdef VST4d8 : VST4D<0b0000, {0,0,?,?}, "8">; 20350b57cec5SDimitry Andricdef VST4d16 : VST4D<0b0000, {0,1,?,?}, "16">; 20360b57cec5SDimitry Andricdef VST4d32 : VST4D<0b0000, {1,0,?,?}, "32">; 20370b57cec5SDimitry Andric 20380b57cec5SDimitry Andricdef VST4d8Pseudo : VSTQQPseudo<IIC_VST4>, Sched<[WriteVST4]>; 20390b57cec5SDimitry Andricdef VST4d16Pseudo : VSTQQPseudo<IIC_VST4>, Sched<[WriteVST4]>; 20400b57cec5SDimitry Andricdef VST4d32Pseudo : VSTQQPseudo<IIC_VST4>, Sched<[WriteVST4]>; 20410b57cec5SDimitry Andric 20420b57cec5SDimitry Andric// ...with address register writeback: 20430b57cec5SDimitry Andricclass VST4DWB<bits<4> op11_8, bits<4> op7_4, string Dt> 20440b57cec5SDimitry Andric : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb), 20450b57cec5SDimitry Andric (ins addrmode6:$Rn, am6offset:$Rm, 20460b57cec5SDimitry Andric DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4), IIC_VST4u, 20470b57cec5SDimitry Andric "vst4", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn$Rm", 20480b57cec5SDimitry Andric "$Rn.addr = $wb", []>, Sched<[WriteVST4]> { 20490b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 20500b57cec5SDimitry Andric let DecoderMethod = "DecodeVLDST4Instruction"; 20510b57cec5SDimitry Andric} 20520b57cec5SDimitry Andric 20530b57cec5SDimitry Andricdef VST4d8_UPD : VST4DWB<0b0000, {0,0,?,?}, "8">; 20540b57cec5SDimitry Andricdef VST4d16_UPD : VST4DWB<0b0000, {0,1,?,?}, "16">; 20550b57cec5SDimitry Andricdef VST4d32_UPD : VST4DWB<0b0000, {1,0,?,?}, "32">; 20560b57cec5SDimitry Andric 20570b57cec5SDimitry Andricdef VST4d8Pseudo_UPD : VSTQQWBPseudo<IIC_VST4u>, Sched<[WriteVST4]>; 20580b57cec5SDimitry Andricdef VST4d16Pseudo_UPD : VSTQQWBPseudo<IIC_VST4u>, Sched<[WriteVST4]>; 20590b57cec5SDimitry Andricdef VST4d32Pseudo_UPD : VSTQQWBPseudo<IIC_VST4u>, Sched<[WriteVST4]>; 20600b57cec5SDimitry Andric 20610b57cec5SDimitry Andric// ...with double-spaced registers: 20620b57cec5SDimitry Andricdef VST4q8 : VST4D<0b0001, {0,0,?,?}, "8">; 20630b57cec5SDimitry Andricdef VST4q16 : VST4D<0b0001, {0,1,?,?}, "16">; 20640b57cec5SDimitry Andricdef VST4q32 : VST4D<0b0001, {1,0,?,?}, "32">; 20650b57cec5SDimitry Andricdef VST4q8_UPD : VST4DWB<0b0001, {0,0,?,?}, "8">; 20660b57cec5SDimitry Andricdef VST4q16_UPD : VST4DWB<0b0001, {0,1,?,?}, "16">; 20670b57cec5SDimitry Andricdef VST4q32_UPD : VST4DWB<0b0001, {1,0,?,?}, "32">; 20680b57cec5SDimitry Andric 20690b57cec5SDimitry Andricdef VST4q8Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>, Sched<[WriteVST4]>; 20700b57cec5SDimitry Andricdef VST4q16Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>, Sched<[WriteVST4]>; 20710b57cec5SDimitry Andricdef VST4q32Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>, Sched<[WriteVST4]>; 20720b57cec5SDimitry Andric 20730b57cec5SDimitry Andric// ...alternate versions to be allocated odd register numbers: 20740b57cec5SDimitry Andricdef VST4q8oddPseudo : VSTQQQQPseudo<IIC_VST4>, Sched<[WriteVST4]>; 20750b57cec5SDimitry Andricdef VST4q16oddPseudo : VSTQQQQPseudo<IIC_VST4>, Sched<[WriteVST4]>; 20760b57cec5SDimitry Andricdef VST4q32oddPseudo : VSTQQQQPseudo<IIC_VST4>, Sched<[WriteVST4]>; 20770b57cec5SDimitry Andric 20780b57cec5SDimitry Andricdef VST4q8oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>, Sched<[WriteVST4]>; 20790b57cec5SDimitry Andricdef VST4q16oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>, Sched<[WriteVST4]>; 20800b57cec5SDimitry Andricdef VST4q32oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>, Sched<[WriteVST4]>; 20810b57cec5SDimitry Andric 20820b57cec5SDimitry Andric} // mayStore = 1, hasSideEffects = 0, hasExtraSrcRegAllocReq = 1 20830b57cec5SDimitry Andric 20840b57cec5SDimitry Andric// Classes for VST*LN pseudo-instructions with multi-register operands. 20850b57cec5SDimitry Andric// These are expanded to real instructions after register allocation. 20860b57cec5SDimitry Andricclass VSTQLNPseudo<InstrItinClass itin> 20870b57cec5SDimitry Andric : PseudoNLdSt<(outs), (ins addrmode6:$addr, QPR:$src, nohash_imm:$lane), 20880b57cec5SDimitry Andric itin, "">; 20890b57cec5SDimitry Andricclass VSTQLNWBPseudo<InstrItinClass itin> 20900b57cec5SDimitry Andric : PseudoNLdSt<(outs GPR:$wb), 20910b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset, QPR:$src, 20920b57cec5SDimitry Andric nohash_imm:$lane), itin, "$addr.addr = $wb">; 20930b57cec5SDimitry Andricclass VSTQQLNPseudo<InstrItinClass itin> 20940b57cec5SDimitry Andric : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQPR:$src, nohash_imm:$lane), 20950b57cec5SDimitry Andric itin, "">; 20960b57cec5SDimitry Andricclass VSTQQLNWBPseudo<InstrItinClass itin> 20970b57cec5SDimitry Andric : PseudoNLdSt<(outs GPR:$wb), 20980b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset, QQPR:$src, 20990b57cec5SDimitry Andric nohash_imm:$lane), itin, "$addr.addr = $wb">; 21000b57cec5SDimitry Andricclass VSTQQQQLNPseudo<InstrItinClass itin> 21010b57cec5SDimitry Andric : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQQQPR:$src, nohash_imm:$lane), 21020b57cec5SDimitry Andric itin, "">; 21030b57cec5SDimitry Andricclass VSTQQQQLNWBPseudo<InstrItinClass itin> 21040b57cec5SDimitry Andric : PseudoNLdSt<(outs GPR:$wb), 21050b57cec5SDimitry Andric (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src, 21060b57cec5SDimitry Andric nohash_imm:$lane), itin, "$addr.addr = $wb">; 21070b57cec5SDimitry Andric 21080b57cec5SDimitry Andric// VST1LN : Vector Store (single element from one lane) 21090b57cec5SDimitry Andricclass VST1LN<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty, 21100b57cec5SDimitry Andric PatFrag StoreOp, SDNode ExtractOp, Operand AddrMode> 21110b57cec5SDimitry Andric : NLdStLn<1, 0b00, op11_8, op7_4, (outs), 21120b57cec5SDimitry Andric (ins AddrMode:$Rn, DPR:$Vd, nohash_imm:$lane), 21130b57cec5SDimitry Andric IIC_VST1ln, "vst1", Dt, "\\{$Vd[$lane]\\}, $Rn", "", 21140b57cec5SDimitry Andric [(StoreOp (ExtractOp (Ty DPR:$Vd), imm:$lane), AddrMode:$Rn)]>, 21150b57cec5SDimitry Andric Sched<[WriteVST1]> { 21160b57cec5SDimitry Andric let Rm = 0b1111; 21170b57cec5SDimitry Andric let DecoderMethod = "DecodeVST1LN"; 21180b57cec5SDimitry Andric} 21190b57cec5SDimitry Andricclass VST1QLNPseudo<ValueType Ty, PatFrag StoreOp, SDNode ExtractOp> 21200b57cec5SDimitry Andric : VSTQLNPseudo<IIC_VST1ln>, Sched<[WriteVST1]> { 21210b57cec5SDimitry Andric let Pattern = [(StoreOp (ExtractOp (Ty QPR:$src), imm:$lane), 21220b57cec5SDimitry Andric addrmode6:$addr)]; 21230b57cec5SDimitry Andric} 21240b57cec5SDimitry Andric 21250b57cec5SDimitry Andricdef VST1LNd8 : VST1LN<0b0000, {?,?,?,0}, "8", v8i8, truncstorei8, 21260b57cec5SDimitry Andric ARMvgetlaneu, addrmode6> { 21270b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 21280b57cec5SDimitry Andric} 21290b57cec5SDimitry Andricdef VST1LNd16 : VST1LN<0b0100, {?,?,0,?}, "16", v4i16, truncstorei16, 21300b57cec5SDimitry Andric ARMvgetlaneu, addrmode6> { 21310b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 21320b57cec5SDimitry Andric let Inst{4} = Rn{4}; 21330b57cec5SDimitry Andric} 21340b57cec5SDimitry Andric 21350b57cec5SDimitry Andricdef VST1LNd32 : VST1LN<0b1000, {?,0,?,?}, "32", v2i32, store, extractelt, 21360b57cec5SDimitry Andric addrmode6oneL32> { 21370b57cec5SDimitry Andric let Inst{7} = lane{0}; 21380b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 21390b57cec5SDimitry Andric} 21400b57cec5SDimitry Andric 21410b57cec5SDimitry Andricdef VST1LNq8Pseudo : VST1QLNPseudo<v16i8, truncstorei8, ARMvgetlaneu>; 21420b57cec5SDimitry Andricdef VST1LNq16Pseudo : VST1QLNPseudo<v8i16, truncstorei16, ARMvgetlaneu>; 21430b57cec5SDimitry Andricdef VST1LNq32Pseudo : VST1QLNPseudo<v4i32, store, extractelt>; 21440b57cec5SDimitry Andric 21450b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 21460b57cec5SDimitry Andricdef : Pat<(store (extractelt (v2f32 DPR:$src), imm:$lane), addrmode6:$addr), 21470b57cec5SDimitry Andric (VST1LNd32 addrmode6:$addr, DPR:$src, imm:$lane)>; 21480b57cec5SDimitry Andricdef : Pat<(store (extractelt (v4f32 QPR:$src), imm:$lane), addrmode6:$addr), 21490b57cec5SDimitry Andric (VST1LNq32Pseudo addrmode6:$addr, QPR:$src, imm:$lane)>; 21500b57cec5SDimitry Andric 21510b57cec5SDimitry Andricdef : Pat<(store (extractelt (v4f16 DPR:$src), imm:$lane), addrmode6:$addr), 21520b57cec5SDimitry Andric (VST1LNd16 addrmode6:$addr, DPR:$src, imm:$lane)>; 21530b57cec5SDimitry Andricdef : Pat<(store (extractelt (v8f16 QPR:$src), imm:$lane), addrmode6:$addr), 21540b57cec5SDimitry Andric (VST1LNq16Pseudo addrmode6:$addr, QPR:$src, imm:$lane)>; 21550b57cec5SDimitry Andric} 21560b57cec5SDimitry Andric 21570b57cec5SDimitry Andric// ...with address register writeback: 21580b57cec5SDimitry Andricclass VST1LNWB<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty, 21590b57cec5SDimitry Andric PatFrag StoreOp, SDNode ExtractOp, Operand AdrMode> 21600b57cec5SDimitry Andric : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb), 21610b57cec5SDimitry Andric (ins AdrMode:$Rn, am6offset:$Rm, 21620b57cec5SDimitry Andric DPR:$Vd, nohash_imm:$lane), IIC_VST1lnu, "vst1", Dt, 21630b57cec5SDimitry Andric "\\{$Vd[$lane]\\}, $Rn$Rm", 21640b57cec5SDimitry Andric "$Rn.addr = $wb", 21650b57cec5SDimitry Andric [(set GPR:$wb, (StoreOp (ExtractOp (Ty DPR:$Vd), imm:$lane), 21660b57cec5SDimitry Andric AdrMode:$Rn, am6offset:$Rm))]>, 21670b57cec5SDimitry Andric Sched<[WriteVST1]> { 21680b57cec5SDimitry Andric let DecoderMethod = "DecodeVST1LN"; 21690b57cec5SDimitry Andric} 21700b57cec5SDimitry Andricclass VST1QLNWBPseudo<ValueType Ty, PatFrag StoreOp, SDNode ExtractOp> 21710b57cec5SDimitry Andric : VSTQLNWBPseudo<IIC_VST1lnu>, Sched<[WriteVST1]> { 21720b57cec5SDimitry Andric let Pattern = [(set GPR:$wb, (StoreOp (ExtractOp (Ty QPR:$src), imm:$lane), 21730b57cec5SDimitry Andric addrmode6:$addr, am6offset:$offset))]; 21740b57cec5SDimitry Andric} 21750b57cec5SDimitry Andric 21760b57cec5SDimitry Andricdef VST1LNd8_UPD : VST1LNWB<0b0000, {?,?,?,0}, "8", v8i8, post_truncsti8, 21770b57cec5SDimitry Andric ARMvgetlaneu, addrmode6> { 21780b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 21790b57cec5SDimitry Andric} 21800b57cec5SDimitry Andricdef VST1LNd16_UPD : VST1LNWB<0b0100, {?,?,0,?}, "16", v4i16, post_truncsti16, 21810b57cec5SDimitry Andric ARMvgetlaneu, addrmode6> { 21820b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 21830b57cec5SDimitry Andric let Inst{4} = Rn{4}; 21840b57cec5SDimitry Andric} 21850b57cec5SDimitry Andricdef VST1LNd32_UPD : VST1LNWB<0b1000, {?,0,?,?}, "32", v2i32, post_store, 21860b57cec5SDimitry Andric extractelt, addrmode6oneL32> { 21870b57cec5SDimitry Andric let Inst{7} = lane{0}; 21880b57cec5SDimitry Andric let Inst{5-4} = Rn{5-4}; 21890b57cec5SDimitry Andric} 21900b57cec5SDimitry Andric 21910b57cec5SDimitry Andricdef VST1LNq8Pseudo_UPD : VST1QLNWBPseudo<v16i8, post_truncsti8, ARMvgetlaneu>; 21920b57cec5SDimitry Andricdef VST1LNq16Pseudo_UPD : VST1QLNWBPseudo<v8i16, post_truncsti16,ARMvgetlaneu>; 21930b57cec5SDimitry Andricdef VST1LNq32Pseudo_UPD : VST1QLNWBPseudo<v4i32, post_store, extractelt>; 21940b57cec5SDimitry Andric 21950b57cec5SDimitry Andriclet mayStore = 1, hasSideEffects = 0, hasExtraSrcRegAllocReq = 1 in { 21960b57cec5SDimitry Andric 21970b57cec5SDimitry Andric// VST2LN : Vector Store (single 2-element structure from one lane) 21980b57cec5SDimitry Andricclass VST2LN<bits<4> op11_8, bits<4> op7_4, string Dt> 21990b57cec5SDimitry Andric : NLdStLn<1, 0b00, op11_8, op7_4, (outs), 22000b57cec5SDimitry Andric (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, nohash_imm:$lane), 22010b57cec5SDimitry Andric IIC_VST2ln, "vst2", Dt, "\\{$Vd[$lane], $src2[$lane]\\}, $Rn", 22020b57cec5SDimitry Andric "", []>, Sched<[WriteVST1]> { 22030b57cec5SDimitry Andric let Rm = 0b1111; 22040b57cec5SDimitry Andric let Inst{4} = Rn{4}; 22050b57cec5SDimitry Andric let DecoderMethod = "DecodeVST2LN"; 22060b57cec5SDimitry Andric} 22070b57cec5SDimitry Andric 22080b57cec5SDimitry Andricdef VST2LNd8 : VST2LN<0b0001, {?,?,?,?}, "8"> { 22090b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 22100b57cec5SDimitry Andric} 22110b57cec5SDimitry Andricdef VST2LNd16 : VST2LN<0b0101, {?,?,0,?}, "16"> { 22120b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 22130b57cec5SDimitry Andric} 22140b57cec5SDimitry Andricdef VST2LNd32 : VST2LN<0b1001, {?,0,0,?}, "32"> { 22150b57cec5SDimitry Andric let Inst{7} = lane{0}; 22160b57cec5SDimitry Andric} 22170b57cec5SDimitry Andric 22180b57cec5SDimitry Andricdef VST2LNd8Pseudo : VSTQLNPseudo<IIC_VST2ln>, Sched<[WriteVST1]>; 22190b57cec5SDimitry Andricdef VST2LNd16Pseudo : VSTQLNPseudo<IIC_VST2ln>, Sched<[WriteVST1]>; 22200b57cec5SDimitry Andricdef VST2LNd32Pseudo : VSTQLNPseudo<IIC_VST2ln>, Sched<[WriteVST1]>; 22210b57cec5SDimitry Andric 22220b57cec5SDimitry Andric// ...with double-spaced registers: 22230b57cec5SDimitry Andricdef VST2LNq16 : VST2LN<0b0101, {?,?,1,?}, "16"> { 22240b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 22250b57cec5SDimitry Andric let Inst{4} = Rn{4}; 22260b57cec5SDimitry Andric} 22270b57cec5SDimitry Andricdef VST2LNq32 : VST2LN<0b1001, {?,1,0,?}, "32"> { 22280b57cec5SDimitry Andric let Inst{7} = lane{0}; 22290b57cec5SDimitry Andric let Inst{4} = Rn{4}; 22300b57cec5SDimitry Andric} 22310b57cec5SDimitry Andric 22320b57cec5SDimitry Andricdef VST2LNq16Pseudo : VSTQQLNPseudo<IIC_VST2ln>, Sched<[WriteVST1]>; 22330b57cec5SDimitry Andricdef VST2LNq32Pseudo : VSTQQLNPseudo<IIC_VST2ln>, Sched<[WriteVST1]>; 22340b57cec5SDimitry Andric 22350b57cec5SDimitry Andric// ...with address register writeback: 22360b57cec5SDimitry Andricclass VST2LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> 22370b57cec5SDimitry Andric : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb), 22380b57cec5SDimitry Andric (ins addrmode6:$Rn, am6offset:$Rm, 22390b57cec5SDimitry Andric DPR:$Vd, DPR:$src2, nohash_imm:$lane), IIC_VST2lnu, "vst2", Dt, 22400b57cec5SDimitry Andric "\\{$Vd[$lane], $src2[$lane]\\}, $Rn$Rm", 22410b57cec5SDimitry Andric "$Rn.addr = $wb", []> { 22420b57cec5SDimitry Andric let Inst{4} = Rn{4}; 22430b57cec5SDimitry Andric let DecoderMethod = "DecodeVST2LN"; 22440b57cec5SDimitry Andric} 22450b57cec5SDimitry Andric 22460b57cec5SDimitry Andricdef VST2LNd8_UPD : VST2LNWB<0b0001, {?,?,?,?}, "8"> { 22470b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 22480b57cec5SDimitry Andric} 22490b57cec5SDimitry Andricdef VST2LNd16_UPD : VST2LNWB<0b0101, {?,?,0,?}, "16"> { 22500b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 22510b57cec5SDimitry Andric} 22520b57cec5SDimitry Andricdef VST2LNd32_UPD : VST2LNWB<0b1001, {?,0,0,?}, "32"> { 22530b57cec5SDimitry Andric let Inst{7} = lane{0}; 22540b57cec5SDimitry Andric} 22550b57cec5SDimitry Andric 22560b57cec5SDimitry Andricdef VST2LNd8Pseudo_UPD : VSTQLNWBPseudo<IIC_VST2lnu>, Sched<[WriteVST1]>; 22570b57cec5SDimitry Andricdef VST2LNd16Pseudo_UPD : VSTQLNWBPseudo<IIC_VST2lnu>, Sched<[WriteVST1]>; 22580b57cec5SDimitry Andricdef VST2LNd32Pseudo_UPD : VSTQLNWBPseudo<IIC_VST2lnu>, Sched<[WriteVST1]>; 22590b57cec5SDimitry Andric 22600b57cec5SDimitry Andricdef VST2LNq16_UPD : VST2LNWB<0b0101, {?,?,1,?}, "16"> { 22610b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 22620b57cec5SDimitry Andric} 22630b57cec5SDimitry Andricdef VST2LNq32_UPD : VST2LNWB<0b1001, {?,1,0,?}, "32"> { 22640b57cec5SDimitry Andric let Inst{7} = lane{0}; 22650b57cec5SDimitry Andric} 22660b57cec5SDimitry Andric 22670b57cec5SDimitry Andricdef VST2LNq16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST2lnu>, Sched<[WriteVST1]>; 22680b57cec5SDimitry Andricdef VST2LNq32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST2lnu>, Sched<[WriteVST1]>; 22690b57cec5SDimitry Andric 22700b57cec5SDimitry Andric// VST3LN : Vector Store (single 3-element structure from one lane) 22710b57cec5SDimitry Andricclass VST3LN<bits<4> op11_8, bits<4> op7_4, string Dt> 22720b57cec5SDimitry Andric : NLdStLn<1, 0b00, op11_8, op7_4, (outs), 22730b57cec5SDimitry Andric (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3, 22740b57cec5SDimitry Andric nohash_imm:$lane), IIC_VST3ln, "vst3", Dt, 22750b57cec5SDimitry Andric "\\{$Vd[$lane], $src2[$lane], $src3[$lane]\\}, $Rn", "", []>, 22760b57cec5SDimitry Andric Sched<[WriteVST2]> { 22770b57cec5SDimitry Andric let Rm = 0b1111; 22780b57cec5SDimitry Andric let DecoderMethod = "DecodeVST3LN"; 22790b57cec5SDimitry Andric} 22800b57cec5SDimitry Andric 22810b57cec5SDimitry Andricdef VST3LNd8 : VST3LN<0b0010, {?,?,?,0}, "8"> { 22820b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 22830b57cec5SDimitry Andric} 22840b57cec5SDimitry Andricdef VST3LNd16 : VST3LN<0b0110, {?,?,0,0}, "16"> { 22850b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 22860b57cec5SDimitry Andric} 22870b57cec5SDimitry Andricdef VST3LNd32 : VST3LN<0b1010, {?,0,0,0}, "32"> { 22880b57cec5SDimitry Andric let Inst{7} = lane{0}; 22890b57cec5SDimitry Andric} 22900b57cec5SDimitry Andric 22910b57cec5SDimitry Andricdef VST3LNd8Pseudo : VSTQQLNPseudo<IIC_VST3ln>, Sched<[WriteVST2]>; 22920b57cec5SDimitry Andricdef VST3LNd16Pseudo : VSTQQLNPseudo<IIC_VST3ln>, Sched<[WriteVST2]>; 22930b57cec5SDimitry Andricdef VST3LNd32Pseudo : VSTQQLNPseudo<IIC_VST3ln>, Sched<[WriteVST2]>; 22940b57cec5SDimitry Andric 22950b57cec5SDimitry Andric// ...with double-spaced registers: 22960b57cec5SDimitry Andricdef VST3LNq16 : VST3LN<0b0110, {?,?,1,0}, "16"> { 22970b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 22980b57cec5SDimitry Andric} 22990b57cec5SDimitry Andricdef VST3LNq32 : VST3LN<0b1010, {?,1,0,0}, "32"> { 23000b57cec5SDimitry Andric let Inst{7} = lane{0}; 23010b57cec5SDimitry Andric} 23020b57cec5SDimitry Andric 23030b57cec5SDimitry Andricdef VST3LNq16Pseudo : VSTQQQQLNPseudo<IIC_VST3ln>; 23040b57cec5SDimitry Andricdef VST3LNq32Pseudo : VSTQQQQLNPseudo<IIC_VST3ln>; 23050b57cec5SDimitry Andric 23060b57cec5SDimitry Andric// ...with address register writeback: 23070b57cec5SDimitry Andricclass VST3LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> 23080b57cec5SDimitry Andric : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb), 23090b57cec5SDimitry Andric (ins addrmode6:$Rn, am6offset:$Rm, 23100b57cec5SDimitry Andric DPR:$Vd, DPR:$src2, DPR:$src3, nohash_imm:$lane), 23110b57cec5SDimitry Andric IIC_VST3lnu, "vst3", Dt, 23120b57cec5SDimitry Andric "\\{$Vd[$lane], $src2[$lane], $src3[$lane]\\}, $Rn$Rm", 23130b57cec5SDimitry Andric "$Rn.addr = $wb", []> { 23140b57cec5SDimitry Andric let DecoderMethod = "DecodeVST3LN"; 23150b57cec5SDimitry Andric} 23160b57cec5SDimitry Andric 23170b57cec5SDimitry Andricdef VST3LNd8_UPD : VST3LNWB<0b0010, {?,?,?,0}, "8"> { 23180b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 23190b57cec5SDimitry Andric} 23200b57cec5SDimitry Andricdef VST3LNd16_UPD : VST3LNWB<0b0110, {?,?,0,0}, "16"> { 23210b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 23220b57cec5SDimitry Andric} 23230b57cec5SDimitry Andricdef VST3LNd32_UPD : VST3LNWB<0b1010, {?,0,0,0}, "32"> { 23240b57cec5SDimitry Andric let Inst{7} = lane{0}; 23250b57cec5SDimitry Andric} 23260b57cec5SDimitry Andric 23270b57cec5SDimitry Andricdef VST3LNd8Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST3lnu>, Sched<[WriteVST2]>; 23280b57cec5SDimitry Andricdef VST3LNd16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST3lnu>, Sched<[WriteVST2]>; 23290b57cec5SDimitry Andricdef VST3LNd32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST3lnu>, Sched<[WriteVST2]>; 23300b57cec5SDimitry Andric 23310b57cec5SDimitry Andricdef VST3LNq16_UPD : VST3LNWB<0b0110, {?,?,1,0}, "16"> { 23320b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 23330b57cec5SDimitry Andric} 23340b57cec5SDimitry Andricdef VST3LNq32_UPD : VST3LNWB<0b1010, {?,1,0,0}, "32"> { 23350b57cec5SDimitry Andric let Inst{7} = lane{0}; 23360b57cec5SDimitry Andric} 23370b57cec5SDimitry Andric 23380b57cec5SDimitry Andricdef VST3LNq16Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST3lnu>, Sched<[WriteVST2]>; 23390b57cec5SDimitry Andricdef VST3LNq32Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST3lnu>, Sched<[WriteVST2]>; 23400b57cec5SDimitry Andric 23410b57cec5SDimitry Andric// VST4LN : Vector Store (single 4-element structure from one lane) 23420b57cec5SDimitry Andricclass VST4LN<bits<4> op11_8, bits<4> op7_4, string Dt> 23430b57cec5SDimitry Andric : NLdStLn<1, 0b00, op11_8, op7_4, (outs), 23440b57cec5SDimitry Andric (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4, 23450b57cec5SDimitry Andric nohash_imm:$lane), IIC_VST4ln, "vst4", Dt, 23460b57cec5SDimitry Andric "\\{$Vd[$lane], $src2[$lane], $src3[$lane], $src4[$lane]\\}, $Rn", 23470b57cec5SDimitry Andric "", []>, Sched<[WriteVST2]> { 23480b57cec5SDimitry Andric let Rm = 0b1111; 23490b57cec5SDimitry Andric let Inst{4} = Rn{4}; 23500b57cec5SDimitry Andric let DecoderMethod = "DecodeVST4LN"; 23510b57cec5SDimitry Andric} 23520b57cec5SDimitry Andric 23530b57cec5SDimitry Andricdef VST4LNd8 : VST4LN<0b0011, {?,?,?,?}, "8"> { 23540b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 23550b57cec5SDimitry Andric} 23560b57cec5SDimitry Andricdef VST4LNd16 : VST4LN<0b0111, {?,?,0,?}, "16"> { 23570b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 23580b57cec5SDimitry Andric} 23590b57cec5SDimitry Andricdef VST4LNd32 : VST4LN<0b1011, {?,0,?,?}, "32"> { 23600b57cec5SDimitry Andric let Inst{7} = lane{0}; 23610b57cec5SDimitry Andric let Inst{5} = Rn{5}; 23620b57cec5SDimitry Andric} 23630b57cec5SDimitry Andric 23640b57cec5SDimitry Andricdef VST4LNd8Pseudo : VSTQQLNPseudo<IIC_VST4ln>, Sched<[WriteVST2]>; 23650b57cec5SDimitry Andricdef VST4LNd16Pseudo : VSTQQLNPseudo<IIC_VST4ln>, Sched<[WriteVST2]>; 23660b57cec5SDimitry Andricdef VST4LNd32Pseudo : VSTQQLNPseudo<IIC_VST4ln>, Sched<[WriteVST2]>; 23670b57cec5SDimitry Andric 23680b57cec5SDimitry Andric// ...with double-spaced registers: 23690b57cec5SDimitry Andricdef VST4LNq16 : VST4LN<0b0111, {?,?,1,?}, "16"> { 23700b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 23710b57cec5SDimitry Andric} 23720b57cec5SDimitry Andricdef VST4LNq32 : VST4LN<0b1011, {?,1,?,?}, "32"> { 23730b57cec5SDimitry Andric let Inst{7} = lane{0}; 23740b57cec5SDimitry Andric let Inst{5} = Rn{5}; 23750b57cec5SDimitry Andric} 23760b57cec5SDimitry Andric 23770b57cec5SDimitry Andricdef VST4LNq16Pseudo : VSTQQQQLNPseudo<IIC_VST4ln>, Sched<[WriteVST2]>; 23780b57cec5SDimitry Andricdef VST4LNq32Pseudo : VSTQQQQLNPseudo<IIC_VST4ln>, Sched<[WriteVST2]>; 23790b57cec5SDimitry Andric 23800b57cec5SDimitry Andric// ...with address register writeback: 23810b57cec5SDimitry Andricclass VST4LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> 23820b57cec5SDimitry Andric : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb), 23830b57cec5SDimitry Andric (ins addrmode6:$Rn, am6offset:$Rm, 23840b57cec5SDimitry Andric DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4, nohash_imm:$lane), 23850b57cec5SDimitry Andric IIC_VST4lnu, "vst4", Dt, 23860b57cec5SDimitry Andric "\\{$Vd[$lane], $src2[$lane], $src3[$lane], $src4[$lane]\\}, $Rn$Rm", 23870b57cec5SDimitry Andric "$Rn.addr = $wb", []> { 23880b57cec5SDimitry Andric let Inst{4} = Rn{4}; 23890b57cec5SDimitry Andric let DecoderMethod = "DecodeVST4LN"; 23900b57cec5SDimitry Andric} 23910b57cec5SDimitry Andric 23920b57cec5SDimitry Andricdef VST4LNd8_UPD : VST4LNWB<0b0011, {?,?,?,?}, "8"> { 23930b57cec5SDimitry Andric let Inst{7-5} = lane{2-0}; 23940b57cec5SDimitry Andric} 23950b57cec5SDimitry Andricdef VST4LNd16_UPD : VST4LNWB<0b0111, {?,?,0,?}, "16"> { 23960b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 23970b57cec5SDimitry Andric} 23980b57cec5SDimitry Andricdef VST4LNd32_UPD : VST4LNWB<0b1011, {?,0,?,?}, "32"> { 23990b57cec5SDimitry Andric let Inst{7} = lane{0}; 24000b57cec5SDimitry Andric let Inst{5} = Rn{5}; 24010b57cec5SDimitry Andric} 24020b57cec5SDimitry Andric 24030b57cec5SDimitry Andricdef VST4LNd8Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST4lnu>, Sched<[WriteVST2]>; 24040b57cec5SDimitry Andricdef VST4LNd16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST4lnu>, Sched<[WriteVST2]>; 24050b57cec5SDimitry Andricdef VST4LNd32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST4lnu>, Sched<[WriteVST2]>; 24060b57cec5SDimitry Andric 24070b57cec5SDimitry Andricdef VST4LNq16_UPD : VST4LNWB<0b0111, {?,?,1,?}, "16"> { 24080b57cec5SDimitry Andric let Inst{7-6} = lane{1-0}; 24090b57cec5SDimitry Andric} 24100b57cec5SDimitry Andricdef VST4LNq32_UPD : VST4LNWB<0b1011, {?,1,?,?}, "32"> { 24110b57cec5SDimitry Andric let Inst{7} = lane{0}; 24120b57cec5SDimitry Andric let Inst{5} = Rn{5}; 24130b57cec5SDimitry Andric} 24140b57cec5SDimitry Andric 24150b57cec5SDimitry Andricdef VST4LNq16Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST4lnu>, Sched<[WriteVST2]>; 24160b57cec5SDimitry Andricdef VST4LNq32Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST4lnu>, Sched<[WriteVST2]>; 24170b57cec5SDimitry Andric 24180b57cec5SDimitry Andric} // mayStore = 1, hasSideEffects = 0, hasExtraSrcRegAllocReq = 1 24190b57cec5SDimitry Andric 24200b57cec5SDimitry Andric// Use vld1/vst1 for unaligned f64 load / store 24210b57cec5SDimitry Andriclet Predicates = [IsLE,HasNEON] in { 24220b57cec5SDimitry Andricdef : Pat<(f64 (hword_alignedload addrmode6:$addr)), 24230b57cec5SDimitry Andric (VLD1d16 addrmode6:$addr)>; 24240b57cec5SDimitry Andricdef : Pat<(hword_alignedstore (f64 DPR:$value), addrmode6:$addr), 24250b57cec5SDimitry Andric (VST1d16 addrmode6:$addr, DPR:$value)>; 24260b57cec5SDimitry Andricdef : Pat<(f64 (byte_alignedload addrmode6:$addr)), 24270b57cec5SDimitry Andric (VLD1d8 addrmode6:$addr)>; 24280b57cec5SDimitry Andricdef : Pat<(byte_alignedstore (f64 DPR:$value), addrmode6:$addr), 24290b57cec5SDimitry Andric (VST1d8 addrmode6:$addr, DPR:$value)>; 24300b57cec5SDimitry Andric} 24310b57cec5SDimitry Andriclet Predicates = [IsBE,HasNEON] in { 24320b57cec5SDimitry Andricdef : Pat<(f64 (non_word_alignedload addrmode6:$addr)), 24330b57cec5SDimitry Andric (VLD1d64 addrmode6:$addr)>; 24340b57cec5SDimitry Andricdef : Pat<(non_word_alignedstore (f64 DPR:$value), addrmode6:$addr), 24350b57cec5SDimitry Andric (VST1d64 addrmode6:$addr, DPR:$value)>; 24360b57cec5SDimitry Andric} 24370b57cec5SDimitry Andric 24380b57cec5SDimitry Andric// Use vld1/vst1 for Q and QQ. Also use them for unaligned v2f64 24390b57cec5SDimitry Andric// load / store if it's legal. 24400b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 24410b57cec5SDimitry Andricdef : Pat<(v2f64 (dword_alignedload addrmode6:$addr)), 24420b57cec5SDimitry Andric (VLD1q64 addrmode6:$addr)>; 24430b57cec5SDimitry Andricdef : Pat<(dword_alignedstore (v2f64 QPR:$value), addrmode6:$addr), 24440b57cec5SDimitry Andric (VST1q64 addrmode6:$addr, QPR:$value)>; 24450b57cec5SDimitry Andric} 24460b57cec5SDimitry Andriclet Predicates = [IsLE,HasNEON] in { 24470b57cec5SDimitry Andricdef : Pat<(v2f64 (word_alignedload addrmode6:$addr)), 24480b57cec5SDimitry Andric (VLD1q32 addrmode6:$addr)>; 24490b57cec5SDimitry Andricdef : Pat<(word_alignedstore (v2f64 QPR:$value), addrmode6:$addr), 24500b57cec5SDimitry Andric (VST1q32 addrmode6:$addr, QPR:$value)>; 24510b57cec5SDimitry Andricdef : Pat<(v2f64 (hword_alignedload addrmode6:$addr)), 24520b57cec5SDimitry Andric (VLD1q16 addrmode6:$addr)>; 24530b57cec5SDimitry Andricdef : Pat<(hword_alignedstore (v2f64 QPR:$value), addrmode6:$addr), 24540b57cec5SDimitry Andric (VST1q16 addrmode6:$addr, QPR:$value)>; 24550b57cec5SDimitry Andricdef : Pat<(v2f64 (byte_alignedload addrmode6:$addr)), 24560b57cec5SDimitry Andric (VLD1q8 addrmode6:$addr)>; 24570b57cec5SDimitry Andricdef : Pat<(byte_alignedstore (v2f64 QPR:$value), addrmode6:$addr), 24580b57cec5SDimitry Andric (VST1q8 addrmode6:$addr, QPR:$value)>; 24590b57cec5SDimitry Andric} 24600b57cec5SDimitry Andric 24610b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 24620b57cec5SDimitry Andric// NEON pattern fragments 24630b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 24640b57cec5SDimitry Andric 24650b57cec5SDimitry Andric// Extract D sub-registers of Q registers. 24660b57cec5SDimitry Andricdef DSubReg_i8_reg : SDNodeXForm<imm, [{ 24670b57cec5SDimitry Andric assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering"); 24680b57cec5SDimitry Andric return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/8, SDLoc(N), 24690b57cec5SDimitry Andric MVT::i32); 24700b57cec5SDimitry Andric}]>; 24710b57cec5SDimitry Andricdef DSubReg_i16_reg : SDNodeXForm<imm, [{ 24720b57cec5SDimitry Andric assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering"); 24730b57cec5SDimitry Andric return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/4, SDLoc(N), 24740b57cec5SDimitry Andric MVT::i32); 24750b57cec5SDimitry Andric}]>; 24760b57cec5SDimitry Andricdef DSubReg_i32_reg : SDNodeXForm<imm, [{ 24770b57cec5SDimitry Andric assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering"); 24780b57cec5SDimitry Andric return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/2, SDLoc(N), 24790b57cec5SDimitry Andric MVT::i32); 24800b57cec5SDimitry Andric}]>; 24810b57cec5SDimitry Andricdef DSubReg_f64_reg : SDNodeXForm<imm, [{ 24820b57cec5SDimitry Andric assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering"); 24830b57cec5SDimitry Andric return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue(), SDLoc(N), 24840b57cec5SDimitry Andric MVT::i32); 24850b57cec5SDimitry Andric}]>; 24860b57cec5SDimitry Andric 24870b57cec5SDimitry Andric// Extract S sub-registers of Q/D registers. 24880b57cec5SDimitry Andricdef SSubReg_f32_reg : SDNodeXForm<imm, [{ 24890b57cec5SDimitry Andric assert(ARM::ssub_3 == ARM::ssub_0+3 && "Unexpected subreg numbering"); 24900b57cec5SDimitry Andric return CurDAG->getTargetConstant(ARM::ssub_0 + N->getZExtValue(), SDLoc(N), 24910b57cec5SDimitry Andric MVT::i32); 24920b57cec5SDimitry Andric}]>; 24930b57cec5SDimitry Andric 24940b57cec5SDimitry Andric// Extract S sub-registers of Q/D registers containing a given f16 lane. 24950b57cec5SDimitry Andricdef SSubReg_f16_reg : SDNodeXForm<imm, [{ 24960b57cec5SDimitry Andric assert(ARM::ssub_3 == ARM::ssub_0+3 && "Unexpected subreg numbering"); 24970b57cec5SDimitry Andric return CurDAG->getTargetConstant(ARM::ssub_0 + N->getZExtValue()/2, SDLoc(N), 24980b57cec5SDimitry Andric MVT::i32); 24990b57cec5SDimitry Andric}]>; 25000b57cec5SDimitry Andric 25010b57cec5SDimitry Andric// Translate lane numbers from Q registers to D subregs. 25020b57cec5SDimitry Andricdef SubReg_i8_lane : SDNodeXForm<imm, [{ 25030b57cec5SDimitry Andric return CurDAG->getTargetConstant(N->getZExtValue() & 7, SDLoc(N), MVT::i32); 25040b57cec5SDimitry Andric}]>; 25050b57cec5SDimitry Andricdef SubReg_i16_lane : SDNodeXForm<imm, [{ 25060b57cec5SDimitry Andric return CurDAG->getTargetConstant(N->getZExtValue() & 3, SDLoc(N), MVT::i32); 25070b57cec5SDimitry Andric}]>; 25080b57cec5SDimitry Andricdef SubReg_i32_lane : SDNodeXForm<imm, [{ 25090b57cec5SDimitry Andric return CurDAG->getTargetConstant(N->getZExtValue() & 1, SDLoc(N), MVT::i32); 25100b57cec5SDimitry Andric}]>; 25110b57cec5SDimitry Andric 25120b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 25130b57cec5SDimitry Andric// Instruction Classes 25140b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 25150b57cec5SDimitry Andric 25160b57cec5SDimitry Andric// Basic 2-register operations: double- and quad-register. 25170b57cec5SDimitry Andricclass N2VD<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 25180b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr, 25190b57cec5SDimitry Andric string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode> 25200b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$Vd), 25210b57cec5SDimitry Andric (ins DPR:$Vm), IIC_VUNAD, OpcodeStr, Dt,"$Vd, $Vm", "", 25220b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vm))))]>; 25230b57cec5SDimitry Andricclass N2VQ<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 25240b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr, 25250b57cec5SDimitry Andric string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode> 25260b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$Vd), 25270b57cec5SDimitry Andric (ins QPR:$Vm), IIC_VUNAQ, OpcodeStr, Dt,"$Vd, $Vm", "", 25280b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vm))))]>; 25290b57cec5SDimitry Andric 25300b57cec5SDimitry Andric// Basic 2-register intrinsics, both double- and quad-register. 25310b57cec5SDimitry Andricclass N2VDInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 25320b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op4, 25330b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 25340b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 25350b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$Vd), 25360b57cec5SDimitry Andric (ins DPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "", 25370b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm))))]>; 25380b57cec5SDimitry Andricclass N2VQInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 25390b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op4, 25400b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 25410b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 25420b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$Vd), 25430b57cec5SDimitry Andric (ins QPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "", 25440b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm))))]>; 25450b57cec5SDimitry Andric 25460b57cec5SDimitry Andric// Same as above, but not predicated. 25470b57cec5SDimitry Andricclass N2VDIntnp<bits<2> op19_18, bits<2> op17_16, bits<3> op10_8, bit op7, 25480b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 25490b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 25500b57cec5SDimitry Andric : N2Vnp<op19_18, op17_16, op10_8, op7, 0, (outs DPR:$Vd), (ins DPR:$Vm), 25510b57cec5SDimitry Andric itin, OpcodeStr, Dt, 25520b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm))))]>; 25530b57cec5SDimitry Andric 25540b57cec5SDimitry Andricclass N2VQIntnp<bits<2> op19_18, bits<2> op17_16, bits<3> op10_8, bit op7, 25550b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 25560b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 25570b57cec5SDimitry Andric : N2Vnp<op19_18, op17_16, op10_8, op7, 1, (outs QPR:$Vd), (ins QPR:$Vm), 25580b57cec5SDimitry Andric itin, OpcodeStr, Dt, 25590b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm))))]>; 25600b57cec5SDimitry Andric 25610b57cec5SDimitry Andric// Similar to NV2VQIntnp with some more encoding bits exposed (crypto). 25620b57cec5SDimitry Andricclass N2VQIntXnp<bits<2> op19_18, bits<2> op17_16, bits<3> op10_8, bit op6, 25630b57cec5SDimitry Andric bit op7, InstrItinClass itin, string OpcodeStr, string Dt, 25640b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 25650b57cec5SDimitry Andric : N2Vnp<op19_18, op17_16, op10_8, op7, op6, (outs QPR:$Vd), (ins QPR:$Vm), 25660b57cec5SDimitry Andric itin, OpcodeStr, Dt, 25670b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm))))]>; 25680b57cec5SDimitry Andric 25690b57cec5SDimitry Andric// Same as N2VQIntXnp but with Vd as a src register. 25700b57cec5SDimitry Andricclass N2VQIntX2np<bits<2> op19_18, bits<2> op17_16, bits<3> op10_8, bit op6, 25710b57cec5SDimitry Andric bit op7, InstrItinClass itin, string OpcodeStr, string Dt, 25720b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 25730b57cec5SDimitry Andric : N2Vnp<op19_18, op17_16, op10_8, op7, op6, 25740b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$src, QPR:$Vm), 25750b57cec5SDimitry Andric itin, OpcodeStr, Dt, 25760b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$src), (OpTy QPR:$Vm))))]> { 25770b57cec5SDimitry Andric let Constraints = "$src = $Vd"; 25780b57cec5SDimitry Andric} 25790b57cec5SDimitry Andric 25800b57cec5SDimitry Andric// Narrow 2-register operations. 25810b57cec5SDimitry Andricclass N2VN<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 25820b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op6, bit op4, 25830b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 25840b57cec5SDimitry Andric ValueType TyD, ValueType TyQ, SDNode OpNode> 25850b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs DPR:$Vd), 25860b57cec5SDimitry Andric (ins QPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "", 25870b57cec5SDimitry Andric [(set DPR:$Vd, (TyD (OpNode (TyQ QPR:$Vm))))]>; 25880b57cec5SDimitry Andric 25890b57cec5SDimitry Andric// Narrow 2-register intrinsics. 25900b57cec5SDimitry Andricclass N2VNInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 25910b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op6, bit op4, 25920b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 25930b57cec5SDimitry Andric ValueType TyD, ValueType TyQ, SDPatternOperator IntOp> 25940b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs DPR:$Vd), 25950b57cec5SDimitry Andric (ins QPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "", 25960b57cec5SDimitry Andric [(set DPR:$Vd, (TyD (IntOp (TyQ QPR:$Vm))))]>; 25970b57cec5SDimitry Andric 25980b57cec5SDimitry Andric// Long 2-register operations (currently only used for VMOVL). 25990b57cec5SDimitry Andricclass N2VL<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 26000b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op6, bit op4, 26010b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 26020b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDNode OpNode> 26030b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs QPR:$Vd), 26040b57cec5SDimitry Andric (ins DPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "", 26050b57cec5SDimitry Andric [(set QPR:$Vd, (TyQ (OpNode (TyD DPR:$Vm))))]>; 26060b57cec5SDimitry Andric 26070b57cec5SDimitry Andric// Long 2-register intrinsics. 26080b57cec5SDimitry Andricclass N2VLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 26090b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op6, bit op4, 26100b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 26110b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDPatternOperator IntOp> 26120b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs QPR:$Vd), 26130b57cec5SDimitry Andric (ins DPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "", 26140b57cec5SDimitry Andric [(set QPR:$Vd, (TyQ (IntOp (TyD DPR:$Vm))))]>; 26150b57cec5SDimitry Andric 26160b57cec5SDimitry Andric// 2-register shuffles (VTRN/VZIP/VUZP), both double- and quad-register. 26170b57cec5SDimitry Andricclass N2VDShuffle<bits<2> op19_18, bits<5> op11_7, string OpcodeStr, string Dt> 26180b57cec5SDimitry Andric : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 0, 0, (outs DPR:$Vd, DPR:$Vm), 26190b57cec5SDimitry Andric (ins DPR:$src1, DPR:$src2), IIC_VPERMD, 26200b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm", 26210b57cec5SDimitry Andric "$src1 = $Vd, $src2 = $Vm", []>; 26220b57cec5SDimitry Andricclass N2VQShuffle<bits<2> op19_18, bits<5> op11_7, 26230b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt> 26240b57cec5SDimitry Andric : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 1, 0, (outs QPR:$Vd, QPR:$Vm), 26250b57cec5SDimitry Andric (ins QPR:$src1, QPR:$src2), itin, OpcodeStr, Dt, "$Vd, $Vm", 26260b57cec5SDimitry Andric "$src1 = $Vd, $src2 = $Vm", []>; 26270b57cec5SDimitry Andric 26280b57cec5SDimitry Andric// Basic 3-register operations: double- and quad-register. 26290b57cec5SDimitry Andricclass N3VD<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 26300b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 26310b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> 26320b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 26330b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 26340b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 26350b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]> { 26360b57cec5SDimitry Andric // All of these have a two-operand InstAlias. 26370b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 26380b57cec5SDimitry Andric let isCommutable = Commutable; 26390b57cec5SDimitry Andric} 26400b57cec5SDimitry Andric// Same as N3VD but no data type. 26410b57cec5SDimitry Andricclass N3VDX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 26420b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, 26430b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, 26440b57cec5SDimitry Andric SDNode OpNode, bit Commutable> 26450b57cec5SDimitry Andric : N3VX<op24, op23, op21_20, op11_8, 0, op4, 26460b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 26470b57cec5SDimitry Andric OpcodeStr, "$Vd, $Vn, $Vm", "", 26480b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]>{ 26490b57cec5SDimitry Andric // All of these have a two-operand InstAlias. 26500b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 26510b57cec5SDimitry Andric let isCommutable = Commutable; 26520b57cec5SDimitry Andric} 26530b57cec5SDimitry Andric 26540b57cec5SDimitry Andricclass N3VDSL<bits<2> op21_20, bits<4> op11_8, 26550b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 26560b57cec5SDimitry Andric ValueType Ty, SDNode ShOp> 26570b57cec5SDimitry Andric : N3VLane32<0, 1, op21_20, op11_8, 1, 0, 26580b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane), 26590b57cec5SDimitry Andric NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "", 26600b57cec5SDimitry Andric [(set (Ty DPR:$Vd), 26610b57cec5SDimitry Andric (Ty (ShOp (Ty DPR:$Vn), 26620b57cec5SDimitry Andric (Ty (ARMvduplane (Ty DPR_VFP2:$Vm),imm:$lane)))))]> { 26630b57cec5SDimitry Andric // All of these have a two-operand InstAlias. 26640b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 26650b57cec5SDimitry Andric let isCommutable = 0; 26660b57cec5SDimitry Andric} 26670b57cec5SDimitry Andricclass N3VDSL16<bits<2> op21_20, bits<4> op11_8, 26680b57cec5SDimitry Andric string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> 26690b57cec5SDimitry Andric : N3VLane16<0, 1, op21_20, op11_8, 1, 0, 26700b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane), 26710b57cec5SDimitry Andric NVMulSLFrm, IIC_VMULi16D, OpcodeStr, Dt,"$Vd, $Vn, $Vm$lane","", 26720b57cec5SDimitry Andric [(set (Ty DPR:$Vd), 26730b57cec5SDimitry Andric (Ty (ShOp (Ty DPR:$Vn), 26740b57cec5SDimitry Andric (Ty (ARMvduplane (Ty DPR_8:$Vm), imm:$lane)))))]> { 26750b57cec5SDimitry Andric // All of these have a two-operand InstAlias. 26760b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 26770b57cec5SDimitry Andric let isCommutable = 0; 26780b57cec5SDimitry Andric} 26790b57cec5SDimitry Andric 26800b57cec5SDimitry Andricclass N3VQ<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 26810b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 26820b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> 26830b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 1, op4, 26840b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), N3RegFrm, itin, 26850b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 26860b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]> { 26870b57cec5SDimitry Andric // All of these have a two-operand InstAlias. 26880b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 26890b57cec5SDimitry Andric let isCommutable = Commutable; 26900b57cec5SDimitry Andric} 26910b57cec5SDimitry Andricclass N3VQX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 26920b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, 26930b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> 26940b57cec5SDimitry Andric : N3VX<op24, op23, op21_20, op11_8, 1, op4, 26950b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), N3RegFrm, itin, 26960b57cec5SDimitry Andric OpcodeStr, "$Vd, $Vn, $Vm", "", 26970b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]>{ 26980b57cec5SDimitry Andric // All of these have a two-operand InstAlias. 26990b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 27000b57cec5SDimitry Andric let isCommutable = Commutable; 27010b57cec5SDimitry Andric} 27020b57cec5SDimitry Andricclass N3VQSL<bits<2> op21_20, bits<4> op11_8, 27030b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 27040b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDNode ShOp> 27050b57cec5SDimitry Andric : N3VLane32<1, 1, op21_20, op11_8, 1, 0, 27060b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane), 27070b57cec5SDimitry Andric NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "", 27080b57cec5SDimitry Andric [(set (ResTy QPR:$Vd), 27090b57cec5SDimitry Andric (ResTy (ShOp (ResTy QPR:$Vn), 27100b57cec5SDimitry Andric (ResTy (ARMvduplane (OpTy DPR_VFP2:$Vm), 27110b57cec5SDimitry Andric imm:$lane)))))]> { 27120b57cec5SDimitry Andric // All of these have a two-operand InstAlias. 27130b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 27140b57cec5SDimitry Andric let isCommutable = 0; 27150b57cec5SDimitry Andric} 27160b57cec5SDimitry Andricclass N3VQSL16<bits<2> op21_20, bits<4> op11_8, string OpcodeStr, string Dt, 27170b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDNode ShOp> 27180b57cec5SDimitry Andric : N3VLane16<1, 1, op21_20, op11_8, 1, 0, 27190b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane), 27200b57cec5SDimitry Andric NVMulSLFrm, IIC_VMULi16Q, OpcodeStr, Dt,"$Vd, $Vn, $Vm$lane", "", 27210b57cec5SDimitry Andric [(set (ResTy QPR:$Vd), 27220b57cec5SDimitry Andric (ResTy (ShOp (ResTy QPR:$Vn), 27230b57cec5SDimitry Andric (ResTy (ARMvduplane (OpTy DPR_8:$Vm), 27240b57cec5SDimitry Andric imm:$lane)))))]> { 27250b57cec5SDimitry Andric // All of these have a two-operand InstAlias. 27260b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 27270b57cec5SDimitry Andric let isCommutable = 0; 27280b57cec5SDimitry Andric} 27290b57cec5SDimitry Andric 27300b57cec5SDimitry Andric// Basic 3-register intrinsics, both double- and quad-register. 27310b57cec5SDimitry Andricclass N3VDInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 27320b57cec5SDimitry Andric Format f, InstrItinClass itin, string OpcodeStr, string Dt, 27330b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp, bit Commutable> 27340b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 27350b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), f, itin, 27360b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 27370b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]> { 27380b57cec5SDimitry Andric // All of these have a two-operand InstAlias. 27390b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 27400b57cec5SDimitry Andric let isCommutable = Commutable; 27410b57cec5SDimitry Andric} 27420b57cec5SDimitry Andric 27430b57cec5SDimitry Andricclass N3VDIntnp<bits<5> op27_23, bits<2> op21_20, bits<4> op11_8, bit op6, 27440b57cec5SDimitry Andric bit op4, Format f, InstrItinClass itin, string OpcodeStr, 27450b57cec5SDimitry Andric string Dt, ValueType ResTy, ValueType OpTy, 27460b57cec5SDimitry Andric SDPatternOperator IntOp, bit Commutable> 27470b57cec5SDimitry Andric : N3Vnp<op27_23, op21_20, op11_8, op6, op4, 27480b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin, OpcodeStr, Dt, 27490b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]>; 27500b57cec5SDimitry Andric 27510b57cec5SDimitry Andricclass N3VDIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, 27520b57cec5SDimitry Andric string OpcodeStr, string Dt, ValueType Ty, SDPatternOperator IntOp> 27530b57cec5SDimitry Andric : N3VLane32<0, 1, op21_20, op11_8, 1, 0, 27540b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane), 27550b57cec5SDimitry Andric NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "", 27560b57cec5SDimitry Andric [(set (Ty DPR:$Vd), 27570b57cec5SDimitry Andric (Ty (IntOp (Ty DPR:$Vn), 27580b57cec5SDimitry Andric (Ty (ARMvduplane (Ty DPR_VFP2:$Vm), 27590b57cec5SDimitry Andric imm:$lane)))))]> { 27600b57cec5SDimitry Andric let isCommutable = 0; 27610b57cec5SDimitry Andric} 27620b57cec5SDimitry Andric 27630b57cec5SDimitry Andricclass N3VDIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, 27640b57cec5SDimitry Andric string OpcodeStr, string Dt, ValueType Ty, SDPatternOperator IntOp> 27650b57cec5SDimitry Andric : N3VLane16<0, 1, op21_20, op11_8, 1, 0, 27660b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane), 27670b57cec5SDimitry Andric NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "", 27680b57cec5SDimitry Andric [(set (Ty DPR:$Vd), 27690b57cec5SDimitry Andric (Ty (IntOp (Ty DPR:$Vn), 27700b57cec5SDimitry Andric (Ty (ARMvduplane (Ty DPR_8:$Vm), imm:$lane)))))]> { 27710b57cec5SDimitry Andric let isCommutable = 0; 27720b57cec5SDimitry Andric} 27730b57cec5SDimitry Andricclass N3VDIntSh<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 27740b57cec5SDimitry Andric Format f, InstrItinClass itin, string OpcodeStr, string Dt, 27750b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 27760b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 27770b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vm, DPR:$Vn), f, itin, 27780b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm, $Vn", "", 27790b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm), (OpTy DPR:$Vn))))]> { 27800b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vm = $Vd"; 27810b57cec5SDimitry Andric let isCommutable = 0; 27820b57cec5SDimitry Andric} 27830b57cec5SDimitry Andric 27840b57cec5SDimitry Andricclass N3VQInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 27850b57cec5SDimitry Andric Format f, InstrItinClass itin, string OpcodeStr, string Dt, 27860b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp, bit Commutable> 27870b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 1, op4, 27880b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), f, itin, 27890b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 27900b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]> { 27910b57cec5SDimitry Andric // All of these have a two-operand InstAlias. 27920b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 27930b57cec5SDimitry Andric let isCommutable = Commutable; 27940b57cec5SDimitry Andric} 27950b57cec5SDimitry Andric 27960b57cec5SDimitry Andricclass N3VQIntnp<bits<5> op27_23, bits<2> op21_20, bits<4> op11_8, bit op6, 27970b57cec5SDimitry Andric bit op4, Format f, InstrItinClass itin, string OpcodeStr, 27980b57cec5SDimitry Andric string Dt, ValueType ResTy, ValueType OpTy, 27990b57cec5SDimitry Andric SDPatternOperator IntOp, bit Commutable> 28000b57cec5SDimitry Andric : N3Vnp<op27_23, op21_20, op11_8, op6, op4, 28010b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), f, itin, OpcodeStr, Dt, 28020b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]>; 28030b57cec5SDimitry Andric 28040b57cec5SDimitry Andric// Same as N3VQIntnp but with Vd as a src register. 28050b57cec5SDimitry Andricclass N3VQInt3np<bits<5> op27_23, bits<2> op21_20, bits<4> op11_8, bit op6, 28060b57cec5SDimitry Andric bit op4, Format f, InstrItinClass itin, string OpcodeStr, 28070b57cec5SDimitry Andric string Dt, ValueType ResTy, ValueType OpTy, 28080b57cec5SDimitry Andric SDPatternOperator IntOp, bit Commutable> 28090b57cec5SDimitry Andric : N3Vnp<op27_23, op21_20, op11_8, op6, op4, 28100b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$src, QPR:$Vn, QPR:$Vm), 28110b57cec5SDimitry Andric f, itin, OpcodeStr, Dt, 28120b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$src), (OpTy QPR:$Vn), 28130b57cec5SDimitry Andric (OpTy QPR:$Vm))))]> { 28140b57cec5SDimitry Andric let Constraints = "$src = $Vd"; 28150b57cec5SDimitry Andric} 28160b57cec5SDimitry Andric 28170b57cec5SDimitry Andricclass N3VQIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, 28180b57cec5SDimitry Andric string OpcodeStr, string Dt, 28190b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 28200b57cec5SDimitry Andric : N3VLane32<1, 1, op21_20, op11_8, 1, 0, 28210b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane), 28220b57cec5SDimitry Andric NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "", 28230b57cec5SDimitry Andric [(set (ResTy QPR:$Vd), 28240b57cec5SDimitry Andric (ResTy (IntOp (ResTy QPR:$Vn), 28250b57cec5SDimitry Andric (ResTy (ARMvduplane (OpTy DPR_VFP2:$Vm), 28260b57cec5SDimitry Andric imm:$lane)))))]> { 28270b57cec5SDimitry Andric let isCommutable = 0; 28280b57cec5SDimitry Andric} 28290b57cec5SDimitry Andricclass N3VQIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, 28300b57cec5SDimitry Andric string OpcodeStr, string Dt, 28310b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 28320b57cec5SDimitry Andric : N3VLane16<1, 1, op21_20, op11_8, 1, 0, 28330b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane), 28340b57cec5SDimitry Andric NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "", 28350b57cec5SDimitry Andric [(set (ResTy QPR:$Vd), 28360b57cec5SDimitry Andric (ResTy (IntOp (ResTy QPR:$Vn), 28370b57cec5SDimitry Andric (ResTy (ARMvduplane (OpTy DPR_8:$Vm), 28380b57cec5SDimitry Andric imm:$lane)))))]> { 28390b57cec5SDimitry Andric let isCommutable = 0; 28400b57cec5SDimitry Andric} 28410b57cec5SDimitry Andricclass N3VQIntSh<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 28420b57cec5SDimitry Andric Format f, InstrItinClass itin, string OpcodeStr, string Dt, 28430b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 28440b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 1, op4, 28450b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vm, QPR:$Vn), f, itin, 28460b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm, $Vn", "", 28470b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm), (OpTy QPR:$Vn))))]> { 28480b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vm = $Vd"; 28490b57cec5SDimitry Andric let isCommutable = 0; 28500b57cec5SDimitry Andric} 28510b57cec5SDimitry Andric 28520b57cec5SDimitry Andric// Multiply-Add/Sub operations: double- and quad-register. 28530b57cec5SDimitry Andricclass N3VDMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 28540b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 28550b57cec5SDimitry Andric ValueType Ty, SDPatternOperator MulOp, SDPatternOperator OpNode> 28560b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 28570b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 28580b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd", 28590b57cec5SDimitry Andric [(set DPR:$Vd, (Ty (OpNode DPR:$src1, 28600b57cec5SDimitry Andric (Ty (MulOp DPR:$Vn, DPR:$Vm)))))]>; 28610b57cec5SDimitry Andric 28620b57cec5SDimitry Andricclass N3VDMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, 28630b57cec5SDimitry Andric string OpcodeStr, string Dt, 28640b57cec5SDimitry Andric ValueType Ty, SDPatternOperator MulOp, SDPatternOperator ShOp> 28650b57cec5SDimitry Andric : N3VLane32<0, 1, op21_20, op11_8, 1, 0, 28660b57cec5SDimitry Andric (outs DPR:$Vd), 28670b57cec5SDimitry Andric (ins DPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane), 28680b57cec5SDimitry Andric NVMulSLFrm, itin, 28690b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd", 28700b57cec5SDimitry Andric [(set (Ty DPR:$Vd), 28710b57cec5SDimitry Andric (Ty (ShOp (Ty DPR:$src1), 28720b57cec5SDimitry Andric (Ty (MulOp DPR:$Vn, 28730b57cec5SDimitry Andric (Ty (ARMvduplane (Ty DPR_VFP2:$Vm), 28740b57cec5SDimitry Andric imm:$lane)))))))]>; 28750b57cec5SDimitry Andricclass N3VDMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, 28760b57cec5SDimitry Andric string OpcodeStr, string Dt, 28770b57cec5SDimitry Andric ValueType Ty, SDPatternOperator MulOp, SDPatternOperator ShOp> 28780b57cec5SDimitry Andric : N3VLane16<0, 1, op21_20, op11_8, 1, 0, 28790b57cec5SDimitry Andric (outs DPR:$Vd), 28800b57cec5SDimitry Andric (ins DPR:$src1, DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane), 28810b57cec5SDimitry Andric NVMulSLFrm, itin, 28820b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd", 28830b57cec5SDimitry Andric [(set (Ty DPR:$Vd), 28840b57cec5SDimitry Andric (Ty (ShOp (Ty DPR:$src1), 28850b57cec5SDimitry Andric (Ty (MulOp DPR:$Vn, 28860b57cec5SDimitry Andric (Ty (ARMvduplane (Ty DPR_8:$Vm), 28870b57cec5SDimitry Andric imm:$lane)))))))]>; 28880b57cec5SDimitry Andric 28890b57cec5SDimitry Andricclass N3VQMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 28900b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, ValueType Ty, 28910b57cec5SDimitry Andric SDPatternOperator MulOp, SDPatternOperator OpNode> 28920b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 1, op4, 28930b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm), N3RegFrm, itin, 28940b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd", 28950b57cec5SDimitry Andric [(set QPR:$Vd, (Ty (OpNode QPR:$src1, 28960b57cec5SDimitry Andric (Ty (MulOp QPR:$Vn, QPR:$Vm)))))]>; 28970b57cec5SDimitry Andricclass N3VQMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, 28980b57cec5SDimitry Andric string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, 28990b57cec5SDimitry Andric SDPatternOperator MulOp, SDPatternOperator ShOp> 29000b57cec5SDimitry Andric : N3VLane32<1, 1, op21_20, op11_8, 1, 0, 29010b57cec5SDimitry Andric (outs QPR:$Vd), 29020b57cec5SDimitry Andric (ins QPR:$src1, QPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane), 29030b57cec5SDimitry Andric NVMulSLFrm, itin, 29040b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd", 29050b57cec5SDimitry Andric [(set (ResTy QPR:$Vd), 29060b57cec5SDimitry Andric (ResTy (ShOp (ResTy QPR:$src1), 29070b57cec5SDimitry Andric (ResTy (MulOp QPR:$Vn, 29080b57cec5SDimitry Andric (ResTy (ARMvduplane (OpTy DPR_VFP2:$Vm), 29090b57cec5SDimitry Andric imm:$lane)))))))]>; 29100b57cec5SDimitry Andricclass N3VQMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, 29110b57cec5SDimitry Andric string OpcodeStr, string Dt, 29120b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, 29130b57cec5SDimitry Andric SDPatternOperator MulOp, SDPatternOperator ShOp> 29140b57cec5SDimitry Andric : N3VLane16<1, 1, op21_20, op11_8, 1, 0, 29150b57cec5SDimitry Andric (outs QPR:$Vd), 29160b57cec5SDimitry Andric (ins QPR:$src1, QPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane), 29170b57cec5SDimitry Andric NVMulSLFrm, itin, 29180b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd", 29190b57cec5SDimitry Andric [(set (ResTy QPR:$Vd), 29200b57cec5SDimitry Andric (ResTy (ShOp (ResTy QPR:$src1), 29210b57cec5SDimitry Andric (ResTy (MulOp QPR:$Vn, 29220b57cec5SDimitry Andric (ResTy (ARMvduplane (OpTy DPR_8:$Vm), 29230b57cec5SDimitry Andric imm:$lane)))))))]>; 29240b57cec5SDimitry Andric 29250b57cec5SDimitry Andric// Neon Intrinsic-Op instructions (VABA): double- and quad-register. 29260b57cec5SDimitry Andricclass N3VDIntOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 29270b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 29280b57cec5SDimitry Andric ValueType Ty, SDPatternOperator IntOp, SDNode OpNode> 29290b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 29300b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 29310b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd", 29320b57cec5SDimitry Andric [(set DPR:$Vd, (Ty (OpNode DPR:$src1, 29330b57cec5SDimitry Andric (Ty (IntOp (Ty DPR:$Vn), (Ty DPR:$Vm))))))]>; 29340b57cec5SDimitry Andricclass N3VQIntOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 29350b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 29360b57cec5SDimitry Andric ValueType Ty, SDPatternOperator IntOp, SDNode OpNode> 29370b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 1, op4, 29380b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm), N3RegFrm, itin, 29390b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd", 29400b57cec5SDimitry Andric [(set QPR:$Vd, (Ty (OpNode QPR:$src1, 29410b57cec5SDimitry Andric (Ty (IntOp (Ty QPR:$Vn), (Ty QPR:$Vm))))))]>; 29420b57cec5SDimitry Andric 29430b57cec5SDimitry Andric// Neon 3-argument intrinsics, both double- and quad-register. 29440b57cec5SDimitry Andric// The destination register is also used as the first source operand register. 29450b57cec5SDimitry Andricclass N3VDInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 29460b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 29470b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 29480b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 29490b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 29500b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd", 29510b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$src1), 29520b57cec5SDimitry Andric (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]>; 29530b57cec5SDimitry Andricclass N3VQInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 29540b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 29550b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 29560b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 1, op4, 29570b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm), N3RegFrm, itin, 29580b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd", 29590b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$src1), 29600b57cec5SDimitry Andric (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]>; 29610b57cec5SDimitry Andric 29620b57cec5SDimitry Andric// Long Multiply-Add/Sub operations. 29630b57cec5SDimitry Andricclass N3VLMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 29640b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 29650b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode> 29660b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 29670b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 29680b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd", 29690b57cec5SDimitry Andric [(set QPR:$Vd, (OpNode (TyQ QPR:$src1), 29700b57cec5SDimitry Andric (TyQ (MulOp (TyD DPR:$Vn), 29710b57cec5SDimitry Andric (TyD DPR:$Vm)))))]>; 29720b57cec5SDimitry Andricclass N3VLMulOpSL<bit op24, bits<2> op21_20, bits<4> op11_8, 29730b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 29740b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode> 29750b57cec5SDimitry Andric : N3VLane32<op24, 1, op21_20, op11_8, 1, 0, (outs QPR:$Vd), 29760b57cec5SDimitry Andric (ins QPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane), 29770b57cec5SDimitry Andric NVMulSLFrm, itin, 29780b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd", 29790b57cec5SDimitry Andric [(set QPR:$Vd, 29800b57cec5SDimitry Andric (OpNode (TyQ QPR:$src1), 29810b57cec5SDimitry Andric (TyQ (MulOp (TyD DPR:$Vn), 29820b57cec5SDimitry Andric (TyD (ARMvduplane (TyD DPR_VFP2:$Vm), 29830b57cec5SDimitry Andric imm:$lane))))))]>; 29840b57cec5SDimitry Andricclass N3VLMulOpSL16<bit op24, bits<2> op21_20, bits<4> op11_8, 29850b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 29860b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode> 29870b57cec5SDimitry Andric : N3VLane16<op24, 1, op21_20, op11_8, 1, 0, (outs QPR:$Vd), 29880b57cec5SDimitry Andric (ins QPR:$src1, DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane), 29890b57cec5SDimitry Andric NVMulSLFrm, itin, 29900b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd", 29910b57cec5SDimitry Andric [(set QPR:$Vd, 29920b57cec5SDimitry Andric (OpNode (TyQ QPR:$src1), 29930b57cec5SDimitry Andric (TyQ (MulOp (TyD DPR:$Vn), 29940b57cec5SDimitry Andric (TyD (ARMvduplane (TyD DPR_8:$Vm), 29950b57cec5SDimitry Andric imm:$lane))))))]>; 29960b57cec5SDimitry Andric 29970b57cec5SDimitry Andric// Long Intrinsic-Op vector operations with explicit extend (VABAL). 29980b57cec5SDimitry Andricclass N3VLIntExtOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 29990b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 30000b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDPatternOperator IntOp, SDNode ExtOp, 30010b57cec5SDimitry Andric SDNode OpNode> 30020b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 30030b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 30040b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd", 30050b57cec5SDimitry Andric [(set QPR:$Vd, (OpNode (TyQ QPR:$src1), 30060b57cec5SDimitry Andric (TyQ (ExtOp (TyD (IntOp (TyD DPR:$Vn), 30070b57cec5SDimitry Andric (TyD DPR:$Vm)))))))]>; 30080b57cec5SDimitry Andric 30090b57cec5SDimitry Andric// Neon Long 3-argument intrinsic. The destination register is 30100b57cec5SDimitry Andric// a quad-register and is also used as the first source operand register. 30110b57cec5SDimitry Andricclass N3VLInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 30120b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 30130b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDPatternOperator IntOp> 30140b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 30150b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 30160b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd", 30170b57cec5SDimitry Andric [(set QPR:$Vd, 30180b57cec5SDimitry Andric (TyQ (IntOp (TyQ QPR:$src1), (TyD DPR:$Vn), (TyD DPR:$Vm))))]>; 30190b57cec5SDimitry Andricclass N3VLInt3SL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, 30200b57cec5SDimitry Andric string OpcodeStr, string Dt, 30210b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 30220b57cec5SDimitry Andric : N3VLane32<op24, 1, op21_20, op11_8, 1, 0, 30230b57cec5SDimitry Andric (outs QPR:$Vd), 30240b57cec5SDimitry Andric (ins QPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane), 30250b57cec5SDimitry Andric NVMulSLFrm, itin, 30260b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd", 30270b57cec5SDimitry Andric [(set (ResTy QPR:$Vd), 30280b57cec5SDimitry Andric (ResTy (IntOp (ResTy QPR:$src1), 30290b57cec5SDimitry Andric (OpTy DPR:$Vn), 30300b57cec5SDimitry Andric (OpTy (ARMvduplane (OpTy DPR_VFP2:$Vm), 30310b57cec5SDimitry Andric imm:$lane)))))]>; 30320b57cec5SDimitry Andricclass N3VLInt3SL16<bit op24, bits<2> op21_20, bits<4> op11_8, 30330b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 30340b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 30350b57cec5SDimitry Andric : N3VLane16<op24, 1, op21_20, op11_8, 1, 0, 30360b57cec5SDimitry Andric (outs QPR:$Vd), 30370b57cec5SDimitry Andric (ins QPR:$src1, DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane), 30380b57cec5SDimitry Andric NVMulSLFrm, itin, 30390b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd", 30400b57cec5SDimitry Andric [(set (ResTy QPR:$Vd), 30410b57cec5SDimitry Andric (ResTy (IntOp (ResTy QPR:$src1), 30420b57cec5SDimitry Andric (OpTy DPR:$Vn), 30430b57cec5SDimitry Andric (OpTy (ARMvduplane (OpTy DPR_8:$Vm), 30440b57cec5SDimitry Andric imm:$lane)))))]>; 30450b57cec5SDimitry Andric 30460b57cec5SDimitry Andric// Narrowing 3-register intrinsics. 30470b57cec5SDimitry Andricclass N3VNInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 30480b57cec5SDimitry Andric string OpcodeStr, string Dt, ValueType TyD, ValueType TyQ, 30490b57cec5SDimitry Andric SDPatternOperator IntOp, bit Commutable> 30500b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 30510b57cec5SDimitry Andric (outs DPR:$Vd), (ins QPR:$Vn, QPR:$Vm), N3RegFrm, IIC_VBINi4D, 30520b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 30530b57cec5SDimitry Andric [(set DPR:$Vd, (TyD (IntOp (TyQ QPR:$Vn), (TyQ QPR:$Vm))))]> { 30540b57cec5SDimitry Andric let isCommutable = Commutable; 30550b57cec5SDimitry Andric} 30560b57cec5SDimitry Andric 30570b57cec5SDimitry Andric// Long 3-register operations. 30580b57cec5SDimitry Andricclass N3VL<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 30590b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 30600b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDNode OpNode, bit Commutable> 30610b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 30620b57cec5SDimitry Andric (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 30630b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 30640b57cec5SDimitry Andric [(set QPR:$Vd, (TyQ (OpNode (TyD DPR:$Vn), (TyD DPR:$Vm))))]> { 30650b57cec5SDimitry Andric let isCommutable = Commutable; 30660b57cec5SDimitry Andric} 30670b57cec5SDimitry Andric 30680b57cec5SDimitry Andricclass N3VLSL<bit op24, bits<2> op21_20, bits<4> op11_8, 30690b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 30700b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDNode OpNode> 30710b57cec5SDimitry Andric : N3VLane32<op24, 1, op21_20, op11_8, 1, 0, 30720b57cec5SDimitry Andric (outs QPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane), 30730b57cec5SDimitry Andric NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "", 30740b57cec5SDimitry Andric [(set QPR:$Vd, 30750b57cec5SDimitry Andric (TyQ (OpNode (TyD DPR:$Vn), 30760b57cec5SDimitry Andric (TyD (ARMvduplane (TyD DPR_VFP2:$Vm),imm:$lane)))))]>; 30770b57cec5SDimitry Andricclass N3VLSL16<bit op24, bits<2> op21_20, bits<4> op11_8, 30780b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 30790b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDNode OpNode> 30800b57cec5SDimitry Andric : N3VLane16<op24, 1, op21_20, op11_8, 1, 0, 30810b57cec5SDimitry Andric (outs QPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane), 30820b57cec5SDimitry Andric NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "", 30830b57cec5SDimitry Andric [(set QPR:$Vd, 30840b57cec5SDimitry Andric (TyQ (OpNode (TyD DPR:$Vn), 30850b57cec5SDimitry Andric (TyD (ARMvduplane (TyD DPR_8:$Vm), imm:$lane)))))]>; 30860b57cec5SDimitry Andric 30870b57cec5SDimitry Andric// Long 3-register operations with explicitly extended operands. 30880b57cec5SDimitry Andricclass N3VLExt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 30890b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 30900b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDNode OpNode, SDNode ExtOp, 30910b57cec5SDimitry Andric bit Commutable> 30920b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 30930b57cec5SDimitry Andric (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 30940b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 30950b57cec5SDimitry Andric [(set QPR:$Vd, (OpNode (TyQ (ExtOp (TyD DPR:$Vn))), 30960b57cec5SDimitry Andric (TyQ (ExtOp (TyD DPR:$Vm)))))]> { 30970b57cec5SDimitry Andric let isCommutable = Commutable; 30980b57cec5SDimitry Andric} 30990b57cec5SDimitry Andric 31000b57cec5SDimitry Andric// Long 3-register intrinsics with explicit extend (VABDL). 31010b57cec5SDimitry Andricclass N3VLIntExt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 31020b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 31030b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDPatternOperator IntOp, SDNode ExtOp, 31040b57cec5SDimitry Andric bit Commutable> 31050b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 31060b57cec5SDimitry Andric (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 31070b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 31080b57cec5SDimitry Andric [(set QPR:$Vd, (TyQ (ExtOp (TyD (IntOp (TyD DPR:$Vn), 31090b57cec5SDimitry Andric (TyD DPR:$Vm))))))]> { 31100b57cec5SDimitry Andric let isCommutable = Commutable; 31110b57cec5SDimitry Andric} 31120b57cec5SDimitry Andric 31130b57cec5SDimitry Andric// Long 3-register intrinsics. 31140b57cec5SDimitry Andricclass N3VLInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 31150b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 31160b57cec5SDimitry Andric ValueType TyQ, ValueType TyD, SDPatternOperator IntOp, bit Commutable> 31170b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 31180b57cec5SDimitry Andric (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 31190b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 31200b57cec5SDimitry Andric [(set QPR:$Vd, (TyQ (IntOp (TyD DPR:$Vn), (TyD DPR:$Vm))))]> { 31210b57cec5SDimitry Andric let isCommutable = Commutable; 31220b57cec5SDimitry Andric} 31230b57cec5SDimitry Andric 31240b57cec5SDimitry Andric// Same as above, but not predicated. 31250b57cec5SDimitry Andricclass N3VLIntnp<bits<5> op27_23, bits<2> op21_20, bits<4> op11_8, bit op6, 31260b57cec5SDimitry Andric bit op4, InstrItinClass itin, string OpcodeStr, 31270b57cec5SDimitry Andric string Dt, ValueType ResTy, ValueType OpTy, 31280b57cec5SDimitry Andric SDPatternOperator IntOp, bit Commutable> 31290b57cec5SDimitry Andric : N3Vnp<op27_23, op21_20, op11_8, op6, op4, 31300b57cec5SDimitry Andric (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin, OpcodeStr, Dt, 31310b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]>; 31320b57cec5SDimitry Andric 31330b57cec5SDimitry Andricclass N3VLIntSL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, 31340b57cec5SDimitry Andric string OpcodeStr, string Dt, 31350b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 31360b57cec5SDimitry Andric : N3VLane32<op24, 1, op21_20, op11_8, 1, 0, 31370b57cec5SDimitry Andric (outs QPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane), 31380b57cec5SDimitry Andric NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "", 31390b57cec5SDimitry Andric [(set (ResTy QPR:$Vd), 31400b57cec5SDimitry Andric (ResTy (IntOp (OpTy DPR:$Vn), 31410b57cec5SDimitry Andric (OpTy (ARMvduplane (OpTy DPR_VFP2:$Vm), 31420b57cec5SDimitry Andric imm:$lane)))))]>; 31430b57cec5SDimitry Andricclass N3VLIntSL16<bit op24, bits<2> op21_20, bits<4> op11_8, 31440b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 31450b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 31460b57cec5SDimitry Andric : N3VLane16<op24, 1, op21_20, op11_8, 1, 0, 31470b57cec5SDimitry Andric (outs QPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane), 31480b57cec5SDimitry Andric NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "", 31490b57cec5SDimitry Andric [(set (ResTy QPR:$Vd), 31500b57cec5SDimitry Andric (ResTy (IntOp (OpTy DPR:$Vn), 31510b57cec5SDimitry Andric (OpTy (ARMvduplane (OpTy DPR_8:$Vm), 31520b57cec5SDimitry Andric imm:$lane)))))]>; 31530b57cec5SDimitry Andric 31540b57cec5SDimitry Andric// Wide 3-register operations. 31550b57cec5SDimitry Andricclass N3VW<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 31560b57cec5SDimitry Andric string OpcodeStr, string Dt, ValueType TyQ, ValueType TyD, 31570b57cec5SDimitry Andric SDNode OpNode, SDNode ExtOp, bit Commutable> 31580b57cec5SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 31590b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vn, DPR:$Vm), N3RegFrm, IIC_VSUBiD, 31600b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 31610b57cec5SDimitry Andric [(set QPR:$Vd, (OpNode (TyQ QPR:$Vn), 31620b57cec5SDimitry Andric (TyQ (ExtOp (TyD DPR:$Vm)))))]> { 31630b57cec5SDimitry Andric // All of these have a two-operand InstAlias. 31640b57cec5SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 31650b57cec5SDimitry Andric let isCommutable = Commutable; 31660b57cec5SDimitry Andric} 31670b57cec5SDimitry Andric 31680b57cec5SDimitry Andric// Pairwise long 2-register intrinsics, both double- and quad-register. 31690b57cec5SDimitry Andricclass N2VDPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 31700b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op4, 31710b57cec5SDimitry Andric string OpcodeStr, string Dt, 31720b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 31730b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$Vd), 31740b57cec5SDimitry Andric (ins DPR:$Vm), IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm", "", 31750b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm))))]>; 31760b57cec5SDimitry Andricclass N2VQPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 31770b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op4, 31780b57cec5SDimitry Andric string OpcodeStr, string Dt, 31790b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 31800b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$Vd), 31810b57cec5SDimitry Andric (ins QPR:$Vm), IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm", "", 31820b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm))))]>; 31830b57cec5SDimitry Andric 31840b57cec5SDimitry Andric// Pairwise long 2-register accumulate intrinsics, 31850b57cec5SDimitry Andric// both double- and quad-register. 31860b57cec5SDimitry Andric// The destination register is also used as the first source operand register. 31870b57cec5SDimitry Andricclass N2VDPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 31880b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op4, 31890b57cec5SDimitry Andric string OpcodeStr, string Dt, 31900b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 31910b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, 31920b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vm), IIC_VPALiD, 31930b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm", "$src1 = $Vd", 31940b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (IntOp (ResTy DPR:$src1), (OpTy DPR:$Vm))))]>; 31950b57cec5SDimitry Andricclass N2VQPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, 31960b57cec5SDimitry Andric bits<2> op17_16, bits<5> op11_7, bit op4, 31970b57cec5SDimitry Andric string OpcodeStr, string Dt, 31980b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp> 31990b57cec5SDimitry Andric : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, 32000b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vm), IIC_VPALiQ, 32010b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm", "$src1 = $Vd", 32020b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (ResTy QPR:$src1), (OpTy QPR:$Vm))))]>; 32030b57cec5SDimitry Andric 32040b57cec5SDimitry Andric// Shift by immediate, 32050b57cec5SDimitry Andric// both double- and quad-register. 32060b57cec5SDimitry Andriclet TwoOperandAliasConstraint = "$Vm = $Vd" in { 32070b57cec5SDimitry Andricclass N2VDSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, 32080b57cec5SDimitry Andric Format f, InstrItinClass itin, Operand ImmTy, 32090b57cec5SDimitry Andric string OpcodeStr, string Dt, ValueType Ty, SDNode OpNode> 32100b57cec5SDimitry Andric : N2VImm<op24, op23, op11_8, op7, 0, op4, 32110b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vm, ImmTy:$SIMM), f, itin, 32120b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "", 32130b57cec5SDimitry Andric [(set DPR:$Vd, (Ty (OpNode (Ty DPR:$Vm), (i32 imm:$SIMM))))]>; 32140b57cec5SDimitry Andricclass N2VQSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, 32150b57cec5SDimitry Andric Format f, InstrItinClass itin, Operand ImmTy, 32160b57cec5SDimitry Andric string OpcodeStr, string Dt, ValueType Ty, SDNode OpNode> 32170b57cec5SDimitry Andric : N2VImm<op24, op23, op11_8, op7, 1, op4, 32180b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vm, ImmTy:$SIMM), f, itin, 32190b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "", 32200b57cec5SDimitry Andric [(set QPR:$Vd, (Ty (OpNode (Ty QPR:$Vm), (i32 imm:$SIMM))))]>; 32210b57cec5SDimitry Andric} 32220b57cec5SDimitry Andric 32230b57cec5SDimitry Andric// Long shift by immediate. 32240b57cec5SDimitry Andricclass N2VLSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4, 32250b57cec5SDimitry Andric string OpcodeStr, string Dt, 32260b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, Operand ImmTy, 32270b57cec5SDimitry Andric SDPatternOperator OpNode> 32280b57cec5SDimitry Andric : N2VImm<op24, op23, op11_8, op7, op6, op4, 32290b57cec5SDimitry Andric (outs QPR:$Vd), (ins DPR:$Vm, ImmTy:$SIMM), N2RegVShLFrm, 32300b57cec5SDimitry Andric IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "", 32310b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vm), ImmTy:$SIMM)))]>; 32320b57cec5SDimitry Andric 32330b57cec5SDimitry Andric// Narrow shift by immediate. 32340b57cec5SDimitry Andricclass N2VNSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4, 32350b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 32360b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, Operand ImmTy, 32370b57cec5SDimitry Andric SDPatternOperator OpNode> 32380b57cec5SDimitry Andric : N2VImm<op24, op23, op11_8, op7, op6, op4, 32390b57cec5SDimitry Andric (outs DPR:$Vd), (ins QPR:$Vm, ImmTy:$SIMM), N2RegVShRFrm, itin, 32400b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "", 32410b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vm), 32420b57cec5SDimitry Andric (i32 ImmTy:$SIMM))))]>; 32430b57cec5SDimitry Andric 32440b57cec5SDimitry Andric// Shift right by immediate and accumulate, 32450b57cec5SDimitry Andric// both double- and quad-register. 32460b57cec5SDimitry Andriclet TwoOperandAliasConstraint = "$Vm = $Vd" in { 32470b57cec5SDimitry Andricclass N2VDShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, 32480b57cec5SDimitry Andric Operand ImmTy, string OpcodeStr, string Dt, 32490b57cec5SDimitry Andric ValueType Ty, SDNode ShOp> 32500b57cec5SDimitry Andric : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$Vd), 32510b57cec5SDimitry Andric (ins DPR:$src1, DPR:$Vm, ImmTy:$SIMM), N2RegVShRFrm, IIC_VPALiD, 32520b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd", 32530b57cec5SDimitry Andric [(set DPR:$Vd, (Ty (add DPR:$src1, 32540b57cec5SDimitry Andric (Ty (ShOp DPR:$Vm, (i32 imm:$SIMM))))))]>; 32550b57cec5SDimitry Andricclass N2VQShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, 32560b57cec5SDimitry Andric Operand ImmTy, string OpcodeStr, string Dt, 32570b57cec5SDimitry Andric ValueType Ty, SDNode ShOp> 32580b57cec5SDimitry Andric : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$Vd), 32590b57cec5SDimitry Andric (ins QPR:$src1, QPR:$Vm, ImmTy:$SIMM), N2RegVShRFrm, IIC_VPALiD, 32600b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd", 32610b57cec5SDimitry Andric [(set QPR:$Vd, (Ty (add QPR:$src1, 32620b57cec5SDimitry Andric (Ty (ShOp QPR:$Vm, (i32 imm:$SIMM))))))]>; 32630b57cec5SDimitry Andric} 32640b57cec5SDimitry Andric 32650b57cec5SDimitry Andric// Shift by immediate and insert, 32660b57cec5SDimitry Andric// both double- and quad-register. 32670b57cec5SDimitry Andriclet TwoOperandAliasConstraint = "$Vm = $Vd" in { 32680b57cec5SDimitry Andricclass N2VDShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, 32690b57cec5SDimitry Andric Operand ImmTy, Format f, string OpcodeStr, string Dt, 32700b57cec5SDimitry Andric ValueType Ty,SDNode ShOp> 32710b57cec5SDimitry Andric : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$Vd), 32720b57cec5SDimitry Andric (ins DPR:$src1, DPR:$Vm, ImmTy:$SIMM), f, IIC_VSHLiD, 32730b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd", 32740b57cec5SDimitry Andric [(set DPR:$Vd, (Ty (ShOp DPR:$src1, DPR:$Vm, (i32 imm:$SIMM))))]>; 32750b57cec5SDimitry Andricclass N2VQShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, 32760b57cec5SDimitry Andric Operand ImmTy, Format f, string OpcodeStr, string Dt, 32770b57cec5SDimitry Andric ValueType Ty,SDNode ShOp> 32780b57cec5SDimitry Andric : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$Vd), 32790b57cec5SDimitry Andric (ins QPR:$src1, QPR:$Vm, ImmTy:$SIMM), f, IIC_VSHLiQ, 32800b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd", 32810b57cec5SDimitry Andric [(set QPR:$Vd, (Ty (ShOp QPR:$src1, QPR:$Vm, (i32 imm:$SIMM))))]>; 32820b57cec5SDimitry Andric} 32830b57cec5SDimitry Andric 32840b57cec5SDimitry Andric// Convert, with fractional bits immediate, 32850b57cec5SDimitry Andric// both double- and quad-register. 32860b57cec5SDimitry Andricclass N2VCvtD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, 32870b57cec5SDimitry Andric string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, 32880b57cec5SDimitry Andric SDPatternOperator IntOp> 32890b57cec5SDimitry Andric : N2VImm<op24, op23, op11_8, op7, 0, op4, 32900b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vm, neon_vcvt_imm32:$SIMM), NVCVTFrm, 32910b57cec5SDimitry Andric IIC_VUNAD, OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "", 32920b57cec5SDimitry Andric [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm), (i32 imm:$SIMM))))]>; 32930b57cec5SDimitry Andricclass N2VCvtQ<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, 32940b57cec5SDimitry Andric string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, 32950b57cec5SDimitry Andric SDPatternOperator IntOp> 32960b57cec5SDimitry Andric : N2VImm<op24, op23, op11_8, op7, 1, op4, 32970b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vm, neon_vcvt_imm32:$SIMM), NVCVTFrm, 32980b57cec5SDimitry Andric IIC_VUNAQ, OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "", 32990b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm), (i32 imm:$SIMM))))]>; 33000b57cec5SDimitry Andric 33010b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 33020b57cec5SDimitry Andric// Multiclasses 33030b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 33040b57cec5SDimitry Andric 33050b57cec5SDimitry Andric// Abbreviations used in multiclass suffixes: 33060b57cec5SDimitry Andric// Q = quarter int (8 bit) elements 33070b57cec5SDimitry Andric// H = half int (16 bit) elements 33080b57cec5SDimitry Andric// S = single int (32 bit) elements 33090b57cec5SDimitry Andric// D = double int (64 bit) elements 33100b57cec5SDimitry Andric 33110b57cec5SDimitry Andric// Neon 2-register vector operations and intrinsics. 33120b57cec5SDimitry Andric 33130b57cec5SDimitry Andric// Neon 2-register comparisons. 33140b57cec5SDimitry Andric// source operand element sizes of 8, 16 and 32 bits: 33150b57cec5SDimitry Andricmulticlass N2V_QHS_cmp<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, 33160b57cec5SDimitry Andric bits<5> op11_7, bit op4, string opc, string Dt, 3317*480093f4SDimitry Andric string asm, PatFrag fc> { 33180b57cec5SDimitry Andric // 64-bit vector types. 33190b57cec5SDimitry Andric def v8i8 : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 0, op4, 33200b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary, 33210b57cec5SDimitry Andric opc, !strconcat(Dt, "8"), asm, "", 3322*480093f4SDimitry Andric [(set DPR:$Vd, (v8i8 (ARMvcmpz (v8i8 DPR:$Vm), fc)))]>; 33230b57cec5SDimitry Andric def v4i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 0, op4, 33240b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary, 33250b57cec5SDimitry Andric opc, !strconcat(Dt, "16"), asm, "", 3326*480093f4SDimitry Andric [(set DPR:$Vd, (v4i16 (ARMvcmpz (v4i16 DPR:$Vm), fc)))]>; 33270b57cec5SDimitry Andric def v2i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4, 33280b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary, 33290b57cec5SDimitry Andric opc, !strconcat(Dt, "32"), asm, "", 3330*480093f4SDimitry Andric [(set DPR:$Vd, (v2i32 (ARMvcmpz (v2i32 DPR:$Vm), fc)))]>; 33310b57cec5SDimitry Andric def v2f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4, 33320b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary, 33330b57cec5SDimitry Andric opc, "f32", asm, "", 3334*480093f4SDimitry Andric [(set DPR:$Vd, (v2i32 (ARMvcmpz (v2f32 DPR:$Vm), fc)))]> { 33350b57cec5SDimitry Andric let Inst{10} = 1; // overwrite F = 1 33360b57cec5SDimitry Andric } 33370b57cec5SDimitry Andric def v4f16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 0, op4, 33380b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary, 33390b57cec5SDimitry Andric opc, "f16", asm, "", 3340*480093f4SDimitry Andric [(set DPR:$Vd, (v4i16 (ARMvcmpz (v4f16 DPR:$Vm), fc)))]>, 33410b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]> { 33420b57cec5SDimitry Andric let Inst{10} = 1; // overwrite F = 1 33430b57cec5SDimitry Andric } 33440b57cec5SDimitry Andric 33450b57cec5SDimitry Andric // 128-bit vector types. 33460b57cec5SDimitry Andric def v16i8 : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 1, op4, 33470b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary, 33480b57cec5SDimitry Andric opc, !strconcat(Dt, "8"), asm, "", 3349*480093f4SDimitry Andric [(set QPR:$Vd, (v16i8 (ARMvcmpz (v16i8 QPR:$Vm), fc)))]>; 33500b57cec5SDimitry Andric def v8i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 1, op4, 33510b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary, 33520b57cec5SDimitry Andric opc, !strconcat(Dt, "16"), asm, "", 3353*480093f4SDimitry Andric [(set QPR:$Vd, (v8i16 (ARMvcmpz (v8i16 QPR:$Vm), fc)))]>; 33540b57cec5SDimitry Andric def v4i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4, 33550b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary, 33560b57cec5SDimitry Andric opc, !strconcat(Dt, "32"), asm, "", 3357*480093f4SDimitry Andric [(set QPR:$Vd, (v4i32 (ARMvcmpz (v4i32 QPR:$Vm), fc)))]>; 33580b57cec5SDimitry Andric def v4f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4, 33590b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary, 33600b57cec5SDimitry Andric opc, "f32", asm, "", 3361*480093f4SDimitry Andric [(set QPR:$Vd, (v4i32 (ARMvcmpz (v4f32 QPR:$Vm), fc)))]> { 33620b57cec5SDimitry Andric let Inst{10} = 1; // overwrite F = 1 33630b57cec5SDimitry Andric } 33640b57cec5SDimitry Andric def v8f16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 1, op4, 33650b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary, 33660b57cec5SDimitry Andric opc, "f16", asm, "", 3367*480093f4SDimitry Andric [(set QPR:$Vd, (v8i16 (ARMvcmpz (v8f16 QPR:$Vm), fc)))]>, 33680b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]> { 33690b57cec5SDimitry Andric let Inst{10} = 1; // overwrite F = 1 33700b57cec5SDimitry Andric } 33710b57cec5SDimitry Andric} 33720b57cec5SDimitry Andric 33738bcb0991SDimitry Andric// Neon 3-register comparisons. 33748bcb0991SDimitry Andricclass N3VQ_cmp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 33758bcb0991SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 3376*480093f4SDimitry Andric ValueType ResTy, ValueType OpTy, PatFrag fc, bit Commutable> 33778bcb0991SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 1, op4, 33788bcb0991SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), N3RegFrm, itin, 33798bcb0991SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 3380*480093f4SDimitry Andric [(set QPR:$Vd, (ResTy (ARMvcmp (OpTy QPR:$Vn), (OpTy QPR:$Vm), fc)))]> { 33818bcb0991SDimitry Andric // All of these have a two-operand InstAlias. 33828bcb0991SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 33838bcb0991SDimitry Andric let isCommutable = Commutable; 33848bcb0991SDimitry Andric} 33858bcb0991SDimitry Andric 33868bcb0991SDimitry Andricclass N3VD_cmp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, 33878bcb0991SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 3388*480093f4SDimitry Andric ValueType ResTy, ValueType OpTy, PatFrag fc, bit Commutable> 33898bcb0991SDimitry Andric : N3V<op24, op23, op21_20, op11_8, 0, op4, 33908bcb0991SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin, 33918bcb0991SDimitry Andric OpcodeStr, Dt, "$Vd, $Vn, $Vm", "", 3392*480093f4SDimitry Andric [(set DPR:$Vd, (ResTy (ARMvcmp (OpTy DPR:$Vn), (OpTy DPR:$Vm), fc)))]> { 33938bcb0991SDimitry Andric // All of these have a two-operand InstAlias. 33948bcb0991SDimitry Andric let TwoOperandAliasConstraint = "$Vn = $Vd"; 33958bcb0991SDimitry Andric let isCommutable = Commutable; 33968bcb0991SDimitry Andric} 33978bcb0991SDimitry Andric 33988bcb0991SDimitry Andricmulticlass N3V_QHS_cmp<bit op24, bit op23, bits<4> op11_8, bit op4, 33998bcb0991SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 34008bcb0991SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 34018bcb0991SDimitry Andric string OpcodeStr, string Dt, 3402*480093f4SDimitry Andric PatFrag fc, bit Commutable = 0> { 34038bcb0991SDimitry Andric // 64-bit vector types. 34048bcb0991SDimitry Andric def v8i8 : N3VD_cmp<op24, op23, 0b00, op11_8, op4, itinD16, 34058bcb0991SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 34068bcb0991SDimitry Andric v8i8, v8i8, fc, Commutable>; 34078bcb0991SDimitry Andric def v4i16 : N3VD_cmp<op24, op23, 0b01, op11_8, op4, itinD16, 34088bcb0991SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 34098bcb0991SDimitry Andric v4i16, v4i16, fc, Commutable>; 34108bcb0991SDimitry Andric def v2i32 : N3VD_cmp<op24, op23, 0b10, op11_8, op4, itinD32, 34118bcb0991SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 34128bcb0991SDimitry Andric v2i32, v2i32, fc, Commutable>; 34138bcb0991SDimitry Andric 34148bcb0991SDimitry Andric // 128-bit vector types. 34158bcb0991SDimitry Andric def v16i8 : N3VQ_cmp<op24, op23, 0b00, op11_8, op4, itinQ16, 34168bcb0991SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 34178bcb0991SDimitry Andric v16i8, v16i8, fc, Commutable>; 34188bcb0991SDimitry Andric def v8i16 : N3VQ_cmp<op24, op23, 0b01, op11_8, op4, itinQ16, 34198bcb0991SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 34208bcb0991SDimitry Andric v8i16, v8i16, fc, Commutable>; 34218bcb0991SDimitry Andric def v4i32 : N3VQ_cmp<op24, op23, 0b10, op11_8, op4, itinQ32, 34228bcb0991SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 34238bcb0991SDimitry Andric v4i32, v4i32, fc, Commutable>; 34248bcb0991SDimitry Andric} 34258bcb0991SDimitry Andric 34260b57cec5SDimitry Andric 34270b57cec5SDimitry Andric// Neon 2-register vector intrinsics, 34280b57cec5SDimitry Andric// element sizes of 8, 16 and 32 bits: 34290b57cec5SDimitry Andricmulticlass N2VInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, 34300b57cec5SDimitry Andric bits<5> op11_7, bit op4, 34310b57cec5SDimitry Andric InstrItinClass itinD, InstrItinClass itinQ, 34320b57cec5SDimitry Andric string OpcodeStr, string Dt, SDPatternOperator IntOp> { 34330b57cec5SDimitry Andric // 64-bit vector types. 34340b57cec5SDimitry Andric def v8i8 : N2VDInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, 34350b57cec5SDimitry Andric itinD, OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>; 34360b57cec5SDimitry Andric def v4i16 : N2VDInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, 34370b57cec5SDimitry Andric itinD, OpcodeStr, !strconcat(Dt, "16"),v4i16,v4i16,IntOp>; 34380b57cec5SDimitry Andric def v2i32 : N2VDInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, 34390b57cec5SDimitry Andric itinD, OpcodeStr, !strconcat(Dt, "32"),v2i32,v2i32,IntOp>; 34400b57cec5SDimitry Andric 34410b57cec5SDimitry Andric // 128-bit vector types. 34420b57cec5SDimitry Andric def v16i8 : N2VQInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, 34430b57cec5SDimitry Andric itinQ, OpcodeStr, !strconcat(Dt, "8"), v16i8,v16i8,IntOp>; 34440b57cec5SDimitry Andric def v8i16 : N2VQInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, 34450b57cec5SDimitry Andric itinQ, OpcodeStr, !strconcat(Dt, "16"),v8i16,v8i16,IntOp>; 34460b57cec5SDimitry Andric def v4i32 : N2VQInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, 34470b57cec5SDimitry Andric itinQ, OpcodeStr, !strconcat(Dt, "32"),v4i32,v4i32,IntOp>; 34480b57cec5SDimitry Andric} 34490b57cec5SDimitry Andric 34500b57cec5SDimitry Andric 34510b57cec5SDimitry Andric// Neon Narrowing 2-register vector operations, 34520b57cec5SDimitry Andric// source operand element sizes of 16, 32 and 64 bits: 34530b57cec5SDimitry Andricmulticlass N2VN_HSD<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, 34540b57cec5SDimitry Andric bits<5> op11_7, bit op6, bit op4, 34550b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 34560b57cec5SDimitry Andric SDNode OpNode> { 34570b57cec5SDimitry Andric def v8i8 : N2VN<op24_23, op21_20, 0b00, op17_16, op11_7, op6, op4, 34580b57cec5SDimitry Andric itin, OpcodeStr, !strconcat(Dt, "16"), 34590b57cec5SDimitry Andric v8i8, v8i16, OpNode>; 34600b57cec5SDimitry Andric def v4i16 : N2VN<op24_23, op21_20, 0b01, op17_16, op11_7, op6, op4, 34610b57cec5SDimitry Andric itin, OpcodeStr, !strconcat(Dt, "32"), 34620b57cec5SDimitry Andric v4i16, v4i32, OpNode>; 34630b57cec5SDimitry Andric def v2i32 : N2VN<op24_23, op21_20, 0b10, op17_16, op11_7, op6, op4, 34640b57cec5SDimitry Andric itin, OpcodeStr, !strconcat(Dt, "64"), 34650b57cec5SDimitry Andric v2i32, v2i64, OpNode>; 34660b57cec5SDimitry Andric} 34670b57cec5SDimitry Andric 34680b57cec5SDimitry Andric// Neon Narrowing 2-register vector intrinsics, 34690b57cec5SDimitry Andric// source operand element sizes of 16, 32 and 64 bits: 34700b57cec5SDimitry Andricmulticlass N2VNInt_HSD<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, 34710b57cec5SDimitry Andric bits<5> op11_7, bit op6, bit op4, 34720b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 34730b57cec5SDimitry Andric SDPatternOperator IntOp> { 34740b57cec5SDimitry Andric def v8i8 : N2VNInt<op24_23, op21_20, 0b00, op17_16, op11_7, op6, op4, 34750b57cec5SDimitry Andric itin, OpcodeStr, !strconcat(Dt, "16"), 34760b57cec5SDimitry Andric v8i8, v8i16, IntOp>; 34770b57cec5SDimitry Andric def v4i16 : N2VNInt<op24_23, op21_20, 0b01, op17_16, op11_7, op6, op4, 34780b57cec5SDimitry Andric itin, OpcodeStr, !strconcat(Dt, "32"), 34790b57cec5SDimitry Andric v4i16, v4i32, IntOp>; 34800b57cec5SDimitry Andric def v2i32 : N2VNInt<op24_23, op21_20, 0b10, op17_16, op11_7, op6, op4, 34810b57cec5SDimitry Andric itin, OpcodeStr, !strconcat(Dt, "64"), 34820b57cec5SDimitry Andric v2i32, v2i64, IntOp>; 34830b57cec5SDimitry Andric} 34840b57cec5SDimitry Andric 34850b57cec5SDimitry Andric 34860b57cec5SDimitry Andric// Neon Lengthening 2-register vector intrinsic (currently specific to VMOVL). 34870b57cec5SDimitry Andric// source operand element sizes of 16, 32 and 64 bits: 34880b57cec5SDimitry Andricmulticlass N2VL_QHS<bits<2> op24_23, bits<5> op11_7, bit op6, bit op4, 34890b57cec5SDimitry Andric string OpcodeStr, string Dt, SDNode OpNode> { 34900b57cec5SDimitry Andric def v8i16 : N2VL<op24_23, 0b00, 0b10, 0b00, op11_7, op6, op4, IIC_VQUNAiD, 34910b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, OpNode>; 34920b57cec5SDimitry Andric def v4i32 : N2VL<op24_23, 0b01, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD, 34930b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, OpNode>; 34940b57cec5SDimitry Andric def v2i64 : N2VL<op24_23, 0b10, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD, 34950b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, OpNode>; 34960b57cec5SDimitry Andric} 34970b57cec5SDimitry Andric 34980b57cec5SDimitry Andric 34990b57cec5SDimitry Andric// Neon 3-register vector operations. 35000b57cec5SDimitry Andric 35010b57cec5SDimitry Andric// First with only element sizes of 8, 16 and 32 bits: 35020b57cec5SDimitry Andricmulticlass N3V_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 35030b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 35040b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 35050b57cec5SDimitry Andric string OpcodeStr, string Dt, 35060b57cec5SDimitry Andric SDNode OpNode, bit Commutable = 0> { 35070b57cec5SDimitry Andric // 64-bit vector types. 35080b57cec5SDimitry Andric def v8i8 : N3VD<op24, op23, 0b00, op11_8, op4, itinD16, 35090b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 35100b57cec5SDimitry Andric v8i8, v8i8, OpNode, Commutable>; 35110b57cec5SDimitry Andric def v4i16 : N3VD<op24, op23, 0b01, op11_8, op4, itinD16, 35120b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 35130b57cec5SDimitry Andric v4i16, v4i16, OpNode, Commutable>; 35140b57cec5SDimitry Andric def v2i32 : N3VD<op24, op23, 0b10, op11_8, op4, itinD32, 35150b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 35160b57cec5SDimitry Andric v2i32, v2i32, OpNode, Commutable>; 35170b57cec5SDimitry Andric 35180b57cec5SDimitry Andric // 128-bit vector types. 35190b57cec5SDimitry Andric def v16i8 : N3VQ<op24, op23, 0b00, op11_8, op4, itinQ16, 35200b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 35210b57cec5SDimitry Andric v16i8, v16i8, OpNode, Commutable>; 35220b57cec5SDimitry Andric def v8i16 : N3VQ<op24, op23, 0b01, op11_8, op4, itinQ16, 35230b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 35240b57cec5SDimitry Andric v8i16, v8i16, OpNode, Commutable>; 35250b57cec5SDimitry Andric def v4i32 : N3VQ<op24, op23, 0b10, op11_8, op4, itinQ32, 35260b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 35270b57cec5SDimitry Andric v4i32, v4i32, OpNode, Commutable>; 35280b57cec5SDimitry Andric} 35290b57cec5SDimitry Andric 35300b57cec5SDimitry Andricmulticlass N3VSL_HS<bits<4> op11_8, string OpcodeStr, SDNode ShOp> { 35310b57cec5SDimitry Andric def v4i16 : N3VDSL16<0b01, op11_8, OpcodeStr, "i16", v4i16, ShOp>; 35320b57cec5SDimitry Andric def v2i32 : N3VDSL<0b10, op11_8, IIC_VMULi32D, OpcodeStr, "i32", v2i32, ShOp>; 35330b57cec5SDimitry Andric def v8i16 : N3VQSL16<0b01, op11_8, OpcodeStr, "i16", v8i16, v4i16, ShOp>; 35340b57cec5SDimitry Andric def v4i32 : N3VQSL<0b10, op11_8, IIC_VMULi32Q, OpcodeStr, "i32", 35350b57cec5SDimitry Andric v4i32, v2i32, ShOp>; 35360b57cec5SDimitry Andric} 35370b57cec5SDimitry Andric 35380b57cec5SDimitry Andric// ....then also with element size 64 bits: 35390b57cec5SDimitry Andricmulticlass N3V_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, 35400b57cec5SDimitry Andric InstrItinClass itinD, InstrItinClass itinQ, 35410b57cec5SDimitry Andric string OpcodeStr, string Dt, 35420b57cec5SDimitry Andric SDNode OpNode, bit Commutable = 0> 35430b57cec5SDimitry Andric : N3V_QHS<op24, op23, op11_8, op4, itinD, itinD, itinQ, itinQ, 35440b57cec5SDimitry Andric OpcodeStr, Dt, OpNode, Commutable> { 35450b57cec5SDimitry Andric def v1i64 : N3VD<op24, op23, 0b11, op11_8, op4, itinD, 35460b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), 35470b57cec5SDimitry Andric v1i64, v1i64, OpNode, Commutable>; 35480b57cec5SDimitry Andric def v2i64 : N3VQ<op24, op23, 0b11, op11_8, op4, itinQ, 35490b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), 35500b57cec5SDimitry Andric v2i64, v2i64, OpNode, Commutable>; 35510b57cec5SDimitry Andric} 35520b57cec5SDimitry Andric 35530b57cec5SDimitry Andric 35540b57cec5SDimitry Andric// Neon 3-register vector intrinsics. 35550b57cec5SDimitry Andric 35560b57cec5SDimitry Andric// First with only element sizes of 16 and 32 bits: 35570b57cec5SDimitry Andricmulticlass N3VInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4, Format f, 35580b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 35590b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 35600b57cec5SDimitry Andric string OpcodeStr, string Dt, 35610b57cec5SDimitry Andric SDPatternOperator IntOp, bit Commutable = 0> { 35620b57cec5SDimitry Andric // 64-bit vector types. 35630b57cec5SDimitry Andric def v4i16 : N3VDInt<op24, op23, 0b01, op11_8, op4, f, itinD16, 35640b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 35650b57cec5SDimitry Andric v4i16, v4i16, IntOp, Commutable>; 35660b57cec5SDimitry Andric def v2i32 : N3VDInt<op24, op23, 0b10, op11_8, op4, f, itinD32, 35670b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 35680b57cec5SDimitry Andric v2i32, v2i32, IntOp, Commutable>; 35690b57cec5SDimitry Andric 35700b57cec5SDimitry Andric // 128-bit vector types. 35710b57cec5SDimitry Andric def v8i16 : N3VQInt<op24, op23, 0b01, op11_8, op4, f, itinQ16, 35720b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 35730b57cec5SDimitry Andric v8i16, v8i16, IntOp, Commutable>; 35740b57cec5SDimitry Andric def v4i32 : N3VQInt<op24, op23, 0b10, op11_8, op4, f, itinQ32, 35750b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 35760b57cec5SDimitry Andric v4i32, v4i32, IntOp, Commutable>; 35770b57cec5SDimitry Andric} 35780b57cec5SDimitry Andricmulticlass N3VInt_HSSh<bit op24, bit op23, bits<4> op11_8, bit op4, Format f, 35790b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 35800b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 35810b57cec5SDimitry Andric string OpcodeStr, string Dt, 35820b57cec5SDimitry Andric SDPatternOperator IntOp> { 35830b57cec5SDimitry Andric // 64-bit vector types. 35840b57cec5SDimitry Andric def v4i16 : N3VDIntSh<op24, op23, 0b01, op11_8, op4, f, itinD16, 35850b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 35860b57cec5SDimitry Andric v4i16, v4i16, IntOp>; 35870b57cec5SDimitry Andric def v2i32 : N3VDIntSh<op24, op23, 0b10, op11_8, op4, f, itinD32, 35880b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 35890b57cec5SDimitry Andric v2i32, v2i32, IntOp>; 35900b57cec5SDimitry Andric 35910b57cec5SDimitry Andric // 128-bit vector types. 35920b57cec5SDimitry Andric def v8i16 : N3VQIntSh<op24, op23, 0b01, op11_8, op4, f, itinQ16, 35930b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 35940b57cec5SDimitry Andric v8i16, v8i16, IntOp>; 35950b57cec5SDimitry Andric def v4i32 : N3VQIntSh<op24, op23, 0b10, op11_8, op4, f, itinQ32, 35960b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 35970b57cec5SDimitry Andric v4i32, v4i32, IntOp>; 35980b57cec5SDimitry Andric} 35990b57cec5SDimitry Andric 36000b57cec5SDimitry Andricmulticlass N3VIntSL_HS<bits<4> op11_8, 36010b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 36020b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 36030b57cec5SDimitry Andric string OpcodeStr, string Dt, SDPatternOperator IntOp> { 36040b57cec5SDimitry Andric def v4i16 : N3VDIntSL16<0b01, op11_8, itinD16, 36050b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i16, IntOp>; 36060b57cec5SDimitry Andric def v2i32 : N3VDIntSL<0b10, op11_8, itinD32, 36070b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i32, IntOp>; 36080b57cec5SDimitry Andric def v8i16 : N3VQIntSL16<0b01, op11_8, itinQ16, 36090b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16, IntOp>; 36100b57cec5SDimitry Andric def v4i32 : N3VQIntSL<0b10, op11_8, itinQ32, 36110b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32, IntOp>; 36120b57cec5SDimitry Andric} 36130b57cec5SDimitry Andric 36140b57cec5SDimitry Andric// ....then also with element size of 8 bits: 36150b57cec5SDimitry Andricmulticlass N3VInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, Format f, 36160b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 36170b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 36180b57cec5SDimitry Andric string OpcodeStr, string Dt, 36190b57cec5SDimitry Andric SDPatternOperator IntOp, bit Commutable = 0> 36200b57cec5SDimitry Andric : N3VInt_HS<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32, 36210b57cec5SDimitry Andric OpcodeStr, Dt, IntOp, Commutable> { 36220b57cec5SDimitry Andric def v8i8 : N3VDInt<op24, op23, 0b00, op11_8, op4, f, itinD16, 36230b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 36240b57cec5SDimitry Andric v8i8, v8i8, IntOp, Commutable>; 36250b57cec5SDimitry Andric def v16i8 : N3VQInt<op24, op23, 0b00, op11_8, op4, f, itinQ16, 36260b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 36270b57cec5SDimitry Andric v16i8, v16i8, IntOp, Commutable>; 36280b57cec5SDimitry Andric} 36290b57cec5SDimitry Andricmulticlass N3VInt_QHSSh<bit op24, bit op23, bits<4> op11_8, bit op4, Format f, 36300b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 36310b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 36320b57cec5SDimitry Andric string OpcodeStr, string Dt, 36330b57cec5SDimitry Andric SDPatternOperator IntOp> 36340b57cec5SDimitry Andric : N3VInt_HSSh<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32, 36350b57cec5SDimitry Andric OpcodeStr, Dt, IntOp> { 36360b57cec5SDimitry Andric def v8i8 : N3VDIntSh<op24, op23, 0b00, op11_8, op4, f, itinD16, 36370b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 36380b57cec5SDimitry Andric v8i8, v8i8, IntOp>; 36390b57cec5SDimitry Andric def v16i8 : N3VQIntSh<op24, op23, 0b00, op11_8, op4, f, itinQ16, 36400b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 36410b57cec5SDimitry Andric v16i8, v16i8, IntOp>; 36420b57cec5SDimitry Andric} 36430b57cec5SDimitry Andric 36440b57cec5SDimitry Andric 36450b57cec5SDimitry Andric// ....then also with element size of 64 bits: 36460b57cec5SDimitry Andricmulticlass N3VInt_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, Format f, 36470b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 36480b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 36490b57cec5SDimitry Andric string OpcodeStr, string Dt, 36500b57cec5SDimitry Andric SDPatternOperator IntOp, bit Commutable = 0> 36510b57cec5SDimitry Andric : N3VInt_QHS<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32, 36520b57cec5SDimitry Andric OpcodeStr, Dt, IntOp, Commutable> { 36530b57cec5SDimitry Andric def v1i64 : N3VDInt<op24, op23, 0b11, op11_8, op4, f, itinD32, 36540b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), 36550b57cec5SDimitry Andric v1i64, v1i64, IntOp, Commutable>; 36560b57cec5SDimitry Andric def v2i64 : N3VQInt<op24, op23, 0b11, op11_8, op4, f, itinQ32, 36570b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), 36580b57cec5SDimitry Andric v2i64, v2i64, IntOp, Commutable>; 36590b57cec5SDimitry Andric} 36600b57cec5SDimitry Andricmulticlass N3VInt_QHSDSh<bit op24, bit op23, bits<4> op11_8, bit op4, Format f, 36610b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 36620b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 36630b57cec5SDimitry Andric string OpcodeStr, string Dt, 36640b57cec5SDimitry Andric SDPatternOperator IntOp> 36650b57cec5SDimitry Andric : N3VInt_QHSSh<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32, 36660b57cec5SDimitry Andric OpcodeStr, Dt, IntOp> { 36670b57cec5SDimitry Andric def v1i64 : N3VDIntSh<op24, op23, 0b11, op11_8, op4, f, itinD32, 36680b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), 36690b57cec5SDimitry Andric v1i64, v1i64, IntOp>; 36700b57cec5SDimitry Andric def v2i64 : N3VQIntSh<op24, op23, 0b11, op11_8, op4, f, itinQ32, 36710b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), 36720b57cec5SDimitry Andric v2i64, v2i64, IntOp>; 36730b57cec5SDimitry Andric} 36740b57cec5SDimitry Andric 36750b57cec5SDimitry Andric// Neon Narrowing 3-register vector intrinsics, 36760b57cec5SDimitry Andric// source operand element sizes of 16, 32 and 64 bits: 36770b57cec5SDimitry Andricmulticlass N3VNInt_HSD<bit op24, bit op23, bits<4> op11_8, bit op4, 36780b57cec5SDimitry Andric string OpcodeStr, string Dt, 36790b57cec5SDimitry Andric SDPatternOperator IntOp, bit Commutable = 0> { 36800b57cec5SDimitry Andric def v8i8 : N3VNInt<op24, op23, 0b00, op11_8, op4, 36810b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 36820b57cec5SDimitry Andric v8i8, v8i16, IntOp, Commutable>; 36830b57cec5SDimitry Andric def v4i16 : N3VNInt<op24, op23, 0b01, op11_8, op4, 36840b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 36850b57cec5SDimitry Andric v4i16, v4i32, IntOp, Commutable>; 36860b57cec5SDimitry Andric def v2i32 : N3VNInt<op24, op23, 0b10, op11_8, op4, 36870b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), 36880b57cec5SDimitry Andric v2i32, v2i64, IntOp, Commutable>; 36890b57cec5SDimitry Andric} 36900b57cec5SDimitry Andric 36910b57cec5SDimitry Andric 36920b57cec5SDimitry Andric// Neon Long 3-register vector operations. 36930b57cec5SDimitry Andric 36940b57cec5SDimitry Andricmulticlass N3VL_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 36950b57cec5SDimitry Andric InstrItinClass itin16, InstrItinClass itin32, 36960b57cec5SDimitry Andric string OpcodeStr, string Dt, 36970b57cec5SDimitry Andric SDNode OpNode, bit Commutable = 0> { 36980b57cec5SDimitry Andric def v8i16 : N3VL<op24, op23, 0b00, op11_8, op4, itin16, 36990b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 37000b57cec5SDimitry Andric v8i16, v8i8, OpNode, Commutable>; 37010b57cec5SDimitry Andric def v4i32 : N3VL<op24, op23, 0b01, op11_8, op4, itin16, 37020b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 37030b57cec5SDimitry Andric v4i32, v4i16, OpNode, Commutable>; 37040b57cec5SDimitry Andric def v2i64 : N3VL<op24, op23, 0b10, op11_8, op4, itin32, 37050b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 37060b57cec5SDimitry Andric v2i64, v2i32, OpNode, Commutable>; 37070b57cec5SDimitry Andric} 37080b57cec5SDimitry Andric 37090b57cec5SDimitry Andricmulticlass N3VLSL_HS<bit op24, bits<4> op11_8, 37100b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 37110b57cec5SDimitry Andric SDNode OpNode> { 37120b57cec5SDimitry Andric def v4i16 : N3VLSL16<op24, 0b01, op11_8, itin, OpcodeStr, 37130b57cec5SDimitry Andric !strconcat(Dt, "16"), v4i32, v4i16, OpNode>; 37140b57cec5SDimitry Andric def v2i32 : N3VLSL<op24, 0b10, op11_8, itin, OpcodeStr, 37150b57cec5SDimitry Andric !strconcat(Dt, "32"), v2i64, v2i32, OpNode>; 37160b57cec5SDimitry Andric} 37170b57cec5SDimitry Andric 37180b57cec5SDimitry Andricmulticlass N3VLExt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 37190b57cec5SDimitry Andric InstrItinClass itin16, InstrItinClass itin32, 37200b57cec5SDimitry Andric string OpcodeStr, string Dt, 37210b57cec5SDimitry Andric SDNode OpNode, SDNode ExtOp, bit Commutable = 0> { 37220b57cec5SDimitry Andric def v8i16 : N3VLExt<op24, op23, 0b00, op11_8, op4, itin16, 37230b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 37240b57cec5SDimitry Andric v8i16, v8i8, OpNode, ExtOp, Commutable>; 37250b57cec5SDimitry Andric def v4i32 : N3VLExt<op24, op23, 0b01, op11_8, op4, itin16, 37260b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 37270b57cec5SDimitry Andric v4i32, v4i16, OpNode, ExtOp, Commutable>; 37280b57cec5SDimitry Andric def v2i64 : N3VLExt<op24, op23, 0b10, op11_8, op4, itin32, 37290b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 37300b57cec5SDimitry Andric v2i64, v2i32, OpNode, ExtOp, Commutable>; 37310b57cec5SDimitry Andric} 37320b57cec5SDimitry Andric 37330b57cec5SDimitry Andric// Neon Long 3-register vector intrinsics. 37340b57cec5SDimitry Andric 37350b57cec5SDimitry Andric// First with only element sizes of 16 and 32 bits: 37360b57cec5SDimitry Andricmulticlass N3VLInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4, 37370b57cec5SDimitry Andric InstrItinClass itin16, InstrItinClass itin32, 37380b57cec5SDimitry Andric string OpcodeStr, string Dt, 37390b57cec5SDimitry Andric SDPatternOperator IntOp, bit Commutable = 0> { 37400b57cec5SDimitry Andric def v4i32 : N3VLInt<op24, op23, 0b01, op11_8, op4, itin16, 37410b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 37420b57cec5SDimitry Andric v4i32, v4i16, IntOp, Commutable>; 37430b57cec5SDimitry Andric def v2i64 : N3VLInt<op24, op23, 0b10, op11_8, op4, itin32, 37440b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 37450b57cec5SDimitry Andric v2i64, v2i32, IntOp, Commutable>; 37460b57cec5SDimitry Andric} 37470b57cec5SDimitry Andric 37480b57cec5SDimitry Andricmulticlass N3VLIntSL_HS<bit op24, bits<4> op11_8, 37490b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 37500b57cec5SDimitry Andric SDPatternOperator IntOp> { 37510b57cec5SDimitry Andric def v4i16 : N3VLIntSL16<op24, 0b01, op11_8, itin, 37520b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>; 37530b57cec5SDimitry Andric def v2i32 : N3VLIntSL<op24, 0b10, op11_8, itin, 37540b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; 37550b57cec5SDimitry Andric} 37560b57cec5SDimitry Andric 37570b57cec5SDimitry Andric// ....then also with element size of 8 bits: 37580b57cec5SDimitry Andricmulticlass N3VLInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 37590b57cec5SDimitry Andric InstrItinClass itin16, InstrItinClass itin32, 37600b57cec5SDimitry Andric string OpcodeStr, string Dt, 37610b57cec5SDimitry Andric SDPatternOperator IntOp, bit Commutable = 0> 37620b57cec5SDimitry Andric : N3VLInt_HS<op24, op23, op11_8, op4, itin16, itin32, OpcodeStr, Dt, 37630b57cec5SDimitry Andric IntOp, Commutable> { 37640b57cec5SDimitry Andric def v8i16 : N3VLInt<op24, op23, 0b00, op11_8, op4, itin16, 37650b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 37660b57cec5SDimitry Andric v8i16, v8i8, IntOp, Commutable>; 37670b57cec5SDimitry Andric} 37680b57cec5SDimitry Andric 37690b57cec5SDimitry Andric// ....with explicit extend (VABDL). 37700b57cec5SDimitry Andricmulticlass N3VLIntExt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 37710b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 37720b57cec5SDimitry Andric SDPatternOperator IntOp, SDNode ExtOp, bit Commutable = 0> { 37730b57cec5SDimitry Andric def v8i16 : N3VLIntExt<op24, op23, 0b00, op11_8, op4, itin, 37740b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 37750b57cec5SDimitry Andric v8i16, v8i8, IntOp, ExtOp, Commutable>; 37760b57cec5SDimitry Andric def v4i32 : N3VLIntExt<op24, op23, 0b01, op11_8, op4, itin, 37770b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 37780b57cec5SDimitry Andric v4i32, v4i16, IntOp, ExtOp, Commutable>; 37790b57cec5SDimitry Andric def v2i64 : N3VLIntExt<op24, op23, 0b10, op11_8, op4, itin, 37800b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 37810b57cec5SDimitry Andric v2i64, v2i32, IntOp, ExtOp, Commutable>; 37820b57cec5SDimitry Andric} 37830b57cec5SDimitry Andric 37840b57cec5SDimitry Andric 37850b57cec5SDimitry Andric// Neon Wide 3-register vector intrinsics, 37860b57cec5SDimitry Andric// source operand element sizes of 8, 16 and 32 bits: 37870b57cec5SDimitry Andricmulticlass N3VW_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 37880b57cec5SDimitry Andric string OpcodeStr, string Dt, 37890b57cec5SDimitry Andric SDNode OpNode, SDNode ExtOp, bit Commutable = 0> { 37900b57cec5SDimitry Andric def v8i16 : N3VW<op24, op23, 0b00, op11_8, op4, 37910b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), 37920b57cec5SDimitry Andric v8i16, v8i8, OpNode, ExtOp, Commutable>; 37930b57cec5SDimitry Andric def v4i32 : N3VW<op24, op23, 0b01, op11_8, op4, 37940b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 37950b57cec5SDimitry Andric v4i32, v4i16, OpNode, ExtOp, Commutable>; 37960b57cec5SDimitry Andric def v2i64 : N3VW<op24, op23, 0b10, op11_8, op4, 37970b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 37980b57cec5SDimitry Andric v2i64, v2i32, OpNode, ExtOp, Commutable>; 37990b57cec5SDimitry Andric} 38000b57cec5SDimitry Andric 38010b57cec5SDimitry Andric 38020b57cec5SDimitry Andric// Neon Multiply-Op vector operations, 38030b57cec5SDimitry Andric// element sizes of 8, 16 and 32 bits: 38040b57cec5SDimitry Andricmulticlass N3VMulOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 38050b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 38060b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 38070b57cec5SDimitry Andric string OpcodeStr, string Dt, SDNode OpNode> { 38080b57cec5SDimitry Andric // 64-bit vector types. 38090b57cec5SDimitry Andric def v8i8 : N3VDMulOp<op24, op23, 0b00, op11_8, op4, itinD16, 38100b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i8, mul, OpNode>; 38110b57cec5SDimitry Andric def v4i16 : N3VDMulOp<op24, op23, 0b01, op11_8, op4, itinD16, 38120b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, OpNode>; 38130b57cec5SDimitry Andric def v2i32 : N3VDMulOp<op24, op23, 0b10, op11_8, op4, itinD32, 38140b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, OpNode>; 38150b57cec5SDimitry Andric 38160b57cec5SDimitry Andric // 128-bit vector types. 38170b57cec5SDimitry Andric def v16i8 : N3VQMulOp<op24, op23, 0b00, op11_8, op4, itinQ16, 38180b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v16i8, mul, OpNode>; 38190b57cec5SDimitry Andric def v8i16 : N3VQMulOp<op24, op23, 0b01, op11_8, op4, itinQ16, 38200b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v8i16, mul, OpNode>; 38210b57cec5SDimitry Andric def v4i32 : N3VQMulOp<op24, op23, 0b10, op11_8, op4, itinQ32, 38220b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v4i32, mul, OpNode>; 38230b57cec5SDimitry Andric} 38240b57cec5SDimitry Andric 38250b57cec5SDimitry Andricmulticlass N3VMulOpSL_HS<bits<4> op11_8, 38260b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 38270b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 38280b57cec5SDimitry Andric string OpcodeStr, string Dt, SDPatternOperator ShOp> { 38290b57cec5SDimitry Andric def v4i16 : N3VDMulOpSL16<0b01, op11_8, itinD16, 38300b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, ShOp>; 38310b57cec5SDimitry Andric def v2i32 : N3VDMulOpSL<0b10, op11_8, itinD32, 38320b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, ShOp>; 38330b57cec5SDimitry Andric def v8i16 : N3VQMulOpSL16<0b01, op11_8, itinQ16, 38340b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16, 38350b57cec5SDimitry Andric mul, ShOp>; 38360b57cec5SDimitry Andric def v4i32 : N3VQMulOpSL<0b10, op11_8, itinQ32, 38370b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32, 38380b57cec5SDimitry Andric mul, ShOp>; 38390b57cec5SDimitry Andric} 38400b57cec5SDimitry Andric 38410b57cec5SDimitry Andric// Neon Intrinsic-Op vector operations, 38420b57cec5SDimitry Andric// element sizes of 8, 16 and 32 bits: 38430b57cec5SDimitry Andricmulticlass N3VIntOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 38440b57cec5SDimitry Andric InstrItinClass itinD, InstrItinClass itinQ, 38450b57cec5SDimitry Andric string OpcodeStr, string Dt, SDPatternOperator IntOp, 38460b57cec5SDimitry Andric SDNode OpNode> { 38470b57cec5SDimitry Andric // 64-bit vector types. 38480b57cec5SDimitry Andric def v8i8 : N3VDIntOp<op24, op23, 0b00, op11_8, op4, itinD, 38490b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i8, IntOp, OpNode>; 38500b57cec5SDimitry Andric def v4i16 : N3VDIntOp<op24, op23, 0b01, op11_8, op4, itinD, 38510b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i16, IntOp, OpNode>; 38520b57cec5SDimitry Andric def v2i32 : N3VDIntOp<op24, op23, 0b10, op11_8, op4, itinD, 38530b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i32, IntOp, OpNode>; 38540b57cec5SDimitry Andric 38550b57cec5SDimitry Andric // 128-bit vector types. 38560b57cec5SDimitry Andric def v16i8 : N3VQIntOp<op24, op23, 0b00, op11_8, op4, itinQ, 38570b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v16i8, IntOp, OpNode>; 38580b57cec5SDimitry Andric def v8i16 : N3VQIntOp<op24, op23, 0b01, op11_8, op4, itinQ, 38590b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v8i16, IntOp, OpNode>; 38600b57cec5SDimitry Andric def v4i32 : N3VQIntOp<op24, op23, 0b10, op11_8, op4, itinQ, 38610b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v4i32, IntOp, OpNode>; 38620b57cec5SDimitry Andric} 38630b57cec5SDimitry Andric 38640b57cec5SDimitry Andric// Neon 3-argument intrinsics, 38650b57cec5SDimitry Andric// element sizes of 16 and 32 bits: 38660b57cec5SDimitry Andricmulticlass N3VInt3_HS<bit op24, bit op23, bits<4> op11_8, bit op4, 38670b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 38680b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 38690b57cec5SDimitry Andric string OpcodeStr, string Dt, SDPatternOperator IntOp> { 38700b57cec5SDimitry Andric // 64-bit vector types. 38710b57cec5SDimitry Andric def v4i16 : N3VDInt3<op24, op23, 0b01, op11_8, op4, itinD16, 38720b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i16, v4i16, IntOp>; 38730b57cec5SDimitry Andric def v2i32 : N3VDInt3<op24, op23, 0b10, op11_8, op4, itinD32, 38740b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i32, v2i32, IntOp>; 38750b57cec5SDimitry Andric 38760b57cec5SDimitry Andric // 128-bit vector types. 38770b57cec5SDimitry Andric def v8i16 : N3VQInt3<op24, op23, 0b01, op11_8, op4, itinQ16, 38780b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v8i16, v8i16, IntOp>; 38790b57cec5SDimitry Andric def v4i32 : N3VQInt3<op24, op23, 0b10, op11_8, op4, itinQ32, 38800b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v4i32, v4i32, IntOp>; 38810b57cec5SDimitry Andric} 38820b57cec5SDimitry Andric 38830b57cec5SDimitry Andric// element sizes of 8, 16 and 32 bits: 38840b57cec5SDimitry Andricmulticlass N3VInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 38850b57cec5SDimitry Andric InstrItinClass itinD16, InstrItinClass itinD32, 38860b57cec5SDimitry Andric InstrItinClass itinQ16, InstrItinClass itinQ32, 38870b57cec5SDimitry Andric string OpcodeStr, string Dt, SDPatternOperator IntOp> 38880b57cec5SDimitry Andric :N3VInt3_HS <op24, op23, op11_8, op4, itinD16, itinD32, 38890b57cec5SDimitry Andric itinQ16, itinQ32, OpcodeStr, Dt, IntOp>{ 38900b57cec5SDimitry Andric // 64-bit vector types. 38910b57cec5SDimitry Andric def v8i8 : N3VDInt3<op24, op23, 0b00, op11_8, op4, itinD16, 38920b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>; 38930b57cec5SDimitry Andric // 128-bit vector types. 38940b57cec5SDimitry Andric def v16i8 : N3VQInt3<op24, op23, 0b00, op11_8, op4, itinQ16, 38950b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v16i8, v16i8, IntOp>; 38960b57cec5SDimitry Andric} 38970b57cec5SDimitry Andric 38980b57cec5SDimitry Andric// Neon Long Multiply-Op vector operations, 38990b57cec5SDimitry Andric// element sizes of 8, 16 and 32 bits: 39000b57cec5SDimitry Andricmulticlass N3VLMulOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 39010b57cec5SDimitry Andric InstrItinClass itin16, InstrItinClass itin32, 39020b57cec5SDimitry Andric string OpcodeStr, string Dt, SDNode MulOp, 39030b57cec5SDimitry Andric SDNode OpNode> { 39040b57cec5SDimitry Andric def v8i16 : N3VLMulOp<op24, op23, 0b00, op11_8, op4, itin16, OpcodeStr, 39050b57cec5SDimitry Andric !strconcat(Dt, "8"), v8i16, v8i8, MulOp, OpNode>; 39060b57cec5SDimitry Andric def v4i32 : N3VLMulOp<op24, op23, 0b01, op11_8, op4, itin16, OpcodeStr, 39070b57cec5SDimitry Andric !strconcat(Dt, "16"), v4i32, v4i16, MulOp, OpNode>; 39080b57cec5SDimitry Andric def v2i64 : N3VLMulOp<op24, op23, 0b10, op11_8, op4, itin32, OpcodeStr, 39090b57cec5SDimitry Andric !strconcat(Dt, "32"), v2i64, v2i32, MulOp, OpNode>; 39100b57cec5SDimitry Andric} 39110b57cec5SDimitry Andric 39120b57cec5SDimitry Andricmulticlass N3VLMulOpSL_HS<bit op24, bits<4> op11_8, string OpcodeStr, 39130b57cec5SDimitry Andric string Dt, SDNode MulOp, SDNode OpNode> { 39140b57cec5SDimitry Andric def v4i16 : N3VLMulOpSL16<op24, 0b01, op11_8, IIC_VMACi16D, OpcodeStr, 39150b57cec5SDimitry Andric !strconcat(Dt,"16"), v4i32, v4i16, MulOp, OpNode>; 39160b57cec5SDimitry Andric def v2i32 : N3VLMulOpSL<op24, 0b10, op11_8, IIC_VMACi32D, OpcodeStr, 39170b57cec5SDimitry Andric !strconcat(Dt, "32"), v2i64, v2i32, MulOp, OpNode>; 39180b57cec5SDimitry Andric} 39190b57cec5SDimitry Andric 39200b57cec5SDimitry Andric 39210b57cec5SDimitry Andric// Neon Long 3-argument intrinsics. 39220b57cec5SDimitry Andric 39230b57cec5SDimitry Andric// First with only element sizes of 16 and 32 bits: 39240b57cec5SDimitry Andricmulticlass N3VLInt3_HS<bit op24, bit op23, bits<4> op11_8, bit op4, 39250b57cec5SDimitry Andric InstrItinClass itin16, InstrItinClass itin32, 39260b57cec5SDimitry Andric string OpcodeStr, string Dt, SDPatternOperator IntOp> { 39270b57cec5SDimitry Andric def v4i32 : N3VLInt3<op24, op23, 0b01, op11_8, op4, itin16, 39280b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>; 39290b57cec5SDimitry Andric def v2i64 : N3VLInt3<op24, op23, 0b10, op11_8, op4, itin32, 39300b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; 39310b57cec5SDimitry Andric} 39320b57cec5SDimitry Andric 39330b57cec5SDimitry Andricmulticlass N3VLInt3SL_HS<bit op24, bits<4> op11_8, 39340b57cec5SDimitry Andric string OpcodeStr, string Dt, SDPatternOperator IntOp> { 39350b57cec5SDimitry Andric def v4i16 : N3VLInt3SL16<op24, 0b01, op11_8, IIC_VMACi16D, 39360b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt,"16"), v4i32, v4i16, IntOp>; 39370b57cec5SDimitry Andric def v2i32 : N3VLInt3SL<op24, 0b10, op11_8, IIC_VMACi32D, 39380b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; 39390b57cec5SDimitry Andric} 39400b57cec5SDimitry Andric 39410b57cec5SDimitry Andric// ....then also with element size of 8 bits: 39420b57cec5SDimitry Andricmulticlass N3VLInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 39430b57cec5SDimitry Andric InstrItinClass itin16, InstrItinClass itin32, 39440b57cec5SDimitry Andric string OpcodeStr, string Dt, SDPatternOperator IntOp> 39450b57cec5SDimitry Andric : N3VLInt3_HS<op24, op23, op11_8, op4, itin16, itin32, OpcodeStr, Dt, IntOp> { 39460b57cec5SDimitry Andric def v8i16 : N3VLInt3<op24, op23, 0b00, op11_8, op4, itin16, 39470b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, IntOp>; 39480b57cec5SDimitry Andric} 39490b57cec5SDimitry Andric 39500b57cec5SDimitry Andric// ....with explicit extend (VABAL). 39510b57cec5SDimitry Andricmulticlass N3VLIntExtOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, 39520b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 39530b57cec5SDimitry Andric SDPatternOperator IntOp, SDNode ExtOp, SDNode OpNode> { 39540b57cec5SDimitry Andric def v8i16 : N3VLIntExtOp<op24, op23, 0b00, op11_8, op4, itin, 39550b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, 39560b57cec5SDimitry Andric IntOp, ExtOp, OpNode>; 39570b57cec5SDimitry Andric def v4i32 : N3VLIntExtOp<op24, op23, 0b01, op11_8, op4, itin, 39580b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, 39590b57cec5SDimitry Andric IntOp, ExtOp, OpNode>; 39600b57cec5SDimitry Andric def v2i64 : N3VLIntExtOp<op24, op23, 0b10, op11_8, op4, itin, 39610b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, 39620b57cec5SDimitry Andric IntOp, ExtOp, OpNode>; 39630b57cec5SDimitry Andric} 39640b57cec5SDimitry Andric 39650b57cec5SDimitry Andric 39660b57cec5SDimitry Andric// Neon Pairwise long 2-register intrinsics, 39670b57cec5SDimitry Andric// element sizes of 8, 16 and 32 bits: 39680b57cec5SDimitry Andricmulticlass N2VPLInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, 39690b57cec5SDimitry Andric bits<5> op11_7, bit op4, 39700b57cec5SDimitry Andric string OpcodeStr, string Dt, SDPatternOperator IntOp> { 39710b57cec5SDimitry Andric // 64-bit vector types. 39720b57cec5SDimitry Andric def v8i8 : N2VDPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, 39730b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>; 39740b57cec5SDimitry Andric def v4i16 : N2VDPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, 39750b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>; 39760b57cec5SDimitry Andric def v2i32 : N2VDPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, 39770b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>; 39780b57cec5SDimitry Andric 39790b57cec5SDimitry Andric // 128-bit vector types. 39800b57cec5SDimitry Andric def v16i8 : N2VQPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, 39810b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>; 39820b57cec5SDimitry Andric def v8i16 : N2VQPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, 39830b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>; 39840b57cec5SDimitry Andric def v4i32 : N2VQPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, 39850b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>; 39860b57cec5SDimitry Andric} 39870b57cec5SDimitry Andric 39880b57cec5SDimitry Andric 39890b57cec5SDimitry Andric// Neon Pairwise long 2-register accumulate intrinsics, 39900b57cec5SDimitry Andric// element sizes of 8, 16 and 32 bits: 39910b57cec5SDimitry Andricmulticlass N2VPLInt2_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, 39920b57cec5SDimitry Andric bits<5> op11_7, bit op4, 39930b57cec5SDimitry Andric string OpcodeStr, string Dt, SDPatternOperator IntOp> { 39940b57cec5SDimitry Andric // 64-bit vector types. 39950b57cec5SDimitry Andric def v8i8 : N2VDPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4, 39960b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>; 39970b57cec5SDimitry Andric def v4i16 : N2VDPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4, 39980b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>; 39990b57cec5SDimitry Andric def v2i32 : N2VDPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4, 40000b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>; 40010b57cec5SDimitry Andric 40020b57cec5SDimitry Andric // 128-bit vector types. 40030b57cec5SDimitry Andric def v16i8 : N2VQPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4, 40040b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>; 40050b57cec5SDimitry Andric def v8i16 : N2VQPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4, 40060b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>; 40070b57cec5SDimitry Andric def v4i32 : N2VQPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4, 40080b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>; 40090b57cec5SDimitry Andric} 40100b57cec5SDimitry Andric 40110b57cec5SDimitry Andric 40120b57cec5SDimitry Andric// Neon 2-register vector shift by immediate, 40130b57cec5SDimitry Andric// with f of either N2RegVShLFrm or N2RegVShRFrm 40140b57cec5SDimitry Andric// element sizes of 8, 16, 32 and 64 bits: 40150b57cec5SDimitry Andricmulticlass N2VShL_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, 40160b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 40170b57cec5SDimitry Andric SDNode OpNode> { 40180b57cec5SDimitry Andric // 64-bit vector types. 40190b57cec5SDimitry Andric def v8i8 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm, 40200b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i8, OpNode> { 40210b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 40220b57cec5SDimitry Andric } 40230b57cec5SDimitry Andric def v4i16 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm, 40240b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i16, OpNode> { 40250b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 40260b57cec5SDimitry Andric } 40270b57cec5SDimitry Andric def v2i32 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm, 40280b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i32, OpNode> { 40290b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 40300b57cec5SDimitry Andric } 40310b57cec5SDimitry Andric def v1i64 : N2VDSh<op24, op23, op11_8, 1, op4, N2RegVShLFrm, itin, i32imm, 40320b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), v1i64, OpNode>; 40330b57cec5SDimitry Andric // imm6 = xxxxxx 40340b57cec5SDimitry Andric 40350b57cec5SDimitry Andric // 128-bit vector types. 40360b57cec5SDimitry Andric def v16i8 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm, 40370b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v16i8, OpNode> { 40380b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 40390b57cec5SDimitry Andric } 40400b57cec5SDimitry Andric def v8i16 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm, 40410b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v8i16, OpNode> { 40420b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 40430b57cec5SDimitry Andric } 40440b57cec5SDimitry Andric def v4i32 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm, 40450b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v4i32, OpNode> { 40460b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 40470b57cec5SDimitry Andric } 40480b57cec5SDimitry Andric def v2i64 : N2VQSh<op24, op23, op11_8, 1, op4, N2RegVShLFrm, itin, i32imm, 40490b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), v2i64, OpNode>; 40500b57cec5SDimitry Andric // imm6 = xxxxxx 40510b57cec5SDimitry Andric} 40520b57cec5SDimitry Andricmulticlass N2VShR_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, 40530b57cec5SDimitry Andric InstrItinClass itin, string OpcodeStr, string Dt, 40540b57cec5SDimitry Andric string baseOpc, SDNode OpNode> { 40550b57cec5SDimitry Andric // 64-bit vector types. 40560b57cec5SDimitry Andric def v8i8 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm8, 40570b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i8, OpNode> { 40580b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 40590b57cec5SDimitry Andric } 40600b57cec5SDimitry Andric def v4i16 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm16, 40610b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i16, OpNode> { 40620b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 40630b57cec5SDimitry Andric } 40640b57cec5SDimitry Andric def v2i32 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm32, 40650b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i32, OpNode> { 40660b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 40670b57cec5SDimitry Andric } 40680b57cec5SDimitry Andric def v1i64 : N2VDSh<op24, op23, op11_8, 1, op4, N2RegVShRFrm, itin, shr_imm64, 40690b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), v1i64, OpNode>; 40700b57cec5SDimitry Andric // imm6 = xxxxxx 40710b57cec5SDimitry Andric 40720b57cec5SDimitry Andric // 128-bit vector types. 40730b57cec5SDimitry Andric def v16i8 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm8, 40740b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v16i8, OpNode> { 40750b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 40760b57cec5SDimitry Andric } 40770b57cec5SDimitry Andric def v8i16 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm16, 40780b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v8i16, OpNode> { 40790b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 40800b57cec5SDimitry Andric } 40810b57cec5SDimitry Andric def v4i32 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm32, 40820b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v4i32, OpNode> { 40830b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 40840b57cec5SDimitry Andric } 40850b57cec5SDimitry Andric def v2i64 : N2VQSh<op24, op23, op11_8, 1, op4, N2RegVShRFrm, itin, shr_imm64, 40860b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), v2i64, OpNode>; 40870b57cec5SDimitry Andric // imm6 = xxxxxx 40880b57cec5SDimitry Andric} 40890b57cec5SDimitry Andric 40900b57cec5SDimitry Andric// Neon Shift-Accumulate vector operations, 40910b57cec5SDimitry Andric// element sizes of 8, 16, 32 and 64 bits: 40920b57cec5SDimitry Andricmulticlass N2VShAdd_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, 40930b57cec5SDimitry Andric string OpcodeStr, string Dt, SDNode ShOp> { 40940b57cec5SDimitry Andric // 64-bit vector types. 40950b57cec5SDimitry Andric def v8i8 : N2VDShAdd<op24, op23, op11_8, 0, op4, shr_imm8, 40960b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i8, ShOp> { 40970b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 40980b57cec5SDimitry Andric } 40990b57cec5SDimitry Andric def v4i16 : N2VDShAdd<op24, op23, op11_8, 0, op4, shr_imm16, 41000b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i16, ShOp> { 41010b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 41020b57cec5SDimitry Andric } 41030b57cec5SDimitry Andric def v2i32 : N2VDShAdd<op24, op23, op11_8, 0, op4, shr_imm32, 41040b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i32, ShOp> { 41050b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 41060b57cec5SDimitry Andric } 41070b57cec5SDimitry Andric def v1i64 : N2VDShAdd<op24, op23, op11_8, 1, op4, shr_imm64, 41080b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), v1i64, ShOp>; 41090b57cec5SDimitry Andric // imm6 = xxxxxx 41100b57cec5SDimitry Andric 41110b57cec5SDimitry Andric // 128-bit vector types. 41120b57cec5SDimitry Andric def v16i8 : N2VQShAdd<op24, op23, op11_8, 0, op4, shr_imm8, 41130b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v16i8, ShOp> { 41140b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 41150b57cec5SDimitry Andric } 41160b57cec5SDimitry Andric def v8i16 : N2VQShAdd<op24, op23, op11_8, 0, op4, shr_imm16, 41170b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v8i16, ShOp> { 41180b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 41190b57cec5SDimitry Andric } 41200b57cec5SDimitry Andric def v4i32 : N2VQShAdd<op24, op23, op11_8, 0, op4, shr_imm32, 41210b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v4i32, ShOp> { 41220b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 41230b57cec5SDimitry Andric } 41240b57cec5SDimitry Andric def v2i64 : N2VQShAdd<op24, op23, op11_8, 1, op4, shr_imm64, 41250b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), v2i64, ShOp>; 41260b57cec5SDimitry Andric // imm6 = xxxxxx 41270b57cec5SDimitry Andric} 41280b57cec5SDimitry Andric 41290b57cec5SDimitry Andric// Neon Shift-Insert vector operations, 41300b57cec5SDimitry Andric// with f of either N2RegVShLFrm or N2RegVShRFrm 41310b57cec5SDimitry Andric// element sizes of 8, 16, 32 and 64 bits: 41320b57cec5SDimitry Andricmulticlass N2VShInsL_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, 41330b57cec5SDimitry Andric string OpcodeStr> { 41340b57cec5SDimitry Andric // 64-bit vector types. 41350b57cec5SDimitry Andric def v8i8 : N2VDShIns<op24, op23, op11_8, 0, op4, i32imm, 41360b57cec5SDimitry Andric N2RegVShLFrm, OpcodeStr, "8", v8i8, NEONvsliImm> { 41370b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 41380b57cec5SDimitry Andric } 41390b57cec5SDimitry Andric def v4i16 : N2VDShIns<op24, op23, op11_8, 0, op4, i32imm, 41400b57cec5SDimitry Andric N2RegVShLFrm, OpcodeStr, "16", v4i16, NEONvsliImm> { 41410b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 41420b57cec5SDimitry Andric } 41430b57cec5SDimitry Andric def v2i32 : N2VDShIns<op24, op23, op11_8, 0, op4, i32imm, 41440b57cec5SDimitry Andric N2RegVShLFrm, OpcodeStr, "32", v2i32, NEONvsliImm> { 41450b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 41460b57cec5SDimitry Andric } 41470b57cec5SDimitry Andric def v1i64 : N2VDShIns<op24, op23, op11_8, 1, op4, i32imm, 41480b57cec5SDimitry Andric N2RegVShLFrm, OpcodeStr, "64", v1i64, NEONvsliImm>; 41490b57cec5SDimitry Andric // imm6 = xxxxxx 41500b57cec5SDimitry Andric 41510b57cec5SDimitry Andric // 128-bit vector types. 41520b57cec5SDimitry Andric def v16i8 : N2VQShIns<op24, op23, op11_8, 0, op4, i32imm, 41530b57cec5SDimitry Andric N2RegVShLFrm, OpcodeStr, "8", v16i8, NEONvsliImm> { 41540b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 41550b57cec5SDimitry Andric } 41560b57cec5SDimitry Andric def v8i16 : N2VQShIns<op24, op23, op11_8, 0, op4, i32imm, 41570b57cec5SDimitry Andric N2RegVShLFrm, OpcodeStr, "16", v8i16, NEONvsliImm> { 41580b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 41590b57cec5SDimitry Andric } 41600b57cec5SDimitry Andric def v4i32 : N2VQShIns<op24, op23, op11_8, 0, op4, i32imm, 41610b57cec5SDimitry Andric N2RegVShLFrm, OpcodeStr, "32", v4i32, NEONvsliImm> { 41620b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 41630b57cec5SDimitry Andric } 41640b57cec5SDimitry Andric def v2i64 : N2VQShIns<op24, op23, op11_8, 1, op4, i32imm, 41650b57cec5SDimitry Andric N2RegVShLFrm, OpcodeStr, "64", v2i64, NEONvsliImm>; 41660b57cec5SDimitry Andric // imm6 = xxxxxx 41670b57cec5SDimitry Andric} 41680b57cec5SDimitry Andricmulticlass N2VShInsR_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, 41690b57cec5SDimitry Andric string OpcodeStr> { 41700b57cec5SDimitry Andric // 64-bit vector types. 41710b57cec5SDimitry Andric def v8i8 : N2VDShIns<op24, op23, op11_8, 0, op4, shr_imm8, 41720b57cec5SDimitry Andric N2RegVShRFrm, OpcodeStr, "8", v8i8, NEONvsriImm> { 41730b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 41740b57cec5SDimitry Andric } 41750b57cec5SDimitry Andric def v4i16 : N2VDShIns<op24, op23, op11_8, 0, op4, shr_imm16, 41760b57cec5SDimitry Andric N2RegVShRFrm, OpcodeStr, "16", v4i16, NEONvsriImm> { 41770b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 41780b57cec5SDimitry Andric } 41790b57cec5SDimitry Andric def v2i32 : N2VDShIns<op24, op23, op11_8, 0, op4, shr_imm32, 41800b57cec5SDimitry Andric N2RegVShRFrm, OpcodeStr, "32", v2i32, NEONvsriImm> { 41810b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 41820b57cec5SDimitry Andric } 41830b57cec5SDimitry Andric def v1i64 : N2VDShIns<op24, op23, op11_8, 1, op4, shr_imm64, 41840b57cec5SDimitry Andric N2RegVShRFrm, OpcodeStr, "64", v1i64, NEONvsriImm>; 41850b57cec5SDimitry Andric // imm6 = xxxxxx 41860b57cec5SDimitry Andric 41870b57cec5SDimitry Andric // 128-bit vector types. 41880b57cec5SDimitry Andric def v16i8 : N2VQShIns<op24, op23, op11_8, 0, op4, shr_imm8, 41890b57cec5SDimitry Andric N2RegVShRFrm, OpcodeStr, "8", v16i8, NEONvsriImm> { 41900b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 41910b57cec5SDimitry Andric } 41920b57cec5SDimitry Andric def v8i16 : N2VQShIns<op24, op23, op11_8, 0, op4, shr_imm16, 41930b57cec5SDimitry Andric N2RegVShRFrm, OpcodeStr, "16", v8i16, NEONvsriImm> { 41940b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 41950b57cec5SDimitry Andric } 41960b57cec5SDimitry Andric def v4i32 : N2VQShIns<op24, op23, op11_8, 0, op4, shr_imm32, 41970b57cec5SDimitry Andric N2RegVShRFrm, OpcodeStr, "32", v4i32, NEONvsriImm> { 41980b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 41990b57cec5SDimitry Andric } 42000b57cec5SDimitry Andric def v2i64 : N2VQShIns<op24, op23, op11_8, 1, op4, shr_imm64, 42010b57cec5SDimitry Andric N2RegVShRFrm, OpcodeStr, "64", v2i64, NEONvsriImm>; 42020b57cec5SDimitry Andric // imm6 = xxxxxx 42030b57cec5SDimitry Andric} 42040b57cec5SDimitry Andric 42050b57cec5SDimitry Andric// Neon Shift Long operations, 42060b57cec5SDimitry Andric// element sizes of 8, 16, 32 bits: 42070b57cec5SDimitry Andricmulticlass N2VLSh_QHS<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, 42080b57cec5SDimitry Andric bit op4, string OpcodeStr, string Dt, 42090b57cec5SDimitry Andric SDPatternOperator OpNode> { 42100b57cec5SDimitry Andric def v8i16 : N2VLSh<op24, op23, op11_8, op7, op6, op4, 42110b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, imm1_7, OpNode> { 42120b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 42130b57cec5SDimitry Andric } 42140b57cec5SDimitry Andric def v4i32 : N2VLSh<op24, op23, op11_8, op7, op6, op4, 42150b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, imm1_15, OpNode> { 42160b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 42170b57cec5SDimitry Andric } 42180b57cec5SDimitry Andric def v2i64 : N2VLSh<op24, op23, op11_8, op7, op6, op4, 42190b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, imm1_31, OpNode> { 42200b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 42210b57cec5SDimitry Andric } 42220b57cec5SDimitry Andric} 42230b57cec5SDimitry Andric 42240b57cec5SDimitry Andric// Neon Shift Narrow operations, 42250b57cec5SDimitry Andric// element sizes of 16, 32, 64 bits: 42260b57cec5SDimitry Andricmulticlass N2VNSh_HSD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, 42270b57cec5SDimitry Andric bit op4, InstrItinClass itin, string OpcodeStr, string Dt, 42280b57cec5SDimitry Andric SDPatternOperator OpNode> { 42290b57cec5SDimitry Andric def v8i8 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, 42300b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "16"), 42310b57cec5SDimitry Andric v8i8, v8i16, shr_imm8, OpNode> { 42320b57cec5SDimitry Andric let Inst{21-19} = 0b001; // imm6 = 001xxx 42330b57cec5SDimitry Andric } 42340b57cec5SDimitry Andric def v4i16 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, 42350b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "32"), 42360b57cec5SDimitry Andric v4i16, v4i32, shr_imm16, OpNode> { 42370b57cec5SDimitry Andric let Inst{21-20} = 0b01; // imm6 = 01xxxx 42380b57cec5SDimitry Andric } 42390b57cec5SDimitry Andric def v2i32 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, 42400b57cec5SDimitry Andric OpcodeStr, !strconcat(Dt, "64"), 42410b57cec5SDimitry Andric v2i32, v2i64, shr_imm32, OpNode> { 42420b57cec5SDimitry Andric let Inst{21} = 0b1; // imm6 = 1xxxxx 42430b57cec5SDimitry Andric } 42440b57cec5SDimitry Andric} 42450b57cec5SDimitry Andric 42460b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 42470b57cec5SDimitry Andric// Instruction Definitions. 42480b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 42490b57cec5SDimitry Andric 42500b57cec5SDimitry Andric// Vector Add Operations. 42510b57cec5SDimitry Andric 42520b57cec5SDimitry Andric// VADD : Vector Add (integer and floating-point) 42530b57cec5SDimitry Andricdefm VADD : N3V_QHSD<0, 0, 0b1000, 0, IIC_VBINiD, IIC_VBINiQ, "vadd", "i", 42540b57cec5SDimitry Andric add, 1>; 42550b57cec5SDimitry Andricdef VADDfd : N3VD<0, 0, 0b00, 0b1101, 0, IIC_VBIND, "vadd", "f32", 42560b57cec5SDimitry Andric v2f32, v2f32, fadd, 1>; 42570b57cec5SDimitry Andricdef VADDfq : N3VQ<0, 0, 0b00, 0b1101, 0, IIC_VBINQ, "vadd", "f32", 42580b57cec5SDimitry Andric v4f32, v4f32, fadd, 1>; 42590b57cec5SDimitry Andricdef VADDhd : N3VD<0, 0, 0b01, 0b1101, 0, IIC_VBIND, "vadd", "f16", 42600b57cec5SDimitry Andric v4f16, v4f16, fadd, 1>, 42610b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]>; 42620b57cec5SDimitry Andricdef VADDhq : N3VQ<0, 0, 0b01, 0b1101, 0, IIC_VBINQ, "vadd", "f16", 42630b57cec5SDimitry Andric v8f16, v8f16, fadd, 1>, 42640b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]>; 42650b57cec5SDimitry Andric// VADDL : Vector Add Long (Q = D + D) 42660b57cec5SDimitry Andricdefm VADDLs : N3VLExt_QHS<0,1,0b0000,0, IIC_VSHLiD, IIC_VSHLiD, 42670b57cec5SDimitry Andric "vaddl", "s", add, sext, 1>; 42680b57cec5SDimitry Andricdefm VADDLu : N3VLExt_QHS<1,1,0b0000,0, IIC_VSHLiD, IIC_VSHLiD, 42690b57cec5SDimitry Andric "vaddl", "u", add, zext, 1>; 42700b57cec5SDimitry Andric// VADDW : Vector Add Wide (Q = Q + D) 42710b57cec5SDimitry Andricdefm VADDWs : N3VW_QHS<0,1,0b0001,0, "vaddw", "s", add, sext, 0>; 42720b57cec5SDimitry Andricdefm VADDWu : N3VW_QHS<1,1,0b0001,0, "vaddw", "u", add, zext, 0>; 42730b57cec5SDimitry Andric// VHADD : Vector Halving Add 42740b57cec5SDimitry Andricdefm VHADDs : N3VInt_QHS<0, 0, 0b0000, 0, N3RegFrm, 42750b57cec5SDimitry Andric IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, 42760b57cec5SDimitry Andric "vhadd", "s", int_arm_neon_vhadds, 1>; 42770b57cec5SDimitry Andricdefm VHADDu : N3VInt_QHS<1, 0, 0b0000, 0, N3RegFrm, 42780b57cec5SDimitry Andric IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, 42790b57cec5SDimitry Andric "vhadd", "u", int_arm_neon_vhaddu, 1>; 42800b57cec5SDimitry Andric// VRHADD : Vector Rounding Halving Add 42810b57cec5SDimitry Andricdefm VRHADDs : N3VInt_QHS<0, 0, 0b0001, 0, N3RegFrm, 42820b57cec5SDimitry Andric IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, 42830b57cec5SDimitry Andric "vrhadd", "s", int_arm_neon_vrhadds, 1>; 42840b57cec5SDimitry Andricdefm VRHADDu : N3VInt_QHS<1, 0, 0b0001, 0, N3RegFrm, 42850b57cec5SDimitry Andric IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, 42860b57cec5SDimitry Andric "vrhadd", "u", int_arm_neon_vrhaddu, 1>; 42870b57cec5SDimitry Andric// VQADD : Vector Saturating Add 42880b57cec5SDimitry Andricdefm VQADDs : N3VInt_QHSD<0, 0, 0b0000, 1, N3RegFrm, 42890b57cec5SDimitry Andric IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, 4290*480093f4SDimitry Andric "vqadd", "s", saddsat, 1>; 42910b57cec5SDimitry Andricdefm VQADDu : N3VInt_QHSD<1, 0, 0b0000, 1, N3RegFrm, 42920b57cec5SDimitry Andric IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, 4293*480093f4SDimitry Andric "vqadd", "u", uaddsat, 1>; 42940b57cec5SDimitry Andric// VADDHN : Vector Add and Narrow Returning High Half (D = Q + Q) 42950b57cec5SDimitry Andricdefm VADDHN : N3VNInt_HSD<0,1,0b0100,0, "vaddhn", "i", null_frag, 1>; 42960b57cec5SDimitry Andric// VRADDHN : Vector Rounding Add and Narrow Returning High Half (D = Q + Q) 42970b57cec5SDimitry Andricdefm VRADDHN : N3VNInt_HSD<1,1,0b0100,0, "vraddhn", "i", 42980b57cec5SDimitry Andric int_arm_neon_vraddhn, 1>; 42990b57cec5SDimitry Andric 43000b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 43010b57cec5SDimitry Andricdef : Pat<(v8i8 (trunc (ARMvshruImm (add (v8i16 QPR:$Vn), QPR:$Vm), 8))), 43020b57cec5SDimitry Andric (VADDHNv8i8 QPR:$Vn, QPR:$Vm)>; 43030b57cec5SDimitry Andricdef : Pat<(v4i16 (trunc (ARMvshruImm (add (v4i32 QPR:$Vn), QPR:$Vm), 16))), 43040b57cec5SDimitry Andric (VADDHNv4i16 QPR:$Vn, QPR:$Vm)>; 43050b57cec5SDimitry Andricdef : Pat<(v2i32 (trunc (ARMvshruImm (add (v2i64 QPR:$Vn), QPR:$Vm), 32))), 43060b57cec5SDimitry Andric (VADDHNv2i32 QPR:$Vn, QPR:$Vm)>; 43070b57cec5SDimitry Andric} 43080b57cec5SDimitry Andric 43090b57cec5SDimitry Andric// Vector Multiply Operations. 43100b57cec5SDimitry Andric 43110b57cec5SDimitry Andric// VMUL : Vector Multiply (integer, polynomial and floating-point) 43120b57cec5SDimitry Andricdefm VMUL : N3V_QHS<0, 0, 0b1001, 1, IIC_VMULi16D, IIC_VMULi32D, 43130b57cec5SDimitry Andric IIC_VMULi16Q, IIC_VMULi32Q, "vmul", "i", mul, 1>; 43140b57cec5SDimitry Andricdef VMULpd : N3VDInt<1, 0, 0b00, 0b1001, 1, N3RegFrm, IIC_VMULi16D, "vmul", 43150b57cec5SDimitry Andric "p8", v8i8, v8i8, int_arm_neon_vmulp, 1>; 43160b57cec5SDimitry Andricdef VMULpq : N3VQInt<1, 0, 0b00, 0b1001, 1, N3RegFrm, IIC_VMULi16Q, "vmul", 43170b57cec5SDimitry Andric "p8", v16i8, v16i8, int_arm_neon_vmulp, 1>; 43180b57cec5SDimitry Andricdef VMULfd : N3VD<1, 0, 0b00, 0b1101, 1, IIC_VFMULD, "vmul", "f32", 43190b57cec5SDimitry Andric v2f32, v2f32, fmul, 1>; 43200b57cec5SDimitry Andricdef VMULfq : N3VQ<1, 0, 0b00, 0b1101, 1, IIC_VFMULQ, "vmul", "f32", 43210b57cec5SDimitry Andric v4f32, v4f32, fmul, 1>; 43220b57cec5SDimitry Andricdef VMULhd : N3VD<1, 0, 0b01, 0b1101, 1, IIC_VFMULD, "vmul", "f16", 43230b57cec5SDimitry Andric v4f16, v4f16, fmul, 1>, 43240b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]>; 43250b57cec5SDimitry Andricdef VMULhq : N3VQ<1, 0, 0b01, 0b1101, 1, IIC_VFMULQ, "vmul", "f16", 43260b57cec5SDimitry Andric v8f16, v8f16, fmul, 1>, 43270b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]>; 43280b57cec5SDimitry Andricdefm VMULsl : N3VSL_HS<0b1000, "vmul", mul>; 43290b57cec5SDimitry Andricdef VMULslfd : N3VDSL<0b10, 0b1001, IIC_VBIND, "vmul", "f32", v2f32, fmul>; 43300b57cec5SDimitry Andricdef VMULslfq : N3VQSL<0b10, 0b1001, IIC_VBINQ, "vmul", "f32", v4f32, 43310b57cec5SDimitry Andric v2f32, fmul>; 43320b57cec5SDimitry Andricdef VMULslhd : N3VDSL16<0b01, 0b1001, "vmul", "f16", v4f16, fmul>, 43330b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]>; 43340b57cec5SDimitry Andricdef VMULslhq : N3VQSL16<0b01, 0b1001, "vmul", "f16", v8f16, 43350b57cec5SDimitry Andric v4f16, fmul>, 43360b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]>; 43370b57cec5SDimitry Andric 43380b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 43390b57cec5SDimitry Andricdef : Pat<(v8i16 (mul (v8i16 QPR:$src1), 43400b57cec5SDimitry Andric (v8i16 (ARMvduplane (v8i16 QPR:$src2), imm:$lane)))), 43410b57cec5SDimitry Andric (v8i16 (VMULslv8i16 (v8i16 QPR:$src1), 43420b57cec5SDimitry Andric (v4i16 (EXTRACT_SUBREG QPR:$src2, 43430b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 43440b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane)))>; 43450b57cec5SDimitry Andricdef : Pat<(v4i32 (mul (v4i32 QPR:$src1), 43460b57cec5SDimitry Andric (v4i32 (ARMvduplane (v4i32 QPR:$src2), imm:$lane)))), 43470b57cec5SDimitry Andric (v4i32 (VMULslv4i32 (v4i32 QPR:$src1), 43480b57cec5SDimitry Andric (v2i32 (EXTRACT_SUBREG QPR:$src2, 43490b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 43500b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>; 43510b57cec5SDimitry Andricdef : Pat<(v4f32 (fmul (v4f32 QPR:$src1), 43520b57cec5SDimitry Andric (v4f32 (ARMvduplane (v4f32 QPR:$src2), imm:$lane)))), 43530b57cec5SDimitry Andric (v4f32 (VMULslfq (v4f32 QPR:$src1), 43540b57cec5SDimitry Andric (v2f32 (EXTRACT_SUBREG QPR:$src2, 43550b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 43560b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>; 43570b57cec5SDimitry Andricdef : Pat<(v8f16 (fmul (v8f16 QPR:$src1), 43580b57cec5SDimitry Andric (v8f16 (ARMvduplane (v8f16 QPR:$src2), imm:$lane)))), 43590b57cec5SDimitry Andric (v8f16 (VMULslhq(v8f16 QPR:$src1), 43600b57cec5SDimitry Andric (v4f16 (EXTRACT_SUBREG QPR:$src2, 43610b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 43620b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane)))>; 43630b57cec5SDimitry Andric 43640b57cec5SDimitry Andricdef : Pat<(v2f32 (fmul DPR:$Rn, (ARMvdup (f32 SPR:$Rm)))), 43650b57cec5SDimitry Andric (VMULslfd DPR:$Rn, 43660b57cec5SDimitry Andric (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$Rm, ssub_0), 43670b57cec5SDimitry Andric (i32 0))>; 43680b57cec5SDimitry Andricdef : Pat<(v4f16 (fmul DPR:$Rn, (ARMvdup (f16 HPR:$Rm)))), 43690b57cec5SDimitry Andric (VMULslhd DPR:$Rn, 43700b57cec5SDimitry Andric (INSERT_SUBREG (v4f16 (IMPLICIT_DEF)), HPR:$Rm, ssub_0), 43710b57cec5SDimitry Andric (i32 0))>; 43720b57cec5SDimitry Andricdef : Pat<(v4f32 (fmul QPR:$Rn, (ARMvdup (f32 SPR:$Rm)))), 43730b57cec5SDimitry Andric (VMULslfq QPR:$Rn, 43740b57cec5SDimitry Andric (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$Rm, ssub_0), 43750b57cec5SDimitry Andric (i32 0))>; 43760b57cec5SDimitry Andricdef : Pat<(v8f16 (fmul QPR:$Rn, (ARMvdup (f16 HPR:$Rm)))), 43770b57cec5SDimitry Andric (VMULslhq QPR:$Rn, 43780b57cec5SDimitry Andric (INSERT_SUBREG (v4f16 (IMPLICIT_DEF)), HPR:$Rm, ssub_0), 43790b57cec5SDimitry Andric (i32 0))>; 43800b57cec5SDimitry Andric} 43810b57cec5SDimitry Andric 43820b57cec5SDimitry Andric// VQDMULH : Vector Saturating Doubling Multiply Returning High Half 43830b57cec5SDimitry Andricdefm VQDMULH : N3VInt_HS<0, 0, 0b1011, 0, N3RegFrm, IIC_VMULi16D, IIC_VMULi32D, 43840b57cec5SDimitry Andric IIC_VMULi16Q, IIC_VMULi32Q, 43850b57cec5SDimitry Andric "vqdmulh", "s", int_arm_neon_vqdmulh, 1>; 43860b57cec5SDimitry Andricdefm VQDMULHsl: N3VIntSL_HS<0b1100, IIC_VMULi16D, IIC_VMULi32D, 43870b57cec5SDimitry Andric IIC_VMULi16Q, IIC_VMULi32Q, 43880b57cec5SDimitry Andric "vqdmulh", "s", int_arm_neon_vqdmulh>; 43890b57cec5SDimitry Andric 43900b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 43910b57cec5SDimitry Andricdef : Pat<(v8i16 (int_arm_neon_vqdmulh (v8i16 QPR:$src1), 43920b57cec5SDimitry Andric (v8i16 (ARMvduplane (v8i16 QPR:$src2), 43930b57cec5SDimitry Andric imm:$lane)))), 43940b57cec5SDimitry Andric (v8i16 (VQDMULHslv8i16 (v8i16 QPR:$src1), 43950b57cec5SDimitry Andric (v4i16 (EXTRACT_SUBREG QPR:$src2, 43960b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 43970b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane)))>; 43980b57cec5SDimitry Andricdef : Pat<(v4i32 (int_arm_neon_vqdmulh (v4i32 QPR:$src1), 43990b57cec5SDimitry Andric (v4i32 (ARMvduplane (v4i32 QPR:$src2), 44000b57cec5SDimitry Andric imm:$lane)))), 44010b57cec5SDimitry Andric (v4i32 (VQDMULHslv4i32 (v4i32 QPR:$src1), 44020b57cec5SDimitry Andric (v2i32 (EXTRACT_SUBREG QPR:$src2, 44030b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 44040b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>; 44050b57cec5SDimitry Andric} 44060b57cec5SDimitry Andric 44070b57cec5SDimitry Andric// VQRDMULH : Vector Rounding Saturating Doubling Multiply Returning High Half 44080b57cec5SDimitry Andricdefm VQRDMULH : N3VInt_HS<1, 0, 0b1011, 0, N3RegFrm, 44090b57cec5SDimitry Andric IIC_VMULi16D,IIC_VMULi32D,IIC_VMULi16Q,IIC_VMULi32Q, 44100b57cec5SDimitry Andric "vqrdmulh", "s", int_arm_neon_vqrdmulh, 1>; 44110b57cec5SDimitry Andricdefm VQRDMULHsl : N3VIntSL_HS<0b1101, IIC_VMULi16D, IIC_VMULi32D, 44120b57cec5SDimitry Andric IIC_VMULi16Q, IIC_VMULi32Q, 44130b57cec5SDimitry Andric "vqrdmulh", "s", int_arm_neon_vqrdmulh>; 44140b57cec5SDimitry Andric 44150b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 44160b57cec5SDimitry Andricdef : Pat<(v8i16 (int_arm_neon_vqrdmulh (v8i16 QPR:$src1), 44170b57cec5SDimitry Andric (v8i16 (ARMvduplane (v8i16 QPR:$src2), 44180b57cec5SDimitry Andric imm:$lane)))), 44190b57cec5SDimitry Andric (v8i16 (VQRDMULHslv8i16 (v8i16 QPR:$src1), 44200b57cec5SDimitry Andric (v4i16 (EXTRACT_SUBREG QPR:$src2, 44210b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 44220b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane)))>; 44230b57cec5SDimitry Andricdef : Pat<(v4i32 (int_arm_neon_vqrdmulh (v4i32 QPR:$src1), 44240b57cec5SDimitry Andric (v4i32 (ARMvduplane (v4i32 QPR:$src2), 44250b57cec5SDimitry Andric imm:$lane)))), 44260b57cec5SDimitry Andric (v4i32 (VQRDMULHslv4i32 (v4i32 QPR:$src1), 44270b57cec5SDimitry Andric (v2i32 (EXTRACT_SUBREG QPR:$src2, 44280b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 44290b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>; 44300b57cec5SDimitry Andric} 44310b57cec5SDimitry Andric 44320b57cec5SDimitry Andric// VMULL : Vector Multiply Long (integer and polynomial) (Q = D * D) 44330b57cec5SDimitry Andriclet PostEncoderMethod = "NEONThumb2DataIPostEncoder", 44340b57cec5SDimitry Andric DecoderNamespace = "NEONData" in { 44350b57cec5SDimitry Andric defm VMULLs : N3VL_QHS<0,1,0b1100,0, IIC_VMULi16D, IIC_VMULi32D, 44360b57cec5SDimitry Andric "vmull", "s", NEONvmulls, 1>; 44370b57cec5SDimitry Andric defm VMULLu : N3VL_QHS<1,1,0b1100,0, IIC_VMULi16D, IIC_VMULi32D, 44380b57cec5SDimitry Andric "vmull", "u", NEONvmullu, 1>; 44390b57cec5SDimitry Andric def VMULLp8 : N3VLInt<0, 1, 0b00, 0b1110, 0, IIC_VMULi16D, "vmull", "p8", 44400b57cec5SDimitry Andric v8i16, v8i8, int_arm_neon_vmullp, 1>; 44410b57cec5SDimitry Andric def VMULLp64 : N3VLIntnp<0b00101, 0b10, 0b1110, 0, 0, NoItinerary, 44420b57cec5SDimitry Andric "vmull", "p64", v2i64, v1i64, int_arm_neon_vmullp, 1>, 44430b57cec5SDimitry Andric Requires<[HasV8, HasCrypto]>; 44440b57cec5SDimitry Andric} 44450b57cec5SDimitry Andricdefm VMULLsls : N3VLSL_HS<0, 0b1010, IIC_VMULi16D, "vmull", "s", NEONvmulls>; 44460b57cec5SDimitry Andricdefm VMULLslu : N3VLSL_HS<1, 0b1010, IIC_VMULi16D, "vmull", "u", NEONvmullu>; 44470b57cec5SDimitry Andric 44480b57cec5SDimitry Andric// VQDMULL : Vector Saturating Doubling Multiply Long (Q = D * D) 44490b57cec5SDimitry Andricdefm VQDMULL : N3VLInt_HS<0,1,0b1101,0, IIC_VMULi16D, IIC_VMULi32D, 44500b57cec5SDimitry Andric "vqdmull", "s", int_arm_neon_vqdmull, 1>; 44510b57cec5SDimitry Andricdefm VQDMULLsl: N3VLIntSL_HS<0, 0b1011, IIC_VMULi16D, 44520b57cec5SDimitry Andric "vqdmull", "s", int_arm_neon_vqdmull>; 44530b57cec5SDimitry Andric 44540b57cec5SDimitry Andric// Vector Multiply-Accumulate and Multiply-Subtract Operations. 44550b57cec5SDimitry Andric 44560b57cec5SDimitry Andric// VMLA : Vector Multiply Accumulate (integer and floating-point) 44570b57cec5SDimitry Andricdefm VMLA : N3VMulOp_QHS<0, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D, 44580b57cec5SDimitry Andric IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>; 44590b57cec5SDimitry Andricdef VMLAfd : N3VDMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACD, "vmla", "f32", 44600b57cec5SDimitry Andric v2f32, fmul_su, fadd_mlx>, 44610b57cec5SDimitry Andric Requires<[HasNEON, UseFPVMLx]>; 44620b57cec5SDimitry Andricdef VMLAfq : N3VQMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACQ, "vmla", "f32", 44630b57cec5SDimitry Andric v4f32, fmul_su, fadd_mlx>, 44640b57cec5SDimitry Andric Requires<[HasNEON, UseFPVMLx]>; 44650b57cec5SDimitry Andricdef VMLAhd : N3VDMulOp<0, 0, 0b01, 0b1101, 1, IIC_VMACD, "vmla", "f16", 44660b57cec5SDimitry Andric v4f16, fmul_su, fadd_mlx>, 44670b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16, UseFPVMLx]>; 44680b57cec5SDimitry Andricdef VMLAhq : N3VQMulOp<0, 0, 0b01, 0b1101, 1, IIC_VMACQ, "vmla", "f16", 44690b57cec5SDimitry Andric v8f16, fmul_su, fadd_mlx>, 44700b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16, UseFPVMLx]>; 44710b57cec5SDimitry Andricdefm VMLAsl : N3VMulOpSL_HS<0b0000, IIC_VMACi16D, IIC_VMACi32D, 44720b57cec5SDimitry Andric IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>; 44730b57cec5SDimitry Andricdef VMLAslfd : N3VDMulOpSL<0b10, 0b0001, IIC_VMACD, "vmla", "f32", 44740b57cec5SDimitry Andric v2f32, fmul_su, fadd_mlx>, 44750b57cec5SDimitry Andric Requires<[HasNEON, UseFPVMLx]>; 44760b57cec5SDimitry Andricdef VMLAslfq : N3VQMulOpSL<0b10, 0b0001, IIC_VMACQ, "vmla", "f32", 44770b57cec5SDimitry Andric v4f32, v2f32, fmul_su, fadd_mlx>, 44780b57cec5SDimitry Andric Requires<[HasNEON, UseFPVMLx]>; 44790b57cec5SDimitry Andricdef VMLAslhd : N3VDMulOpSL16<0b01, 0b0001, IIC_VMACD, "vmla", "f16", 44800b57cec5SDimitry Andric v4f16, fmul, fadd>, 44810b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16, UseFPVMLx]>; 44820b57cec5SDimitry Andricdef VMLAslhq : N3VQMulOpSL16<0b01, 0b0001, IIC_VMACQ, "vmla", "f16", 44830b57cec5SDimitry Andric v8f16, v4f16, fmul, fadd>, 44840b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16, UseFPVMLx]>; 44850b57cec5SDimitry Andric 44860b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 44870b57cec5SDimitry Andricdef : Pat<(v8i16 (add (v8i16 QPR:$src1), 44880b57cec5SDimitry Andric (mul (v8i16 QPR:$src2), 44890b57cec5SDimitry Andric (v8i16 (ARMvduplane (v8i16 QPR:$src3), imm:$lane))))), 44900b57cec5SDimitry Andric (v8i16 (VMLAslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2), 44910b57cec5SDimitry Andric (v4i16 (EXTRACT_SUBREG QPR:$src3, 44920b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 44930b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane)))>; 44940b57cec5SDimitry Andric 44950b57cec5SDimitry Andricdef : Pat<(v4i32 (add (v4i32 QPR:$src1), 44960b57cec5SDimitry Andric (mul (v4i32 QPR:$src2), 44970b57cec5SDimitry Andric (v4i32 (ARMvduplane (v4i32 QPR:$src3), imm:$lane))))), 44980b57cec5SDimitry Andric (v4i32 (VMLAslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2), 44990b57cec5SDimitry Andric (v2i32 (EXTRACT_SUBREG QPR:$src3, 45000b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 45010b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>; 45020b57cec5SDimitry Andric} 45030b57cec5SDimitry Andric 45040b57cec5SDimitry Andricdef : Pat<(v4f32 (fadd_mlx (v4f32 QPR:$src1), 45050b57cec5SDimitry Andric (fmul_su (v4f32 QPR:$src2), 45060b57cec5SDimitry Andric (v4f32 (ARMvduplane (v4f32 QPR:$src3), imm:$lane))))), 45070b57cec5SDimitry Andric (v4f32 (VMLAslfq (v4f32 QPR:$src1), 45080b57cec5SDimitry Andric (v4f32 QPR:$src2), 45090b57cec5SDimitry Andric (v2f32 (EXTRACT_SUBREG QPR:$src3, 45100b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 45110b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>, 45120b57cec5SDimitry Andric Requires<[HasNEON, UseFPVMLx]>; 45130b57cec5SDimitry Andric 45140b57cec5SDimitry Andric// VMLAL : Vector Multiply Accumulate Long (Q += D * D) 45150b57cec5SDimitry Andricdefm VMLALs : N3VLMulOp_QHS<0,1,0b1000,0, IIC_VMACi16D, IIC_VMACi32D, 45160b57cec5SDimitry Andric "vmlal", "s", NEONvmulls, add>; 45170b57cec5SDimitry Andricdefm VMLALu : N3VLMulOp_QHS<1,1,0b1000,0, IIC_VMACi16D, IIC_VMACi32D, 45180b57cec5SDimitry Andric "vmlal", "u", NEONvmullu, add>; 45190b57cec5SDimitry Andric 45200b57cec5SDimitry Andricdefm VMLALsls : N3VLMulOpSL_HS<0, 0b0010, "vmlal", "s", NEONvmulls, add>; 45210b57cec5SDimitry Andricdefm VMLALslu : N3VLMulOpSL_HS<1, 0b0010, "vmlal", "u", NEONvmullu, add>; 45220b57cec5SDimitry Andric 45230b57cec5SDimitry Andriclet Predicates = [HasNEON, HasV8_1a] in { 45240b57cec5SDimitry Andric // v8.1a Neon Rounding Double Multiply-Op vector operations, 45250b57cec5SDimitry Andric // VQRDMLAH : Vector Saturating Rounding Doubling Multiply Accumulate Long 45260b57cec5SDimitry Andric // (Q += D * D) 45270b57cec5SDimitry Andric defm VQRDMLAH : N3VInt3_HS<1, 0, 0b1011, 1, IIC_VMACi16D, IIC_VMACi32D, 45280b57cec5SDimitry Andric IIC_VMACi16Q, IIC_VMACi32Q, "vqrdmlah", "s", 45290b57cec5SDimitry Andric null_frag>; 4530*480093f4SDimitry Andric def : Pat<(v4i16 (saddsat 45310b57cec5SDimitry Andric (v4i16 DPR:$src1), 45320b57cec5SDimitry Andric (v4i16 (int_arm_neon_vqrdmulh (v4i16 DPR:$Vn), 45330b57cec5SDimitry Andric (v4i16 DPR:$Vm))))), 45340b57cec5SDimitry Andric (v4i16 (VQRDMLAHv4i16 DPR:$src1, DPR:$Vn, DPR:$Vm))>; 4535*480093f4SDimitry Andric def : Pat<(v2i32 (saddsat 45360b57cec5SDimitry Andric (v2i32 DPR:$src1), 45370b57cec5SDimitry Andric (v2i32 (int_arm_neon_vqrdmulh (v2i32 DPR:$Vn), 45380b57cec5SDimitry Andric (v2i32 DPR:$Vm))))), 45390b57cec5SDimitry Andric (v2i32 (VQRDMLAHv2i32 DPR:$src1, DPR:$Vn, DPR:$Vm))>; 4540*480093f4SDimitry Andric def : Pat<(v8i16 (saddsat 45410b57cec5SDimitry Andric (v8i16 QPR:$src1), 45420b57cec5SDimitry Andric (v8i16 (int_arm_neon_vqrdmulh (v8i16 QPR:$Vn), 45430b57cec5SDimitry Andric (v8i16 QPR:$Vm))))), 45440b57cec5SDimitry Andric (v8i16 (VQRDMLAHv8i16 QPR:$src1, QPR:$Vn, QPR:$Vm))>; 4545*480093f4SDimitry Andric def : Pat<(v4i32 (saddsat 45460b57cec5SDimitry Andric (v4i32 QPR:$src1), 45470b57cec5SDimitry Andric (v4i32 (int_arm_neon_vqrdmulh (v4i32 QPR:$Vn), 45480b57cec5SDimitry Andric (v4i32 QPR:$Vm))))), 45490b57cec5SDimitry Andric (v4i32 (VQRDMLAHv4i32 QPR:$src1, QPR:$Vn, QPR:$Vm))>; 45500b57cec5SDimitry Andric 45510b57cec5SDimitry Andric defm VQRDMLAHsl : N3VMulOpSL_HS<0b1110, IIC_VMACi16D, IIC_VMACi32D, 45520b57cec5SDimitry Andric IIC_VMACi16Q, IIC_VMACi32Q, "vqrdmlah", "s", 45530b57cec5SDimitry Andric null_frag>; 4554*480093f4SDimitry Andric def : Pat<(v4i16 (saddsat 45550b57cec5SDimitry Andric (v4i16 DPR:$src1), 45560b57cec5SDimitry Andric (v4i16 (int_arm_neon_vqrdmulh 45570b57cec5SDimitry Andric (v4i16 DPR:$Vn), 45580b57cec5SDimitry Andric (v4i16 (ARMvduplane (v4i16 DPR_8:$Vm), 45590b57cec5SDimitry Andric imm:$lane)))))), 45600b57cec5SDimitry Andric (v4i16 (VQRDMLAHslv4i16 DPR:$src1, DPR:$Vn, DPR_8:$Vm, 45610b57cec5SDimitry Andric imm:$lane))>; 4562*480093f4SDimitry Andric def : Pat<(v2i32 (saddsat 45630b57cec5SDimitry Andric (v2i32 DPR:$src1), 45640b57cec5SDimitry Andric (v2i32 (int_arm_neon_vqrdmulh 45650b57cec5SDimitry Andric (v2i32 DPR:$Vn), 45660b57cec5SDimitry Andric (v2i32 (ARMvduplane (v2i32 DPR_VFP2:$Vm), 45670b57cec5SDimitry Andric imm:$lane)))))), 45680b57cec5SDimitry Andric (v2i32 (VQRDMLAHslv2i32 DPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, 45690b57cec5SDimitry Andric imm:$lane))>; 4570*480093f4SDimitry Andric def : Pat<(v8i16 (saddsat 45710b57cec5SDimitry Andric (v8i16 QPR:$src1), 45720b57cec5SDimitry Andric (v8i16 (int_arm_neon_vqrdmulh 45730b57cec5SDimitry Andric (v8i16 QPR:$src2), 45740b57cec5SDimitry Andric (v8i16 (ARMvduplane (v8i16 QPR:$src3), 45750b57cec5SDimitry Andric imm:$lane)))))), 45760b57cec5SDimitry Andric (v8i16 (VQRDMLAHslv8i16 (v8i16 QPR:$src1), 45770b57cec5SDimitry Andric (v8i16 QPR:$src2), 45780b57cec5SDimitry Andric (v4i16 (EXTRACT_SUBREG 45790b57cec5SDimitry Andric QPR:$src3, 45800b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 45810b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane)))>; 4582*480093f4SDimitry Andric def : Pat<(v4i32 (saddsat 45830b57cec5SDimitry Andric (v4i32 QPR:$src1), 45840b57cec5SDimitry Andric (v4i32 (int_arm_neon_vqrdmulh 45850b57cec5SDimitry Andric (v4i32 QPR:$src2), 45860b57cec5SDimitry Andric (v4i32 (ARMvduplane (v4i32 QPR:$src3), 45870b57cec5SDimitry Andric imm:$lane)))))), 45880b57cec5SDimitry Andric (v4i32 (VQRDMLAHslv4i32 (v4i32 QPR:$src1), 45890b57cec5SDimitry Andric (v4i32 QPR:$src2), 45900b57cec5SDimitry Andric (v2i32 (EXTRACT_SUBREG 45910b57cec5SDimitry Andric QPR:$src3, 45920b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 45930b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>; 45940b57cec5SDimitry Andric 45950b57cec5SDimitry Andric // VQRDMLSH : Vector Saturating Rounding Doubling Multiply Subtract Long 45960b57cec5SDimitry Andric // (Q -= D * D) 45970b57cec5SDimitry Andric defm VQRDMLSH : N3VInt3_HS<1, 0, 0b1100, 1, IIC_VMACi16D, IIC_VMACi32D, 45980b57cec5SDimitry Andric IIC_VMACi16Q, IIC_VMACi32Q, "vqrdmlsh", "s", 45990b57cec5SDimitry Andric null_frag>; 4600*480093f4SDimitry Andric def : Pat<(v4i16 (ssubsat 46010b57cec5SDimitry Andric (v4i16 DPR:$src1), 46020b57cec5SDimitry Andric (v4i16 (int_arm_neon_vqrdmulh (v4i16 DPR:$Vn), 46030b57cec5SDimitry Andric (v4i16 DPR:$Vm))))), 46040b57cec5SDimitry Andric (v4i16 (VQRDMLSHv4i16 DPR:$src1, DPR:$Vn, DPR:$Vm))>; 4605*480093f4SDimitry Andric def : Pat<(v2i32 (ssubsat 46060b57cec5SDimitry Andric (v2i32 DPR:$src1), 46070b57cec5SDimitry Andric (v2i32 (int_arm_neon_vqrdmulh (v2i32 DPR:$Vn), 46080b57cec5SDimitry Andric (v2i32 DPR:$Vm))))), 46090b57cec5SDimitry Andric (v2i32 (VQRDMLSHv2i32 DPR:$src1, DPR:$Vn, DPR:$Vm))>; 4610*480093f4SDimitry Andric def : Pat<(v8i16 (ssubsat 46110b57cec5SDimitry Andric (v8i16 QPR:$src1), 46120b57cec5SDimitry Andric (v8i16 (int_arm_neon_vqrdmulh (v8i16 QPR:$Vn), 46130b57cec5SDimitry Andric (v8i16 QPR:$Vm))))), 46140b57cec5SDimitry Andric (v8i16 (VQRDMLSHv8i16 QPR:$src1, QPR:$Vn, QPR:$Vm))>; 4615*480093f4SDimitry Andric def : Pat<(v4i32 (ssubsat 46160b57cec5SDimitry Andric (v4i32 QPR:$src1), 46170b57cec5SDimitry Andric (v4i32 (int_arm_neon_vqrdmulh (v4i32 QPR:$Vn), 46180b57cec5SDimitry Andric (v4i32 QPR:$Vm))))), 46190b57cec5SDimitry Andric (v4i32 (VQRDMLSHv4i32 QPR:$src1, QPR:$Vn, QPR:$Vm))>; 46200b57cec5SDimitry Andric 46210b57cec5SDimitry Andric defm VQRDMLSHsl : N3VMulOpSL_HS<0b1111, IIC_VMACi16D, IIC_VMACi32D, 46220b57cec5SDimitry Andric IIC_VMACi16Q, IIC_VMACi32Q, "vqrdmlsh", "s", 46230b57cec5SDimitry Andric null_frag>; 4624*480093f4SDimitry Andric def : Pat<(v4i16 (ssubsat 46250b57cec5SDimitry Andric (v4i16 DPR:$src1), 46260b57cec5SDimitry Andric (v4i16 (int_arm_neon_vqrdmulh 46270b57cec5SDimitry Andric (v4i16 DPR:$Vn), 46280b57cec5SDimitry Andric (v4i16 (ARMvduplane (v4i16 DPR_8:$Vm), 46290b57cec5SDimitry Andric imm:$lane)))))), 46300b57cec5SDimitry Andric (v4i16 (VQRDMLSHslv4i16 DPR:$src1, DPR:$Vn, DPR_8:$Vm, imm:$lane))>; 4631*480093f4SDimitry Andric def : Pat<(v2i32 (ssubsat 46320b57cec5SDimitry Andric (v2i32 DPR:$src1), 46330b57cec5SDimitry Andric (v2i32 (int_arm_neon_vqrdmulh 46340b57cec5SDimitry Andric (v2i32 DPR:$Vn), 46350b57cec5SDimitry Andric (v2i32 (ARMvduplane (v2i32 DPR_VFP2:$Vm), 46360b57cec5SDimitry Andric imm:$lane)))))), 46370b57cec5SDimitry Andric (v2i32 (VQRDMLSHslv2i32 DPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, 46380b57cec5SDimitry Andric imm:$lane))>; 4639*480093f4SDimitry Andric def : Pat<(v8i16 (ssubsat 46400b57cec5SDimitry Andric (v8i16 QPR:$src1), 46410b57cec5SDimitry Andric (v8i16 (int_arm_neon_vqrdmulh 46420b57cec5SDimitry Andric (v8i16 QPR:$src2), 46430b57cec5SDimitry Andric (v8i16 (ARMvduplane (v8i16 QPR:$src3), 46440b57cec5SDimitry Andric imm:$lane)))))), 46450b57cec5SDimitry Andric (v8i16 (VQRDMLSHslv8i16 (v8i16 QPR:$src1), 46460b57cec5SDimitry Andric (v8i16 QPR:$src2), 46470b57cec5SDimitry Andric (v4i16 (EXTRACT_SUBREG 46480b57cec5SDimitry Andric QPR:$src3, 46490b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 46500b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane)))>; 4651*480093f4SDimitry Andric def : Pat<(v4i32 (ssubsat 46520b57cec5SDimitry Andric (v4i32 QPR:$src1), 46530b57cec5SDimitry Andric (v4i32 (int_arm_neon_vqrdmulh 46540b57cec5SDimitry Andric (v4i32 QPR:$src2), 46550b57cec5SDimitry Andric (v4i32 (ARMvduplane (v4i32 QPR:$src3), 46560b57cec5SDimitry Andric imm:$lane)))))), 46570b57cec5SDimitry Andric (v4i32 (VQRDMLSHslv4i32 (v4i32 QPR:$src1), 46580b57cec5SDimitry Andric (v4i32 QPR:$src2), 46590b57cec5SDimitry Andric (v2i32 (EXTRACT_SUBREG 46600b57cec5SDimitry Andric QPR:$src3, 46610b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 46620b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>; 46630b57cec5SDimitry Andric} 46640b57cec5SDimitry Andric// VQDMLAL : Vector Saturating Doubling Multiply Accumulate Long (Q += D * D) 46650b57cec5SDimitry Andricdefm VQDMLAL : N3VLInt3_HS<0, 1, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D, 46660b57cec5SDimitry Andric "vqdmlal", "s", null_frag>; 46670b57cec5SDimitry Andricdefm VQDMLALsl: N3VLInt3SL_HS<0, 0b0011, "vqdmlal", "s", null_frag>; 46680b57cec5SDimitry Andric 46690b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 4670*480093f4SDimitry Andricdef : Pat<(v4i32 (saddsat (v4i32 QPR:$src1), 46710b57cec5SDimitry Andric (v4i32 (int_arm_neon_vqdmull (v4i16 DPR:$Vn), 46720b57cec5SDimitry Andric (v4i16 DPR:$Vm))))), 46730b57cec5SDimitry Andric (VQDMLALv4i32 QPR:$src1, DPR:$Vn, DPR:$Vm)>; 4674*480093f4SDimitry Andricdef : Pat<(v2i64 (saddsat (v2i64 QPR:$src1), 46750b57cec5SDimitry Andric (v2i64 (int_arm_neon_vqdmull (v2i32 DPR:$Vn), 46760b57cec5SDimitry Andric (v2i32 DPR:$Vm))))), 46770b57cec5SDimitry Andric (VQDMLALv2i64 QPR:$src1, DPR:$Vn, DPR:$Vm)>; 4678*480093f4SDimitry Andricdef : Pat<(v4i32 (saddsat (v4i32 QPR:$src1), 46790b57cec5SDimitry Andric (v4i32 (int_arm_neon_vqdmull (v4i16 DPR:$Vn), 46800b57cec5SDimitry Andric (v4i16 (ARMvduplane (v4i16 DPR_8:$Vm), 46810b57cec5SDimitry Andric imm:$lane)))))), 46820b57cec5SDimitry Andric (VQDMLALslv4i16 QPR:$src1, DPR:$Vn, DPR_8:$Vm, imm:$lane)>; 4683*480093f4SDimitry Andricdef : Pat<(v2i64 (saddsat (v2i64 QPR:$src1), 46840b57cec5SDimitry Andric (v2i64 (int_arm_neon_vqdmull (v2i32 DPR:$Vn), 46850b57cec5SDimitry Andric (v2i32 (ARMvduplane (v2i32 DPR_VFP2:$Vm), 46860b57cec5SDimitry Andric imm:$lane)))))), 46870b57cec5SDimitry Andric (VQDMLALslv2i32 QPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, imm:$lane)>; 46880b57cec5SDimitry Andric} 46890b57cec5SDimitry Andric 46900b57cec5SDimitry Andric// VMLS : Vector Multiply Subtract (integer and floating-point) 46910b57cec5SDimitry Andricdefm VMLS : N3VMulOp_QHS<1, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D, 46920b57cec5SDimitry Andric IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>; 46930b57cec5SDimitry Andricdef VMLSfd : N3VDMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACD, "vmls", "f32", 46940b57cec5SDimitry Andric v2f32, fmul_su, fsub_mlx>, 46950b57cec5SDimitry Andric Requires<[HasNEON, UseFPVMLx]>; 46960b57cec5SDimitry Andricdef VMLSfq : N3VQMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACQ, "vmls", "f32", 46970b57cec5SDimitry Andric v4f32, fmul_su, fsub_mlx>, 46980b57cec5SDimitry Andric Requires<[HasNEON, UseFPVMLx]>; 46990b57cec5SDimitry Andricdef VMLShd : N3VDMulOp<0, 0, 0b11, 0b1101, 1, IIC_VMACD, "vmls", "f16", 47000b57cec5SDimitry Andric v4f16, fmul, fsub>, 47010b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16, UseFPVMLx]>; 47020b57cec5SDimitry Andricdef VMLShq : N3VQMulOp<0, 0, 0b11, 0b1101, 1, IIC_VMACQ, "vmls", "f16", 47030b57cec5SDimitry Andric v8f16, fmul, fsub>, 47040b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16, UseFPVMLx]>; 47050b57cec5SDimitry Andricdefm VMLSsl : N3VMulOpSL_HS<0b0100, IIC_VMACi16D, IIC_VMACi32D, 47060b57cec5SDimitry Andric IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>; 47070b57cec5SDimitry Andricdef VMLSslfd : N3VDMulOpSL<0b10, 0b0101, IIC_VMACD, "vmls", "f32", 47080b57cec5SDimitry Andric v2f32, fmul_su, fsub_mlx>, 47090b57cec5SDimitry Andric Requires<[HasNEON, UseFPVMLx]>; 47100b57cec5SDimitry Andricdef VMLSslfq : N3VQMulOpSL<0b10, 0b0101, IIC_VMACQ, "vmls", "f32", 47110b57cec5SDimitry Andric v4f32, v2f32, fmul_su, fsub_mlx>, 47120b57cec5SDimitry Andric Requires<[HasNEON, UseFPVMLx]>; 47130b57cec5SDimitry Andricdef VMLSslhd : N3VDMulOpSL16<0b01, 0b0101, IIC_VMACD, "vmls", "f16", 47140b57cec5SDimitry Andric v4f16, fmul, fsub>, 47150b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16, UseFPVMLx]>; 47160b57cec5SDimitry Andricdef VMLSslhq : N3VQMulOpSL16<0b01, 0b0101, IIC_VMACQ, "vmls", "f16", 47170b57cec5SDimitry Andric v8f16, v4f16, fmul, fsub>, 47180b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16, UseFPVMLx]>; 47190b57cec5SDimitry Andric 47200b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 47210b57cec5SDimitry Andricdef : Pat<(v8i16 (sub (v8i16 QPR:$src1), 47220b57cec5SDimitry Andric (mul (v8i16 QPR:$src2), 47230b57cec5SDimitry Andric (v8i16 (ARMvduplane (v8i16 QPR:$src3), imm:$lane))))), 47240b57cec5SDimitry Andric (v8i16 (VMLSslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2), 47250b57cec5SDimitry Andric (v4i16 (EXTRACT_SUBREG QPR:$src3, 47260b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 47270b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane)))>; 47280b57cec5SDimitry Andric 47290b57cec5SDimitry Andricdef : Pat<(v4i32 (sub (v4i32 QPR:$src1), 47300b57cec5SDimitry Andric (mul (v4i32 QPR:$src2), 47310b57cec5SDimitry Andric (v4i32 (ARMvduplane (v4i32 QPR:$src3), imm:$lane))))), 47320b57cec5SDimitry Andric (v4i32 (VMLSslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2), 47330b57cec5SDimitry Andric (v2i32 (EXTRACT_SUBREG QPR:$src3, 47340b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 47350b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>; 47360b57cec5SDimitry Andric} 47370b57cec5SDimitry Andric 47380b57cec5SDimitry Andricdef : Pat<(v4f32 (fsub_mlx (v4f32 QPR:$src1), 47390b57cec5SDimitry Andric (fmul_su (v4f32 QPR:$src2), 47400b57cec5SDimitry Andric (v4f32 (ARMvduplane (v4f32 QPR:$src3), imm:$lane))))), 47410b57cec5SDimitry Andric (v4f32 (VMLSslfq (v4f32 QPR:$src1), (v4f32 QPR:$src2), 47420b57cec5SDimitry Andric (v2f32 (EXTRACT_SUBREG QPR:$src3, 47430b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 47440b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>, 47450b57cec5SDimitry Andric Requires<[HasNEON, UseFPVMLx]>; 47460b57cec5SDimitry Andric 47470b57cec5SDimitry Andric// VMLSL : Vector Multiply Subtract Long (Q -= D * D) 47480b57cec5SDimitry Andricdefm VMLSLs : N3VLMulOp_QHS<0,1,0b1010,0, IIC_VMACi16D, IIC_VMACi32D, 47490b57cec5SDimitry Andric "vmlsl", "s", NEONvmulls, sub>; 47500b57cec5SDimitry Andricdefm VMLSLu : N3VLMulOp_QHS<1,1,0b1010,0, IIC_VMACi16D, IIC_VMACi32D, 47510b57cec5SDimitry Andric "vmlsl", "u", NEONvmullu, sub>; 47520b57cec5SDimitry Andric 47530b57cec5SDimitry Andricdefm VMLSLsls : N3VLMulOpSL_HS<0, 0b0110, "vmlsl", "s", NEONvmulls, sub>; 47540b57cec5SDimitry Andricdefm VMLSLslu : N3VLMulOpSL_HS<1, 0b0110, "vmlsl", "u", NEONvmullu, sub>; 47550b57cec5SDimitry Andric 47560b57cec5SDimitry Andric// VQDMLSL : Vector Saturating Doubling Multiply Subtract Long (Q -= D * D) 47570b57cec5SDimitry Andricdefm VQDMLSL : N3VLInt3_HS<0, 1, 0b1011, 0, IIC_VMACi16D, IIC_VMACi32D, 47580b57cec5SDimitry Andric "vqdmlsl", "s", null_frag>; 47590b57cec5SDimitry Andricdefm VQDMLSLsl: N3VLInt3SL_HS<0, 0b0111, "vqdmlsl", "s", null_frag>; 47600b57cec5SDimitry Andric 47610b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 4762*480093f4SDimitry Andricdef : Pat<(v4i32 (ssubsat (v4i32 QPR:$src1), 47630b57cec5SDimitry Andric (v4i32 (int_arm_neon_vqdmull (v4i16 DPR:$Vn), 47640b57cec5SDimitry Andric (v4i16 DPR:$Vm))))), 47650b57cec5SDimitry Andric (VQDMLSLv4i32 QPR:$src1, DPR:$Vn, DPR:$Vm)>; 4766*480093f4SDimitry Andricdef : Pat<(v2i64 (ssubsat (v2i64 QPR:$src1), 47670b57cec5SDimitry Andric (v2i64 (int_arm_neon_vqdmull (v2i32 DPR:$Vn), 47680b57cec5SDimitry Andric (v2i32 DPR:$Vm))))), 47690b57cec5SDimitry Andric (VQDMLSLv2i64 QPR:$src1, DPR:$Vn, DPR:$Vm)>; 4770*480093f4SDimitry Andricdef : Pat<(v4i32 (ssubsat (v4i32 QPR:$src1), 47710b57cec5SDimitry Andric (v4i32 (int_arm_neon_vqdmull (v4i16 DPR:$Vn), 47720b57cec5SDimitry Andric (v4i16 (ARMvduplane (v4i16 DPR_8:$Vm), 47730b57cec5SDimitry Andric imm:$lane)))))), 47740b57cec5SDimitry Andric (VQDMLSLslv4i16 QPR:$src1, DPR:$Vn, DPR_8:$Vm, imm:$lane)>; 4775*480093f4SDimitry Andricdef : Pat<(v2i64 (ssubsat (v2i64 QPR:$src1), 47760b57cec5SDimitry Andric (v2i64 (int_arm_neon_vqdmull (v2i32 DPR:$Vn), 47770b57cec5SDimitry Andric (v2i32 (ARMvduplane (v2i32 DPR_VFP2:$Vm), 47780b57cec5SDimitry Andric imm:$lane)))))), 47790b57cec5SDimitry Andric (VQDMLSLslv2i32 QPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, imm:$lane)>; 47800b57cec5SDimitry Andric} 47810b57cec5SDimitry Andric 47820b57cec5SDimitry Andric// Fused Vector Multiply-Accumulate and Fused Multiply-Subtract Operations. 47830b57cec5SDimitry Andricdef VFMAfd : N3VDMulOp<0, 0, 0b00, 0b1100, 1, IIC_VFMACD, "vfma", "f32", 47840b57cec5SDimitry Andric v2f32, fmul_su, fadd_mlx>, 47850b57cec5SDimitry Andric Requires<[HasNEON,HasVFP4,UseFusedMAC]>; 47860b57cec5SDimitry Andric 47870b57cec5SDimitry Andricdef VFMAfq : N3VQMulOp<0, 0, 0b00, 0b1100, 1, IIC_VFMACQ, "vfma", "f32", 47880b57cec5SDimitry Andric v4f32, fmul_su, fadd_mlx>, 47890b57cec5SDimitry Andric Requires<[HasNEON,HasVFP4,UseFusedMAC]>; 47900b57cec5SDimitry Andricdef VFMAhd : N3VDMulOp<0, 0, 0b01, 0b1100, 1, IIC_VFMACD, "vfma", "f16", 47910b57cec5SDimitry Andric v4f16, fmul, fadd>, 47920b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16,UseFusedMAC]>; 47930b57cec5SDimitry Andric 47940b57cec5SDimitry Andricdef VFMAhq : N3VQMulOp<0, 0, 0b01, 0b1100, 1, IIC_VFMACQ, "vfma", "f16", 47950b57cec5SDimitry Andric v8f16, fmul, fadd>, 47960b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16,UseFusedMAC]>; 47970b57cec5SDimitry Andric 47980b57cec5SDimitry Andric// Fused Vector Multiply Subtract (floating-point) 47990b57cec5SDimitry Andricdef VFMSfd : N3VDMulOp<0, 0, 0b10, 0b1100, 1, IIC_VFMACD, "vfms", "f32", 48000b57cec5SDimitry Andric v2f32, fmul_su, fsub_mlx>, 48010b57cec5SDimitry Andric Requires<[HasNEON,HasVFP4,UseFusedMAC]>; 48020b57cec5SDimitry Andricdef VFMSfq : N3VQMulOp<0, 0, 0b10, 0b1100, 1, IIC_VFMACQ, "vfms", "f32", 48030b57cec5SDimitry Andric v4f32, fmul_su, fsub_mlx>, 48040b57cec5SDimitry Andric Requires<[HasNEON,HasVFP4,UseFusedMAC]>; 48050b57cec5SDimitry Andricdef VFMShd : N3VDMulOp<0, 0, 0b11, 0b1100, 1, IIC_VFMACD, "vfms", "f16", 48060b57cec5SDimitry Andric v4f16, fmul, fsub>, 48070b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16,UseFusedMAC]>; 48080b57cec5SDimitry Andricdef VFMShq : N3VQMulOp<0, 0, 0b11, 0b1100, 1, IIC_VFMACQ, "vfms", "f16", 48090b57cec5SDimitry Andric v8f16, fmul, fsub>, 48100b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16,UseFusedMAC]>; 48110b57cec5SDimitry Andric 48120b57cec5SDimitry Andric// Match @llvm.fma.* intrinsics 48130b57cec5SDimitry Andricdef : Pat<(v4f16 (fma DPR:$Vn, DPR:$Vm, DPR:$src1)), 48140b57cec5SDimitry Andric (VFMAhd DPR:$src1, DPR:$Vn, DPR:$Vm)>, 48150b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]>; 48160b57cec5SDimitry Andricdef : Pat<(v8f16 (fma QPR:$Vn, QPR:$Vm, QPR:$src1)), 48170b57cec5SDimitry Andric (VFMAhq QPR:$src1, QPR:$Vn, QPR:$Vm)>, 48180b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]>; 48190b57cec5SDimitry Andricdef : Pat<(v2f32 (fma DPR:$Vn, DPR:$Vm, DPR:$src1)), 48200b57cec5SDimitry Andric (VFMAfd DPR:$src1, DPR:$Vn, DPR:$Vm)>, 48210b57cec5SDimitry Andric Requires<[HasNEON,HasVFP4]>; 48220b57cec5SDimitry Andricdef : Pat<(v4f32 (fma QPR:$Vn, QPR:$Vm, QPR:$src1)), 48230b57cec5SDimitry Andric (VFMAfq QPR:$src1, QPR:$Vn, QPR:$Vm)>, 48240b57cec5SDimitry Andric Requires<[HasNEON,HasVFP4]>; 48250b57cec5SDimitry Andricdef : Pat<(v2f32 (fma (fneg DPR:$Vn), DPR:$Vm, DPR:$src1)), 48260b57cec5SDimitry Andric (VFMSfd DPR:$src1, DPR:$Vn, DPR:$Vm)>, 48270b57cec5SDimitry Andric Requires<[HasNEON,HasVFP4]>; 48280b57cec5SDimitry Andricdef : Pat<(v4f32 (fma (fneg QPR:$Vn), QPR:$Vm, QPR:$src1)), 48290b57cec5SDimitry Andric (VFMSfq QPR:$src1, QPR:$Vn, QPR:$Vm)>, 48300b57cec5SDimitry Andric Requires<[HasNEON,HasVFP4]>; 48310b57cec5SDimitry Andric 48320b57cec5SDimitry Andric// ARMv8.2a dot product instructions. 48330b57cec5SDimitry Andric// We put them in the VFPV8 decoder namespace because the ARM and Thumb 48340b57cec5SDimitry Andric// encodings are the same and thus no further bit twiddling is necessary 48350b57cec5SDimitry Andric// in the disassembler. 48360b57cec5SDimitry Andricclass VDOT<bit op6, bit op4, RegisterClass RegTy, string Asm, string AsmTy, 48370b57cec5SDimitry Andric ValueType AccumTy, ValueType InputTy, 48380b57cec5SDimitry Andric SDPatternOperator OpNode> : 48390b57cec5SDimitry Andric N3Vnp<0b11000, 0b10, 0b1101, op6, op4, (outs RegTy:$dst), 48400b57cec5SDimitry Andric (ins RegTy:$Vd, RegTy:$Vn, RegTy:$Vm), N3RegFrm, IIC_VDOTPROD, 48410b57cec5SDimitry Andric Asm, AsmTy, 48420b57cec5SDimitry Andric [(set (AccumTy RegTy:$dst), 48430b57cec5SDimitry Andric (OpNode (AccumTy RegTy:$Vd), 48440b57cec5SDimitry Andric (InputTy RegTy:$Vn), 48450b57cec5SDimitry Andric (InputTy RegTy:$Vm)))]> { 48460b57cec5SDimitry Andric let Predicates = [HasDotProd]; 48470b57cec5SDimitry Andric let DecoderNamespace = "VFPV8"; 48480b57cec5SDimitry Andric let Constraints = "$dst = $Vd"; 48490b57cec5SDimitry Andric} 48500b57cec5SDimitry Andric 48510b57cec5SDimitry Andricdef VUDOTD : VDOT<0, 1, DPR, "vudot", "u8", v2i32, v8i8, int_arm_neon_udot>; 48520b57cec5SDimitry Andricdef VSDOTD : VDOT<0, 0, DPR, "vsdot", "s8", v2i32, v8i8, int_arm_neon_sdot>; 48530b57cec5SDimitry Andricdef VUDOTQ : VDOT<1, 1, QPR, "vudot", "u8", v4i32, v16i8, int_arm_neon_udot>; 48540b57cec5SDimitry Andricdef VSDOTQ : VDOT<1, 0, QPR, "vsdot", "s8", v4i32, v16i8, int_arm_neon_sdot>; 48550b57cec5SDimitry Andric 48560b57cec5SDimitry Andric// Indexed dot product instructions: 48570b57cec5SDimitry Andricmulticlass DOTI<string opc, string dt, bit Q, bit U, RegisterClass Ty, 48580b57cec5SDimitry Andric ValueType AccumType, ValueType InputType, SDPatternOperator OpNode, 48590b57cec5SDimitry Andric dag RHS> { 48600b57cec5SDimitry Andric def "" : N3Vnp<0b11100, 0b10, 0b1101, Q, U, (outs Ty:$dst), 48610b57cec5SDimitry Andric (ins Ty:$Vd, Ty:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane), 48620b57cec5SDimitry Andric N3RegFrm, IIC_VDOTPROD, opc, dt, []> { 48630b57cec5SDimitry Andric bit lane; 48640b57cec5SDimitry Andric let Inst{5} = lane; 48650b57cec5SDimitry Andric let AsmString = !strconcat(opc, ".", dt, "\t$Vd, $Vn, $Vm$lane"); 48660b57cec5SDimitry Andric let Constraints = "$dst = $Vd"; 48670b57cec5SDimitry Andric let Predicates = [HasDotProd]; 48680b57cec5SDimitry Andric let DecoderNamespace = "VFPV8"; 48690b57cec5SDimitry Andric } 48700b57cec5SDimitry Andric 48710b57cec5SDimitry Andric def : Pat< 48720b57cec5SDimitry Andric (AccumType (OpNode (AccumType Ty:$Vd), 48730b57cec5SDimitry Andric (InputType Ty:$Vn), 48740b57cec5SDimitry Andric (InputType (bitconvert (AccumType 48750b57cec5SDimitry Andric (ARMvduplane (AccumType Ty:$Vm), 48760b57cec5SDimitry Andric VectorIndex32:$lane)))))), 48770b57cec5SDimitry Andric (!cast<Instruction>(NAME) Ty:$Vd, Ty:$Vn, RHS, VectorIndex32:$lane)>; 48780b57cec5SDimitry Andric} 48790b57cec5SDimitry Andric 48800b57cec5SDimitry Andricdefm VUDOTDI : DOTI<"vudot", "u8", 0b0, 0b1, DPR, v2i32, v8i8, 48810b57cec5SDimitry Andric int_arm_neon_udot, (v2i32 DPR_VFP2:$Vm)>; 48820b57cec5SDimitry Andricdefm VSDOTDI : DOTI<"vsdot", "s8", 0b0, 0b0, DPR, v2i32, v8i8, 48830b57cec5SDimitry Andric int_arm_neon_sdot, (v2i32 DPR_VFP2:$Vm)>; 48840b57cec5SDimitry Andricdefm VUDOTQI : DOTI<"vudot", "u8", 0b1, 0b1, QPR, v4i32, v16i8, 48850b57cec5SDimitry Andric int_arm_neon_udot, (EXTRACT_SUBREG QPR:$Vm, dsub_0)>; 48860b57cec5SDimitry Andricdefm VSDOTQI : DOTI<"vsdot", "s8", 0b1, 0b0, QPR, v4i32, v16i8, 48870b57cec5SDimitry Andric int_arm_neon_sdot, (EXTRACT_SUBREG QPR:$Vm, dsub_0)>; 48880b57cec5SDimitry Andric 48890b57cec5SDimitry Andric 48900b57cec5SDimitry Andric// ARMv8.3 complex operations 48910b57cec5SDimitry Andricclass BaseN3VCP8ComplexTied<bit op21, bit op4, bit s, bit q, 48920b57cec5SDimitry Andric InstrItinClass itin, dag oops, dag iops, 48930b57cec5SDimitry Andric string opc, string dt, list<dag> pattern> 48940b57cec5SDimitry Andric : N3VCP8<{?,?}, {op21,s}, q, op4, oops, 48950b57cec5SDimitry Andric iops, itin, opc, dt, "$Vd, $Vn, $Vm, $rot", "$src1 = $Vd", pattern>{ 48960b57cec5SDimitry Andric bits<2> rot; 48970b57cec5SDimitry Andric let Inst{24-23} = rot; 48980b57cec5SDimitry Andric} 48990b57cec5SDimitry Andric 49000b57cec5SDimitry Andricclass BaseN3VCP8ComplexOdd<bit op23, bit op21, bit op4, bit s, bit q, 49010b57cec5SDimitry Andric InstrItinClass itin, dag oops, dag iops, string opc, 49020b57cec5SDimitry Andric string dt, list<dag> pattern> 49030b57cec5SDimitry Andric : N3VCP8<{?,op23}, {op21,s}, q, op4, oops, 49040b57cec5SDimitry Andric iops, itin, opc, dt, "$Vd, $Vn, $Vm, $rot", "", pattern> { 49050b57cec5SDimitry Andric bits<1> rot; 49060b57cec5SDimitry Andric let Inst{24} = rot; 49070b57cec5SDimitry Andric} 49080b57cec5SDimitry Andric 49090b57cec5SDimitry Andricclass BaseN3VCP8ComplexTiedLane32<bit op4, bit s, bit q, InstrItinClass itin, 49100b57cec5SDimitry Andric dag oops, dag iops, string opc, string dt, 49110b57cec5SDimitry Andric list<dag> pattern> 49120b57cec5SDimitry Andric : N3VLaneCP8<s, {?,?}, q, op4, oops, iops, itin, opc, dt, 49130b57cec5SDimitry Andric "$Vd, $Vn, $Vm$lane, $rot", "$src1 = $Vd", pattern> { 49140b57cec5SDimitry Andric bits<2> rot; 49150b57cec5SDimitry Andric bit lane; 49160b57cec5SDimitry Andric 49170b57cec5SDimitry Andric let Inst{21-20} = rot; 49180b57cec5SDimitry Andric let Inst{5} = lane; 49190b57cec5SDimitry Andric} 49200b57cec5SDimitry Andric 49210b57cec5SDimitry Andricclass BaseN3VCP8ComplexTiedLane64<bit op4, bit s, bit q, InstrItinClass itin, 49220b57cec5SDimitry Andric dag oops, dag iops, string opc, string dt, 49230b57cec5SDimitry Andric list<dag> pattern> 49240b57cec5SDimitry Andric : N3VLaneCP8<s, {?,?}, q, op4, oops, iops, itin, opc, dt, 49250b57cec5SDimitry Andric "$Vd, $Vn, $Vm$lane, $rot", "$src1 = $Vd", pattern> { 49260b57cec5SDimitry Andric bits<2> rot; 49270b57cec5SDimitry Andric bit lane; 49280b57cec5SDimitry Andric 49290b57cec5SDimitry Andric let Inst{21-20} = rot; 49300b57cec5SDimitry Andric let Inst{5} = Vm{4}; 49310b57cec5SDimitry Andric // This is needed because the lane operand does not have any bits in the 49320b57cec5SDimitry Andric // encoding (it only has one possible value), so we need to manually set it 49330b57cec5SDimitry Andric // to it's default value. 49340b57cec5SDimitry Andric let DecoderMethod = "DecodeNEONComplexLane64Instruction"; 49350b57cec5SDimitry Andric} 49360b57cec5SDimitry Andric 49370b57cec5SDimitry Andricmulticlass N3VCP8ComplexTied<bit op21, bit op4, 49380b57cec5SDimitry Andric string OpcodeStr, SDPatternOperator Op> { 49390b57cec5SDimitry Andric let Predicates = [HasNEON,HasV8_3a,HasFullFP16] in { 49400b57cec5SDimitry Andric def v4f16 : BaseN3VCP8ComplexTied<op21, op4, 0, 0, IIC_VMACD, (outs DPR:$Vd), 49410b57cec5SDimitry Andric (ins DPR:$src1, DPR:$Vn, DPR:$Vm, complexrotateop:$rot), 49420b57cec5SDimitry Andric OpcodeStr, "f16", []>; 49430b57cec5SDimitry Andric def v8f16 : BaseN3VCP8ComplexTied<op21, op4, 0, 1, IIC_VMACQ, (outs QPR:$Vd), 49440b57cec5SDimitry Andric (ins QPR:$src1, QPR:$Vn, QPR:$Vm, complexrotateop:$rot), 49450b57cec5SDimitry Andric OpcodeStr, "f16", []>; 49460b57cec5SDimitry Andric } 49470b57cec5SDimitry Andric let Predicates = [HasNEON,HasV8_3a] in { 49480b57cec5SDimitry Andric def v2f32 : BaseN3VCP8ComplexTied<op21, op4, 1, 0, IIC_VMACD, (outs DPR:$Vd), 49490b57cec5SDimitry Andric (ins DPR:$src1, DPR:$Vn, DPR:$Vm, complexrotateop:$rot), 49500b57cec5SDimitry Andric OpcodeStr, "f32", []>; 49510b57cec5SDimitry Andric def v4f32 : BaseN3VCP8ComplexTied<op21, op4, 1, 1, IIC_VMACQ, (outs QPR:$Vd), 49520b57cec5SDimitry Andric (ins QPR:$src1, QPR:$Vn, QPR:$Vm, complexrotateop:$rot), 49530b57cec5SDimitry Andric OpcodeStr, "f32", []>; 49540b57cec5SDimitry Andric } 49550b57cec5SDimitry Andric} 49560b57cec5SDimitry Andric 49570b57cec5SDimitry Andricmulticlass N3VCP8ComplexOdd<bit op23, bit op21, bit op4, 49580b57cec5SDimitry Andric string OpcodeStr, SDPatternOperator Op> { 49590b57cec5SDimitry Andric let Predicates = [HasNEON,HasV8_3a,HasFullFP16] in { 49600b57cec5SDimitry Andric def v4f16 : BaseN3VCP8ComplexOdd<op23, op21, op4, 0, 0, IIC_VMACD, 49610b57cec5SDimitry Andric (outs DPR:$Vd), 49620b57cec5SDimitry Andric (ins DPR:$Vn, DPR:$Vm, complexrotateopodd:$rot), 49630b57cec5SDimitry Andric OpcodeStr, "f16", []>; 49640b57cec5SDimitry Andric def v8f16 : BaseN3VCP8ComplexOdd<op23, op21, op4, 0, 1, IIC_VMACQ, 49650b57cec5SDimitry Andric (outs QPR:$Vd), 49660b57cec5SDimitry Andric (ins QPR:$Vn, QPR:$Vm, complexrotateopodd:$rot), 49670b57cec5SDimitry Andric OpcodeStr, "f16", []>; 49680b57cec5SDimitry Andric } 49690b57cec5SDimitry Andric let Predicates = [HasNEON,HasV8_3a] in { 49700b57cec5SDimitry Andric def v2f32 : BaseN3VCP8ComplexOdd<op23, op21, op4, 1, 0, IIC_VMACD, 49710b57cec5SDimitry Andric (outs DPR:$Vd), 49720b57cec5SDimitry Andric (ins DPR:$Vn, DPR:$Vm, complexrotateopodd:$rot), 49730b57cec5SDimitry Andric OpcodeStr, "f32", []>; 49740b57cec5SDimitry Andric def v4f32 : BaseN3VCP8ComplexOdd<op23, op21, op4, 1, 1, IIC_VMACQ, 49750b57cec5SDimitry Andric (outs QPR:$Vd), 49760b57cec5SDimitry Andric (ins QPR:$Vn, QPR:$Vm, complexrotateopodd:$rot), 49770b57cec5SDimitry Andric OpcodeStr, "f32", []>; 49780b57cec5SDimitry Andric } 49790b57cec5SDimitry Andric} 49800b57cec5SDimitry Andric 49810b57cec5SDimitry Andric// These instructions index by pairs of lanes, so the VectorIndexes are twice 49820b57cec5SDimitry Andric// as wide as the data types. 49830b57cec5SDimitry Andricmulticlass N3VCP8ComplexTiedLane<bit op4, string OpcodeStr, 49840b57cec5SDimitry Andric SDPatternOperator Op> { 49850b57cec5SDimitry Andric let Predicates = [HasNEON,HasV8_3a,HasFullFP16] in { 49860b57cec5SDimitry Andric def v4f16_indexed : BaseN3VCP8ComplexTiedLane32<op4, 0, 0, IIC_VMACD, 49870b57cec5SDimitry Andric (outs DPR:$Vd), 49880b57cec5SDimitry Andric (ins DPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, 49890b57cec5SDimitry Andric VectorIndex32:$lane, complexrotateop:$rot), 49900b57cec5SDimitry Andric OpcodeStr, "f16", []>; 49910b57cec5SDimitry Andric def v8f16_indexed : BaseN3VCP8ComplexTiedLane32<op4, 0, 1, IIC_VMACQ, 49920b57cec5SDimitry Andric (outs QPR:$Vd), 49930b57cec5SDimitry Andric (ins QPR:$src1, QPR:$Vn, DPR_VFP2:$Vm, 49940b57cec5SDimitry Andric VectorIndex32:$lane, complexrotateop:$rot), 49950b57cec5SDimitry Andric OpcodeStr, "f16", []>; 49960b57cec5SDimitry Andric } 49970b57cec5SDimitry Andric let Predicates = [HasNEON,HasV8_3a] in { 49980b57cec5SDimitry Andric def v2f32_indexed : BaseN3VCP8ComplexTiedLane64<op4, 1, 0, IIC_VMACD, 49990b57cec5SDimitry Andric (outs DPR:$Vd), 50000b57cec5SDimitry Andric (ins DPR:$src1, DPR:$Vn, DPR:$Vm, VectorIndex64:$lane, 50010b57cec5SDimitry Andric complexrotateop:$rot), 50020b57cec5SDimitry Andric OpcodeStr, "f32", []>; 50030b57cec5SDimitry Andric def v4f32_indexed : BaseN3VCP8ComplexTiedLane64<op4, 1, 1, IIC_VMACQ, 50040b57cec5SDimitry Andric (outs QPR:$Vd), 50050b57cec5SDimitry Andric (ins QPR:$src1, QPR:$Vn, DPR:$Vm, VectorIndex64:$lane, 50060b57cec5SDimitry Andric complexrotateop:$rot), 50070b57cec5SDimitry Andric OpcodeStr, "f32", []>; 50080b57cec5SDimitry Andric } 50090b57cec5SDimitry Andric} 50100b57cec5SDimitry Andric 50110b57cec5SDimitry Andricdefm VCMLA : N3VCP8ComplexTied<1, 0, "vcmla", null_frag>; 50120b57cec5SDimitry Andricdefm VCADD : N3VCP8ComplexOdd<1, 0, 0, "vcadd", null_frag>; 50130b57cec5SDimitry Andricdefm VCMLA : N3VCP8ComplexTiedLane<0, "vcmla", null_frag>; 50140b57cec5SDimitry Andric 5015*480093f4SDimitry Andriclet Predicates = [HasNEON,HasV8_3a,HasFullFP16] in { 5016*480093f4SDimitry Andric def : Pat<(v4f16 (int_arm_neon_vcadd_rot90 (v4f16 DPR:$Rn), (v4f16 DPR:$Rm))), 5017*480093f4SDimitry Andric (VCADDv4f16 (v4f16 DPR:$Rn), (v4f16 DPR:$Rm), (i32 0))>; 5018*480093f4SDimitry Andric def : Pat<(v4f16 (int_arm_neon_vcadd_rot270 (v4f16 DPR:$Rn), (v4f16 DPR:$Rm))), 5019*480093f4SDimitry Andric (VCADDv4f16 (v4f16 DPR:$Rn), (v4f16 DPR:$Rm), (i32 1))>; 5020*480093f4SDimitry Andric def : Pat<(v8f16 (int_arm_neon_vcadd_rot90 (v8f16 QPR:$Rn), (v8f16 QPR:$Rm))), 5021*480093f4SDimitry Andric (VCADDv8f16 (v8f16 QPR:$Rn), (v8f16 QPR:$Rm), (i32 0))>; 5022*480093f4SDimitry Andric def : Pat<(v8f16 (int_arm_neon_vcadd_rot270 (v8f16 QPR:$Rn), (v8f16 QPR:$Rm))), 5023*480093f4SDimitry Andric (VCADDv8f16 (v8f16 QPR:$Rn), (v8f16 QPR:$Rm), (i32 1))>; 5024*480093f4SDimitry Andric} 5025*480093f4SDimitry Andriclet Predicates = [HasNEON,HasV8_3a] in { 5026*480093f4SDimitry Andric def : Pat<(v2f32 (int_arm_neon_vcadd_rot90 (v2f32 DPR:$Rn), (v2f32 DPR:$Rm))), 5027*480093f4SDimitry Andric (VCADDv2f32 (v2f32 DPR:$Rn), (v2f32 DPR:$Rm), (i32 0))>; 5028*480093f4SDimitry Andric def : Pat<(v2f32 (int_arm_neon_vcadd_rot270 (v2f32 DPR:$Rn), (v2f32 DPR:$Rm))), 5029*480093f4SDimitry Andric (VCADDv2f32 (v2f32 DPR:$Rn), (v2f32 DPR:$Rm), (i32 1))>; 5030*480093f4SDimitry Andric def : Pat<(v4f32 (int_arm_neon_vcadd_rot90 (v4f32 QPR:$Rn), (v4f32 QPR:$Rm))), 5031*480093f4SDimitry Andric (VCADDv4f32 (v4f32 QPR:$Rn), (v4f32 QPR:$Rm), (i32 0))>; 5032*480093f4SDimitry Andric def : Pat<(v4f32 (int_arm_neon_vcadd_rot270 (v4f32 QPR:$Rn), (v4f32 QPR:$Rm))), 5033*480093f4SDimitry Andric (VCADDv4f32 (v4f32 QPR:$Rn), (v4f32 QPR:$Rm), (i32 1))>; 5034*480093f4SDimitry Andric} 5035*480093f4SDimitry Andric 50360b57cec5SDimitry Andric// Vector Subtract Operations. 50370b57cec5SDimitry Andric 50380b57cec5SDimitry Andric// VSUB : Vector Subtract (integer and floating-point) 50390b57cec5SDimitry Andricdefm VSUB : N3V_QHSD<1, 0, 0b1000, 0, IIC_VSUBiD, IIC_VSUBiQ, 50400b57cec5SDimitry Andric "vsub", "i", sub, 0>; 50410b57cec5SDimitry Andricdef VSUBfd : N3VD<0, 0, 0b10, 0b1101, 0, IIC_VBIND, "vsub", "f32", 50420b57cec5SDimitry Andric v2f32, v2f32, fsub, 0>; 50430b57cec5SDimitry Andricdef VSUBfq : N3VQ<0, 0, 0b10, 0b1101, 0, IIC_VBINQ, "vsub", "f32", 50440b57cec5SDimitry Andric v4f32, v4f32, fsub, 0>; 50450b57cec5SDimitry Andricdef VSUBhd : N3VD<0, 0, 0b11, 0b1101, 0, IIC_VBIND, "vsub", "f16", 50460b57cec5SDimitry Andric v4f16, v4f16, fsub, 0>, 50470b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]>; 50480b57cec5SDimitry Andricdef VSUBhq : N3VQ<0, 0, 0b11, 0b1101, 0, IIC_VBINQ, "vsub", "f16", 50490b57cec5SDimitry Andric v8f16, v8f16, fsub, 0>, 50500b57cec5SDimitry Andric Requires<[HasNEON,HasFullFP16]>; 50510b57cec5SDimitry Andric// VSUBL : Vector Subtract Long (Q = D - D) 50520b57cec5SDimitry Andricdefm VSUBLs : N3VLExt_QHS<0,1,0b0010,0, IIC_VSHLiD, IIC_VSHLiD, 50530b57cec5SDimitry Andric "vsubl", "s", sub, sext, 0>; 50540b57cec5SDimitry Andricdefm VSUBLu : N3VLExt_QHS<1,1,0b0010,0, IIC_VSHLiD, IIC_VSHLiD, 50550b57cec5SDimitry Andric "vsubl", "u", sub, zext, 0>; 50560b57cec5SDimitry Andric// VSUBW : Vector Subtract Wide (Q = Q - D) 50570b57cec5SDimitry Andricdefm VSUBWs : N3VW_QHS<0,1,0b0011,0, "vsubw", "s", sub, sext, 0>; 50580b57cec5SDimitry Andricdefm VSUBWu : N3VW_QHS<1,1,0b0011,0, "vsubw", "u", sub, zext, 0>; 50590b57cec5SDimitry Andric// VHSUB : Vector Halving Subtract 50600b57cec5SDimitry Andricdefm VHSUBs : N3VInt_QHS<0, 0, 0b0010, 0, N3RegFrm, 50610b57cec5SDimitry Andric IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, 50620b57cec5SDimitry Andric "vhsub", "s", int_arm_neon_vhsubs, 0>; 50630b57cec5SDimitry Andricdefm VHSUBu : N3VInt_QHS<1, 0, 0b0010, 0, N3RegFrm, 50640b57cec5SDimitry Andric IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, 50650b57cec5SDimitry Andric "vhsub", "u", int_arm_neon_vhsubu, 0>; 50660b57cec5SDimitry Andric// VQSUB : Vector Saturing Subtract 50670b57cec5SDimitry Andricdefm VQSUBs : N3VInt_QHSD<0, 0, 0b0010, 1, N3RegFrm, 50680b57cec5SDimitry Andric IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, 5069*480093f4SDimitry Andric "vqsub", "s", ssubsat, 0>; 50700b57cec5SDimitry Andricdefm VQSUBu : N3VInt_QHSD<1, 0, 0b0010, 1, N3RegFrm, 50710b57cec5SDimitry Andric IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, 5072*480093f4SDimitry Andric "vqsub", "u", usubsat, 0>; 50730b57cec5SDimitry Andric// VSUBHN : Vector Subtract and Narrow Returning High Half (D = Q - Q) 50740b57cec5SDimitry Andricdefm VSUBHN : N3VNInt_HSD<0,1,0b0110,0, "vsubhn", "i", null_frag, 0>; 50750b57cec5SDimitry Andric// VRSUBHN : Vector Rounding Subtract and Narrow Returning High Half (D=Q-Q) 50760b57cec5SDimitry Andricdefm VRSUBHN : N3VNInt_HSD<1,1,0b0110,0, "vrsubhn", "i", 50770b57cec5SDimitry Andric int_arm_neon_vrsubhn, 0>; 50780b57cec5SDimitry Andric 50790b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 50800b57cec5SDimitry Andricdef : Pat<(v8i8 (trunc (ARMvshruImm (sub (v8i16 QPR:$Vn), QPR:$Vm), 8))), 50810b57cec5SDimitry Andric (VSUBHNv8i8 QPR:$Vn, QPR:$Vm)>; 50820b57cec5SDimitry Andricdef : Pat<(v4i16 (trunc (ARMvshruImm (sub (v4i32 QPR:$Vn), QPR:$Vm), 16))), 50830b57cec5SDimitry Andric (VSUBHNv4i16 QPR:$Vn, QPR:$Vm)>; 50840b57cec5SDimitry Andricdef : Pat<(v2i32 (trunc (ARMvshruImm (sub (v2i64 QPR:$Vn), QPR:$Vm), 32))), 50850b57cec5SDimitry Andric (VSUBHNv2i32 QPR:$Vn, QPR:$Vm)>; 50860b57cec5SDimitry Andric} 50870b57cec5SDimitry Andric 50880b57cec5SDimitry Andric// Vector Comparisons. 50890b57cec5SDimitry Andric 50900b57cec5SDimitry Andric// VCEQ : Vector Compare Equal 50918bcb0991SDimitry Andricdefm VCEQ : N3V_QHS_cmp<1, 0, 0b1000, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, 5092*480093f4SDimitry Andric IIC_VSUBi4Q, "vceq", "i", ARMCCeq, 1>; 50938bcb0991SDimitry Andricdef VCEQfd : N3VD_cmp<0,0,0b00,0b1110,0, IIC_VBIND, "vceq", "f32", v2i32, v2f32, 5094*480093f4SDimitry Andric ARMCCeq, 1>; 50958bcb0991SDimitry Andricdef VCEQfq : N3VQ_cmp<0,0,0b00,0b1110,0, IIC_VBINQ, "vceq", "f32", v4i32, v4f32, 5096*480093f4SDimitry Andric ARMCCeq, 1>; 50978bcb0991SDimitry Andricdef VCEQhd : N3VD_cmp<0,0,0b01,0b1110,0, IIC_VBIND, "vceq", "f16", v4i16, v4f16, 5098*480093f4SDimitry Andric ARMCCeq, 1>, 50990b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 51008bcb0991SDimitry Andricdef VCEQhq : N3VQ_cmp<0,0,0b01,0b1110,0, IIC_VBINQ, "vceq", "f16", v8i16, v8f16, 5101*480093f4SDimitry Andric ARMCCeq, 1>, 51020b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 51030b57cec5SDimitry Andric 51040b57cec5SDimitry Andriclet TwoOperandAliasConstraint = "$Vm = $Vd" in 51050b57cec5SDimitry Andricdefm VCEQz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00010, 0, "vceq", "i", 5106*480093f4SDimitry Andric "$Vd, $Vm, #0", ARMCCeq>; 51070b57cec5SDimitry Andric 51080b57cec5SDimitry Andric// VCGE : Vector Compare Greater Than or Equal 51098bcb0991SDimitry Andricdefm VCGEs : N3V_QHS_cmp<0, 0, 0b0011, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, 5110*480093f4SDimitry Andric IIC_VSUBi4Q, "vcge", "s", ARMCCge, 0>; 51118bcb0991SDimitry Andricdefm VCGEu : N3V_QHS_cmp<1, 0, 0b0011, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, 5112*480093f4SDimitry Andric IIC_VSUBi4Q, "vcge", "u", ARMCChs, 0>; 51138bcb0991SDimitry Andricdef VCGEfd : N3VD_cmp<1,0,0b00,0b1110,0, IIC_VBIND, "vcge", "f32", v2i32, v2f32, 5114*480093f4SDimitry Andric ARMCCge, 0>; 51158bcb0991SDimitry Andricdef VCGEfq : N3VQ_cmp<1,0,0b00,0b1110,0, IIC_VBINQ, "vcge", "f32", v4i32, v4f32, 5116*480093f4SDimitry Andric ARMCCge, 0>; 51178bcb0991SDimitry Andricdef VCGEhd : N3VD_cmp<1,0,0b01,0b1110,0, IIC_VBIND, "vcge", "f16", v4i16, v4f16, 5118*480093f4SDimitry Andric ARMCCge, 0>, 51190b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 51208bcb0991SDimitry Andricdef VCGEhq : N3VQ_cmp<1,0,0b01,0b1110,0, IIC_VBINQ, "vcge", "f16", v8i16, v8f16, 5121*480093f4SDimitry Andric ARMCCge, 0>, 51220b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 51230b57cec5SDimitry Andric 51240b57cec5SDimitry Andriclet TwoOperandAliasConstraint = "$Vm = $Vd" in { 51250b57cec5SDimitry Andricdefm VCGEz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00001, 0, "vcge", "s", 5126*480093f4SDimitry Andric "$Vd, $Vm, #0", ARMCCge>; 51270b57cec5SDimitry Andricdefm VCLEz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00011, 0, "vcle", "s", 5128*480093f4SDimitry Andric "$Vd, $Vm, #0", ARMCCle>; 51290b57cec5SDimitry Andric} 51300b57cec5SDimitry Andric 51310b57cec5SDimitry Andric// VCGT : Vector Compare Greater Than 51328bcb0991SDimitry Andricdefm VCGTs : N3V_QHS_cmp<0, 0, 0b0011, 0, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, 5133*480093f4SDimitry Andric IIC_VSUBi4Q, "vcgt", "s", ARMCCgt, 0>; 51348bcb0991SDimitry Andricdefm VCGTu : N3V_QHS_cmp<1, 0, 0b0011, 0, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, 5135*480093f4SDimitry Andric IIC_VSUBi4Q, "vcgt", "u", ARMCChi, 0>; 51368bcb0991SDimitry Andricdef VCGTfd : N3VD_cmp<1,0,0b10,0b1110,0, IIC_VBIND, "vcgt", "f32", v2i32, v2f32, 5137*480093f4SDimitry Andric ARMCCgt, 0>; 51388bcb0991SDimitry Andricdef VCGTfq : N3VQ_cmp<1,0,0b10,0b1110,0, IIC_VBINQ, "vcgt", "f32", v4i32, v4f32, 5139*480093f4SDimitry Andric ARMCCgt, 0>; 51408bcb0991SDimitry Andricdef VCGThd : N3VD_cmp<1,0,0b11,0b1110,0, IIC_VBIND, "vcgt", "f16", v4i16, v4f16, 5141*480093f4SDimitry Andric ARMCCgt, 0>, 51420b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 51438bcb0991SDimitry Andricdef VCGThq : N3VQ_cmp<1,0,0b11,0b1110,0, IIC_VBINQ, "vcgt", "f16", v8i16, v8f16, 5144*480093f4SDimitry Andric ARMCCgt, 0>, 51450b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 51460b57cec5SDimitry Andric 51470b57cec5SDimitry Andriclet TwoOperandAliasConstraint = "$Vm = $Vd" in { 51480b57cec5SDimitry Andricdefm VCGTz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00000, 0, "vcgt", "s", 5149*480093f4SDimitry Andric "$Vd, $Vm, #0", ARMCCgt>; 51500b57cec5SDimitry Andricdefm VCLTz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00100, 0, "vclt", "s", 5151*480093f4SDimitry Andric "$Vd, $Vm, #0", ARMCClt>; 51520b57cec5SDimitry Andric} 51530b57cec5SDimitry Andric 51540b57cec5SDimitry Andric// VACGE : Vector Absolute Compare Greater Than or Equal (aka VCAGE) 51550b57cec5SDimitry Andricdef VACGEfd : N3VDInt<1, 0, 0b00, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacge", 51560b57cec5SDimitry Andric "f32", v2i32, v2f32, int_arm_neon_vacge, 0>; 51570b57cec5SDimitry Andricdef VACGEfq : N3VQInt<1, 0, 0b00, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacge", 51580b57cec5SDimitry Andric "f32", v4i32, v4f32, int_arm_neon_vacge, 0>; 51590b57cec5SDimitry Andricdef VACGEhd : N3VDInt<1, 0, 0b01, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacge", 51600b57cec5SDimitry Andric "f16", v4i16, v4f16, int_arm_neon_vacge, 0>, 51610b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 51620b57cec5SDimitry Andricdef VACGEhq : N3VQInt<1, 0, 0b01, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacge", 51630b57cec5SDimitry Andric "f16", v8i16, v8f16, int_arm_neon_vacge, 0>, 51640b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 51650b57cec5SDimitry Andric// VACGT : Vector Absolute Compare Greater Than (aka VCAGT) 51660b57cec5SDimitry Andricdef VACGTfd : N3VDInt<1, 0, 0b10, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacgt", 51670b57cec5SDimitry Andric "f32", v2i32, v2f32, int_arm_neon_vacgt, 0>; 51680b57cec5SDimitry Andricdef VACGTfq : N3VQInt<1, 0, 0b10, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacgt", 51690b57cec5SDimitry Andric "f32", v4i32, v4f32, int_arm_neon_vacgt, 0>; 51700b57cec5SDimitry Andricdef VACGThd : N3VDInt<1, 0, 0b11, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacgt", 51710b57cec5SDimitry Andric "f16", v4i16, v4f16, int_arm_neon_vacgt, 0>, 51720b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 51730b57cec5SDimitry Andricdef VACGThq : N3VQInt<1, 0, 0b11, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacgt", 51740b57cec5SDimitry Andric "f16", v8i16, v8f16, int_arm_neon_vacgt, 0>, 51750b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 51760b57cec5SDimitry Andric// VTST : Vector Test Bits 51770b57cec5SDimitry Andricdefm VTST : N3V_QHS<0, 0, 0b1000, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, 51780b57cec5SDimitry Andric IIC_VBINi4Q, "vtst", "", NEONvtst, 1>; 51790b57cec5SDimitry Andric 51800b57cec5SDimitry Andricdef: NEONInstAlias<"vaclt${p}.f32 $Vd, $Vn, $Vm", 51810b57cec5SDimitry Andric (VACGTfd DPR:$Vd, DPR:$Vm, DPR:$Vn, pred:$p)>; 51820b57cec5SDimitry Andricdef: NEONInstAlias<"vaclt${p}.f32 $Vd, $Vn, $Vm", 51830b57cec5SDimitry Andric (VACGTfq QPR:$Vd, QPR:$Vm, QPR:$Vn, pred:$p)>; 51840b57cec5SDimitry Andricdef: NEONInstAlias<"vacle${p}.f32 $Vd, $Vn, $Vm", 51850b57cec5SDimitry Andric (VACGEfd DPR:$Vd, DPR:$Vm, DPR:$Vn, pred:$p)>; 51860b57cec5SDimitry Andricdef: NEONInstAlias<"vacle${p}.f32 $Vd, $Vn, $Vm", 51870b57cec5SDimitry Andric (VACGEfq QPR:$Vd, QPR:$Vm, QPR:$Vn, pred:$p)>; 51880b57cec5SDimitry Andriclet Predicates = [HasNEON, HasFullFP16] in { 51890b57cec5SDimitry Andricdef: NEONInstAlias<"vaclt${p}.f16 $Vd, $Vn, $Vm", 51900b57cec5SDimitry Andric (VACGThd DPR:$Vd, DPR:$Vm, DPR:$Vn, pred:$p)>; 51910b57cec5SDimitry Andricdef: NEONInstAlias<"vaclt${p}.f16 $Vd, $Vn, $Vm", 51920b57cec5SDimitry Andric (VACGThq QPR:$Vd, QPR:$Vm, QPR:$Vn, pred:$p)>; 51930b57cec5SDimitry Andricdef: NEONInstAlias<"vacle${p}.f16 $Vd, $Vn, $Vm", 51940b57cec5SDimitry Andric (VACGEhd DPR:$Vd, DPR:$Vm, DPR:$Vn, pred:$p)>; 51950b57cec5SDimitry Andricdef: NEONInstAlias<"vacle${p}.f16 $Vd, $Vn, $Vm", 51960b57cec5SDimitry Andric (VACGEhq QPR:$Vd, QPR:$Vm, QPR:$Vn, pred:$p)>; 51970b57cec5SDimitry Andric} 51980b57cec5SDimitry Andric 51990b57cec5SDimitry Andric// +fp16fml Floating Point Multiplication Variants 52000b57cec5SDimitry Andriclet Predicates = [HasNEON, HasFP16FML], DecoderNamespace= "VFPV8" in { 52010b57cec5SDimitry Andric 52020b57cec5SDimitry Andricclass N3VCP8F16Q1<string asm, RegisterClass Td, RegisterClass Tn, 52030b57cec5SDimitry Andric RegisterClass Tm, bits<2> op1, bits<2> op2, bit op3> 52040b57cec5SDimitry Andric : N3VCP8<op1, op2, 1, op3, (outs Td:$Vd), (ins Tn:$Vn, Tm:$Vm), NoItinerary, 52050b57cec5SDimitry Andric asm, "f16", "$Vd, $Vn, $Vm", "", []>; 52060b57cec5SDimitry Andric 52070b57cec5SDimitry Andricclass N3VCP8F16Q0<string asm, RegisterClass Td, RegisterClass Tn, 52080b57cec5SDimitry Andric RegisterClass Tm, bits<2> op1, bits<2> op2, bit op3> 52090b57cec5SDimitry Andric : N3VCP8Q0<op1, op2, 0, op3, (outs Td:$Vd), (ins Tn:$Vn, Tm:$Vm), NoItinerary, 52100b57cec5SDimitry Andric asm, "f16", "$Vd, $Vn, $Vm", "", []>; 52110b57cec5SDimitry Andric 52120b57cec5SDimitry Andric// Vd, Vs, Vs[0-15], Idx[0-1] 52130b57cec5SDimitry Andricclass VFMD<string opc, string type, bits<2> S> 52140b57cec5SDimitry Andric : N3VLaneCP8<0, S, 0, 1, (outs DPR:$Vd), 52150b57cec5SDimitry Andric (ins SPR:$Vn, SPR_8:$Vm, VectorIndex32:$idx), 52160b57cec5SDimitry Andric IIC_VMACD, opc, type, "$Vd, $Vn, $Vm$idx", "", []> { 52170b57cec5SDimitry Andric bit idx; 52180b57cec5SDimitry Andric let Inst{3} = idx; 52190b57cec5SDimitry Andric let Inst{19-16} = Vn{4-1}; 52200b57cec5SDimitry Andric let Inst{7} = Vn{0}; 52210b57cec5SDimitry Andric let Inst{5} = Vm{0}; 52220b57cec5SDimitry Andric let Inst{2-0} = Vm{3-1}; 52230b57cec5SDimitry Andric} 52240b57cec5SDimitry Andric 52250b57cec5SDimitry Andric// Vq, Vd, Vd[0-7], Idx[0-3] 52260b57cec5SDimitry Andricclass VFMQ<string opc, string type, bits<2> S> 52270b57cec5SDimitry Andric : N3VLaneCP8<0, S, 1, 1, (outs QPR:$Vd), 52280b57cec5SDimitry Andric (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$idx), 52290b57cec5SDimitry Andric IIC_VMACD, opc, type, "$Vd, $Vn, $Vm$idx", "", []> { 52300b57cec5SDimitry Andric bits<2> idx; 52310b57cec5SDimitry Andric let Inst{5} = idx{1}; 52320b57cec5SDimitry Andric let Inst{3} = idx{0}; 52330b57cec5SDimitry Andric} 52340b57cec5SDimitry Andric 52350b57cec5SDimitry Andriclet hasNoSchedulingInfo = 1 in { 52360b57cec5SDimitry Andric// op1 op2 op3 52370b57cec5SDimitry Andricdef VFMALD : N3VCP8F16Q0<"vfmal", DPR, SPR, SPR, 0b00, 0b10, 1>; 52380b57cec5SDimitry Andricdef VFMSLD : N3VCP8F16Q0<"vfmsl", DPR, SPR, SPR, 0b01, 0b10, 1>; 52390b57cec5SDimitry Andricdef VFMALQ : N3VCP8F16Q1<"vfmal", QPR, DPR, DPR, 0b00, 0b10, 1>; 52400b57cec5SDimitry Andricdef VFMSLQ : N3VCP8F16Q1<"vfmsl", QPR, DPR, DPR, 0b01, 0b10, 1>; 52410b57cec5SDimitry Andricdef VFMALDI : VFMD<"vfmal", "f16", 0b00>; 52420b57cec5SDimitry Andricdef VFMSLDI : VFMD<"vfmsl", "f16", 0b01>; 52430b57cec5SDimitry Andricdef VFMALQI : VFMQ<"vfmal", "f16", 0b00>; 52440b57cec5SDimitry Andricdef VFMSLQI : VFMQ<"vfmsl", "f16", 0b01>; 52450b57cec5SDimitry Andric} 52460b57cec5SDimitry Andric} // HasNEON, HasFP16FML 52470b57cec5SDimitry Andric 52480b57cec5SDimitry Andric 52490b57cec5SDimitry Andricdef: NEONInstAlias<"vaclt${p}.f32 $Vd, $Vm", 52500b57cec5SDimitry Andric (VACGTfd DPR:$Vd, DPR:$Vm, DPR:$Vd, pred:$p)>; 52510b57cec5SDimitry Andricdef: NEONInstAlias<"vaclt${p}.f32 $Vd, $Vm", 52520b57cec5SDimitry Andric (VACGTfq QPR:$Vd, QPR:$Vm, QPR:$Vd, pred:$p)>; 52530b57cec5SDimitry Andricdef: NEONInstAlias<"vacle${p}.f32 $Vd, $Vm", 52540b57cec5SDimitry Andric (VACGEfd DPR:$Vd, DPR:$Vm, DPR:$Vd, pred:$p)>; 52550b57cec5SDimitry Andricdef: NEONInstAlias<"vacle${p}.f32 $Vd, $Vm", 52560b57cec5SDimitry Andric (VACGEfq QPR:$Vd, QPR:$Vm, QPR:$Vd, pred:$p)>; 52570b57cec5SDimitry Andriclet Predicates = [HasNEON, HasFullFP16] in { 52580b57cec5SDimitry Andricdef: NEONInstAlias<"vaclt${p}.f16 $Vd, $Vm", 52590b57cec5SDimitry Andric (VACGThd DPR:$Vd, DPR:$Vm, DPR:$Vd, pred:$p)>; 52600b57cec5SDimitry Andricdef: NEONInstAlias<"vaclt${p}.f16 $Vd, $Vm", 52610b57cec5SDimitry Andric (VACGThq QPR:$Vd, QPR:$Vm, QPR:$Vd, pred:$p)>; 52620b57cec5SDimitry Andricdef: NEONInstAlias<"vacle${p}.f16 $Vd, $Vm", 52630b57cec5SDimitry Andric (VACGEhd DPR:$Vd, DPR:$Vm, DPR:$Vd, pred:$p)>; 52640b57cec5SDimitry Andricdef: NEONInstAlias<"vacle${p}.f16 $Vd, $Vm", 52650b57cec5SDimitry Andric (VACGEhq QPR:$Vd, QPR:$Vm, QPR:$Vd, pred:$p)>; 52660b57cec5SDimitry Andric} 52670b57cec5SDimitry Andric 52680b57cec5SDimitry Andric// Vector Bitwise Operations. 52690b57cec5SDimitry Andric 52700b57cec5SDimitry Andricdef vnotd : PatFrag<(ops node:$in), 52710b57cec5SDimitry Andric (xor node:$in, (bitconvert (v8i8 NEONimmAllOnesV)))>; 52720b57cec5SDimitry Andricdef vnotq : PatFrag<(ops node:$in), 52730b57cec5SDimitry Andric (xor node:$in, (bitconvert (v16i8 NEONimmAllOnesV)))>; 52740b57cec5SDimitry Andric 52750b57cec5SDimitry Andric 52760b57cec5SDimitry Andric// VAND : Vector Bitwise AND 52770b57cec5SDimitry Andricdef VANDd : N3VDX<0, 0, 0b00, 0b0001, 1, IIC_VBINiD, "vand", 52780b57cec5SDimitry Andric v2i32, v2i32, and, 1>; 52790b57cec5SDimitry Andricdef VANDq : N3VQX<0, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "vand", 52800b57cec5SDimitry Andric v4i32, v4i32, and, 1>; 52810b57cec5SDimitry Andric 52820b57cec5SDimitry Andric// VEOR : Vector Bitwise Exclusive OR 52830b57cec5SDimitry Andricdef VEORd : N3VDX<1, 0, 0b00, 0b0001, 1, IIC_VBINiD, "veor", 52840b57cec5SDimitry Andric v2i32, v2i32, xor, 1>; 52850b57cec5SDimitry Andricdef VEORq : N3VQX<1, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "veor", 52860b57cec5SDimitry Andric v4i32, v4i32, xor, 1>; 52870b57cec5SDimitry Andric 52880b57cec5SDimitry Andric// VORR : Vector Bitwise OR 52890b57cec5SDimitry Andricdef VORRd : N3VDX<0, 0, 0b10, 0b0001, 1, IIC_VBINiD, "vorr", 52900b57cec5SDimitry Andric v2i32, v2i32, or, 1>; 52910b57cec5SDimitry Andricdef VORRq : N3VQX<0, 0, 0b10, 0b0001, 1, IIC_VBINiQ, "vorr", 52920b57cec5SDimitry Andric v4i32, v4i32, or, 1>; 52930b57cec5SDimitry Andric 52940b57cec5SDimitry Andricdef VORRiv4i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 0, 0, 1, 52950b57cec5SDimitry Andric (outs DPR:$Vd), (ins nImmSplatI16:$SIMM, DPR:$src), 52960b57cec5SDimitry Andric IIC_VMOVImm, 52970b57cec5SDimitry Andric "vorr", "i16", "$Vd, $SIMM", "$src = $Vd", 52980b57cec5SDimitry Andric [(set DPR:$Vd, 52990b57cec5SDimitry Andric (v4i16 (NEONvorrImm DPR:$src, timm:$SIMM)))]> { 53000b57cec5SDimitry Andric let Inst{9} = SIMM{9}; 53010b57cec5SDimitry Andric} 53020b57cec5SDimitry Andric 53030b57cec5SDimitry Andricdef VORRiv2i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 0, 0, 1, 53040b57cec5SDimitry Andric (outs DPR:$Vd), (ins nImmSplatI32:$SIMM, DPR:$src), 53050b57cec5SDimitry Andric IIC_VMOVImm, 53060b57cec5SDimitry Andric "vorr", "i32", "$Vd, $SIMM", "$src = $Vd", 53070b57cec5SDimitry Andric [(set DPR:$Vd, 53080b57cec5SDimitry Andric (v2i32 (NEONvorrImm DPR:$src, timm:$SIMM)))]> { 53090b57cec5SDimitry Andric let Inst{10-9} = SIMM{10-9}; 53100b57cec5SDimitry Andric} 53110b57cec5SDimitry Andric 53120b57cec5SDimitry Andricdef VORRiv8i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 1, 0, 1, 53130b57cec5SDimitry Andric (outs QPR:$Vd), (ins nImmSplatI16:$SIMM, QPR:$src), 53140b57cec5SDimitry Andric IIC_VMOVImm, 53150b57cec5SDimitry Andric "vorr", "i16", "$Vd, $SIMM", "$src = $Vd", 53160b57cec5SDimitry Andric [(set QPR:$Vd, 53170b57cec5SDimitry Andric (v8i16 (NEONvorrImm QPR:$src, timm:$SIMM)))]> { 53180b57cec5SDimitry Andric let Inst{9} = SIMM{9}; 53190b57cec5SDimitry Andric} 53200b57cec5SDimitry Andric 53210b57cec5SDimitry Andricdef VORRiv4i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 1, 0, 1, 53220b57cec5SDimitry Andric (outs QPR:$Vd), (ins nImmSplatI32:$SIMM, QPR:$src), 53230b57cec5SDimitry Andric IIC_VMOVImm, 53240b57cec5SDimitry Andric "vorr", "i32", "$Vd, $SIMM", "$src = $Vd", 53250b57cec5SDimitry Andric [(set QPR:$Vd, 53260b57cec5SDimitry Andric (v4i32 (NEONvorrImm QPR:$src, timm:$SIMM)))]> { 53270b57cec5SDimitry Andric let Inst{10-9} = SIMM{10-9}; 53280b57cec5SDimitry Andric} 53290b57cec5SDimitry Andric 53300b57cec5SDimitry Andric 53310b57cec5SDimitry Andric// VBIC : Vector Bitwise Bit Clear (AND NOT) 53320b57cec5SDimitry Andriclet TwoOperandAliasConstraint = "$Vn = $Vd" in { 53330b57cec5SDimitry Andricdef VBICd : N3VX<0, 0, 0b01, 0b0001, 0, 1, (outs DPR:$Vd), 53340b57cec5SDimitry Andric (ins DPR:$Vn, DPR:$Vm), N3RegFrm, IIC_VBINiD, 53350b57cec5SDimitry Andric "vbic", "$Vd, $Vn, $Vm", "", 53360b57cec5SDimitry Andric [(set DPR:$Vd, (v2i32 (and DPR:$Vn, 53370b57cec5SDimitry Andric (vnotd DPR:$Vm))))]>; 53380b57cec5SDimitry Andricdef VBICq : N3VX<0, 0, 0b01, 0b0001, 1, 1, (outs QPR:$Vd), 53390b57cec5SDimitry Andric (ins QPR:$Vn, QPR:$Vm), N3RegFrm, IIC_VBINiQ, 53400b57cec5SDimitry Andric "vbic", "$Vd, $Vn, $Vm", "", 53410b57cec5SDimitry Andric [(set QPR:$Vd, (v4i32 (and QPR:$Vn, 53420b57cec5SDimitry Andric (vnotq QPR:$Vm))))]>; 53430b57cec5SDimitry Andric} 53440b57cec5SDimitry Andric 53450b57cec5SDimitry Andricdef VBICiv4i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 0, 1, 1, 53460b57cec5SDimitry Andric (outs DPR:$Vd), (ins nImmSplatI16:$SIMM, DPR:$src), 53470b57cec5SDimitry Andric IIC_VMOVImm, 53480b57cec5SDimitry Andric "vbic", "i16", "$Vd, $SIMM", "$src = $Vd", 53490b57cec5SDimitry Andric [(set DPR:$Vd, 53500b57cec5SDimitry Andric (v4i16 (NEONvbicImm DPR:$src, timm:$SIMM)))]> { 53510b57cec5SDimitry Andric let Inst{9} = SIMM{9}; 53520b57cec5SDimitry Andric} 53530b57cec5SDimitry Andric 53540b57cec5SDimitry Andricdef VBICiv2i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 0, 1, 1, 53550b57cec5SDimitry Andric (outs DPR:$Vd), (ins nImmSplatI32:$SIMM, DPR:$src), 53560b57cec5SDimitry Andric IIC_VMOVImm, 53570b57cec5SDimitry Andric "vbic", "i32", "$Vd, $SIMM", "$src = $Vd", 53580b57cec5SDimitry Andric [(set DPR:$Vd, 53590b57cec5SDimitry Andric (v2i32 (NEONvbicImm DPR:$src, timm:$SIMM)))]> { 53600b57cec5SDimitry Andric let Inst{10-9} = SIMM{10-9}; 53610b57cec5SDimitry Andric} 53620b57cec5SDimitry Andric 53630b57cec5SDimitry Andricdef VBICiv8i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 1, 1, 1, 53640b57cec5SDimitry Andric (outs QPR:$Vd), (ins nImmSplatI16:$SIMM, QPR:$src), 53650b57cec5SDimitry Andric IIC_VMOVImm, 53660b57cec5SDimitry Andric "vbic", "i16", "$Vd, $SIMM", "$src = $Vd", 53670b57cec5SDimitry Andric [(set QPR:$Vd, 53680b57cec5SDimitry Andric (v8i16 (NEONvbicImm QPR:$src, timm:$SIMM)))]> { 53690b57cec5SDimitry Andric let Inst{9} = SIMM{9}; 53700b57cec5SDimitry Andric} 53710b57cec5SDimitry Andric 53720b57cec5SDimitry Andricdef VBICiv4i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 1, 1, 1, 53730b57cec5SDimitry Andric (outs QPR:$Vd), (ins nImmSplatI32:$SIMM, QPR:$src), 53740b57cec5SDimitry Andric IIC_VMOVImm, 53750b57cec5SDimitry Andric "vbic", "i32", "$Vd, $SIMM", "$src = $Vd", 53760b57cec5SDimitry Andric [(set QPR:$Vd, 53770b57cec5SDimitry Andric (v4i32 (NEONvbicImm QPR:$src, timm:$SIMM)))]> { 53780b57cec5SDimitry Andric let Inst{10-9} = SIMM{10-9}; 53790b57cec5SDimitry Andric} 53800b57cec5SDimitry Andric 53810b57cec5SDimitry Andric// VORN : Vector Bitwise OR NOT 53820b57cec5SDimitry Andricdef VORNd : N3VX<0, 0, 0b11, 0b0001, 0, 1, (outs DPR:$Vd), 53830b57cec5SDimitry Andric (ins DPR:$Vn, DPR:$Vm), N3RegFrm, IIC_VBINiD, 53840b57cec5SDimitry Andric "vorn", "$Vd, $Vn, $Vm", "", 53850b57cec5SDimitry Andric [(set DPR:$Vd, (v2i32 (or DPR:$Vn, 53860b57cec5SDimitry Andric (vnotd DPR:$Vm))))]>; 53870b57cec5SDimitry Andricdef VORNq : N3VX<0, 0, 0b11, 0b0001, 1, 1, (outs QPR:$Vd), 53880b57cec5SDimitry Andric (ins QPR:$Vn, QPR:$Vm), N3RegFrm, IIC_VBINiQ, 53890b57cec5SDimitry Andric "vorn", "$Vd, $Vn, $Vm", "", 53900b57cec5SDimitry Andric [(set QPR:$Vd, (v4i32 (or QPR:$Vn, 53910b57cec5SDimitry Andric (vnotq QPR:$Vm))))]>; 53920b57cec5SDimitry Andric 53930b57cec5SDimitry Andric// VMVN : Vector Bitwise NOT (Immediate) 53940b57cec5SDimitry Andric 53950b57cec5SDimitry Andriclet isReMaterializable = 1 in { 53960b57cec5SDimitry Andric 53970b57cec5SDimitry Andricdef VMVNv4i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 0, 1, 1, (outs DPR:$Vd), 53980b57cec5SDimitry Andric (ins nImmSplatI16:$SIMM), IIC_VMOVImm, 53990b57cec5SDimitry Andric "vmvn", "i16", "$Vd, $SIMM", "", 54000b57cec5SDimitry Andric [(set DPR:$Vd, (v4i16 (ARMvmvnImm timm:$SIMM)))]> { 54010b57cec5SDimitry Andric let Inst{9} = SIMM{9}; 54020b57cec5SDimitry Andric} 54030b57cec5SDimitry Andric 54040b57cec5SDimitry Andricdef VMVNv8i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 1, 1, 1, (outs QPR:$Vd), 54050b57cec5SDimitry Andric (ins nImmSplatI16:$SIMM), IIC_VMOVImm, 54060b57cec5SDimitry Andric "vmvn", "i16", "$Vd, $SIMM", "", 54070b57cec5SDimitry Andric [(set QPR:$Vd, (v8i16 (ARMvmvnImm timm:$SIMM)))]> { 54080b57cec5SDimitry Andric let Inst{9} = SIMM{9}; 54090b57cec5SDimitry Andric} 54100b57cec5SDimitry Andric 54110b57cec5SDimitry Andricdef VMVNv2i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 0, 1, 1, (outs DPR:$Vd), 54120b57cec5SDimitry Andric (ins nImmVMOVI32:$SIMM), IIC_VMOVImm, 54130b57cec5SDimitry Andric "vmvn", "i32", "$Vd, $SIMM", "", 54140b57cec5SDimitry Andric [(set DPR:$Vd, (v2i32 (ARMvmvnImm timm:$SIMM)))]> { 54150b57cec5SDimitry Andric let Inst{11-8} = SIMM{11-8}; 54160b57cec5SDimitry Andric} 54170b57cec5SDimitry Andric 54180b57cec5SDimitry Andricdef VMVNv4i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 1, 1, 1, (outs QPR:$Vd), 54190b57cec5SDimitry Andric (ins nImmVMOVI32:$SIMM), IIC_VMOVImm, 54200b57cec5SDimitry Andric "vmvn", "i32", "$Vd, $SIMM", "", 54210b57cec5SDimitry Andric [(set QPR:$Vd, (v4i32 (ARMvmvnImm timm:$SIMM)))]> { 54220b57cec5SDimitry Andric let Inst{11-8} = SIMM{11-8}; 54230b57cec5SDimitry Andric} 54240b57cec5SDimitry Andric} 54250b57cec5SDimitry Andric 54260b57cec5SDimitry Andric// VMVN : Vector Bitwise NOT 54270b57cec5SDimitry Andricdef VMVNd : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 0, 0, 54280b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vm), IIC_VSUBiD, 54290b57cec5SDimitry Andric "vmvn", "$Vd, $Vm", "", 54300b57cec5SDimitry Andric [(set DPR:$Vd, (v2i32 (vnotd DPR:$Vm)))]>; 54310b57cec5SDimitry Andricdef VMVNq : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 1, 0, 54320b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vm), IIC_VSUBiD, 54330b57cec5SDimitry Andric "vmvn", "$Vd, $Vm", "", 54340b57cec5SDimitry Andric [(set QPR:$Vd, (v4i32 (vnotq QPR:$Vm)))]>; 54350b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 54360b57cec5SDimitry Andricdef : Pat<(v2i32 (vnotd DPR:$src)), (VMVNd DPR:$src)>; 54370b57cec5SDimitry Andricdef : Pat<(v4i32 (vnotq QPR:$src)), (VMVNq QPR:$src)>; 54380b57cec5SDimitry Andric} 54390b57cec5SDimitry Andric 54400b57cec5SDimitry Andric// VBSL : Vector Bitwise Select 54410b57cec5SDimitry Andricdef VBSLd : N3VX<1, 0, 0b01, 0b0001, 0, 1, (outs DPR:$Vd), 54420b57cec5SDimitry Andric (ins DPR:$src1, DPR:$Vn, DPR:$Vm), 54430b57cec5SDimitry Andric N3RegFrm, IIC_VCNTiD, 54440b57cec5SDimitry Andric "vbsl", "$Vd, $Vn, $Vm", "$src1 = $Vd", 54450b57cec5SDimitry Andric [(set DPR:$Vd, 54460b57cec5SDimitry Andric (v2i32 (NEONvbsl DPR:$src1, DPR:$Vn, DPR:$Vm)))]>; 54470b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 54480b57cec5SDimitry Andricdef : Pat<(v8i8 (int_arm_neon_vbsl (v8i8 DPR:$src1), 54490b57cec5SDimitry Andric (v8i8 DPR:$Vn), (v8i8 DPR:$Vm))), 54500b57cec5SDimitry Andric (VBSLd DPR:$src1, DPR:$Vn, DPR:$Vm)>; 54510b57cec5SDimitry Andricdef : Pat<(v4i16 (int_arm_neon_vbsl (v4i16 DPR:$src1), 54520b57cec5SDimitry Andric (v4i16 DPR:$Vn), (v4i16 DPR:$Vm))), 54530b57cec5SDimitry Andric (VBSLd DPR:$src1, DPR:$Vn, DPR:$Vm)>; 54540b57cec5SDimitry Andricdef : Pat<(v2i32 (int_arm_neon_vbsl (v2i32 DPR:$src1), 54550b57cec5SDimitry Andric (v2i32 DPR:$Vn), (v2i32 DPR:$Vm))), 54560b57cec5SDimitry Andric (VBSLd DPR:$src1, DPR:$Vn, DPR:$Vm)>; 54570b57cec5SDimitry Andricdef : Pat<(v2f32 (int_arm_neon_vbsl (v2f32 DPR:$src1), 54580b57cec5SDimitry Andric (v2f32 DPR:$Vn), (v2f32 DPR:$Vm))), 54590b57cec5SDimitry Andric (VBSLd DPR:$src1, DPR:$Vn, DPR:$Vm)>; 54600b57cec5SDimitry Andricdef : Pat<(v1i64 (int_arm_neon_vbsl (v1i64 DPR:$src1), 54610b57cec5SDimitry Andric (v1i64 DPR:$Vn), (v1i64 DPR:$Vm))), 54620b57cec5SDimitry Andric (VBSLd DPR:$src1, DPR:$Vn, DPR:$Vm)>; 54630b57cec5SDimitry Andric 54640b57cec5SDimitry Andricdef : Pat<(v2i32 (or (and DPR:$Vn, DPR:$Vd), 54650b57cec5SDimitry Andric (and DPR:$Vm, (vnotd DPR:$Vd)))), 54660b57cec5SDimitry Andric (VBSLd DPR:$Vd, DPR:$Vn, DPR:$Vm)>; 54670b57cec5SDimitry Andric 54680b57cec5SDimitry Andricdef : Pat<(v1i64 (or (and DPR:$Vn, DPR:$Vd), 54690b57cec5SDimitry Andric (and DPR:$Vm, (vnotd DPR:$Vd)))), 54700b57cec5SDimitry Andric (VBSLd DPR:$Vd, DPR:$Vn, DPR:$Vm)>; 54710b57cec5SDimitry Andric} 54720b57cec5SDimitry Andric 54730b57cec5SDimitry Andricdef VBSLq : N3VX<1, 0, 0b01, 0b0001, 1, 1, (outs QPR:$Vd), 54740b57cec5SDimitry Andric (ins QPR:$src1, QPR:$Vn, QPR:$Vm), 54750b57cec5SDimitry Andric N3RegFrm, IIC_VCNTiQ, 54760b57cec5SDimitry Andric "vbsl", "$Vd, $Vn, $Vm", "$src1 = $Vd", 54770b57cec5SDimitry Andric [(set QPR:$Vd, 54780b57cec5SDimitry Andric (v4i32 (NEONvbsl QPR:$src1, QPR:$Vn, QPR:$Vm)))]>; 54790b57cec5SDimitry Andric 54800b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 54810b57cec5SDimitry Andricdef : Pat<(v16i8 (int_arm_neon_vbsl (v16i8 QPR:$src1), 54820b57cec5SDimitry Andric (v16i8 QPR:$Vn), (v16i8 QPR:$Vm))), 54830b57cec5SDimitry Andric (VBSLq QPR:$src1, QPR:$Vn, QPR:$Vm)>; 54840b57cec5SDimitry Andricdef : Pat<(v8i16 (int_arm_neon_vbsl (v8i16 QPR:$src1), 54850b57cec5SDimitry Andric (v8i16 QPR:$Vn), (v8i16 QPR:$Vm))), 54860b57cec5SDimitry Andric (VBSLq QPR:$src1, QPR:$Vn, QPR:$Vm)>; 54870b57cec5SDimitry Andricdef : Pat<(v4i32 (int_arm_neon_vbsl (v4i32 QPR:$src1), 54880b57cec5SDimitry Andric (v4i32 QPR:$Vn), (v4i32 QPR:$Vm))), 54890b57cec5SDimitry Andric (VBSLq QPR:$src1, QPR:$Vn, QPR:$Vm)>; 54900b57cec5SDimitry Andricdef : Pat<(v4f32 (int_arm_neon_vbsl (v4f32 QPR:$src1), 54910b57cec5SDimitry Andric (v4f32 QPR:$Vn), (v4f32 QPR:$Vm))), 54920b57cec5SDimitry Andric (VBSLq QPR:$src1, QPR:$Vn, QPR:$Vm)>; 54930b57cec5SDimitry Andricdef : Pat<(v2i64 (int_arm_neon_vbsl (v2i64 QPR:$src1), 54940b57cec5SDimitry Andric (v2i64 QPR:$Vn), (v2i64 QPR:$Vm))), 54950b57cec5SDimitry Andric (VBSLq QPR:$src1, QPR:$Vn, QPR:$Vm)>; 54960b57cec5SDimitry Andric 54970b57cec5SDimitry Andricdef : Pat<(v4i32 (or (and QPR:$Vn, QPR:$Vd), 54980b57cec5SDimitry Andric (and QPR:$Vm, (vnotq QPR:$Vd)))), 54990b57cec5SDimitry Andric (VBSLq QPR:$Vd, QPR:$Vn, QPR:$Vm)>; 55000b57cec5SDimitry Andricdef : Pat<(v2i64 (or (and QPR:$Vn, QPR:$Vd), 55010b57cec5SDimitry Andric (and QPR:$Vm, (vnotq QPR:$Vd)))), 55020b57cec5SDimitry Andric (VBSLq QPR:$Vd, QPR:$Vn, QPR:$Vm)>; 55030b57cec5SDimitry Andric} 55040b57cec5SDimitry Andric 55050b57cec5SDimitry Andric// VBIF : Vector Bitwise Insert if False 55060b57cec5SDimitry Andric// like VBSL but with: "vbif $dst, $src3, $src1", "$src2 = $dst", 55070b57cec5SDimitry Andric// FIXME: This instruction's encoding MAY NOT BE correct. 55080b57cec5SDimitry Andricdef VBIFd : N3VX<1, 0, 0b11, 0b0001, 0, 1, 55090b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm), 55100b57cec5SDimitry Andric N3RegFrm, IIC_VBINiD, 55110b57cec5SDimitry Andric "vbif", "$Vd, $Vn, $Vm", "$src1 = $Vd", 55120b57cec5SDimitry Andric []>; 55130b57cec5SDimitry Andricdef VBIFq : N3VX<1, 0, 0b11, 0b0001, 1, 1, 55140b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm), 55150b57cec5SDimitry Andric N3RegFrm, IIC_VBINiQ, 55160b57cec5SDimitry Andric "vbif", "$Vd, $Vn, $Vm", "$src1 = $Vd", 55170b57cec5SDimitry Andric []>; 55180b57cec5SDimitry Andric 55190b57cec5SDimitry Andric// VBIT : Vector Bitwise Insert if True 55200b57cec5SDimitry Andric// like VBSL but with: "vbit $dst, $src2, $src1", "$src3 = $dst", 55210b57cec5SDimitry Andric// FIXME: This instruction's encoding MAY NOT BE correct. 55220b57cec5SDimitry Andricdef VBITd : N3VX<1, 0, 0b10, 0b0001, 0, 1, 55230b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm), 55240b57cec5SDimitry Andric N3RegFrm, IIC_VBINiD, 55250b57cec5SDimitry Andric "vbit", "$Vd, $Vn, $Vm", "$src1 = $Vd", 55260b57cec5SDimitry Andric []>; 55270b57cec5SDimitry Andricdef VBITq : N3VX<1, 0, 0b10, 0b0001, 1, 1, 55280b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm), 55290b57cec5SDimitry Andric N3RegFrm, IIC_VBINiQ, 55300b57cec5SDimitry Andric "vbit", "$Vd, $Vn, $Vm", "$src1 = $Vd", 55310b57cec5SDimitry Andric []>; 55320b57cec5SDimitry Andric 55330b57cec5SDimitry Andric// VBIT/VBIF are not yet implemented. The TwoAddress pass will not go looking 55340b57cec5SDimitry Andric// for equivalent operations with different register constraints; it just 55350b57cec5SDimitry Andric// inserts copies. 55360b57cec5SDimitry Andric 55370b57cec5SDimitry Andric// Vector Absolute Differences. 55380b57cec5SDimitry Andric 55390b57cec5SDimitry Andric// VABD : Vector Absolute Difference 55400b57cec5SDimitry Andricdefm VABDs : N3VInt_QHS<0, 0, 0b0111, 0, N3RegFrm, 55410b57cec5SDimitry Andric IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, 55420b57cec5SDimitry Andric "vabd", "s", int_arm_neon_vabds, 1>; 55430b57cec5SDimitry Andricdefm VABDu : N3VInt_QHS<1, 0, 0b0111, 0, N3RegFrm, 55440b57cec5SDimitry Andric IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, 55450b57cec5SDimitry Andric "vabd", "u", int_arm_neon_vabdu, 1>; 55460b57cec5SDimitry Andricdef VABDfd : N3VDInt<1, 0, 0b10, 0b1101, 0, N3RegFrm, IIC_VBIND, 55470b57cec5SDimitry Andric "vabd", "f32", v2f32, v2f32, int_arm_neon_vabds, 1>; 55480b57cec5SDimitry Andricdef VABDfq : N3VQInt<1, 0, 0b10, 0b1101, 0, N3RegFrm, IIC_VBINQ, 55490b57cec5SDimitry Andric "vabd", "f32", v4f32, v4f32, int_arm_neon_vabds, 1>; 55500b57cec5SDimitry Andricdef VABDhd : N3VDInt<1, 0, 0b11, 0b1101, 0, N3RegFrm, IIC_VBIND, 55510b57cec5SDimitry Andric "vabd", "f16", v4f16, v4f16, int_arm_neon_vabds, 1>, 55520b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 55530b57cec5SDimitry Andricdef VABDhq : N3VQInt<1, 0, 0b11, 0b1101, 0, N3RegFrm, IIC_VBINQ, 55540b57cec5SDimitry Andric "vabd", "f16", v8f16, v8f16, int_arm_neon_vabds, 1>, 55550b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 55560b57cec5SDimitry Andric 55570b57cec5SDimitry Andric// VABDL : Vector Absolute Difference Long (Q = | D - D |) 55580b57cec5SDimitry Andricdefm VABDLs : N3VLIntExt_QHS<0,1,0b0111,0, IIC_VSUBi4Q, 55590b57cec5SDimitry Andric "vabdl", "s", int_arm_neon_vabds, zext, 1>; 55600b57cec5SDimitry Andricdefm VABDLu : N3VLIntExt_QHS<1,1,0b0111,0, IIC_VSUBi4Q, 55610b57cec5SDimitry Andric "vabdl", "u", int_arm_neon_vabdu, zext, 1>; 55620b57cec5SDimitry Andric 55630b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 55640b57cec5SDimitry Andricdef : Pat<(v8i16 (abs (sub (zext (v8i8 DPR:$opA)), (zext (v8i8 DPR:$opB))))), 55650b57cec5SDimitry Andric (VABDLuv8i16 DPR:$opA, DPR:$opB)>; 55660b57cec5SDimitry Andricdef : Pat<(v4i32 (abs (sub (zext (v4i16 DPR:$opA)), (zext (v4i16 DPR:$opB))))), 55670b57cec5SDimitry Andric (VABDLuv4i32 DPR:$opA, DPR:$opB)>; 55680b57cec5SDimitry Andric} 55690b57cec5SDimitry Andric 55700b57cec5SDimitry Andric// ISD::ABS is not legal for v2i64, so VABDL needs to be matched from the 55710b57cec5SDimitry Andric// shift/xor pattern for ABS. 55720b57cec5SDimitry Andric 55730b57cec5SDimitry Andricdef abd_shr : 55740b57cec5SDimitry Andric PatFrag<(ops node:$in1, node:$in2, node:$shift), 55750b57cec5SDimitry Andric (ARMvshrsImm (sub (zext node:$in1), 55760b57cec5SDimitry Andric (zext node:$in2)), (i32 $shift))>; 55770b57cec5SDimitry Andric 55780b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 55790b57cec5SDimitry Andricdef : Pat<(xor (v4i32 (bitconvert (v2i64 (abd_shr (v2i32 DPR:$opA), (v2i32 DPR:$opB), 63)))), 55800b57cec5SDimitry Andric (v4i32 (bitconvert (v2i64 (add (sub (zext (v2i32 DPR:$opA)), 55810b57cec5SDimitry Andric (zext (v2i32 DPR:$opB))), 55820b57cec5SDimitry Andric (abd_shr (v2i32 DPR:$opA), (v2i32 DPR:$opB), 63)))))), 55830b57cec5SDimitry Andric (VABDLuv2i64 DPR:$opA, DPR:$opB)>; 55840b57cec5SDimitry Andric} 55850b57cec5SDimitry Andric 55860b57cec5SDimitry Andric// VABA : Vector Absolute Difference and Accumulate 55870b57cec5SDimitry Andricdefm VABAs : N3VIntOp_QHS<0,0,0b0111,1, IIC_VABAD, IIC_VABAQ, 55880b57cec5SDimitry Andric "vaba", "s", int_arm_neon_vabds, add>; 55890b57cec5SDimitry Andricdefm VABAu : N3VIntOp_QHS<1,0,0b0111,1, IIC_VABAD, IIC_VABAQ, 55900b57cec5SDimitry Andric "vaba", "u", int_arm_neon_vabdu, add>; 55910b57cec5SDimitry Andric 55920b57cec5SDimitry Andric// VABAL : Vector Absolute Difference and Accumulate Long (Q += | D - D |) 55930b57cec5SDimitry Andricdefm VABALs : N3VLIntExtOp_QHS<0,1,0b0101,0, IIC_VABAD, 55940b57cec5SDimitry Andric "vabal", "s", int_arm_neon_vabds, zext, add>; 55950b57cec5SDimitry Andricdefm VABALu : N3VLIntExtOp_QHS<1,1,0b0101,0, IIC_VABAD, 55960b57cec5SDimitry Andric "vabal", "u", int_arm_neon_vabdu, zext, add>; 55970b57cec5SDimitry Andric 55980b57cec5SDimitry Andric// Vector Maximum and Minimum. 55990b57cec5SDimitry Andric 56000b57cec5SDimitry Andric// VMAX : Vector Maximum 56010b57cec5SDimitry Andricdefm VMAXs : N3VInt_QHS<0, 0, 0b0110, 0, N3RegFrm, 56020b57cec5SDimitry Andric IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, 56030b57cec5SDimitry Andric "vmax", "s", smax, 1>; 56040b57cec5SDimitry Andricdefm VMAXu : N3VInt_QHS<1, 0, 0b0110, 0, N3RegFrm, 56050b57cec5SDimitry Andric IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, 56060b57cec5SDimitry Andric "vmax", "u", umax, 1>; 56070b57cec5SDimitry Andricdef VMAXfd : N3VDInt<0, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VBIND, 56080b57cec5SDimitry Andric "vmax", "f32", 56090b57cec5SDimitry Andric v2f32, v2f32, fmaximum, 1>; 56100b57cec5SDimitry Andricdef VMAXfq : N3VQInt<0, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VBINQ, 56110b57cec5SDimitry Andric "vmax", "f32", 56120b57cec5SDimitry Andric v4f32, v4f32, fmaximum, 1>; 56130b57cec5SDimitry Andricdef VMAXhd : N3VDInt<0, 0, 0b01, 0b1111, 0, N3RegFrm, IIC_VBIND, 56140b57cec5SDimitry Andric "vmax", "f16", 56150b57cec5SDimitry Andric v4f16, v4f16, fmaximum, 1>, 56160b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 56170b57cec5SDimitry Andricdef VMAXhq : N3VQInt<0, 0, 0b01, 0b1111, 0, N3RegFrm, IIC_VBINQ, 56180b57cec5SDimitry Andric "vmax", "f16", 56190b57cec5SDimitry Andric v8f16, v8f16, fmaximum, 1>, 56200b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 56210b57cec5SDimitry Andric 56220b57cec5SDimitry Andric// VMAXNM 56230b57cec5SDimitry Andriclet PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" in { 56240b57cec5SDimitry Andric def NEON_VMAXNMNDf : N3VDIntnp<0b00110, 0b00, 0b1111, 0, 1, 56250b57cec5SDimitry Andric N3RegFrm, NoItinerary, "vmaxnm", "f32", 56260b57cec5SDimitry Andric v2f32, v2f32, fmaxnum, 1>, 56270b57cec5SDimitry Andric Requires<[HasV8, HasNEON]>; 56280b57cec5SDimitry Andric def NEON_VMAXNMNQf : N3VQIntnp<0b00110, 0b00, 0b1111, 1, 1, 56290b57cec5SDimitry Andric N3RegFrm, NoItinerary, "vmaxnm", "f32", 56300b57cec5SDimitry Andric v4f32, v4f32, fmaxnum, 1>, 56310b57cec5SDimitry Andric Requires<[HasV8, HasNEON]>; 56320b57cec5SDimitry Andric def NEON_VMAXNMNDh : N3VDIntnp<0b00110, 0b01, 0b1111, 0, 1, 56330b57cec5SDimitry Andric N3RegFrm, NoItinerary, "vmaxnm", "f16", 56340b57cec5SDimitry Andric v4f16, v4f16, fmaxnum, 1>, 56350b57cec5SDimitry Andric Requires<[HasV8, HasNEON, HasFullFP16]>; 56360b57cec5SDimitry Andric def NEON_VMAXNMNQh : N3VQIntnp<0b00110, 0b01, 0b1111, 1, 1, 56370b57cec5SDimitry Andric N3RegFrm, NoItinerary, "vmaxnm", "f16", 56380b57cec5SDimitry Andric v8f16, v8f16, fmaxnum, 1>, 56390b57cec5SDimitry Andric Requires<[HasV8, HasNEON, HasFullFP16]>; 56400b57cec5SDimitry Andric} 56410b57cec5SDimitry Andric 56420b57cec5SDimitry Andric// VMIN : Vector Minimum 56430b57cec5SDimitry Andricdefm VMINs : N3VInt_QHS<0, 0, 0b0110, 1, N3RegFrm, 56440b57cec5SDimitry Andric IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, 56450b57cec5SDimitry Andric "vmin", "s", smin, 1>; 56460b57cec5SDimitry Andricdefm VMINu : N3VInt_QHS<1, 0, 0b0110, 1, N3RegFrm, 56470b57cec5SDimitry Andric IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, 56480b57cec5SDimitry Andric "vmin", "u", umin, 1>; 56490b57cec5SDimitry Andricdef VMINfd : N3VDInt<0, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VBIND, 56500b57cec5SDimitry Andric "vmin", "f32", 56510b57cec5SDimitry Andric v2f32, v2f32, fminimum, 1>; 56520b57cec5SDimitry Andricdef VMINfq : N3VQInt<0, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VBINQ, 56530b57cec5SDimitry Andric "vmin", "f32", 56540b57cec5SDimitry Andric v4f32, v4f32, fminimum, 1>; 56550b57cec5SDimitry Andricdef VMINhd : N3VDInt<0, 0, 0b11, 0b1111, 0, N3RegFrm, IIC_VBIND, 56560b57cec5SDimitry Andric "vmin", "f16", 56570b57cec5SDimitry Andric v4f16, v4f16, fminimum, 1>, 56580b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 56590b57cec5SDimitry Andricdef VMINhq : N3VQInt<0, 0, 0b11, 0b1111, 0, N3RegFrm, IIC_VBINQ, 56600b57cec5SDimitry Andric "vmin", "f16", 56610b57cec5SDimitry Andric v8f16, v8f16, fminimum, 1>, 56620b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 56630b57cec5SDimitry Andric 56640b57cec5SDimitry Andric// VMINNM 56650b57cec5SDimitry Andriclet PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" in { 56660b57cec5SDimitry Andric def NEON_VMINNMNDf : N3VDIntnp<0b00110, 0b10, 0b1111, 0, 1, 56670b57cec5SDimitry Andric N3RegFrm, NoItinerary, "vminnm", "f32", 56680b57cec5SDimitry Andric v2f32, v2f32, fminnum, 1>, 56690b57cec5SDimitry Andric Requires<[HasV8, HasNEON]>; 56700b57cec5SDimitry Andric def NEON_VMINNMNQf : N3VQIntnp<0b00110, 0b10, 0b1111, 1, 1, 56710b57cec5SDimitry Andric N3RegFrm, NoItinerary, "vminnm", "f32", 56720b57cec5SDimitry Andric v4f32, v4f32, fminnum, 1>, 56730b57cec5SDimitry Andric Requires<[HasV8, HasNEON]>; 56740b57cec5SDimitry Andric def NEON_VMINNMNDh : N3VDIntnp<0b00110, 0b11, 0b1111, 0, 1, 56750b57cec5SDimitry Andric N3RegFrm, NoItinerary, "vminnm", "f16", 56760b57cec5SDimitry Andric v4f16, v4f16, fminnum, 1>, 56770b57cec5SDimitry Andric Requires<[HasV8, HasNEON, HasFullFP16]>; 56780b57cec5SDimitry Andric def NEON_VMINNMNQh : N3VQIntnp<0b00110, 0b11, 0b1111, 1, 1, 56790b57cec5SDimitry Andric N3RegFrm, NoItinerary, "vminnm", "f16", 56800b57cec5SDimitry Andric v8f16, v8f16, fminnum, 1>, 56810b57cec5SDimitry Andric Requires<[HasV8, HasNEON, HasFullFP16]>; 56820b57cec5SDimitry Andric} 56830b57cec5SDimitry Andric 56840b57cec5SDimitry Andric// Vector Pairwise Operations. 56850b57cec5SDimitry Andric 56860b57cec5SDimitry Andric// VPADD : Vector Pairwise Add 56870b57cec5SDimitry Andricdef VPADDi8 : N3VDInt<0, 0, 0b00, 0b1011, 1, N3RegFrm, IIC_VSHLiD, 56880b57cec5SDimitry Andric "vpadd", "i8", 56890b57cec5SDimitry Andric v8i8, v8i8, int_arm_neon_vpadd, 0>; 56900b57cec5SDimitry Andricdef VPADDi16 : N3VDInt<0, 0, 0b01, 0b1011, 1, N3RegFrm, IIC_VSHLiD, 56910b57cec5SDimitry Andric "vpadd", "i16", 56920b57cec5SDimitry Andric v4i16, v4i16, int_arm_neon_vpadd, 0>; 56930b57cec5SDimitry Andricdef VPADDi32 : N3VDInt<0, 0, 0b10, 0b1011, 1, N3RegFrm, IIC_VSHLiD, 56940b57cec5SDimitry Andric "vpadd", "i32", 56950b57cec5SDimitry Andric v2i32, v2i32, int_arm_neon_vpadd, 0>; 56960b57cec5SDimitry Andricdef VPADDf : N3VDInt<1, 0, 0b00, 0b1101, 0, N3RegFrm, 56970b57cec5SDimitry Andric IIC_VPBIND, "vpadd", "f32", 56980b57cec5SDimitry Andric v2f32, v2f32, int_arm_neon_vpadd, 0>; 56990b57cec5SDimitry Andricdef VPADDh : N3VDInt<1, 0, 0b01, 0b1101, 0, N3RegFrm, 57000b57cec5SDimitry Andric IIC_VPBIND, "vpadd", "f16", 57010b57cec5SDimitry Andric v4f16, v4f16, int_arm_neon_vpadd, 0>, 57020b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 57030b57cec5SDimitry Andric 57040b57cec5SDimitry Andric// VPADDL : Vector Pairwise Add Long 57050b57cec5SDimitry Andricdefm VPADDLs : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00100, 0, "vpaddl", "s", 57060b57cec5SDimitry Andric int_arm_neon_vpaddls>; 57070b57cec5SDimitry Andricdefm VPADDLu : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00101, 0, "vpaddl", "u", 57080b57cec5SDimitry Andric int_arm_neon_vpaddlu>; 57090b57cec5SDimitry Andric 57100b57cec5SDimitry Andric// VPADAL : Vector Pairwise Add and Accumulate Long 57110b57cec5SDimitry Andricdefm VPADALs : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01100, 0, "vpadal", "s", 57120b57cec5SDimitry Andric int_arm_neon_vpadals>; 57130b57cec5SDimitry Andricdefm VPADALu : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01101, 0, "vpadal", "u", 57140b57cec5SDimitry Andric int_arm_neon_vpadalu>; 57150b57cec5SDimitry Andric 57160b57cec5SDimitry Andric// VPMAX : Vector Pairwise Maximum 57170b57cec5SDimitry Andricdef VPMAXs8 : N3VDInt<0, 0, 0b00, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", 57180b57cec5SDimitry Andric "s8", v8i8, v8i8, int_arm_neon_vpmaxs, 0>; 57190b57cec5SDimitry Andricdef VPMAXs16 : N3VDInt<0, 0, 0b01, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", 57200b57cec5SDimitry Andric "s16", v4i16, v4i16, int_arm_neon_vpmaxs, 0>; 57210b57cec5SDimitry Andricdef VPMAXs32 : N3VDInt<0, 0, 0b10, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", 57220b57cec5SDimitry Andric "s32", v2i32, v2i32, int_arm_neon_vpmaxs, 0>; 57230b57cec5SDimitry Andricdef VPMAXu8 : N3VDInt<1, 0, 0b00, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", 57240b57cec5SDimitry Andric "u8", v8i8, v8i8, int_arm_neon_vpmaxu, 0>; 57250b57cec5SDimitry Andricdef VPMAXu16 : N3VDInt<1, 0, 0b01, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", 57260b57cec5SDimitry Andric "u16", v4i16, v4i16, int_arm_neon_vpmaxu, 0>; 57270b57cec5SDimitry Andricdef VPMAXu32 : N3VDInt<1, 0, 0b10, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", 57280b57cec5SDimitry Andric "u32", v2i32, v2i32, int_arm_neon_vpmaxu, 0>; 57290b57cec5SDimitry Andricdef VPMAXf : N3VDInt<1, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VPBIND, "vpmax", 57300b57cec5SDimitry Andric "f32", v2f32, v2f32, int_arm_neon_vpmaxs, 0>; 57310b57cec5SDimitry Andricdef VPMAXh : N3VDInt<1, 0, 0b01, 0b1111, 0, N3RegFrm, IIC_VPBIND, "vpmax", 57320b57cec5SDimitry Andric "f16", v4f16, v4f16, int_arm_neon_vpmaxs, 0>, 57330b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 57340b57cec5SDimitry Andric 57350b57cec5SDimitry Andric// VPMIN : Vector Pairwise Minimum 57360b57cec5SDimitry Andricdef VPMINs8 : N3VDInt<0, 0, 0b00, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", 57370b57cec5SDimitry Andric "s8", v8i8, v8i8, int_arm_neon_vpmins, 0>; 57380b57cec5SDimitry Andricdef VPMINs16 : N3VDInt<0, 0, 0b01, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", 57390b57cec5SDimitry Andric "s16", v4i16, v4i16, int_arm_neon_vpmins, 0>; 57400b57cec5SDimitry Andricdef VPMINs32 : N3VDInt<0, 0, 0b10, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", 57410b57cec5SDimitry Andric "s32", v2i32, v2i32, int_arm_neon_vpmins, 0>; 57420b57cec5SDimitry Andricdef VPMINu8 : N3VDInt<1, 0, 0b00, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", 57430b57cec5SDimitry Andric "u8", v8i8, v8i8, int_arm_neon_vpminu, 0>; 57440b57cec5SDimitry Andricdef VPMINu16 : N3VDInt<1, 0, 0b01, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", 57450b57cec5SDimitry Andric "u16", v4i16, v4i16, int_arm_neon_vpminu, 0>; 57460b57cec5SDimitry Andricdef VPMINu32 : N3VDInt<1, 0, 0b10, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", 57470b57cec5SDimitry Andric "u32", v2i32, v2i32, int_arm_neon_vpminu, 0>; 57480b57cec5SDimitry Andricdef VPMINf : N3VDInt<1, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VPBIND, "vpmin", 57490b57cec5SDimitry Andric "f32", v2f32, v2f32, int_arm_neon_vpmins, 0>; 57500b57cec5SDimitry Andricdef VPMINh : N3VDInt<1, 0, 0b11, 0b1111, 0, N3RegFrm, IIC_VPBIND, "vpmin", 57510b57cec5SDimitry Andric "f16", v4f16, v4f16, int_arm_neon_vpmins, 0>, 57520b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 57530b57cec5SDimitry Andric 57540b57cec5SDimitry Andric// Vector Reciprocal and Reciprocal Square Root Estimate and Step. 57550b57cec5SDimitry Andric 57560b57cec5SDimitry Andric// VRECPE : Vector Reciprocal Estimate 57570b57cec5SDimitry Andricdef VRECPEd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0, 57580b57cec5SDimitry Andric IIC_VUNAD, "vrecpe", "u32", 57590b57cec5SDimitry Andric v2i32, v2i32, int_arm_neon_vrecpe>; 57600b57cec5SDimitry Andricdef VRECPEq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0, 57610b57cec5SDimitry Andric IIC_VUNAQ, "vrecpe", "u32", 57620b57cec5SDimitry Andric v4i32, v4i32, int_arm_neon_vrecpe>; 57630b57cec5SDimitry Andricdef VRECPEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0, 57640b57cec5SDimitry Andric IIC_VUNAD, "vrecpe", "f32", 57650b57cec5SDimitry Andric v2f32, v2f32, int_arm_neon_vrecpe>; 57660b57cec5SDimitry Andricdef VRECPEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0, 57670b57cec5SDimitry Andric IIC_VUNAQ, "vrecpe", "f32", 57680b57cec5SDimitry Andric v4f32, v4f32, int_arm_neon_vrecpe>; 57690b57cec5SDimitry Andricdef VRECPEhd : N2VDInt<0b11, 0b11, 0b01, 0b11, 0b01010, 0, 57700b57cec5SDimitry Andric IIC_VUNAD, "vrecpe", "f16", 57710b57cec5SDimitry Andric v4f16, v4f16, int_arm_neon_vrecpe>, 57720b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 57730b57cec5SDimitry Andricdef VRECPEhq : N2VQInt<0b11, 0b11, 0b01, 0b11, 0b01010, 0, 57740b57cec5SDimitry Andric IIC_VUNAQ, "vrecpe", "f16", 57750b57cec5SDimitry Andric v8f16, v8f16, int_arm_neon_vrecpe>, 57760b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 57770b57cec5SDimitry Andric 57780b57cec5SDimitry Andric// VRECPS : Vector Reciprocal Step 57790b57cec5SDimitry Andricdef VRECPSfd : N3VDInt<0, 0, 0b00, 0b1111, 1, N3RegFrm, 57800b57cec5SDimitry Andric IIC_VRECSD, "vrecps", "f32", 57810b57cec5SDimitry Andric v2f32, v2f32, int_arm_neon_vrecps, 1>; 57820b57cec5SDimitry Andricdef VRECPSfq : N3VQInt<0, 0, 0b00, 0b1111, 1, N3RegFrm, 57830b57cec5SDimitry Andric IIC_VRECSQ, "vrecps", "f32", 57840b57cec5SDimitry Andric v4f32, v4f32, int_arm_neon_vrecps, 1>; 57850b57cec5SDimitry Andricdef VRECPShd : N3VDInt<0, 0, 0b01, 0b1111, 1, N3RegFrm, 57860b57cec5SDimitry Andric IIC_VRECSD, "vrecps", "f16", 57870b57cec5SDimitry Andric v4f16, v4f16, int_arm_neon_vrecps, 1>, 57880b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 57890b57cec5SDimitry Andricdef VRECPShq : N3VQInt<0, 0, 0b01, 0b1111, 1, N3RegFrm, 57900b57cec5SDimitry Andric IIC_VRECSQ, "vrecps", "f16", 57910b57cec5SDimitry Andric v8f16, v8f16, int_arm_neon_vrecps, 1>, 57920b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 57930b57cec5SDimitry Andric 57940b57cec5SDimitry Andric// VRSQRTE : Vector Reciprocal Square Root Estimate 57950b57cec5SDimitry Andricdef VRSQRTEd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0, 57960b57cec5SDimitry Andric IIC_VUNAD, "vrsqrte", "u32", 57970b57cec5SDimitry Andric v2i32, v2i32, int_arm_neon_vrsqrte>; 57980b57cec5SDimitry Andricdef VRSQRTEq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0, 57990b57cec5SDimitry Andric IIC_VUNAQ, "vrsqrte", "u32", 58000b57cec5SDimitry Andric v4i32, v4i32, int_arm_neon_vrsqrte>; 58010b57cec5SDimitry Andricdef VRSQRTEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0, 58020b57cec5SDimitry Andric IIC_VUNAD, "vrsqrte", "f32", 58030b57cec5SDimitry Andric v2f32, v2f32, int_arm_neon_vrsqrte>; 58040b57cec5SDimitry Andricdef VRSQRTEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0, 58050b57cec5SDimitry Andric IIC_VUNAQ, "vrsqrte", "f32", 58060b57cec5SDimitry Andric v4f32, v4f32, int_arm_neon_vrsqrte>; 58070b57cec5SDimitry Andricdef VRSQRTEhd : N2VDInt<0b11, 0b11, 0b01, 0b11, 0b01011, 0, 58080b57cec5SDimitry Andric IIC_VUNAD, "vrsqrte", "f16", 58090b57cec5SDimitry Andric v4f16, v4f16, int_arm_neon_vrsqrte>, 58100b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 58110b57cec5SDimitry Andricdef VRSQRTEhq : N2VQInt<0b11, 0b11, 0b01, 0b11, 0b01011, 0, 58120b57cec5SDimitry Andric IIC_VUNAQ, "vrsqrte", "f16", 58130b57cec5SDimitry Andric v8f16, v8f16, int_arm_neon_vrsqrte>, 58140b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 58150b57cec5SDimitry Andric 58160b57cec5SDimitry Andric// VRSQRTS : Vector Reciprocal Square Root Step 58170b57cec5SDimitry Andricdef VRSQRTSfd : N3VDInt<0, 0, 0b10, 0b1111, 1, N3RegFrm, 58180b57cec5SDimitry Andric IIC_VRECSD, "vrsqrts", "f32", 58190b57cec5SDimitry Andric v2f32, v2f32, int_arm_neon_vrsqrts, 1>; 58200b57cec5SDimitry Andricdef VRSQRTSfq : N3VQInt<0, 0, 0b10, 0b1111, 1, N3RegFrm, 58210b57cec5SDimitry Andric IIC_VRECSQ, "vrsqrts", "f32", 58220b57cec5SDimitry Andric v4f32, v4f32, int_arm_neon_vrsqrts, 1>; 58230b57cec5SDimitry Andricdef VRSQRTShd : N3VDInt<0, 0, 0b11, 0b1111, 1, N3RegFrm, 58240b57cec5SDimitry Andric IIC_VRECSD, "vrsqrts", "f16", 58250b57cec5SDimitry Andric v4f16, v4f16, int_arm_neon_vrsqrts, 1>, 58260b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 58270b57cec5SDimitry Andricdef VRSQRTShq : N3VQInt<0, 0, 0b11, 0b1111, 1, N3RegFrm, 58280b57cec5SDimitry Andric IIC_VRECSQ, "vrsqrts", "f16", 58290b57cec5SDimitry Andric v8f16, v8f16, int_arm_neon_vrsqrts, 1>, 58300b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 58310b57cec5SDimitry Andric 58320b57cec5SDimitry Andric// Vector Shifts. 58330b57cec5SDimitry Andric 58340b57cec5SDimitry Andric// VSHL : Vector Shift 58350b57cec5SDimitry Andricdefm VSHLs : N3VInt_QHSDSh<0, 0, 0b0100, 0, N3RegVShFrm, 58360b57cec5SDimitry Andric IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, IIC_VSHLiQ, 58370b57cec5SDimitry Andric "vshl", "s", int_arm_neon_vshifts>; 58380b57cec5SDimitry Andricdefm VSHLu : N3VInt_QHSDSh<1, 0, 0b0100, 0, N3RegVShFrm, 58390b57cec5SDimitry Andric IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, IIC_VSHLiQ, 58400b57cec5SDimitry Andric "vshl", "u", int_arm_neon_vshiftu>; 58410b57cec5SDimitry Andric 58420b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 58430b57cec5SDimitry Andricdef : Pat<(v8i8 (ARMvshls (v8i8 DPR:$Dn), (v8i8 DPR:$Dm))), 58440b57cec5SDimitry Andric (VSHLsv8i8 DPR:$Dn, DPR:$Dm)>; 58450b57cec5SDimitry Andricdef : Pat<(v4i16 (ARMvshls (v4i16 DPR:$Dn), (v4i16 DPR:$Dm))), 58460b57cec5SDimitry Andric (VSHLsv4i16 DPR:$Dn, DPR:$Dm)>; 58470b57cec5SDimitry Andricdef : Pat<(v2i32 (ARMvshls (v2i32 DPR:$Dn), (v2i32 DPR:$Dm))), 58480b57cec5SDimitry Andric (VSHLsv2i32 DPR:$Dn, DPR:$Dm)>; 58490b57cec5SDimitry Andricdef : Pat<(v1i64 (ARMvshls (v1i64 DPR:$Dn), (v1i64 DPR:$Dm))), 58500b57cec5SDimitry Andric (VSHLsv1i64 DPR:$Dn, DPR:$Dm)>; 58510b57cec5SDimitry Andricdef : Pat<(v16i8 (ARMvshls (v16i8 QPR:$Dn), (v16i8 QPR:$Dm))), 58520b57cec5SDimitry Andric (VSHLsv16i8 QPR:$Dn, QPR:$Dm)>; 58530b57cec5SDimitry Andricdef : Pat<(v8i16 (ARMvshls (v8i16 QPR:$Dn), (v8i16 QPR:$Dm))), 58540b57cec5SDimitry Andric (VSHLsv8i16 QPR:$Dn, QPR:$Dm)>; 58550b57cec5SDimitry Andricdef : Pat<(v4i32 (ARMvshls (v4i32 QPR:$Dn), (v4i32 QPR:$Dm))), 58560b57cec5SDimitry Andric (VSHLsv4i32 QPR:$Dn, QPR:$Dm)>; 58570b57cec5SDimitry Andricdef : Pat<(v2i64 (ARMvshls (v2i64 QPR:$Dn), (v2i64 QPR:$Dm))), 58580b57cec5SDimitry Andric (VSHLsv2i64 QPR:$Dn, QPR:$Dm)>; 58590b57cec5SDimitry Andric 58600b57cec5SDimitry Andricdef : Pat<(v8i8 (ARMvshlu (v8i8 DPR:$Dn), (v8i8 DPR:$Dm))), 58610b57cec5SDimitry Andric (VSHLuv8i8 DPR:$Dn, DPR:$Dm)>; 58620b57cec5SDimitry Andricdef : Pat<(v4i16 (ARMvshlu (v4i16 DPR:$Dn), (v4i16 DPR:$Dm))), 58630b57cec5SDimitry Andric (VSHLuv4i16 DPR:$Dn, DPR:$Dm)>; 58640b57cec5SDimitry Andricdef : Pat<(v2i32 (ARMvshlu (v2i32 DPR:$Dn), (v2i32 DPR:$Dm))), 58650b57cec5SDimitry Andric (VSHLuv2i32 DPR:$Dn, DPR:$Dm)>; 58660b57cec5SDimitry Andricdef : Pat<(v1i64 (ARMvshlu (v1i64 DPR:$Dn), (v1i64 DPR:$Dm))), 58670b57cec5SDimitry Andric (VSHLuv1i64 DPR:$Dn, DPR:$Dm)>; 58680b57cec5SDimitry Andricdef : Pat<(v16i8 (ARMvshlu (v16i8 QPR:$Dn), (v16i8 QPR:$Dm))), 58690b57cec5SDimitry Andric (VSHLuv16i8 QPR:$Dn, QPR:$Dm)>; 58700b57cec5SDimitry Andricdef : Pat<(v8i16 (ARMvshlu (v8i16 QPR:$Dn), (v8i16 QPR:$Dm))), 58710b57cec5SDimitry Andric (VSHLuv8i16 QPR:$Dn, QPR:$Dm)>; 58720b57cec5SDimitry Andricdef : Pat<(v4i32 (ARMvshlu (v4i32 QPR:$Dn), (v4i32 QPR:$Dm))), 58730b57cec5SDimitry Andric (VSHLuv4i32 QPR:$Dn, QPR:$Dm)>; 58740b57cec5SDimitry Andricdef : Pat<(v2i64 (ARMvshlu (v2i64 QPR:$Dn), (v2i64 QPR:$Dm))), 58750b57cec5SDimitry Andric (VSHLuv2i64 QPR:$Dn, QPR:$Dm)>; 58760b57cec5SDimitry Andric 58770b57cec5SDimitry Andric} 58780b57cec5SDimitry Andric 58790b57cec5SDimitry Andric// VSHL : Vector Shift Left (Immediate) 58800b57cec5SDimitry Andricdefm VSHLi : N2VShL_QHSD<0, 1, 0b0101, 1, IIC_VSHLiD, "vshl", "i", ARMvshlImm>; 58810b57cec5SDimitry Andric 58820b57cec5SDimitry Andric// VSHR : Vector Shift Right (Immediate) 58830b57cec5SDimitry Andricdefm VSHRs : N2VShR_QHSD<0, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "s", "VSHRs", 58840b57cec5SDimitry Andric ARMvshrsImm>; 58850b57cec5SDimitry Andricdefm VSHRu : N2VShR_QHSD<1, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "u", "VSHRu", 58860b57cec5SDimitry Andric ARMvshruImm>; 58870b57cec5SDimitry Andric 58880b57cec5SDimitry Andric// VSHLL : Vector Shift Left Long 58890b57cec5SDimitry Andricdefm VSHLLs : N2VLSh_QHS<0, 1, 0b1010, 0, 0, 1, "vshll", "s", 58900b57cec5SDimitry Andric PatFrag<(ops node:$LHS, node:$RHS), (ARMvshlImm (sext node:$LHS), node:$RHS)>>; 58910b57cec5SDimitry Andricdefm VSHLLu : N2VLSh_QHS<1, 1, 0b1010, 0, 0, 1, "vshll", "u", 58920b57cec5SDimitry Andric PatFrag<(ops node:$LHS, node:$RHS), (ARMvshlImm (zext node:$LHS), node:$RHS)>>; 58930b57cec5SDimitry Andric 58940b57cec5SDimitry Andric// VSHLL : Vector Shift Left Long (with maximum shift count) 58950b57cec5SDimitry Andricclass N2VLShMax<bit op24, bit op23, bits<6> op21_16, bits<4> op11_8, bit op7, 58960b57cec5SDimitry Andric bit op6, bit op4, string OpcodeStr, string Dt, ValueType ResTy, 58970b57cec5SDimitry Andric ValueType OpTy, Operand ImmTy> 58980b57cec5SDimitry Andric : N2VLSh<op24, op23, op11_8, op7, op6, op4, OpcodeStr, Dt, 58990b57cec5SDimitry Andric ResTy, OpTy, ImmTy, null_frag> { 59000b57cec5SDimitry Andric let Inst{21-16} = op21_16; 59010b57cec5SDimitry Andric let DecoderMethod = "DecodeVSHLMaxInstruction"; 59020b57cec5SDimitry Andric} 59030b57cec5SDimitry Andricdef VSHLLi8 : N2VLShMax<1, 1, 0b110010, 0b0011, 0, 0, 0, "vshll", "i8", 59040b57cec5SDimitry Andric v8i16, v8i8, imm8>; 59050b57cec5SDimitry Andricdef VSHLLi16 : N2VLShMax<1, 1, 0b110110, 0b0011, 0, 0, 0, "vshll", "i16", 59060b57cec5SDimitry Andric v4i32, v4i16, imm16>; 59070b57cec5SDimitry Andricdef VSHLLi32 : N2VLShMax<1, 1, 0b111010, 0b0011, 0, 0, 0, "vshll", "i32", 59080b57cec5SDimitry Andric v2i64, v2i32, imm32>; 59090b57cec5SDimitry Andric 59100b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 59110b57cec5SDimitry Andricdef : Pat<(v8i16 (ARMvshlImm (zext (v8i8 DPR:$Rn)), (i32 8))), 59120b57cec5SDimitry Andric (VSHLLi8 DPR:$Rn, 8)>; 59130b57cec5SDimitry Andricdef : Pat<(v4i32 (ARMvshlImm (zext (v4i16 DPR:$Rn)), (i32 16))), 59140b57cec5SDimitry Andric (VSHLLi16 DPR:$Rn, 16)>; 59150b57cec5SDimitry Andricdef : Pat<(v2i64 (ARMvshlImm (zext (v2i32 DPR:$Rn)), (i32 32))), 59160b57cec5SDimitry Andric (VSHLLi32 DPR:$Rn, 32)>; 59170b57cec5SDimitry Andricdef : Pat<(v8i16 (ARMvshlImm (sext (v8i8 DPR:$Rn)), (i32 8))), 59180b57cec5SDimitry Andric (VSHLLi8 DPR:$Rn, 8)>; 59190b57cec5SDimitry Andricdef : Pat<(v4i32 (ARMvshlImm (sext (v4i16 DPR:$Rn)), (i32 16))), 59200b57cec5SDimitry Andric (VSHLLi16 DPR:$Rn, 16)>; 59210b57cec5SDimitry Andricdef : Pat<(v2i64 (ARMvshlImm (sext (v2i32 DPR:$Rn)), (i32 32))), 59220b57cec5SDimitry Andric (VSHLLi32 DPR:$Rn, 32)>; 59230b57cec5SDimitry Andricdef : Pat<(v8i16 (ARMvshlImm (anyext (v8i8 DPR:$Rn)), (i32 8))), 59240b57cec5SDimitry Andric (VSHLLi8 DPR:$Rn, 8)>; 59250b57cec5SDimitry Andricdef : Pat<(v4i32 (ARMvshlImm (anyext (v4i16 DPR:$Rn)), (i32 16))), 59260b57cec5SDimitry Andric (VSHLLi16 DPR:$Rn, 16)>; 59270b57cec5SDimitry Andricdef : Pat<(v2i64 (ARMvshlImm (anyext (v2i32 DPR:$Rn)), (i32 32))), 59280b57cec5SDimitry Andric (VSHLLi32 DPR:$Rn, 32)>; 59290b57cec5SDimitry Andric} 59300b57cec5SDimitry Andric 59310b57cec5SDimitry Andric// VSHRN : Vector Shift Right and Narrow 59320b57cec5SDimitry Andricdefm VSHRN : N2VNSh_HSD<0,1,0b1000,0,0,1, IIC_VSHLiD, "vshrn", "i", 59330b57cec5SDimitry Andric PatFrag<(ops node:$Rn, node:$amt), 59340b57cec5SDimitry Andric (trunc (ARMvshrsImm node:$Rn, node:$amt))>>; 59350b57cec5SDimitry Andric 59360b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 59370b57cec5SDimitry Andricdef : Pat<(v8i8 (trunc (ARMvshruImm (v8i16 QPR:$Vn), shr_imm8:$amt))), 59380b57cec5SDimitry Andric (VSHRNv8i8 QPR:$Vn, shr_imm8:$amt)>; 59390b57cec5SDimitry Andricdef : Pat<(v4i16 (trunc (ARMvshruImm (v4i32 QPR:$Vn), shr_imm16:$amt))), 59400b57cec5SDimitry Andric (VSHRNv4i16 QPR:$Vn, shr_imm16:$amt)>; 59410b57cec5SDimitry Andricdef : Pat<(v2i32 (trunc (ARMvshruImm (v2i64 QPR:$Vn), shr_imm32:$amt))), 59420b57cec5SDimitry Andric (VSHRNv2i32 QPR:$Vn, shr_imm32:$amt)>; 59430b57cec5SDimitry Andric} 59440b57cec5SDimitry Andric 59450b57cec5SDimitry Andric// VRSHL : Vector Rounding Shift 59460b57cec5SDimitry Andricdefm VRSHLs : N3VInt_QHSDSh<0, 0, 0b0101, 0, N3RegVShFrm, 59470b57cec5SDimitry Andric IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, 59480b57cec5SDimitry Andric "vrshl", "s", int_arm_neon_vrshifts>; 59490b57cec5SDimitry Andricdefm VRSHLu : N3VInt_QHSDSh<1, 0, 0b0101, 0, N3RegVShFrm, 59500b57cec5SDimitry Andric IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, 59510b57cec5SDimitry Andric "vrshl", "u", int_arm_neon_vrshiftu>; 59520b57cec5SDimitry Andric// VRSHR : Vector Rounding Shift Right 59530b57cec5SDimitry Andricdefm VRSHRs : N2VShR_QHSD<0,1,0b0010,1, IIC_VSHLi4D, "vrshr", "s", "VRSHRs", 59540b57cec5SDimitry Andric NEONvrshrsImm>; 59550b57cec5SDimitry Andricdefm VRSHRu : N2VShR_QHSD<1,1,0b0010,1, IIC_VSHLi4D, "vrshr", "u", "VRSHRu", 59560b57cec5SDimitry Andric NEONvrshruImm>; 59570b57cec5SDimitry Andric 59580b57cec5SDimitry Andric// VRSHRN : Vector Rounding Shift Right and Narrow 59590b57cec5SDimitry Andricdefm VRSHRN : N2VNSh_HSD<0, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vrshrn", "i", 59600b57cec5SDimitry Andric NEONvrshrnImm>; 59610b57cec5SDimitry Andric 59620b57cec5SDimitry Andric// VQSHL : Vector Saturating Shift 59630b57cec5SDimitry Andricdefm VQSHLs : N3VInt_QHSDSh<0, 0, 0b0100, 1, N3RegVShFrm, 59640b57cec5SDimitry Andric IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, 59650b57cec5SDimitry Andric "vqshl", "s", int_arm_neon_vqshifts>; 59660b57cec5SDimitry Andricdefm VQSHLu : N3VInt_QHSDSh<1, 0, 0b0100, 1, N3RegVShFrm, 59670b57cec5SDimitry Andric IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, 59680b57cec5SDimitry Andric "vqshl", "u", int_arm_neon_vqshiftu>; 59690b57cec5SDimitry Andric// VQSHL : Vector Saturating Shift Left (Immediate) 59700b57cec5SDimitry Andricdefm VQSHLsi : N2VShL_QHSD<0,1,0b0111,1, IIC_VSHLi4D, "vqshl", "s",NEONvqshlsImm>; 59710b57cec5SDimitry Andricdefm VQSHLui : N2VShL_QHSD<1,1,0b0111,1, IIC_VSHLi4D, "vqshl", "u",NEONvqshluImm>; 59720b57cec5SDimitry Andric 59730b57cec5SDimitry Andric// VQSHLU : Vector Saturating Shift Left (Immediate, Unsigned) 59740b57cec5SDimitry Andricdefm VQSHLsu : N2VShL_QHSD<1,1,0b0110,1, IIC_VSHLi4D,"vqshlu","s",NEONvqshlsuImm>; 59750b57cec5SDimitry Andric 59760b57cec5SDimitry Andric// VQSHRN : Vector Saturating Shift Right and Narrow 59770b57cec5SDimitry Andricdefm VQSHRNs : N2VNSh_HSD<0, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "s", 59780b57cec5SDimitry Andric NEONvqshrnsImm>; 59790b57cec5SDimitry Andricdefm VQSHRNu : N2VNSh_HSD<1, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "u", 59800b57cec5SDimitry Andric NEONvqshrnuImm>; 59810b57cec5SDimitry Andric 59820b57cec5SDimitry Andric// VQSHRUN : Vector Saturating Shift Right and Narrow (Unsigned) 59830b57cec5SDimitry Andricdefm VQSHRUN : N2VNSh_HSD<1, 1, 0b1000, 0, 0, 1, IIC_VSHLi4D, "vqshrun", "s", 59840b57cec5SDimitry Andric NEONvqshrnsuImm>; 59850b57cec5SDimitry Andric 59860b57cec5SDimitry Andric// VQRSHL : Vector Saturating Rounding Shift 59870b57cec5SDimitry Andricdefm VQRSHLs : N3VInt_QHSDSh<0, 0, 0b0101, 1, N3RegVShFrm, 59880b57cec5SDimitry Andric IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, 59890b57cec5SDimitry Andric "vqrshl", "s", int_arm_neon_vqrshifts>; 59900b57cec5SDimitry Andricdefm VQRSHLu : N3VInt_QHSDSh<1, 0, 0b0101, 1, N3RegVShFrm, 59910b57cec5SDimitry Andric IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, 59920b57cec5SDimitry Andric "vqrshl", "u", int_arm_neon_vqrshiftu>; 59930b57cec5SDimitry Andric 59940b57cec5SDimitry Andric// VQRSHRN : Vector Saturating Rounding Shift Right and Narrow 59950b57cec5SDimitry Andricdefm VQRSHRNs : N2VNSh_HSD<0, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "s", 59960b57cec5SDimitry Andric NEONvqrshrnsImm>; 59970b57cec5SDimitry Andricdefm VQRSHRNu : N2VNSh_HSD<1, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "u", 59980b57cec5SDimitry Andric NEONvqrshrnuImm>; 59990b57cec5SDimitry Andric 60000b57cec5SDimitry Andric// VQRSHRUN : Vector Saturating Rounding Shift Right and Narrow (Unsigned) 60010b57cec5SDimitry Andricdefm VQRSHRUN : N2VNSh_HSD<1, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vqrshrun", "s", 60020b57cec5SDimitry Andric NEONvqrshrnsuImm>; 60030b57cec5SDimitry Andric 60040b57cec5SDimitry Andric// VSRA : Vector Shift Right and Accumulate 60050b57cec5SDimitry Andricdefm VSRAs : N2VShAdd_QHSD<0, 1, 0b0001, 1, "vsra", "s", ARMvshrsImm>; 60060b57cec5SDimitry Andricdefm VSRAu : N2VShAdd_QHSD<1, 1, 0b0001, 1, "vsra", "u", ARMvshruImm>; 60070b57cec5SDimitry Andric// VRSRA : Vector Rounding Shift Right and Accumulate 60080b57cec5SDimitry Andricdefm VRSRAs : N2VShAdd_QHSD<0, 1, 0b0011, 1, "vrsra", "s", NEONvrshrsImm>; 60090b57cec5SDimitry Andricdefm VRSRAu : N2VShAdd_QHSD<1, 1, 0b0011, 1, "vrsra", "u", NEONvrshruImm>; 60100b57cec5SDimitry Andric 60110b57cec5SDimitry Andric// VSLI : Vector Shift Left and Insert 60120b57cec5SDimitry Andricdefm VSLI : N2VShInsL_QHSD<1, 1, 0b0101, 1, "vsli">; 60130b57cec5SDimitry Andric 60140b57cec5SDimitry Andric// VSRI : Vector Shift Right and Insert 60150b57cec5SDimitry Andricdefm VSRI : N2VShInsR_QHSD<1, 1, 0b0100, 1, "vsri">; 60160b57cec5SDimitry Andric 60170b57cec5SDimitry Andric// Vector Absolute and Saturating Absolute. 60180b57cec5SDimitry Andric 60190b57cec5SDimitry Andric// VABS : Vector Absolute Value 60200b57cec5SDimitry Andricdefm VABS : N2VInt_QHS<0b11, 0b11, 0b01, 0b00110, 0, 60210b57cec5SDimitry Andric IIC_VUNAiD, IIC_VUNAiQ, "vabs", "s", abs>; 60220b57cec5SDimitry Andricdef VABSfd : N2VD<0b11, 0b11, 0b10, 0b01, 0b01110, 0, 60230b57cec5SDimitry Andric "vabs", "f32", 60240b57cec5SDimitry Andric v2f32, v2f32, fabs>; 60250b57cec5SDimitry Andricdef VABSfq : N2VQ<0b11, 0b11, 0b10, 0b01, 0b01110, 0, 60260b57cec5SDimitry Andric "vabs", "f32", 60270b57cec5SDimitry Andric v4f32, v4f32, fabs>; 60280b57cec5SDimitry Andricdef VABShd : N2VD<0b11, 0b11, 0b01, 0b01, 0b01110, 0, 60290b57cec5SDimitry Andric "vabs", "f16", 60300b57cec5SDimitry Andric v4f16, v4f16, fabs>, 60310b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 60320b57cec5SDimitry Andricdef VABShq : N2VQ<0b11, 0b11, 0b01, 0b01, 0b01110, 0, 60330b57cec5SDimitry Andric "vabs", "f16", 60340b57cec5SDimitry Andric v8f16, v8f16, fabs>, 60350b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 60360b57cec5SDimitry Andric 60370b57cec5SDimitry Andric// VQABS : Vector Saturating Absolute Value 60380b57cec5SDimitry Andricdefm VQABS : N2VInt_QHS<0b11, 0b11, 0b00, 0b01110, 0, 60390b57cec5SDimitry Andric IIC_VQUNAiD, IIC_VQUNAiQ, "vqabs", "s", 60400b57cec5SDimitry Andric int_arm_neon_vqabs>; 60410b57cec5SDimitry Andric 60420b57cec5SDimitry Andric// Vector Negate. 60430b57cec5SDimitry Andric 60440b57cec5SDimitry Andricdef vnegd : PatFrag<(ops node:$in), 60450b57cec5SDimitry Andric (sub (bitconvert (v2i32 NEONimmAllZerosV)), node:$in)>; 60460b57cec5SDimitry Andricdef vnegq : PatFrag<(ops node:$in), 60470b57cec5SDimitry Andric (sub (bitconvert (v4i32 NEONimmAllZerosV)), node:$in)>; 60480b57cec5SDimitry Andric 60490b57cec5SDimitry Andricclass VNEGD<bits<2> size, string OpcodeStr, string Dt, ValueType Ty> 60500b57cec5SDimitry Andric : N2V<0b11, 0b11, size, 0b01, 0b00111, 0, 0, (outs DPR:$Vd), (ins DPR:$Vm), 60510b57cec5SDimitry Andric IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm", "", 60520b57cec5SDimitry Andric [(set DPR:$Vd, (Ty (vnegd DPR:$Vm)))]>; 60530b57cec5SDimitry Andricclass VNEGQ<bits<2> size, string OpcodeStr, string Dt, ValueType Ty> 60540b57cec5SDimitry Andric : N2V<0b11, 0b11, size, 0b01, 0b00111, 1, 0, (outs QPR:$Vd), (ins QPR:$Vm), 60550b57cec5SDimitry Andric IIC_VSHLiQ, OpcodeStr, Dt, "$Vd, $Vm", "", 60560b57cec5SDimitry Andric [(set QPR:$Vd, (Ty (vnegq QPR:$Vm)))]>; 60570b57cec5SDimitry Andric 60580b57cec5SDimitry Andric// VNEG : Vector Negate (integer) 60590b57cec5SDimitry Andricdef VNEGs8d : VNEGD<0b00, "vneg", "s8", v8i8>; 60600b57cec5SDimitry Andricdef VNEGs16d : VNEGD<0b01, "vneg", "s16", v4i16>; 60610b57cec5SDimitry Andricdef VNEGs32d : VNEGD<0b10, "vneg", "s32", v2i32>; 60620b57cec5SDimitry Andricdef VNEGs8q : VNEGQ<0b00, "vneg", "s8", v16i8>; 60630b57cec5SDimitry Andricdef VNEGs16q : VNEGQ<0b01, "vneg", "s16", v8i16>; 60640b57cec5SDimitry Andricdef VNEGs32q : VNEGQ<0b10, "vneg", "s32", v4i32>; 60650b57cec5SDimitry Andric 60660b57cec5SDimitry Andric// VNEG : Vector Negate (floating-point) 60670b57cec5SDimitry Andricdef VNEGfd : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 0, 0, 60680b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vm), IIC_VUNAD, 60690b57cec5SDimitry Andric "vneg", "f32", "$Vd, $Vm", "", 60700b57cec5SDimitry Andric [(set DPR:$Vd, (v2f32 (fneg DPR:$Vm)))]>; 60710b57cec5SDimitry Andricdef VNEGf32q : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 1, 0, 60720b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vm), IIC_VUNAQ, 60730b57cec5SDimitry Andric "vneg", "f32", "$Vd, $Vm", "", 60740b57cec5SDimitry Andric [(set QPR:$Vd, (v4f32 (fneg QPR:$Vm)))]>; 60750b57cec5SDimitry Andricdef VNEGhd : N2V<0b11, 0b11, 0b01, 0b01, 0b01111, 0, 0, 60760b57cec5SDimitry Andric (outs DPR:$Vd), (ins DPR:$Vm), IIC_VUNAD, 60770b57cec5SDimitry Andric "vneg", "f16", "$Vd, $Vm", "", 60780b57cec5SDimitry Andric [(set DPR:$Vd, (v4f16 (fneg DPR:$Vm)))]>, 60790b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 60800b57cec5SDimitry Andricdef VNEGhq : N2V<0b11, 0b11, 0b01, 0b01, 0b01111, 1, 0, 60810b57cec5SDimitry Andric (outs QPR:$Vd), (ins QPR:$Vm), IIC_VUNAQ, 60820b57cec5SDimitry Andric "vneg", "f16", "$Vd, $Vm", "", 60830b57cec5SDimitry Andric [(set QPR:$Vd, (v8f16 (fneg QPR:$Vm)))]>, 60840b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 60850b57cec5SDimitry Andric 60860b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 60870b57cec5SDimitry Andricdef : Pat<(v8i8 (vnegd DPR:$src)), (VNEGs8d DPR:$src)>; 60880b57cec5SDimitry Andricdef : Pat<(v4i16 (vnegd DPR:$src)), (VNEGs16d DPR:$src)>; 60890b57cec5SDimitry Andricdef : Pat<(v2i32 (vnegd DPR:$src)), (VNEGs32d DPR:$src)>; 60900b57cec5SDimitry Andricdef : Pat<(v16i8 (vnegq QPR:$src)), (VNEGs8q QPR:$src)>; 60910b57cec5SDimitry Andricdef : Pat<(v8i16 (vnegq QPR:$src)), (VNEGs16q QPR:$src)>; 60920b57cec5SDimitry Andricdef : Pat<(v4i32 (vnegq QPR:$src)), (VNEGs32q QPR:$src)>; 60930b57cec5SDimitry Andric} 60940b57cec5SDimitry Andric 60950b57cec5SDimitry Andric// VQNEG : Vector Saturating Negate 60960b57cec5SDimitry Andricdefm VQNEG : N2VInt_QHS<0b11, 0b11, 0b00, 0b01111, 0, 60970b57cec5SDimitry Andric IIC_VQUNAiD, IIC_VQUNAiQ, "vqneg", "s", 60980b57cec5SDimitry Andric int_arm_neon_vqneg>; 60990b57cec5SDimitry Andric 61000b57cec5SDimitry Andric// Vector Bit Counting Operations. 61010b57cec5SDimitry Andric 61020b57cec5SDimitry Andric// VCLS : Vector Count Leading Sign Bits 61030b57cec5SDimitry Andricdefm VCLS : N2VInt_QHS<0b11, 0b11, 0b00, 0b01000, 0, 61040b57cec5SDimitry Andric IIC_VCNTiD, IIC_VCNTiQ, "vcls", "s", 61050b57cec5SDimitry Andric int_arm_neon_vcls>; 61060b57cec5SDimitry Andric// VCLZ : Vector Count Leading Zeros 61070b57cec5SDimitry Andricdefm VCLZ : N2VInt_QHS<0b11, 0b11, 0b00, 0b01001, 0, 61080b57cec5SDimitry Andric IIC_VCNTiD, IIC_VCNTiQ, "vclz", "i", 61090b57cec5SDimitry Andric ctlz>; 61100b57cec5SDimitry Andric// VCNT : Vector Count One Bits 61110b57cec5SDimitry Andricdef VCNTd : N2VDInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0, 61120b57cec5SDimitry Andric IIC_VCNTiD, "vcnt", "8", 61130b57cec5SDimitry Andric v8i8, v8i8, ctpop>; 61140b57cec5SDimitry Andricdef VCNTq : N2VQInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0, 61150b57cec5SDimitry Andric IIC_VCNTiQ, "vcnt", "8", 61160b57cec5SDimitry Andric v16i8, v16i8, ctpop>; 61170b57cec5SDimitry Andric 61180b57cec5SDimitry Andric// Vector Swap 61190b57cec5SDimitry Andricdef VSWPd : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 0, 0, 61200b57cec5SDimitry Andric (outs DPR:$Vd, DPR:$Vm), (ins DPR:$in1, DPR:$in2), 61210b57cec5SDimitry Andric NoItinerary, "vswp", "$Vd, $Vm", "$in1 = $Vd, $in2 = $Vm", 61220b57cec5SDimitry Andric []>; 61230b57cec5SDimitry Andricdef VSWPq : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 1, 0, 61240b57cec5SDimitry Andric (outs QPR:$Vd, QPR:$Vm), (ins QPR:$in1, QPR:$in2), 61250b57cec5SDimitry Andric NoItinerary, "vswp", "$Vd, $Vm", "$in1 = $Vd, $in2 = $Vm", 61260b57cec5SDimitry Andric []>; 61270b57cec5SDimitry Andric 61280b57cec5SDimitry Andric// Vector Move Operations. 61290b57cec5SDimitry Andric 61300b57cec5SDimitry Andric// VMOV : Vector Move (Register) 61310b57cec5SDimitry Andricdef : NEONInstAlias<"vmov${p} $Vd, $Vm", 61320b57cec5SDimitry Andric (VORRd DPR:$Vd, DPR:$Vm, DPR:$Vm, pred:$p)>; 61330b57cec5SDimitry Andricdef : NEONInstAlias<"vmov${p} $Vd, $Vm", 61340b57cec5SDimitry Andric (VORRq QPR:$Vd, QPR:$Vm, QPR:$Vm, pred:$p)>; 61350b57cec5SDimitry Andric 61360b57cec5SDimitry Andric// VMOV : Vector Move (Immediate) 61370b57cec5SDimitry Andric 61380b57cec5SDimitry Andric// Although VMOVs are not strictly speaking cheap, they are as expensive 61390b57cec5SDimitry Andric// as their copies counterpart (VORR), so we should prefer rematerialization 61400b57cec5SDimitry Andric// over splitting when it applies. 61410b57cec5SDimitry Andriclet isReMaterializable = 1, isAsCheapAsAMove=1 in { 61420b57cec5SDimitry Andricdef VMOVv8i8 : N1ModImm<1, 0b000, 0b1110, 0, 0, 0, 1, (outs DPR:$Vd), 61430b57cec5SDimitry Andric (ins nImmSplatI8:$SIMM), IIC_VMOVImm, 61440b57cec5SDimitry Andric "vmov", "i8", "$Vd, $SIMM", "", 61450b57cec5SDimitry Andric [(set DPR:$Vd, (v8i8 (ARMvmovImm timm:$SIMM)))]>; 61460b57cec5SDimitry Andricdef VMOVv16i8 : N1ModImm<1, 0b000, 0b1110, 0, 1, 0, 1, (outs QPR:$Vd), 61470b57cec5SDimitry Andric (ins nImmSplatI8:$SIMM), IIC_VMOVImm, 61480b57cec5SDimitry Andric "vmov", "i8", "$Vd, $SIMM", "", 61490b57cec5SDimitry Andric [(set QPR:$Vd, (v16i8 (ARMvmovImm timm:$SIMM)))]>; 61500b57cec5SDimitry Andric 61510b57cec5SDimitry Andricdef VMOVv4i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 0, 0, 1, (outs DPR:$Vd), 61520b57cec5SDimitry Andric (ins nImmSplatI16:$SIMM), IIC_VMOVImm, 61530b57cec5SDimitry Andric "vmov", "i16", "$Vd, $SIMM", "", 61540b57cec5SDimitry Andric [(set DPR:$Vd, (v4i16 (ARMvmovImm timm:$SIMM)))]> { 61550b57cec5SDimitry Andric let Inst{9} = SIMM{9}; 61560b57cec5SDimitry Andric} 61570b57cec5SDimitry Andric 61580b57cec5SDimitry Andricdef VMOVv8i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 1, 0, 1, (outs QPR:$Vd), 61590b57cec5SDimitry Andric (ins nImmSplatI16:$SIMM), IIC_VMOVImm, 61600b57cec5SDimitry Andric "vmov", "i16", "$Vd, $SIMM", "", 61610b57cec5SDimitry Andric [(set QPR:$Vd, (v8i16 (ARMvmovImm timm:$SIMM)))]> { 61620b57cec5SDimitry Andric let Inst{9} = SIMM{9}; 61630b57cec5SDimitry Andric} 61640b57cec5SDimitry Andric 61650b57cec5SDimitry Andricdef VMOVv2i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 0, 0, 1, (outs DPR:$Vd), 61660b57cec5SDimitry Andric (ins nImmVMOVI32:$SIMM), IIC_VMOVImm, 61670b57cec5SDimitry Andric "vmov", "i32", "$Vd, $SIMM", "", 61680b57cec5SDimitry Andric [(set DPR:$Vd, (v2i32 (ARMvmovImm timm:$SIMM)))]> { 61690b57cec5SDimitry Andric let Inst{11-8} = SIMM{11-8}; 61700b57cec5SDimitry Andric} 61710b57cec5SDimitry Andric 61720b57cec5SDimitry Andricdef VMOVv4i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 1, 0, 1, (outs QPR:$Vd), 61730b57cec5SDimitry Andric (ins nImmVMOVI32:$SIMM), IIC_VMOVImm, 61740b57cec5SDimitry Andric "vmov", "i32", "$Vd, $SIMM", "", 61750b57cec5SDimitry Andric [(set QPR:$Vd, (v4i32 (ARMvmovImm timm:$SIMM)))]> { 61760b57cec5SDimitry Andric let Inst{11-8} = SIMM{11-8}; 61770b57cec5SDimitry Andric} 61780b57cec5SDimitry Andric 61790b57cec5SDimitry Andricdef VMOVv1i64 : N1ModImm<1, 0b000, 0b1110, 0, 0, 1, 1, (outs DPR:$Vd), 61800b57cec5SDimitry Andric (ins nImmSplatI64:$SIMM), IIC_VMOVImm, 61810b57cec5SDimitry Andric "vmov", "i64", "$Vd, $SIMM", "", 61820b57cec5SDimitry Andric [(set DPR:$Vd, (v1i64 (ARMvmovImm timm:$SIMM)))]>; 61830b57cec5SDimitry Andricdef VMOVv2i64 : N1ModImm<1, 0b000, 0b1110, 0, 1, 1, 1, (outs QPR:$Vd), 61840b57cec5SDimitry Andric (ins nImmSplatI64:$SIMM), IIC_VMOVImm, 61850b57cec5SDimitry Andric "vmov", "i64", "$Vd, $SIMM", "", 61860b57cec5SDimitry Andric [(set QPR:$Vd, (v2i64 (ARMvmovImm timm:$SIMM)))]>; 61870b57cec5SDimitry Andric 61880b57cec5SDimitry Andricdef VMOVv2f32 : N1ModImm<1, 0b000, 0b1111, 0, 0, 0, 1, (outs DPR:$Vd), 61890b57cec5SDimitry Andric (ins nImmVMOVF32:$SIMM), IIC_VMOVImm, 61900b57cec5SDimitry Andric "vmov", "f32", "$Vd, $SIMM", "", 61910b57cec5SDimitry Andric [(set DPR:$Vd, (v2f32 (ARMvmovFPImm timm:$SIMM)))]>; 61920b57cec5SDimitry Andricdef VMOVv4f32 : N1ModImm<1, 0b000, 0b1111, 0, 1, 0, 1, (outs QPR:$Vd), 61930b57cec5SDimitry Andric (ins nImmVMOVF32:$SIMM), IIC_VMOVImm, 61940b57cec5SDimitry Andric "vmov", "f32", "$Vd, $SIMM", "", 61950b57cec5SDimitry Andric [(set QPR:$Vd, (v4f32 (ARMvmovFPImm timm:$SIMM)))]>; 61960b57cec5SDimitry Andric} // isReMaterializable, isAsCheapAsAMove 61970b57cec5SDimitry Andric 61980b57cec5SDimitry Andric// Add support for bytes replication feature, so it could be GAS compatible. 61990b57cec5SDimitry Andricmulticlass NEONImmReplicateI8InstAlias<ValueType To> { 62000b57cec5SDimitry Andric // E.g. instructions below: 62010b57cec5SDimitry Andric // "vmov.i32 d0, #0xffffffff" 62020b57cec5SDimitry Andric // "vmov.i32 d0, #0xabababab" 62030b57cec5SDimitry Andric // "vmov.i16 d0, #0xabab" 62040b57cec5SDimitry Andric // are incorrect, but we could deal with such cases. 62050b57cec5SDimitry Andric // For last two instructions, for example, it should emit: 62060b57cec5SDimitry Andric // "vmov.i8 d0, #0xab" 62070b57cec5SDimitry Andric def : NEONInstAlias<"vmov${p}.i" # To.Size # " $Vd, $Vm", 62080b57cec5SDimitry Andric (VMOVv8i8 DPR:$Vd, nImmVMOVIReplicate<i8, To>:$Vm, pred:$p)>; 62090b57cec5SDimitry Andric def : NEONInstAlias<"vmov${p}.i" # To.Size # " $Vd, $Vm", 62100b57cec5SDimitry Andric (VMOVv16i8 QPR:$Vd, nImmVMOVIReplicate<i8, To>:$Vm, pred:$p)>; 62110b57cec5SDimitry Andric // Also add same support for VMVN instructions. So instruction: 62120b57cec5SDimitry Andric // "vmvn.i32 d0, #0xabababab" 62130b57cec5SDimitry Andric // actually means: 62140b57cec5SDimitry Andric // "vmov.i8 d0, #0x54" 62150b57cec5SDimitry Andric def : NEONInstAlias<"vmvn${p}.i" # To.Size # " $Vd, $Vm", 62160b57cec5SDimitry Andric (VMOVv8i8 DPR:$Vd, nImmVINVIReplicate<i8, To>:$Vm, pred:$p)>; 62170b57cec5SDimitry Andric def : NEONInstAlias<"vmvn${p}.i" # To.Size # " $Vd, $Vm", 62180b57cec5SDimitry Andric (VMOVv16i8 QPR:$Vd, nImmVINVIReplicate<i8, To>:$Vm, pred:$p)>; 62190b57cec5SDimitry Andric} 62200b57cec5SDimitry Andric 62210b57cec5SDimitry Andricdefm : NEONImmReplicateI8InstAlias<i16>; 62220b57cec5SDimitry Andricdefm : NEONImmReplicateI8InstAlias<i32>; 62230b57cec5SDimitry Andricdefm : NEONImmReplicateI8InstAlias<i64>; 62240b57cec5SDimitry Andric 62250b57cec5SDimitry Andric// Similar to above for types other than i8, e.g.: 62260b57cec5SDimitry Andric// "vmov.i32 d0, #0xab00ab00" -> "vmov.i16 d0, #0xab00" 62270b57cec5SDimitry Andric// "vmvn.i64 q0, #0xab000000ab000000" -> "vmvn.i32 q0, #0xab000000" 62280b57cec5SDimitry Andric// In this case we do not canonicalize VMVN to VMOV 62290b57cec5SDimitry Andricmulticlass NEONImmReplicateInstAlias<ValueType From, NeonI V8, NeonI V16, 62300b57cec5SDimitry Andric NeonI NV8, NeonI NV16, ValueType To> { 62310b57cec5SDimitry Andric def : NEONInstAlias<"vmov${p}.i" # To.Size # " $Vd, $Vm", 62320b57cec5SDimitry Andric (V8 DPR:$Vd, nImmVMOVIReplicate<From, To>:$Vm, pred:$p)>; 62330b57cec5SDimitry Andric def : NEONInstAlias<"vmov${p}.i" # To.Size # " $Vd, $Vm", 62340b57cec5SDimitry Andric (V16 QPR:$Vd, nImmVMOVIReplicate<From, To>:$Vm, pred:$p)>; 62350b57cec5SDimitry Andric def : NEONInstAlias<"vmvn${p}.i" # To.Size # " $Vd, $Vm", 62360b57cec5SDimitry Andric (NV8 DPR:$Vd, nImmVMOVIReplicate<From, To>:$Vm, pred:$p)>; 62370b57cec5SDimitry Andric def : NEONInstAlias<"vmvn${p}.i" # To.Size # " $Vd, $Vm", 62380b57cec5SDimitry Andric (NV16 QPR:$Vd, nImmVMOVIReplicate<From, To>:$Vm, pred:$p)>; 62390b57cec5SDimitry Andric} 62400b57cec5SDimitry Andric 62410b57cec5SDimitry Andricdefm : NEONImmReplicateInstAlias<i16, VMOVv4i16, VMOVv8i16, 62420b57cec5SDimitry Andric VMVNv4i16, VMVNv8i16, i32>; 62430b57cec5SDimitry Andricdefm : NEONImmReplicateInstAlias<i16, VMOVv4i16, VMOVv8i16, 62440b57cec5SDimitry Andric VMVNv4i16, VMVNv8i16, i64>; 62450b57cec5SDimitry Andricdefm : NEONImmReplicateInstAlias<i32, VMOVv2i32, VMOVv4i32, 62460b57cec5SDimitry Andric VMVNv2i32, VMVNv4i32, i64>; 62470b57cec5SDimitry Andric// TODO: add "VMOV <-> VMVN" conversion for cases like 62480b57cec5SDimitry Andric// "vmov.i32 d0, #0xffaaffaa" -> "vmvn.i16 d0, #0x55" 62490b57cec5SDimitry Andric// "vmvn.i32 d0, #0xaaffaaff" -> "vmov.i16 d0, #0xff00" 62500b57cec5SDimitry Andric 62510b57cec5SDimitry Andric// On some CPUs the two instructions "vmov.i32 dD, #0" and "vmov.i32 qD, #0" 62520b57cec5SDimitry Andric// require zero cycles to execute so they should be used wherever possible for 62530b57cec5SDimitry Andric// setting a register to zero. 62540b57cec5SDimitry Andric 62550b57cec5SDimitry Andric// Even without these pseudo-insts we would probably end up with the correct 62560b57cec5SDimitry Andric// instruction, but we could not mark the general ones with "isAsCheapAsAMove" 62570b57cec5SDimitry Andric// since they are sometimes rather expensive (in general). 62580b57cec5SDimitry Andric 62590b57cec5SDimitry Andriclet AddedComplexity = 50, isAsCheapAsAMove = 1, isReMaterializable = 1 in { 62600b57cec5SDimitry Andric def VMOVD0 : ARMPseudoExpand<(outs DPR:$Vd), (ins), 4, IIC_VMOVImm, 62610b57cec5SDimitry Andric [(set DPR:$Vd, (v2i32 NEONimmAllZerosV))], 62620b57cec5SDimitry Andric (VMOVv2i32 DPR:$Vd, 0, (ops 14, zero_reg))>, 62630b57cec5SDimitry Andric Requires<[HasZCZ]>; 62640b57cec5SDimitry Andric def VMOVQ0 : ARMPseudoExpand<(outs QPR:$Vd), (ins), 4, IIC_VMOVImm, 62650b57cec5SDimitry Andric [(set QPR:$Vd, (v4i32 NEONimmAllZerosV))], 62660b57cec5SDimitry Andric (VMOVv4i32 QPR:$Vd, 0, (ops 14, zero_reg))>, 62670b57cec5SDimitry Andric Requires<[HasZCZ]>; 62680b57cec5SDimitry Andric} 62690b57cec5SDimitry Andric 62700b57cec5SDimitry Andric// VMOV : Vector Get Lane (move scalar to ARM core register) 62710b57cec5SDimitry Andric 62720b57cec5SDimitry Andricdef VGETLNs8 : NVGetLane<{1,1,1,0,0,1,?,1}, 0b1011, {?,?}, 62730b57cec5SDimitry Andric (outs GPR:$R), (ins DPR:$V, VectorIndex8:$lane), 62740b57cec5SDimitry Andric IIC_VMOVSI, "vmov", "s8", "$R, $V$lane", 62750b57cec5SDimitry Andric [(set GPR:$R, (ARMvgetlanes (v8i8 DPR:$V), 62760b57cec5SDimitry Andric imm:$lane))]> { 62770b57cec5SDimitry Andric let Inst{21} = lane{2}; 62780b57cec5SDimitry Andric let Inst{6-5} = lane{1-0}; 62790b57cec5SDimitry Andric} 62800b57cec5SDimitry Andricdef VGETLNs16 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, {?,1}, 62810b57cec5SDimitry Andric (outs GPR:$R), (ins DPR:$V, VectorIndex16:$lane), 62820b57cec5SDimitry Andric IIC_VMOVSI, "vmov", "s16", "$R, $V$lane", 62830b57cec5SDimitry Andric [(set GPR:$R, (ARMvgetlanes (v4i16 DPR:$V), 62840b57cec5SDimitry Andric imm:$lane))]> { 62850b57cec5SDimitry Andric let Inst{21} = lane{1}; 62860b57cec5SDimitry Andric let Inst{6} = lane{0}; 62870b57cec5SDimitry Andric} 62880b57cec5SDimitry Andricdef VGETLNu8 : NVGetLane<{1,1,1,0,1,1,?,1}, 0b1011, {?,?}, 62890b57cec5SDimitry Andric (outs GPR:$R), (ins DPR:$V, VectorIndex8:$lane), 62900b57cec5SDimitry Andric IIC_VMOVSI, "vmov", "u8", "$R, $V$lane", 62910b57cec5SDimitry Andric [(set GPR:$R, (ARMvgetlaneu (v8i8 DPR:$V), 62920b57cec5SDimitry Andric imm:$lane))]> { 62930b57cec5SDimitry Andric let Inst{21} = lane{2}; 62940b57cec5SDimitry Andric let Inst{6-5} = lane{1-0}; 62950b57cec5SDimitry Andric} 62960b57cec5SDimitry Andricdef VGETLNu16 : NVGetLane<{1,1,1,0,1,0,?,1}, 0b1011, {?,1}, 62970b57cec5SDimitry Andric (outs GPR:$R), (ins DPR:$V, VectorIndex16:$lane), 62980b57cec5SDimitry Andric IIC_VMOVSI, "vmov", "u16", "$R, $V$lane", 62990b57cec5SDimitry Andric [(set GPR:$R, (ARMvgetlaneu (v4i16 DPR:$V), 63000b57cec5SDimitry Andric imm:$lane))]> { 63010b57cec5SDimitry Andric let Inst{21} = lane{1}; 63020b57cec5SDimitry Andric let Inst{6} = lane{0}; 63030b57cec5SDimitry Andric} 63040b57cec5SDimitry Andricdef VGETLNi32 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, 0b00, 63050b57cec5SDimitry Andric (outs GPR:$R), (ins DPR:$V, VectorIndex32:$lane), 63060b57cec5SDimitry Andric IIC_VMOVSI, "vmov", "32", "$R, $V$lane", 63070b57cec5SDimitry Andric [(set GPR:$R, (extractelt (v2i32 DPR:$V), 63080b57cec5SDimitry Andric imm:$lane))]>, 63090b57cec5SDimitry Andric Requires<[HasFPRegs, HasFastVGETLNi32]> { 63100b57cec5SDimitry Andric let Inst{21} = lane{0}; 63110b57cec5SDimitry Andric} 63120b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 63130b57cec5SDimitry Andric// def VGETLNf32: see FMRDH and FMRDL in ARMInstrVFP.td 63140b57cec5SDimitry Andricdef : Pat<(ARMvgetlanes (v16i8 QPR:$src), imm:$lane), 63150b57cec5SDimitry Andric (VGETLNs8 (v8i8 (EXTRACT_SUBREG QPR:$src, 63160b57cec5SDimitry Andric (DSubReg_i8_reg imm:$lane))), 63170b57cec5SDimitry Andric (SubReg_i8_lane imm:$lane))>; 63180b57cec5SDimitry Andricdef : Pat<(ARMvgetlanes (v8i16 QPR:$src), imm:$lane), 63190b57cec5SDimitry Andric (VGETLNs16 (v4i16 (EXTRACT_SUBREG QPR:$src, 63200b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 63210b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane))>; 63220b57cec5SDimitry Andricdef : Pat<(ARMvgetlaneu (v16i8 QPR:$src), imm:$lane), 63230b57cec5SDimitry Andric (VGETLNu8 (v8i8 (EXTRACT_SUBREG QPR:$src, 63240b57cec5SDimitry Andric (DSubReg_i8_reg imm:$lane))), 63250b57cec5SDimitry Andric (SubReg_i8_lane imm:$lane))>; 63260b57cec5SDimitry Andricdef : Pat<(ARMvgetlaneu (v8i16 QPR:$src), imm:$lane), 63270b57cec5SDimitry Andric (VGETLNu16 (v4i16 (EXTRACT_SUBREG QPR:$src, 63280b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 63290b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane))>; 63300b57cec5SDimitry Andric} 63310b57cec5SDimitry Andricdef : Pat<(extractelt (v4i32 QPR:$src), imm:$lane), 63320b57cec5SDimitry Andric (VGETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src, 63330b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 63340b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane))>, 63350b57cec5SDimitry Andric Requires<[HasNEON, HasFastVGETLNi32]>; 63360b57cec5SDimitry Andricdef : Pat<(extractelt (v2i32 DPR:$src), imm:$lane), 63370b57cec5SDimitry Andric (COPY_TO_REGCLASS 63380b57cec5SDimitry Andric (i32 (EXTRACT_SUBREG DPR:$src, (SSubReg_f32_reg imm:$lane))), GPR)>, 63390b57cec5SDimitry Andric Requires<[HasNEON, HasSlowVGETLNi32]>; 63400b57cec5SDimitry Andricdef : Pat<(extractelt (v4i32 QPR:$src), imm:$lane), 63410b57cec5SDimitry Andric (COPY_TO_REGCLASS 63420b57cec5SDimitry Andric (i32 (EXTRACT_SUBREG QPR:$src, (SSubReg_f32_reg imm:$lane))), GPR)>, 63430b57cec5SDimitry Andric Requires<[HasNEON, HasSlowVGETLNi32]>; 63440b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 63450b57cec5SDimitry Andricdef : Pat<(extractelt (v2f32 DPR:$src1), imm:$src2), 63460b57cec5SDimitry Andric (EXTRACT_SUBREG (v2f32 (COPY_TO_REGCLASS (v2f32 DPR:$src1),DPR_VFP2)), 63470b57cec5SDimitry Andric (SSubReg_f32_reg imm:$src2))>; 63480b57cec5SDimitry Andricdef : Pat<(extractelt (v4f32 QPR:$src1), imm:$src2), 63490b57cec5SDimitry Andric (EXTRACT_SUBREG (v4f32 (COPY_TO_REGCLASS (v4f32 QPR:$src1),QPR_VFP2)), 63500b57cec5SDimitry Andric (SSubReg_f32_reg imm:$src2))>; 63510b57cec5SDimitry Andric//def : Pat<(extractelt (v2i64 QPR:$src1), imm:$src2), 63520b57cec5SDimitry Andric// (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>; 63530b57cec5SDimitry Andricdef : Pat<(extractelt (v2f64 QPR:$src1), imm:$src2), 63540b57cec5SDimitry Andric (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>; 63550b57cec5SDimitry Andric} 63560b57cec5SDimitry Andric 63570b57cec5SDimitry Andricdef imm_even : ImmLeaf<i32, [{ return (Imm & 1) == 0; }]>; 63580b57cec5SDimitry Andricdef imm_odd : ImmLeaf<i32, [{ return (Imm & 1) == 1; }]>; 63590b57cec5SDimitry Andric 63600b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 63610b57cec5SDimitry Andricdef : Pat<(extractelt (v4f16 DPR:$src), imm_even:$lane), 63620b57cec5SDimitry Andric (EXTRACT_SUBREG 63630b57cec5SDimitry Andric (v2f32 (COPY_TO_REGCLASS (v4f16 DPR:$src), DPR_VFP2)), 63640b57cec5SDimitry Andric (SSubReg_f16_reg imm_even:$lane))>; 63650b57cec5SDimitry Andric 63660b57cec5SDimitry Andricdef : Pat<(extractelt (v4f16 DPR:$src), imm_odd:$lane), 63670b57cec5SDimitry Andric (COPY_TO_REGCLASS 63680b57cec5SDimitry Andric (VMOVH (EXTRACT_SUBREG 63690b57cec5SDimitry Andric (v2f32 (COPY_TO_REGCLASS (v4f16 DPR:$src), DPR_VFP2)), 63700b57cec5SDimitry Andric (SSubReg_f16_reg imm_odd:$lane))), 63710b57cec5SDimitry Andric HPR)>; 63720b57cec5SDimitry Andric 63730b57cec5SDimitry Andricdef : Pat<(extractelt (v8f16 QPR:$src), imm_even:$lane), 63740b57cec5SDimitry Andric (EXTRACT_SUBREG 63750b57cec5SDimitry Andric (v4f32 (COPY_TO_REGCLASS (v8f16 QPR:$src), QPR_VFP2)), 63760b57cec5SDimitry Andric (SSubReg_f16_reg imm_even:$lane))>; 63770b57cec5SDimitry Andric 63780b57cec5SDimitry Andricdef : Pat<(extractelt (v8f16 QPR:$src), imm_odd:$lane), 63790b57cec5SDimitry Andric (COPY_TO_REGCLASS 63800b57cec5SDimitry Andric (VMOVH (EXTRACT_SUBREG 63810b57cec5SDimitry Andric (v4f32 (COPY_TO_REGCLASS (v8f16 QPR:$src), QPR_VFP2)), 63820b57cec5SDimitry Andric (SSubReg_f16_reg imm_odd:$lane))), 63830b57cec5SDimitry Andric HPR)>; 63840b57cec5SDimitry Andric} 63850b57cec5SDimitry Andric 63860b57cec5SDimitry Andric// VMOV : Vector Set Lane (move ARM core register to scalar) 63870b57cec5SDimitry Andric 63880b57cec5SDimitry Andriclet Constraints = "$src1 = $V" in { 63890b57cec5SDimitry Andricdef VSETLNi8 : NVSetLane<{1,1,1,0,0,1,?,0}, 0b1011, {?,?}, (outs DPR:$V), 63900b57cec5SDimitry Andric (ins DPR:$src1, GPR:$R, VectorIndex8:$lane), 63910b57cec5SDimitry Andric IIC_VMOVISL, "vmov", "8", "$V$lane, $R", 63920b57cec5SDimitry Andric [(set DPR:$V, (vector_insert (v8i8 DPR:$src1), 63930b57cec5SDimitry Andric GPR:$R, imm:$lane))]> { 63940b57cec5SDimitry Andric let Inst{21} = lane{2}; 63950b57cec5SDimitry Andric let Inst{6-5} = lane{1-0}; 63960b57cec5SDimitry Andric} 63970b57cec5SDimitry Andricdef VSETLNi16 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, {?,1}, (outs DPR:$V), 63980b57cec5SDimitry Andric (ins DPR:$src1, GPR:$R, VectorIndex16:$lane), 63990b57cec5SDimitry Andric IIC_VMOVISL, "vmov", "16", "$V$lane, $R", 64000b57cec5SDimitry Andric [(set DPR:$V, (vector_insert (v4i16 DPR:$src1), 64010b57cec5SDimitry Andric GPR:$R, imm:$lane))]> { 64020b57cec5SDimitry Andric let Inst{21} = lane{1}; 64030b57cec5SDimitry Andric let Inst{6} = lane{0}; 64040b57cec5SDimitry Andric} 64050b57cec5SDimitry Andricdef VSETLNi32 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, 0b00, (outs DPR:$V), 64060b57cec5SDimitry Andric (ins DPR:$src1, GPR:$R, VectorIndex32:$lane), 64070b57cec5SDimitry Andric IIC_VMOVISL, "vmov", "32", "$V$lane, $R", 64080b57cec5SDimitry Andric [(set DPR:$V, (insertelt (v2i32 DPR:$src1), 64090b57cec5SDimitry Andric GPR:$R, imm:$lane))]>, 64100b57cec5SDimitry Andric Requires<[HasVFP2]> { 64110b57cec5SDimitry Andric let Inst{21} = lane{0}; 64120b57cec5SDimitry Andric // This instruction is equivalent as 64130b57cec5SDimitry Andric // $V = INSERT_SUBREG $src1, $R, translateImmToSubIdx($imm) 64140b57cec5SDimitry Andric let isInsertSubreg = 1; 64150b57cec5SDimitry Andric} 64160b57cec5SDimitry Andric} 64170b57cec5SDimitry Andric 64180b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 64190b57cec5SDimitry Andricdef : Pat<(vector_insert (v16i8 QPR:$src1), GPR:$src2, imm:$lane), 64200b57cec5SDimitry Andric (v16i8 (INSERT_SUBREG QPR:$src1, 64210b57cec5SDimitry Andric (v8i8 (VSETLNi8 (v8i8 (EXTRACT_SUBREG QPR:$src1, 64220b57cec5SDimitry Andric (DSubReg_i8_reg imm:$lane))), 64230b57cec5SDimitry Andric GPR:$src2, (SubReg_i8_lane imm:$lane))), 64240b57cec5SDimitry Andric (DSubReg_i8_reg imm:$lane)))>; 64250b57cec5SDimitry Andricdef : Pat<(vector_insert (v8i16 QPR:$src1), GPR:$src2, imm:$lane), 64260b57cec5SDimitry Andric (v8i16 (INSERT_SUBREG QPR:$src1, 64270b57cec5SDimitry Andric (v4i16 (VSETLNi16 (v4i16 (EXTRACT_SUBREG QPR:$src1, 64280b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 64290b57cec5SDimitry Andric GPR:$src2, (SubReg_i16_lane imm:$lane))), 64300b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane)))>; 64310b57cec5SDimitry Andricdef : Pat<(insertelt (v4i32 QPR:$src1), GPR:$src2, imm:$lane), 64320b57cec5SDimitry Andric (v4i32 (INSERT_SUBREG QPR:$src1, 64330b57cec5SDimitry Andric (v2i32 (VSETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src1, 64340b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 64350b57cec5SDimitry Andric GPR:$src2, (SubReg_i32_lane imm:$lane))), 64360b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane)))>; 64370b57cec5SDimitry Andric 64380b57cec5SDimitry Andricdef : Pat<(v2f32 (insertelt DPR:$src1, SPR:$src2, imm:$src3)), 64390b57cec5SDimitry Andric (INSERT_SUBREG (v2f32 (COPY_TO_REGCLASS DPR:$src1, DPR_VFP2)), 64400b57cec5SDimitry Andric SPR:$src2, (SSubReg_f32_reg imm:$src3))>; 64410b57cec5SDimitry Andricdef : Pat<(v4f32 (insertelt QPR:$src1, SPR:$src2, imm:$src3)), 64420b57cec5SDimitry Andric (INSERT_SUBREG (v4f32 (COPY_TO_REGCLASS QPR:$src1, QPR_VFP2)), 64430b57cec5SDimitry Andric SPR:$src2, (SSubReg_f32_reg imm:$src3))>; 64440b57cec5SDimitry Andric 64450b57cec5SDimitry Andricdef : Pat<(insertelt (v4f16 DPR:$src1), HPR:$src2, imm:$lane), 64460b57cec5SDimitry Andric (v4f16 (VSETLNi16 DPR:$src1, (VMOVRH $src2), imm:$lane))>; 64470b57cec5SDimitry Andricdef : Pat<(insertelt (v8f16 QPR:$src1), HPR:$src2, imm:$lane), 64480b57cec5SDimitry Andric (v8f16 (INSERT_SUBREG QPR:$src1, 64490b57cec5SDimitry Andric (v4i16 (VSETLNi16 (v4i16 (EXTRACT_SUBREG QPR:$src1, 64500b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 64510b57cec5SDimitry Andric (VMOVRH $src2), (SubReg_i16_lane imm:$lane))), 64520b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane)))>; 64530b57cec5SDimitry Andric 64540b57cec5SDimitry Andric//def : Pat<(v2i64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)), 64550b57cec5SDimitry Andric// (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>; 64560b57cec5SDimitry Andricdef : Pat<(v2f64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)), 64570b57cec5SDimitry Andric (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>; 64580b57cec5SDimitry Andric 64590b57cec5SDimitry Andricdef : Pat<(v2f32 (scalar_to_vector SPR:$src)), 64600b57cec5SDimitry Andric (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$src, ssub_0)>; 64610b57cec5SDimitry Andricdef : Pat<(v2f64 (scalar_to_vector (f64 DPR:$src))), 64620b57cec5SDimitry Andric (INSERT_SUBREG (v2f64 (IMPLICIT_DEF)), DPR:$src, dsub_0)>; 64630b57cec5SDimitry Andricdef : Pat<(v4f32 (scalar_to_vector SPR:$src)), 64640b57cec5SDimitry Andric (INSERT_SUBREG (v4f32 (IMPLICIT_DEF)), SPR:$src, ssub_0)>; 64650b57cec5SDimitry Andric 64660b57cec5SDimitry Andricdef : Pat<(v8i8 (scalar_to_vector GPR:$src)), 64670b57cec5SDimitry Andric (VSETLNi8 (v8i8 (IMPLICIT_DEF)), GPR:$src, (i32 0))>; 64680b57cec5SDimitry Andricdef : Pat<(v4i16 (scalar_to_vector GPR:$src)), 64690b57cec5SDimitry Andric (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0))>; 64700b57cec5SDimitry Andricdef : Pat<(v2i32 (scalar_to_vector GPR:$src)), 64710b57cec5SDimitry Andric (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0))>; 64720b57cec5SDimitry Andric 64730b57cec5SDimitry Andricdef : Pat<(v16i8 (scalar_to_vector GPR:$src)), 64740b57cec5SDimitry Andric (INSERT_SUBREG (v16i8 (IMPLICIT_DEF)), 64750b57cec5SDimitry Andric (VSETLNi8 (v8i8 (IMPLICIT_DEF)), GPR:$src, (i32 0)), 64760b57cec5SDimitry Andric dsub_0)>; 64770b57cec5SDimitry Andricdef : Pat<(v8i16 (scalar_to_vector GPR:$src)), 64780b57cec5SDimitry Andric (INSERT_SUBREG (v8i16 (IMPLICIT_DEF)), 64790b57cec5SDimitry Andric (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0)), 64800b57cec5SDimitry Andric dsub_0)>; 64810b57cec5SDimitry Andricdef : Pat<(v4i32 (scalar_to_vector GPR:$src)), 64820b57cec5SDimitry Andric (INSERT_SUBREG (v4i32 (IMPLICIT_DEF)), 64830b57cec5SDimitry Andric (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0)), 64840b57cec5SDimitry Andric dsub_0)>; 64850b57cec5SDimitry Andric} 64860b57cec5SDimitry Andric 64870b57cec5SDimitry Andric// VDUP : Vector Duplicate (from ARM core register to all elements) 64880b57cec5SDimitry Andric 64890b57cec5SDimitry Andricclass VDUPD<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty> 64900b57cec5SDimitry Andric : NVDup<opcod1, 0b1011, opcod3, (outs DPR:$V), (ins GPR:$R), 64910b57cec5SDimitry Andric IIC_VMOVIS, "vdup", Dt, "$V, $R", 64920b57cec5SDimitry Andric [(set DPR:$V, (Ty (ARMvdup (i32 GPR:$R))))]>; 64930b57cec5SDimitry Andricclass VDUPQ<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty> 64940b57cec5SDimitry Andric : NVDup<opcod1, 0b1011, opcod3, (outs QPR:$V), (ins GPR:$R), 64950b57cec5SDimitry Andric IIC_VMOVIS, "vdup", Dt, "$V, $R", 64960b57cec5SDimitry Andric [(set QPR:$V, (Ty (ARMvdup (i32 GPR:$R))))]>; 64970b57cec5SDimitry Andric 64980b57cec5SDimitry Andricdef VDUP8d : VDUPD<0b11101100, 0b00, "8", v8i8>; 64990b57cec5SDimitry Andricdef VDUP16d : VDUPD<0b11101000, 0b01, "16", v4i16>; 65000b57cec5SDimitry Andricdef VDUP32d : VDUPD<0b11101000, 0b00, "32", v2i32>, 65010b57cec5SDimitry Andric Requires<[HasNEON, HasFastVDUP32]>; 65020b57cec5SDimitry Andricdef VDUP8q : VDUPQ<0b11101110, 0b00, "8", v16i8>; 65030b57cec5SDimitry Andricdef VDUP16q : VDUPQ<0b11101010, 0b01, "16", v8i16>; 65040b57cec5SDimitry Andricdef VDUP32q : VDUPQ<0b11101010, 0b00, "32", v4i32>; 65050b57cec5SDimitry Andric 65060b57cec5SDimitry Andric// ARMvdup patterns for uarchs with fast VDUP.32. 65070b57cec5SDimitry Andricdef : Pat<(v2f32 (ARMvdup (f32 (bitconvert GPR:$R)))), (VDUP32d GPR:$R)>, 65080b57cec5SDimitry Andric Requires<[HasNEON,HasFastVDUP32]>; 65090b57cec5SDimitry Andricdef : Pat<(v4f32 (ARMvdup (f32 (bitconvert GPR:$R)))), (VDUP32q GPR:$R)>, 65100b57cec5SDimitry Andric Requires<[HasNEON]>; 65110b57cec5SDimitry Andric 65120b57cec5SDimitry Andric// ARMvdup patterns for uarchs with slow VDUP.32 - use VMOVDRR instead. 65130b57cec5SDimitry Andricdef : Pat<(v2i32 (ARMvdup (i32 GPR:$R))), (VMOVDRR GPR:$R, GPR:$R)>, 65140b57cec5SDimitry Andric Requires<[HasNEON,HasSlowVDUP32]>; 65150b57cec5SDimitry Andricdef : Pat<(v2f32 (ARMvdup (f32 (bitconvert GPR:$R)))), (VMOVDRR GPR:$R, GPR:$R)>, 65160b57cec5SDimitry Andric Requires<[HasNEON,HasSlowVDUP32]>; 65170b57cec5SDimitry Andric 65180b57cec5SDimitry Andric// VDUP : Vector Duplicate Lane (from scalar to all elements) 65190b57cec5SDimitry Andric 65200b57cec5SDimitry Andricclass VDUPLND<bits<4> op19_16, string OpcodeStr, string Dt, 65210b57cec5SDimitry Andric ValueType Ty, Operand IdxTy> 65220b57cec5SDimitry Andric : NVDupLane<op19_16, 0, (outs DPR:$Vd), (ins DPR:$Vm, IdxTy:$lane), 65230b57cec5SDimitry Andric IIC_VMOVD, OpcodeStr, Dt, "$Vd, $Vm$lane", 65240b57cec5SDimitry Andric [(set DPR:$Vd, (Ty (ARMvduplane (Ty DPR:$Vm), imm:$lane)))]>; 65250b57cec5SDimitry Andric 65260b57cec5SDimitry Andricclass VDUPLNQ<bits<4> op19_16, string OpcodeStr, string Dt, 65270b57cec5SDimitry Andric ValueType ResTy, ValueType OpTy, Operand IdxTy> 65280b57cec5SDimitry Andric : NVDupLane<op19_16, 1, (outs QPR:$Vd), (ins DPR:$Vm, IdxTy:$lane), 65290b57cec5SDimitry Andric IIC_VMOVQ, OpcodeStr, Dt, "$Vd, $Vm$lane", 65300b57cec5SDimitry Andric [(set QPR:$Vd, (ResTy (ARMvduplane (OpTy DPR:$Vm), 65310b57cec5SDimitry Andric VectorIndex32:$lane)))]>; 65320b57cec5SDimitry Andric 65330b57cec5SDimitry Andric// Inst{19-16} is partially specified depending on the element size. 65340b57cec5SDimitry Andric 65350b57cec5SDimitry Andricdef VDUPLN8d : VDUPLND<{?,?,?,1}, "vdup", "8", v8i8, VectorIndex8> { 65360b57cec5SDimitry Andric bits<3> lane; 65370b57cec5SDimitry Andric let Inst{19-17} = lane{2-0}; 65380b57cec5SDimitry Andric} 65390b57cec5SDimitry Andricdef VDUPLN16d : VDUPLND<{?,?,1,0}, "vdup", "16", v4i16, VectorIndex16> { 65400b57cec5SDimitry Andric bits<2> lane; 65410b57cec5SDimitry Andric let Inst{19-18} = lane{1-0}; 65420b57cec5SDimitry Andric} 65430b57cec5SDimitry Andricdef VDUPLN32d : VDUPLND<{?,1,0,0}, "vdup", "32", v2i32, VectorIndex32> { 65440b57cec5SDimitry Andric bits<1> lane; 65450b57cec5SDimitry Andric let Inst{19} = lane{0}; 65460b57cec5SDimitry Andric} 65470b57cec5SDimitry Andricdef VDUPLN8q : VDUPLNQ<{?,?,?,1}, "vdup", "8", v16i8, v8i8, VectorIndex8> { 65480b57cec5SDimitry Andric bits<3> lane; 65490b57cec5SDimitry Andric let Inst{19-17} = lane{2-0}; 65500b57cec5SDimitry Andric} 65510b57cec5SDimitry Andricdef VDUPLN16q : VDUPLNQ<{?,?,1,0}, "vdup", "16", v8i16, v4i16, VectorIndex16> { 65520b57cec5SDimitry Andric bits<2> lane; 65530b57cec5SDimitry Andric let Inst{19-18} = lane{1-0}; 65540b57cec5SDimitry Andric} 65550b57cec5SDimitry Andricdef VDUPLN32q : VDUPLNQ<{?,1,0,0}, "vdup", "32", v4i32, v2i32, VectorIndex32> { 65560b57cec5SDimitry Andric bits<1> lane; 65570b57cec5SDimitry Andric let Inst{19} = lane{0}; 65580b57cec5SDimitry Andric} 65590b57cec5SDimitry Andric 65600b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 65610b57cec5SDimitry Andricdef : Pat<(v4f16 (ARMvduplane (v4f16 DPR:$Vm), imm:$lane)), 65620b57cec5SDimitry Andric (VDUPLN32d DPR:$Vm, imm:$lane)>; 65630b57cec5SDimitry Andric 65640b57cec5SDimitry Andricdef : Pat<(v2f32 (ARMvduplane (v2f32 DPR:$Vm), imm:$lane)), 65650b57cec5SDimitry Andric (VDUPLN32d DPR:$Vm, imm:$lane)>; 65660b57cec5SDimitry Andric 65670b57cec5SDimitry Andricdef : Pat<(v4f32 (ARMvduplane (v2f32 DPR:$Vm), imm:$lane)), 65680b57cec5SDimitry Andric (VDUPLN32q DPR:$Vm, imm:$lane)>; 65690b57cec5SDimitry Andric 65700b57cec5SDimitry Andricdef : Pat<(v16i8 (ARMvduplane (v16i8 QPR:$src), imm:$lane)), 65710b57cec5SDimitry Andric (v16i8 (VDUPLN8q (v8i8 (EXTRACT_SUBREG QPR:$src, 65720b57cec5SDimitry Andric (DSubReg_i8_reg imm:$lane))), 65730b57cec5SDimitry Andric (SubReg_i8_lane imm:$lane)))>; 65740b57cec5SDimitry Andricdef : Pat<(v8i16 (ARMvduplane (v8i16 QPR:$src), imm:$lane)), 65750b57cec5SDimitry Andric (v8i16 (VDUPLN16q (v4i16 (EXTRACT_SUBREG QPR:$src, 65760b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 65770b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane)))>; 65780b57cec5SDimitry Andricdef : Pat<(v8f16 (ARMvduplane (v8f16 QPR:$src), imm:$lane)), 65790b57cec5SDimitry Andric (v8f16 (VDUPLN16q (v4f16 (EXTRACT_SUBREG QPR:$src, 65800b57cec5SDimitry Andric (DSubReg_i16_reg imm:$lane))), 65810b57cec5SDimitry Andric (SubReg_i16_lane imm:$lane)))>; 65820b57cec5SDimitry Andricdef : Pat<(v4i32 (ARMvduplane (v4i32 QPR:$src), imm:$lane)), 65830b57cec5SDimitry Andric (v4i32 (VDUPLN32q (v2i32 (EXTRACT_SUBREG QPR:$src, 65840b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 65850b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>; 65860b57cec5SDimitry Andricdef : Pat<(v4f32 (ARMvduplane (v4f32 QPR:$src), imm:$lane)), 65870b57cec5SDimitry Andric (v4f32 (VDUPLN32q (v2f32 (EXTRACT_SUBREG QPR:$src, 65880b57cec5SDimitry Andric (DSubReg_i32_reg imm:$lane))), 65890b57cec5SDimitry Andric (SubReg_i32_lane imm:$lane)))>; 65900b57cec5SDimitry Andric 65910b57cec5SDimitry Andricdef : Pat<(v4f16 (ARMvdup HPR:$src)), 65920b57cec5SDimitry Andric (v4f16 (VDUPLN16d (INSERT_SUBREG (v4f16 (IMPLICIT_DEF)), 65930b57cec5SDimitry Andric HPR:$src, ssub_0), (i32 0)))>; 65940b57cec5SDimitry Andricdef : Pat<(v2f32 (ARMvdup (f32 SPR:$src))), 65950b57cec5SDimitry Andric (v2f32 (VDUPLN32d (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), 65960b57cec5SDimitry Andric SPR:$src, ssub_0), (i32 0)))>; 65970b57cec5SDimitry Andricdef : Pat<(v4f32 (ARMvdup (f32 SPR:$src))), 65980b57cec5SDimitry Andric (v4f32 (VDUPLN32q (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), 65990b57cec5SDimitry Andric SPR:$src, ssub_0), (i32 0)))>; 66000b57cec5SDimitry Andricdef : Pat<(v8f16 (ARMvdup HPR:$src)), 66010b57cec5SDimitry Andric (v8f16 (VDUPLN16q (INSERT_SUBREG (v4f16 (IMPLICIT_DEF)), 66020b57cec5SDimitry Andric HPR:$src, ssub_0), (i32 0)))>; 66030b57cec5SDimitry Andric} 66040b57cec5SDimitry Andric 66050b57cec5SDimitry Andric// VMOVN : Vector Narrowing Move 66060b57cec5SDimitry Andricdefm VMOVN : N2VN_HSD<0b11,0b11,0b10,0b00100,0,0, IIC_VMOVN, 66070b57cec5SDimitry Andric "vmovn", "i", trunc>; 66080b57cec5SDimitry Andric// VQMOVN : Vector Saturating Narrowing Move 66090b57cec5SDimitry Andricdefm VQMOVNs : N2VNInt_HSD<0b11,0b11,0b10,0b00101,0,0, IIC_VQUNAiD, 66100b57cec5SDimitry Andric "vqmovn", "s", int_arm_neon_vqmovns>; 66110b57cec5SDimitry Andricdefm VQMOVNu : N2VNInt_HSD<0b11,0b11,0b10,0b00101,1,0, IIC_VQUNAiD, 66120b57cec5SDimitry Andric "vqmovn", "u", int_arm_neon_vqmovnu>; 66130b57cec5SDimitry Andricdefm VQMOVNsu : N2VNInt_HSD<0b11,0b11,0b10,0b00100,1,0, IIC_VQUNAiD, 66140b57cec5SDimitry Andric "vqmovun", "s", int_arm_neon_vqmovnsu>; 66150b57cec5SDimitry Andric// VMOVL : Vector Lengthening Move 66160b57cec5SDimitry Andricdefm VMOVLs : N2VL_QHS<0b01,0b10100,0,1, "vmovl", "s", sext>; 66170b57cec5SDimitry Andricdefm VMOVLu : N2VL_QHS<0b11,0b10100,0,1, "vmovl", "u", zext>; 66180b57cec5SDimitry Andric 66190b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 66200b57cec5SDimitry Andricdef : Pat<(v8i16 (anyext (v8i8 DPR:$Vm))), (VMOVLuv8i16 DPR:$Vm)>; 66210b57cec5SDimitry Andricdef : Pat<(v4i32 (anyext (v4i16 DPR:$Vm))), (VMOVLuv4i32 DPR:$Vm)>; 66220b57cec5SDimitry Andricdef : Pat<(v2i64 (anyext (v2i32 DPR:$Vm))), (VMOVLuv2i64 DPR:$Vm)>; 66230b57cec5SDimitry Andric} 66240b57cec5SDimitry Andric 66250b57cec5SDimitry Andric// Vector Conversions. 66260b57cec5SDimitry Andric 66270b57cec5SDimitry Andric// VCVT : Vector Convert Between Floating-Point and Integers 66280b57cec5SDimitry Andricdef VCVTf2sd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32", 66290b57cec5SDimitry Andric v2i32, v2f32, fp_to_sint>; 66300b57cec5SDimitry Andricdef VCVTf2ud : N2VD<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32", 66310b57cec5SDimitry Andric v2i32, v2f32, fp_to_uint>; 66320b57cec5SDimitry Andricdef VCVTs2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32", 66330b57cec5SDimitry Andric v2f32, v2i32, sint_to_fp>; 66340b57cec5SDimitry Andricdef VCVTu2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32", 66350b57cec5SDimitry Andric v2f32, v2i32, uint_to_fp>; 66360b57cec5SDimitry Andric 66370b57cec5SDimitry Andricdef VCVTf2sq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32", 66380b57cec5SDimitry Andric v4i32, v4f32, fp_to_sint>; 66390b57cec5SDimitry Andricdef VCVTf2uq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32", 66400b57cec5SDimitry Andric v4i32, v4f32, fp_to_uint>; 66410b57cec5SDimitry Andricdef VCVTs2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32", 66420b57cec5SDimitry Andric v4f32, v4i32, sint_to_fp>; 66430b57cec5SDimitry Andricdef VCVTu2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32", 66440b57cec5SDimitry Andric v4f32, v4i32, uint_to_fp>; 66450b57cec5SDimitry Andric 66460b57cec5SDimitry Andricdef VCVTh2sd : N2VD<0b11, 0b11, 0b01, 0b11, 0b01110, 0, "vcvt", "s16.f16", 66470b57cec5SDimitry Andric v4i16, v4f16, fp_to_sint>, 66480b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 66490b57cec5SDimitry Andricdef VCVTh2ud : N2VD<0b11, 0b11, 0b01, 0b11, 0b01111, 0, "vcvt", "u16.f16", 66500b57cec5SDimitry Andric v4i16, v4f16, fp_to_uint>, 66510b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 66520b57cec5SDimitry Andricdef VCVTs2hd : N2VD<0b11, 0b11, 0b01, 0b11, 0b01100, 0, "vcvt", "f16.s16", 66530b57cec5SDimitry Andric v4f16, v4i16, sint_to_fp>, 66540b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 66550b57cec5SDimitry Andricdef VCVTu2hd : N2VD<0b11, 0b11, 0b01, 0b11, 0b01101, 0, "vcvt", "f16.u16", 66560b57cec5SDimitry Andric v4f16, v4i16, uint_to_fp>, 66570b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 66580b57cec5SDimitry Andric 66590b57cec5SDimitry Andricdef VCVTh2sq : N2VQ<0b11, 0b11, 0b01, 0b11, 0b01110, 0, "vcvt", "s16.f16", 66600b57cec5SDimitry Andric v8i16, v8f16, fp_to_sint>, 66610b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 66620b57cec5SDimitry Andricdef VCVTh2uq : N2VQ<0b11, 0b11, 0b01, 0b11, 0b01111, 0, "vcvt", "u16.f16", 66630b57cec5SDimitry Andric v8i16, v8f16, fp_to_uint>, 66640b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 66650b57cec5SDimitry Andricdef VCVTs2hq : N2VQ<0b11, 0b11, 0b01, 0b11, 0b01100, 0, "vcvt", "f16.s16", 66660b57cec5SDimitry Andric v8f16, v8i16, sint_to_fp>, 66670b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 66680b57cec5SDimitry Andricdef VCVTu2hq : N2VQ<0b11, 0b11, 0b01, 0b11, 0b01101, 0, "vcvt", "f16.u16", 66690b57cec5SDimitry Andric v8f16, v8i16, uint_to_fp>, 66700b57cec5SDimitry Andric Requires<[HasNEON, HasFullFP16]>; 66710b57cec5SDimitry Andric 66720b57cec5SDimitry Andric// VCVT{A, N, P, M} 66730b57cec5SDimitry Andricmulticlass VCVT_FPI<string op, bits<3> op10_8, SDPatternOperator IntS, 66740b57cec5SDimitry Andric SDPatternOperator IntU> { 66750b57cec5SDimitry Andric let PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" in { 66760b57cec5SDimitry Andric def SDf : N2VDIntnp<0b10, 0b11, op10_8, 0, NoItinerary, !strconcat("vcvt", op), 66770b57cec5SDimitry Andric "s32.f32", v2i32, v2f32, IntS>, Requires<[HasV8, HasNEON]>; 66780b57cec5SDimitry Andric def SQf : N2VQIntnp<0b10, 0b11, op10_8, 0, NoItinerary, !strconcat("vcvt", op), 66790b57cec5SDimitry Andric "s32.f32", v4i32, v4f32, IntS>, Requires<[HasV8, HasNEON]>; 66800b57cec5SDimitry Andric def UDf : N2VDIntnp<0b10, 0b11, op10_8, 1, NoItinerary, !strconcat("vcvt", op), 66810b57cec5SDimitry Andric "u32.f32", v2i32, v2f32, IntU>, Requires<[HasV8, HasNEON]>; 66820b57cec5SDimitry Andric def UQf : N2VQIntnp<0b10, 0b11, op10_8, 1, NoItinerary, !strconcat("vcvt", op), 66830b57cec5SDimitry Andric "u32.f32", v4i32, v4f32, IntU>, Requires<[HasV8, HasNEON]>; 66840b57cec5SDimitry Andric def SDh : N2VDIntnp<0b01, 0b11, op10_8, 0, NoItinerary, !strconcat("vcvt", op), 66850b57cec5SDimitry Andric "s16.f16", v4i16, v4f16, IntS>, 66860b57cec5SDimitry Andric Requires<[HasV8, HasNEON, HasFullFP16]>; 66870b57cec5SDimitry Andric def SQh : N2VQIntnp<0b01, 0b11, op10_8, 0, NoItinerary, !strconcat("vcvt", op), 66880b57cec5SDimitry Andric "s16.f16", v8i16, v8f16, IntS>, 66890b57cec5SDimitry Andric Requires<[HasV8, HasNEON, HasFullFP16]>; 66900b57cec5SDimitry Andric def UDh : N2VDIntnp<0b01, 0b11, op10_8, 1, NoItinerary, !strconcat("vcvt", op), 66910b57cec5SDimitry Andric "u16.f16", v4i16, v4f16, IntU>, 66920b57cec5SDimitry Andric Requires<[HasV8, HasNEON, HasFullFP16]>; 66930b57cec5SDimitry Andric def UQh : N2VQIntnp<0b01, 0b11, op10_8, 1, NoItinerary, !strconcat("vcvt", op), 66940b57cec5SDimitry Andric "u16.f16", v8i16, v8f16, IntU>, 66950b57cec5SDimitry Andric Requires<[HasV8, HasNEON, HasFullFP16]>; 66960b57cec5SDimitry Andric } 66970b57cec5SDimitry Andric} 66980b57cec5SDimitry Andric 66990b57cec5SDimitry Andricdefm VCVTAN : VCVT_FPI<"a", 0b000, int_arm_neon_vcvtas, int_arm_neon_vcvtau>; 67000b57cec5SDimitry Andricdefm VCVTNN : VCVT_FPI<"n", 0b001, int_arm_neon_vcvtns, int_arm_neon_vcvtnu>; 67010b57cec5SDimitry Andricdefm VCVTPN : VCVT_FPI<"p", 0b010, int_arm_neon_vcvtps, int_arm_neon_vcvtpu>; 67020b57cec5SDimitry Andricdefm VCVTMN : VCVT_FPI<"m", 0b011, int_arm_neon_vcvtms, int_arm_neon_vcvtmu>; 67030b57cec5SDimitry Andric 67040b57cec5SDimitry Andric// VCVT : Vector Convert Between Floating-Point and Fixed-Point. 67050b57cec5SDimitry Andriclet DecoderMethod = "DecodeVCVTD" in { 67060b57cec5SDimitry Andricdef VCVTf2xsd : N2VCvtD<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32", 67070b57cec5SDimitry Andric v2i32, v2f32, int_arm_neon_vcvtfp2fxs>; 67080b57cec5SDimitry Andricdef VCVTf2xud : N2VCvtD<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32", 67090b57cec5SDimitry Andric v2i32, v2f32, int_arm_neon_vcvtfp2fxu>; 67100b57cec5SDimitry Andricdef VCVTxs2fd : N2VCvtD<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32", 67110b57cec5SDimitry Andric v2f32, v2i32, int_arm_neon_vcvtfxs2fp>; 67120b57cec5SDimitry Andricdef VCVTxu2fd : N2VCvtD<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32", 67130b57cec5SDimitry Andric v2f32, v2i32, int_arm_neon_vcvtfxu2fp>; 67140b57cec5SDimitry Andriclet Predicates = [HasNEON, HasFullFP16] in { 67150b57cec5SDimitry Andricdef VCVTh2xsd : N2VCvtD<0, 1, 0b1101, 0, 1, "vcvt", "s16.f16", 67160b57cec5SDimitry Andric v4i16, v4f16, int_arm_neon_vcvtfp2fxs>; 67170b57cec5SDimitry Andricdef VCVTh2xud : N2VCvtD<1, 1, 0b1101, 0, 1, "vcvt", "u16.f16", 67180b57cec5SDimitry Andric v4i16, v4f16, int_arm_neon_vcvtfp2fxu>; 67190b57cec5SDimitry Andricdef VCVTxs2hd : N2VCvtD<0, 1, 0b1100, 0, 1, "vcvt", "f16.s16", 67200b57cec5SDimitry Andric v4f16, v4i16, int_arm_neon_vcvtfxs2fp>; 67210b57cec5SDimitry Andricdef VCVTxu2hd : N2VCvtD<1, 1, 0b1100, 0, 1, "vcvt", "f16.u16", 67220b57cec5SDimitry Andric v4f16, v4i16, int_arm_neon_vcvtfxu2fp>; 67230b57cec5SDimitry Andric} // Predicates = [HasNEON, HasFullFP16] 67240b57cec5SDimitry Andric} 67250b57cec5SDimitry Andric 67260b57cec5SDimitry Andriclet DecoderMethod = "DecodeVCVTQ" in { 67270b57cec5SDimitry Andricdef VCVTf2xsq : N2VCvtQ<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32", 67280b57cec5SDimitry Andric v4i32, v4f32, int_arm_neon_vcvtfp2fxs>; 67290b57cec5SDimitry Andricdef VCVTf2xuq : N2VCvtQ<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32", 67300b57cec5SDimitry Andric v4i32, v4f32, int_arm_neon_vcvtfp2fxu>; 67310b57cec5SDimitry Andricdef VCVTxs2fq : N2VCvtQ<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32", 67320b57cec5SDimitry Andric v4f32, v4i32, int_arm_neon_vcvtfxs2fp>; 67330b57cec5SDimitry Andricdef VCVTxu2fq : N2VCvtQ<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32", 67340b57cec5SDimitry Andric v4f32, v4i32, int_arm_neon_vcvtfxu2fp>; 67350b57cec5SDimitry Andriclet Predicates = [HasNEON, HasFullFP16] in { 67360b57cec5SDimitry Andricdef VCVTh2xsq : N2VCvtQ<0, 1, 0b1101, 0, 1, "vcvt", "s16.f16", 67370b57cec5SDimitry Andric v8i16, v8f16, int_arm_neon_vcvtfp2fxs>; 67380b57cec5SDimitry Andricdef VCVTh2xuq : N2VCvtQ<1, 1, 0b1101, 0, 1, "vcvt", "u16.f16", 67390b57cec5SDimitry Andric v8i16, v8f16, int_arm_neon_vcvtfp2fxu>; 67400b57cec5SDimitry Andricdef VCVTxs2hq : N2VCvtQ<0, 1, 0b1100, 0, 1, "vcvt", "f16.s16", 67410b57cec5SDimitry Andric v8f16, v8i16, int_arm_neon_vcvtfxs2fp>; 67420b57cec5SDimitry Andricdef VCVTxu2hq : N2VCvtQ<1, 1, 0b1100, 0, 1, "vcvt", "f16.u16", 67430b57cec5SDimitry Andric v8f16, v8i16, int_arm_neon_vcvtfxu2fp>; 67440b57cec5SDimitry Andric} // Predicates = [HasNEON, HasFullFP16] 67450b57cec5SDimitry Andric} 67460b57cec5SDimitry Andric 67470b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.s32.f32 $Dd, $Dm, #0", 67480b57cec5SDimitry Andric (VCVTf2sd DPR:$Dd, DPR:$Dm, pred:$p)>; 67490b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.u32.f32 $Dd, $Dm, #0", 67500b57cec5SDimitry Andric (VCVTf2ud DPR:$Dd, DPR:$Dm, pred:$p)>; 67510b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.f32.s32 $Dd, $Dm, #0", 67520b57cec5SDimitry Andric (VCVTs2fd DPR:$Dd, DPR:$Dm, pred:$p)>; 67530b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.f32.u32 $Dd, $Dm, #0", 67540b57cec5SDimitry Andric (VCVTu2fd DPR:$Dd, DPR:$Dm, pred:$p)>; 67550b57cec5SDimitry Andric 67560b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.s32.f32 $Qd, $Qm, #0", 67570b57cec5SDimitry Andric (VCVTf2sq QPR:$Qd, QPR:$Qm, pred:$p)>; 67580b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.u32.f32 $Qd, $Qm, #0", 67590b57cec5SDimitry Andric (VCVTf2uq QPR:$Qd, QPR:$Qm, pred:$p)>; 67600b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.f32.s32 $Qd, $Qm, #0", 67610b57cec5SDimitry Andric (VCVTs2fq QPR:$Qd, QPR:$Qm, pred:$p)>; 67620b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.f32.u32 $Qd, $Qm, #0", 67630b57cec5SDimitry Andric (VCVTu2fq QPR:$Qd, QPR:$Qm, pred:$p)>; 67640b57cec5SDimitry Andric 67650b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.s16.f16 $Dd, $Dm, #0", 67660b57cec5SDimitry Andric (VCVTh2sd DPR:$Dd, DPR:$Dm, pred:$p)>; 67670b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.u16.f16 $Dd, $Dm, #0", 67680b57cec5SDimitry Andric (VCVTh2ud DPR:$Dd, DPR:$Dm, pred:$p)>; 67690b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.f16.s16 $Dd, $Dm, #0", 67700b57cec5SDimitry Andric (VCVTs2hd DPR:$Dd, DPR:$Dm, pred:$p)>; 67710b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.f16.u16 $Dd, $Dm, #0", 67720b57cec5SDimitry Andric (VCVTu2hd DPR:$Dd, DPR:$Dm, pred:$p)>; 67730b57cec5SDimitry Andric 67740b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.s16.f16 $Qd, $Qm, #0", 67750b57cec5SDimitry Andric (VCVTh2sq QPR:$Qd, QPR:$Qm, pred:$p)>; 67760b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.u16.f16 $Qd, $Qm, #0", 67770b57cec5SDimitry Andric (VCVTh2uq QPR:$Qd, QPR:$Qm, pred:$p)>; 67780b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.f16.s16 $Qd, $Qm, #0", 67790b57cec5SDimitry Andric (VCVTs2hq QPR:$Qd, QPR:$Qm, pred:$p)>; 67800b57cec5SDimitry Andricdef : NEONInstAlias<"vcvt${p}.f16.u16 $Qd, $Qm, #0", 67810b57cec5SDimitry Andric (VCVTu2hq QPR:$Qd, QPR:$Qm, pred:$p)>; 67820b57cec5SDimitry Andric 67830b57cec5SDimitry Andric 67840b57cec5SDimitry Andric// VCVT : Vector Convert Between Half-Precision and Single-Precision. 67850b57cec5SDimitry Andricdef VCVTf2h : N2VNInt<0b11, 0b11, 0b01, 0b10, 0b01100, 0, 0, 67860b57cec5SDimitry Andric IIC_VUNAQ, "vcvt", "f16.f32", 67870b57cec5SDimitry Andric v4i16, v4f32, int_arm_neon_vcvtfp2hf>, 67880b57cec5SDimitry Andric Requires<[HasNEON, HasFP16]>; 67890b57cec5SDimitry Andricdef VCVTh2f : N2VLInt<0b11, 0b11, 0b01, 0b10, 0b01110, 0, 0, 67900b57cec5SDimitry Andric IIC_VUNAQ, "vcvt", "f32.f16", 67910b57cec5SDimitry Andric v4f32, v4i16, int_arm_neon_vcvthf2fp>, 67920b57cec5SDimitry Andric Requires<[HasNEON, HasFP16]>; 67930b57cec5SDimitry Andric 67940b57cec5SDimitry Andric// Vector Reverse. 67950b57cec5SDimitry Andric 67960b57cec5SDimitry Andric// VREV64 : Vector Reverse elements within 64-bit doublewords 67970b57cec5SDimitry Andric 67980b57cec5SDimitry Andricclass VREV64D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> 67990b57cec5SDimitry Andric : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 0, 0, (outs DPR:$Vd), 68000b57cec5SDimitry Andric (ins DPR:$Vm), IIC_VMOVD, 68010b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm", "", 68020b57cec5SDimitry Andric [(set DPR:$Vd, (Ty (ARMvrev64 (Ty DPR:$Vm))))]>; 68030b57cec5SDimitry Andricclass VREV64Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> 68040b57cec5SDimitry Andric : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 1, 0, (outs QPR:$Vd), 68050b57cec5SDimitry Andric (ins QPR:$Vm), IIC_VMOVQ, 68060b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm", "", 68070b57cec5SDimitry Andric [(set QPR:$Vd, (Ty (ARMvrev64 (Ty QPR:$Vm))))]>; 68080b57cec5SDimitry Andric 68090b57cec5SDimitry Andricdef VREV64d8 : VREV64D<0b00, "vrev64", "8", v8i8>; 68100b57cec5SDimitry Andricdef VREV64d16 : VREV64D<0b01, "vrev64", "16", v4i16>; 68110b57cec5SDimitry Andricdef VREV64d32 : VREV64D<0b10, "vrev64", "32", v2i32>; 68120b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 68130b57cec5SDimitry Andricdef : Pat<(v2f32 (ARMvrev64 (v2f32 DPR:$Vm))), (VREV64d32 DPR:$Vm)>; 68140b57cec5SDimitry Andric} 68150b57cec5SDimitry Andric 68160b57cec5SDimitry Andricdef VREV64q8 : VREV64Q<0b00, "vrev64", "8", v16i8>; 68170b57cec5SDimitry Andricdef VREV64q16 : VREV64Q<0b01, "vrev64", "16", v8i16>; 68180b57cec5SDimitry Andricdef VREV64q32 : VREV64Q<0b10, "vrev64", "32", v4i32>; 68190b57cec5SDimitry Andric 68200b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 6821*480093f4SDimitry Andric def : Pat<(v4f32 (ARMvrev64 (v4f32 QPR:$Vm))), 6822*480093f4SDimitry Andric (VREV64q32 QPR:$Vm)>; 6823*480093f4SDimitry Andric def : Pat<(v8f16 (ARMvrev64 (v8f16 QPR:$Vm))), 6824*480093f4SDimitry Andric (VREV64q16 QPR:$Vm)>; 6825*480093f4SDimitry Andric def : Pat<(v4f16 (ARMvrev64 (v4f16 DPR:$Vm))), 6826*480093f4SDimitry Andric (VREV64d16 DPR:$Vm)>; 68270b57cec5SDimitry Andric} 68280b57cec5SDimitry Andric 68290b57cec5SDimitry Andric// VREV32 : Vector Reverse elements within 32-bit words 68300b57cec5SDimitry Andric 68310b57cec5SDimitry Andricclass VREV32D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> 68320b57cec5SDimitry Andric : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 0, 0, (outs DPR:$Vd), 68330b57cec5SDimitry Andric (ins DPR:$Vm), IIC_VMOVD, 68340b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm", "", 68350b57cec5SDimitry Andric [(set DPR:$Vd, (Ty (ARMvrev32 (Ty DPR:$Vm))))]>; 68360b57cec5SDimitry Andricclass VREV32Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> 68370b57cec5SDimitry Andric : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 1, 0, (outs QPR:$Vd), 68380b57cec5SDimitry Andric (ins QPR:$Vm), IIC_VMOVQ, 68390b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm", "", 68400b57cec5SDimitry Andric [(set QPR:$Vd, (Ty (ARMvrev32 (Ty QPR:$Vm))))]>; 68410b57cec5SDimitry Andric 68420b57cec5SDimitry Andricdef VREV32d8 : VREV32D<0b00, "vrev32", "8", v8i8>; 68430b57cec5SDimitry Andricdef VREV32d16 : VREV32D<0b01, "vrev32", "16", v4i16>; 68440b57cec5SDimitry Andric 68450b57cec5SDimitry Andricdef VREV32q8 : VREV32Q<0b00, "vrev32", "8", v16i8>; 68460b57cec5SDimitry Andricdef VREV32q16 : VREV32Q<0b01, "vrev32", "16", v8i16>; 68470b57cec5SDimitry Andric 6848*480093f4SDimitry Andriclet Predicates = [HasNEON] in { 6849*480093f4SDimitry Andric def : Pat<(v8f16 (ARMvrev32 (v8f16 QPR:$Vm))), 6850*480093f4SDimitry Andric (VREV32q16 QPR:$Vm)>; 6851*480093f4SDimitry Andric def : Pat<(v4f16 (ARMvrev32 (v4f16 DPR:$Vm))), 6852*480093f4SDimitry Andric (VREV32d16 DPR:$Vm)>; 6853*480093f4SDimitry Andric} 6854*480093f4SDimitry Andric 68550b57cec5SDimitry Andric// VREV16 : Vector Reverse elements within 16-bit halfwords 68560b57cec5SDimitry Andric 68570b57cec5SDimitry Andricclass VREV16D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> 68580b57cec5SDimitry Andric : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 0, 0, (outs DPR:$Vd), 68590b57cec5SDimitry Andric (ins DPR:$Vm), IIC_VMOVD, 68600b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm", "", 68610b57cec5SDimitry Andric [(set DPR:$Vd, (Ty (ARMvrev16 (Ty DPR:$Vm))))]>; 68620b57cec5SDimitry Andricclass VREV16Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> 68630b57cec5SDimitry Andric : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 1, 0, (outs QPR:$Vd), 68640b57cec5SDimitry Andric (ins QPR:$Vm), IIC_VMOVQ, 68650b57cec5SDimitry Andric OpcodeStr, Dt, "$Vd, $Vm", "", 68660b57cec5SDimitry Andric [(set QPR:$Vd, (Ty (ARMvrev16 (Ty QPR:$Vm))))]>; 68670b57cec5SDimitry Andric 68680b57cec5SDimitry Andricdef VREV16d8 : VREV16D<0b00, "vrev16", "8", v8i8>; 68690b57cec5SDimitry Andricdef VREV16q8 : VREV16Q<0b00, "vrev16", "8", v16i8>; 68700b57cec5SDimitry Andric 68710b57cec5SDimitry Andric// Other Vector Shuffles. 68720b57cec5SDimitry Andric 68730b57cec5SDimitry Andric// Aligned extractions: really just dropping registers 68740b57cec5SDimitry Andric 68750b57cec5SDimitry Andricclass AlignedVEXTq<ValueType DestTy, ValueType SrcTy, SDNodeXForm LaneCVT> 68760b57cec5SDimitry Andric : Pat<(DestTy (vector_extract_subvec (SrcTy QPR:$src), (i32 imm:$start))), 68770b57cec5SDimitry Andric (EXTRACT_SUBREG (SrcTy QPR:$src), (LaneCVT imm:$start))>, 68780b57cec5SDimitry Andric Requires<[HasNEON]>; 68790b57cec5SDimitry Andric 68800b57cec5SDimitry Andricdef : AlignedVEXTq<v8i8, v16i8, DSubReg_i8_reg>; 68810b57cec5SDimitry Andric 68820b57cec5SDimitry Andricdef : AlignedVEXTq<v4i16, v8i16, DSubReg_i16_reg>; 68830b57cec5SDimitry Andric 68840b57cec5SDimitry Andricdef : AlignedVEXTq<v2i32, v4i32, DSubReg_i32_reg>; 68850b57cec5SDimitry Andric 68860b57cec5SDimitry Andricdef : AlignedVEXTq<v1i64, v2i64, DSubReg_f64_reg>; 68870b57cec5SDimitry Andric 68880b57cec5SDimitry Andricdef : AlignedVEXTq<v2f32, v4f32, DSubReg_i32_reg>; 68890b57cec5SDimitry Andric 68900b57cec5SDimitry Andricdef : AlignedVEXTq<v4f16, v8f16, DSubReg_i16_reg>; // v8f16 -> v4f16 68910b57cec5SDimitry Andric 68920b57cec5SDimitry Andric// VEXT : Vector Extract 68930b57cec5SDimitry Andric 68940b57cec5SDimitry Andric 68950b57cec5SDimitry Andric// All of these have a two-operand InstAlias. 68960b57cec5SDimitry Andriclet TwoOperandAliasConstraint = "$Vn = $Vd" in { 68970b57cec5SDimitry Andricclass VEXTd<string OpcodeStr, string Dt, ValueType Ty, Operand immTy> 68980b57cec5SDimitry Andric : N3V<0,1,0b11,{?,?,?,?},0,0, (outs DPR:$Vd), 68990b57cec5SDimitry Andric (ins DPR:$Vn, DPR:$Vm, immTy:$index), NVExtFrm, 69000b57cec5SDimitry Andric IIC_VEXTD, OpcodeStr, Dt, "$Vd, $Vn, $Vm, $index", "", 69010b57cec5SDimitry Andric [(set DPR:$Vd, (Ty (NEONvext (Ty DPR:$Vn), 69020b57cec5SDimitry Andric (Ty DPR:$Vm), imm:$index)))]> { 69030b57cec5SDimitry Andric bits<3> index; 69040b57cec5SDimitry Andric let Inst{11} = 0b0; 69050b57cec5SDimitry Andric let Inst{10-8} = index{2-0}; 69060b57cec5SDimitry Andric} 69070b57cec5SDimitry Andric 69080b57cec5SDimitry Andricclass VEXTq<string OpcodeStr, string Dt, ValueType Ty, Operand immTy> 69090b57cec5SDimitry Andric : N3V<0,1,0b11,{?,?,?,?},1,0, (outs QPR:$Vd), 69100b57cec5SDimitry Andric (ins QPR:$Vn, QPR:$Vm, imm0_15:$index), NVExtFrm, 69110b57cec5SDimitry Andric IIC_VEXTQ, OpcodeStr, Dt, "$Vd, $Vn, $Vm, $index", "", 69120b57cec5SDimitry Andric [(set QPR:$Vd, (Ty (NEONvext (Ty QPR:$Vn), 69130b57cec5SDimitry Andric (Ty QPR:$Vm), imm:$index)))]> { 69140b57cec5SDimitry Andric bits<4> index; 69150b57cec5SDimitry Andric let Inst{11-8} = index{3-0}; 69160b57cec5SDimitry Andric} 69170b57cec5SDimitry Andric} 69180b57cec5SDimitry Andric 69190b57cec5SDimitry Andricdef VEXTd8 : VEXTd<"vext", "8", v8i8, imm0_7> { 69200b57cec5SDimitry Andric let Inst{10-8} = index{2-0}; 69210b57cec5SDimitry Andric} 69220b57cec5SDimitry Andricdef VEXTd16 : VEXTd<"vext", "16", v4i16, imm0_3> { 69230b57cec5SDimitry Andric let Inst{10-9} = index{1-0}; 69240b57cec5SDimitry Andric let Inst{8} = 0b0; 69250b57cec5SDimitry Andric} 69260b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 69270b57cec5SDimitry Andricdef : Pat<(v4f16 (NEONvext (v4f16 DPR:$Vn), (v4f16 DPR:$Vm), (i32 imm:$index))), 69280b57cec5SDimitry Andric (VEXTd16 DPR:$Vn, DPR:$Vm, imm:$index)>; 69290b57cec5SDimitry Andric} 69300b57cec5SDimitry Andric 69310b57cec5SDimitry Andricdef VEXTd32 : VEXTd<"vext", "32", v2i32, imm0_1> { 69320b57cec5SDimitry Andric let Inst{10} = index{0}; 69330b57cec5SDimitry Andric let Inst{9-8} = 0b00; 69340b57cec5SDimitry Andric} 69350b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 69360b57cec5SDimitry Andricdef : Pat<(v2f32 (NEONvext (v2f32 DPR:$Vn), (v2f32 DPR:$Vm), (i32 imm:$index))), 69370b57cec5SDimitry Andric (VEXTd32 DPR:$Vn, DPR:$Vm, imm:$index)>; 69380b57cec5SDimitry Andric} 69390b57cec5SDimitry Andric 69400b57cec5SDimitry Andricdef VEXTq8 : VEXTq<"vext", "8", v16i8, imm0_15> { 69410b57cec5SDimitry Andric let Inst{11-8} = index{3-0}; 69420b57cec5SDimitry Andric} 69430b57cec5SDimitry Andricdef VEXTq16 : VEXTq<"vext", "16", v8i16, imm0_7> { 69440b57cec5SDimitry Andric let Inst{11-9} = index{2-0}; 69450b57cec5SDimitry Andric let Inst{8} = 0b0; 69460b57cec5SDimitry Andric} 69470b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 69480b57cec5SDimitry Andricdef : Pat<(v8f16 (NEONvext (v8f16 QPR:$Vn), (v8f16 QPR:$Vm), (i32 imm:$index))), 69490b57cec5SDimitry Andric (VEXTq16 QPR:$Vn, QPR:$Vm, imm:$index)>; 69500b57cec5SDimitry Andric} 69510b57cec5SDimitry Andric 69520b57cec5SDimitry Andricdef VEXTq32 : VEXTq<"vext", "32", v4i32, imm0_3> { 69530b57cec5SDimitry Andric let Inst{11-10} = index{1-0}; 69540b57cec5SDimitry Andric let Inst{9-8} = 0b00; 69550b57cec5SDimitry Andric} 69560b57cec5SDimitry Andricdef VEXTq64 : VEXTq<"vext", "64", v2i64, imm0_1> { 69570b57cec5SDimitry Andric let Inst{11} = index{0}; 69580b57cec5SDimitry Andric let Inst{10-8} = 0b000; 69590b57cec5SDimitry Andric} 69600b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 69610b57cec5SDimitry Andricdef : Pat<(v4f32 (NEONvext (v4f32 QPR:$Vn), (v4f32 QPR:$Vm), (i32 imm:$index))), 69620b57cec5SDimitry Andric (VEXTq32 QPR:$Vn, QPR:$Vm, imm:$index)>; 69630b57cec5SDimitry Andric} 69640b57cec5SDimitry Andric 69650b57cec5SDimitry Andric// VTRN : Vector Transpose 69660b57cec5SDimitry Andric 69670b57cec5SDimitry Andricdef VTRNd8 : N2VDShuffle<0b00, 0b00001, "vtrn", "8">; 69680b57cec5SDimitry Andricdef VTRNd16 : N2VDShuffle<0b01, 0b00001, "vtrn", "16">; 69690b57cec5SDimitry Andricdef VTRNd32 : N2VDShuffle<0b10, 0b00001, "vtrn", "32">; 69700b57cec5SDimitry Andric 69710b57cec5SDimitry Andricdef VTRNq8 : N2VQShuffle<0b00, 0b00001, IIC_VPERMQ, "vtrn", "8">; 69720b57cec5SDimitry Andricdef VTRNq16 : N2VQShuffle<0b01, 0b00001, IIC_VPERMQ, "vtrn", "16">; 69730b57cec5SDimitry Andricdef VTRNq32 : N2VQShuffle<0b10, 0b00001, IIC_VPERMQ, "vtrn", "32">; 69740b57cec5SDimitry Andric 69750b57cec5SDimitry Andric// VUZP : Vector Unzip (Deinterleave) 69760b57cec5SDimitry Andric 69770b57cec5SDimitry Andricdef VUZPd8 : N2VDShuffle<0b00, 0b00010, "vuzp", "8">; 69780b57cec5SDimitry Andricdef VUZPd16 : N2VDShuffle<0b01, 0b00010, "vuzp", "16">; 69790b57cec5SDimitry Andric// vuzp.32 Dd, Dm is a pseudo-instruction expanded to vtrn.32 Dd, Dm. 69800b57cec5SDimitry Andricdef : NEONInstAlias<"vuzp${p}.32 $Dd, $Dm", 69810b57cec5SDimitry Andric (VTRNd32 DPR:$Dd, DPR:$Dm, pred:$p)>; 69820b57cec5SDimitry Andric 69830b57cec5SDimitry Andricdef VUZPq8 : N2VQShuffle<0b00, 0b00010, IIC_VPERMQ3, "vuzp", "8">; 69840b57cec5SDimitry Andricdef VUZPq16 : N2VQShuffle<0b01, 0b00010, IIC_VPERMQ3, "vuzp", "16">; 69850b57cec5SDimitry Andricdef VUZPq32 : N2VQShuffle<0b10, 0b00010, IIC_VPERMQ3, "vuzp", "32">; 69860b57cec5SDimitry Andric 69870b57cec5SDimitry Andric// VZIP : Vector Zip (Interleave) 69880b57cec5SDimitry Andric 69890b57cec5SDimitry Andricdef VZIPd8 : N2VDShuffle<0b00, 0b00011, "vzip", "8">; 69900b57cec5SDimitry Andricdef VZIPd16 : N2VDShuffle<0b01, 0b00011, "vzip", "16">; 69910b57cec5SDimitry Andric// vzip.32 Dd, Dm is a pseudo-instruction expanded to vtrn.32 Dd, Dm. 69920b57cec5SDimitry Andricdef : NEONInstAlias<"vzip${p}.32 $Dd, $Dm", 69930b57cec5SDimitry Andric (VTRNd32 DPR:$Dd, DPR:$Dm, pred:$p)>; 69940b57cec5SDimitry Andric 69950b57cec5SDimitry Andricdef VZIPq8 : N2VQShuffle<0b00, 0b00011, IIC_VPERMQ3, "vzip", "8">; 69960b57cec5SDimitry Andricdef VZIPq16 : N2VQShuffle<0b01, 0b00011, IIC_VPERMQ3, "vzip", "16">; 69970b57cec5SDimitry Andricdef VZIPq32 : N2VQShuffle<0b10, 0b00011, IIC_VPERMQ3, "vzip", "32">; 69980b57cec5SDimitry Andric 69990b57cec5SDimitry Andric// Vector Table Lookup and Table Extension. 70000b57cec5SDimitry Andric 70010b57cec5SDimitry Andric// VTBL : Vector Table Lookup 70020b57cec5SDimitry Andriclet DecoderMethod = "DecodeTBLInstruction" in { 70030b57cec5SDimitry Andricdef VTBL1 70040b57cec5SDimitry Andric : N3V<1,1,0b11,0b1000,0,0, (outs DPR:$Vd), 70050b57cec5SDimitry Andric (ins VecListOneD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTB1, 70060b57cec5SDimitry Andric "vtbl", "8", "$Vd, $Vn, $Vm", "", 70070b57cec5SDimitry Andric [(set DPR:$Vd, (v8i8 (NEONvtbl1 VecListOneD:$Vn, DPR:$Vm)))]>; 70080b57cec5SDimitry Andric 70090b57cec5SDimitry Andriclet hasExtraSrcRegAllocReq = 1 in { 70100b57cec5SDimitry Andricdef VTBL2 70110b57cec5SDimitry Andric : N3V<1,1,0b11,0b1001,0,0, (outs DPR:$Vd), 70120b57cec5SDimitry Andric (ins VecListDPair:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTB2, 70130b57cec5SDimitry Andric "vtbl", "8", "$Vd, $Vn, $Vm", "", []>; 70140b57cec5SDimitry Andricdef VTBL3 70150b57cec5SDimitry Andric : N3V<1,1,0b11,0b1010,0,0, (outs DPR:$Vd), 70160b57cec5SDimitry Andric (ins VecListThreeD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTB3, 70170b57cec5SDimitry Andric "vtbl", "8", "$Vd, $Vn, $Vm", "", []>; 70180b57cec5SDimitry Andricdef VTBL4 70190b57cec5SDimitry Andric : N3V<1,1,0b11,0b1011,0,0, (outs DPR:$Vd), 70200b57cec5SDimitry Andric (ins VecListFourD:$Vn, DPR:$Vm), 70210b57cec5SDimitry Andric NVTBLFrm, IIC_VTB4, 70220b57cec5SDimitry Andric "vtbl", "8", "$Vd, $Vn, $Vm", "", []>; 70230b57cec5SDimitry Andric} // hasExtraSrcRegAllocReq = 1 70240b57cec5SDimitry Andric 70250b57cec5SDimitry Andricdef VTBL3Pseudo 70260b57cec5SDimitry Andric : PseudoNeonI<(outs DPR:$dst), (ins QQPR:$tbl, DPR:$src), IIC_VTB3, "", []>; 70270b57cec5SDimitry Andricdef VTBL4Pseudo 70280b57cec5SDimitry Andric : PseudoNeonI<(outs DPR:$dst), (ins QQPR:$tbl, DPR:$src), IIC_VTB4, "", []>; 70290b57cec5SDimitry Andric 70300b57cec5SDimitry Andric// VTBX : Vector Table Extension 70310b57cec5SDimitry Andricdef VTBX1 70320b57cec5SDimitry Andric : N3V<1,1,0b11,0b1000,1,0, (outs DPR:$Vd), 70330b57cec5SDimitry Andric (ins DPR:$orig, VecListOneD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTBX1, 70340b57cec5SDimitry Andric "vtbx", "8", "$Vd, $Vn, $Vm", "$orig = $Vd", 70350b57cec5SDimitry Andric [(set DPR:$Vd, (v8i8 (int_arm_neon_vtbx1 70360b57cec5SDimitry Andric DPR:$orig, VecListOneD:$Vn, DPR:$Vm)))]>; 70370b57cec5SDimitry Andriclet hasExtraSrcRegAllocReq = 1 in { 70380b57cec5SDimitry Andricdef VTBX2 70390b57cec5SDimitry Andric : N3V<1,1,0b11,0b1001,1,0, (outs DPR:$Vd), 70400b57cec5SDimitry Andric (ins DPR:$orig, VecListDPair:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTBX2, 70410b57cec5SDimitry Andric "vtbx", "8", "$Vd, $Vn, $Vm", "$orig = $Vd", []>; 70420b57cec5SDimitry Andricdef VTBX3 70430b57cec5SDimitry Andric : N3V<1,1,0b11,0b1010,1,0, (outs DPR:$Vd), 70440b57cec5SDimitry Andric (ins DPR:$orig, VecListThreeD:$Vn, DPR:$Vm), 70450b57cec5SDimitry Andric NVTBLFrm, IIC_VTBX3, 70460b57cec5SDimitry Andric "vtbx", "8", "$Vd, $Vn, $Vm", 70470b57cec5SDimitry Andric "$orig = $Vd", []>; 70480b57cec5SDimitry Andricdef VTBX4 70490b57cec5SDimitry Andric : N3V<1,1,0b11,0b1011,1,0, (outs DPR:$Vd), 70500b57cec5SDimitry Andric (ins DPR:$orig, VecListFourD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTBX4, 70510b57cec5SDimitry Andric "vtbx", "8", "$Vd, $Vn, $Vm", 70520b57cec5SDimitry Andric "$orig = $Vd", []>; 70530b57cec5SDimitry Andric} // hasExtraSrcRegAllocReq = 1 70540b57cec5SDimitry Andric 70550b57cec5SDimitry Andricdef VTBX3Pseudo 70560b57cec5SDimitry Andric : PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QQPR:$tbl, DPR:$src), 70570b57cec5SDimitry Andric IIC_VTBX3, "$orig = $dst", []>; 70580b57cec5SDimitry Andricdef VTBX4Pseudo 70590b57cec5SDimitry Andric : PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QQPR:$tbl, DPR:$src), 70600b57cec5SDimitry Andric IIC_VTBX4, "$orig = $dst", []>; 70610b57cec5SDimitry Andric} // DecoderMethod = "DecodeTBLInstruction" 70620b57cec5SDimitry Andric 70630b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 70640b57cec5SDimitry Andricdef : Pat<(v8i8 (NEONvtbl2 v8i8:$Vn0, v8i8:$Vn1, v8i8:$Vm)), 70650b57cec5SDimitry Andric (v8i8 (VTBL2 (REG_SEQUENCE DPair, v8i8:$Vn0, dsub_0, 70660b57cec5SDimitry Andric v8i8:$Vn1, dsub_1), 70670b57cec5SDimitry Andric v8i8:$Vm))>; 70680b57cec5SDimitry Andricdef : Pat<(v8i8 (int_arm_neon_vtbx2 v8i8:$orig, v8i8:$Vn0, v8i8:$Vn1, 70690b57cec5SDimitry Andric v8i8:$Vm)), 70700b57cec5SDimitry Andric (v8i8 (VTBX2 v8i8:$orig, 70710b57cec5SDimitry Andric (REG_SEQUENCE DPair, v8i8:$Vn0, dsub_0, 70720b57cec5SDimitry Andric v8i8:$Vn1, dsub_1), 70730b57cec5SDimitry Andric v8i8:$Vm))>; 70740b57cec5SDimitry Andric 70750b57cec5SDimitry Andricdef : Pat<(v8i8 (int_arm_neon_vtbl3 v8i8:$Vn0, v8i8:$Vn1, 70760b57cec5SDimitry Andric v8i8:$Vn2, v8i8:$Vm)), 70770b57cec5SDimitry Andric (v8i8 (VTBL3Pseudo (REG_SEQUENCE QQPR, v8i8:$Vn0, dsub_0, 70780b57cec5SDimitry Andric v8i8:$Vn1, dsub_1, 70790b57cec5SDimitry Andric v8i8:$Vn2, dsub_2, 70800b57cec5SDimitry Andric (v8i8 (IMPLICIT_DEF)), dsub_3), 70810b57cec5SDimitry Andric v8i8:$Vm))>; 70820b57cec5SDimitry Andricdef : Pat<(v8i8 (int_arm_neon_vtbx3 v8i8:$orig, v8i8:$Vn0, v8i8:$Vn1, 70830b57cec5SDimitry Andric v8i8:$Vn2, v8i8:$Vm)), 70840b57cec5SDimitry Andric (v8i8 (VTBX3Pseudo v8i8:$orig, 70850b57cec5SDimitry Andric (REG_SEQUENCE QQPR, v8i8:$Vn0, dsub_0, 70860b57cec5SDimitry Andric v8i8:$Vn1, dsub_1, 70870b57cec5SDimitry Andric v8i8:$Vn2, dsub_2, 70880b57cec5SDimitry Andric (v8i8 (IMPLICIT_DEF)), dsub_3), 70890b57cec5SDimitry Andric v8i8:$Vm))>; 70900b57cec5SDimitry Andric 70910b57cec5SDimitry Andricdef : Pat<(v8i8 (int_arm_neon_vtbl4 v8i8:$Vn0, v8i8:$Vn1, 70920b57cec5SDimitry Andric v8i8:$Vn2, v8i8:$Vn3, v8i8:$Vm)), 70930b57cec5SDimitry Andric (v8i8 (VTBL4Pseudo (REG_SEQUENCE QQPR, v8i8:$Vn0, dsub_0, 70940b57cec5SDimitry Andric v8i8:$Vn1, dsub_1, 70950b57cec5SDimitry Andric v8i8:$Vn2, dsub_2, 70960b57cec5SDimitry Andric v8i8:$Vn3, dsub_3), 70970b57cec5SDimitry Andric v8i8:$Vm))>; 70980b57cec5SDimitry Andricdef : Pat<(v8i8 (int_arm_neon_vtbx4 v8i8:$orig, v8i8:$Vn0, v8i8:$Vn1, 70990b57cec5SDimitry Andric v8i8:$Vn2, v8i8:$Vn3, v8i8:$Vm)), 71000b57cec5SDimitry Andric (v8i8 (VTBX4Pseudo v8i8:$orig, 71010b57cec5SDimitry Andric (REG_SEQUENCE QQPR, v8i8:$Vn0, dsub_0, 71020b57cec5SDimitry Andric v8i8:$Vn1, dsub_1, 71030b57cec5SDimitry Andric v8i8:$Vn2, dsub_2, 71040b57cec5SDimitry Andric v8i8:$Vn3, dsub_3), 71050b57cec5SDimitry Andric v8i8:$Vm))>; 71060b57cec5SDimitry Andric} 71070b57cec5SDimitry Andric 71080b57cec5SDimitry Andric// VRINT : Vector Rounding 71090b57cec5SDimitry Andricmulticlass VRINT_FPI<string op, bits<3> op9_7, SDPatternOperator Int> { 71100b57cec5SDimitry Andric let PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" in { 71110b57cec5SDimitry Andric def Df : N2VDIntnp<0b10, 0b10, 0b100, 0, NoItinerary, 71120b57cec5SDimitry Andric !strconcat("vrint", op), "f32", 71130b57cec5SDimitry Andric v2f32, v2f32, Int>, Requires<[HasV8, HasNEON]> { 71140b57cec5SDimitry Andric let Inst{9-7} = op9_7; 71150b57cec5SDimitry Andric } 71160b57cec5SDimitry Andric def Qf : N2VQIntnp<0b10, 0b10, 0b100, 0, NoItinerary, 71170b57cec5SDimitry Andric !strconcat("vrint", op), "f32", 71180b57cec5SDimitry Andric v4f32, v4f32, Int>, Requires<[HasV8, HasNEON]> { 71190b57cec5SDimitry Andric let Inst{9-7} = op9_7; 71200b57cec5SDimitry Andric } 71210b57cec5SDimitry Andric def Dh : N2VDIntnp<0b01, 0b10, 0b100, 0, NoItinerary, 71220b57cec5SDimitry Andric !strconcat("vrint", op), "f16", 71230b57cec5SDimitry Andric v4f16, v4f16, Int>, 71240b57cec5SDimitry Andric Requires<[HasV8, HasNEON, HasFullFP16]> { 71250b57cec5SDimitry Andric let Inst{9-7} = op9_7; 71260b57cec5SDimitry Andric } 71270b57cec5SDimitry Andric def Qh : N2VQIntnp<0b01, 0b10, 0b100, 0, NoItinerary, 71280b57cec5SDimitry Andric !strconcat("vrint", op), "f16", 71290b57cec5SDimitry Andric v8f16, v8f16, Int>, 71300b57cec5SDimitry Andric Requires<[HasV8, HasNEON, HasFullFP16]> { 71310b57cec5SDimitry Andric let Inst{9-7} = op9_7; 71320b57cec5SDimitry Andric } 71330b57cec5SDimitry Andric } 71340b57cec5SDimitry Andric 71350b57cec5SDimitry Andric def : NEONInstAlias<!strconcat("vrint", op, ".f32.f32\t$Dd, $Dm"), 71360b57cec5SDimitry Andric (!cast<Instruction>(NAME#"Df") DPR:$Dd, DPR:$Dm)>; 71370b57cec5SDimitry Andric def : NEONInstAlias<!strconcat("vrint", op, ".f32.f32\t$Qd, $Qm"), 71380b57cec5SDimitry Andric (!cast<Instruction>(NAME#"Qf") QPR:$Qd, QPR:$Qm)>; 71390b57cec5SDimitry Andric let Predicates = [HasNEON, HasFullFP16] in { 71400b57cec5SDimitry Andric def : NEONInstAlias<!strconcat("vrint", op, ".f16.f16\t$Dd, $Dm"), 71410b57cec5SDimitry Andric (!cast<Instruction>(NAME#"Dh") DPR:$Dd, DPR:$Dm)>; 71420b57cec5SDimitry Andric def : NEONInstAlias<!strconcat("vrint", op, ".f16.f16\t$Qd, $Qm"), 71430b57cec5SDimitry Andric (!cast<Instruction>(NAME#"Qh") QPR:$Qd, QPR:$Qm)>; 71440b57cec5SDimitry Andric } 71450b57cec5SDimitry Andric} 71460b57cec5SDimitry Andric 71470b57cec5SDimitry Andricdefm VRINTNN : VRINT_FPI<"n", 0b000, int_arm_neon_vrintn>; 71480b57cec5SDimitry Andricdefm VRINTXN : VRINT_FPI<"x", 0b001, int_arm_neon_vrintx>; 71490b57cec5SDimitry Andricdefm VRINTAN : VRINT_FPI<"a", 0b010, int_arm_neon_vrinta>; 71500b57cec5SDimitry Andricdefm VRINTZN : VRINT_FPI<"z", 0b011, int_arm_neon_vrintz>; 71510b57cec5SDimitry Andricdefm VRINTMN : VRINT_FPI<"m", 0b101, int_arm_neon_vrintm>; 71520b57cec5SDimitry Andricdefm VRINTPN : VRINT_FPI<"p", 0b111, int_arm_neon_vrintp>; 71530b57cec5SDimitry Andric 71540b57cec5SDimitry Andric// Cryptography instructions 71550b57cec5SDimitry Andriclet PostEncoderMethod = "NEONThumb2DataIPostEncoder", 71560b57cec5SDimitry Andric DecoderNamespace = "v8Crypto", hasSideEffects = 0 in { 71570b57cec5SDimitry Andric class AES<string op, bit op7, bit op6, SDPatternOperator Int> 71580b57cec5SDimitry Andric : N2VQIntXnp<0b00, 0b00, 0b011, op6, op7, NoItinerary, 71590b57cec5SDimitry Andric !strconcat("aes", op), "8", v16i8, v16i8, Int>, 71600b57cec5SDimitry Andric Requires<[HasV8, HasCrypto]>; 71610b57cec5SDimitry Andric class AES2Op<string op, bit op7, bit op6, SDPatternOperator Int> 71620b57cec5SDimitry Andric : N2VQIntX2np<0b00, 0b00, 0b011, op6, op7, NoItinerary, 71630b57cec5SDimitry Andric !strconcat("aes", op), "8", v16i8, v16i8, Int>, 71640b57cec5SDimitry Andric Requires<[HasV8, HasCrypto]>; 71650b57cec5SDimitry Andric class N2SHA<string op, bits<2> op17_16, bits<3> op10_8, bit op7, bit op6, 71660b57cec5SDimitry Andric SDPatternOperator Int> 71670b57cec5SDimitry Andric : N2VQIntXnp<0b10, op17_16, op10_8, op6, op7, NoItinerary, 71680b57cec5SDimitry Andric !strconcat("sha", op), "32", v4i32, v4i32, Int>, 71690b57cec5SDimitry Andric Requires<[HasV8, HasCrypto]>; 71700b57cec5SDimitry Andric class N2SHA2Op<string op, bits<2> op17_16, bits<3> op10_8, bit op7, bit op6, 71710b57cec5SDimitry Andric SDPatternOperator Int> 71720b57cec5SDimitry Andric : N2VQIntX2np<0b10, op17_16, op10_8, op6, op7, NoItinerary, 71730b57cec5SDimitry Andric !strconcat("sha", op), "32", v4i32, v4i32, Int>, 71740b57cec5SDimitry Andric Requires<[HasV8, HasCrypto]>; 71750b57cec5SDimitry Andric class N3SHA3Op<string op, bits<5> op27_23, bits<2> op21_20, SDPatternOperator Int> 71760b57cec5SDimitry Andric : N3VQInt3np<op27_23, op21_20, 0b1100, 1, 0, N3RegFrm, NoItinerary, 71770b57cec5SDimitry Andric !strconcat("sha", op), "32", v4i32, v4i32, Int, 0>, 71780b57cec5SDimitry Andric Requires<[HasV8, HasCrypto]>; 71790b57cec5SDimitry Andric} 71800b57cec5SDimitry Andric 71810b57cec5SDimitry Andricdef AESD : AES2Op<"d", 0, 1, int_arm_neon_aesd>; 71820b57cec5SDimitry Andricdef AESE : AES2Op<"e", 0, 0, int_arm_neon_aese>; 71830b57cec5SDimitry Andricdef AESIMC : AES<"imc", 1, 1, int_arm_neon_aesimc>; 71840b57cec5SDimitry Andricdef AESMC : AES<"mc", 1, 0, int_arm_neon_aesmc>; 71850b57cec5SDimitry Andric 71860b57cec5SDimitry Andricdef SHA1H : N2SHA<"1h", 0b01, 0b010, 1, 1, null_frag>; 71870b57cec5SDimitry Andricdef SHA1SU1 : N2SHA2Op<"1su1", 0b10, 0b011, 1, 0, int_arm_neon_sha1su1>; 71880b57cec5SDimitry Andricdef SHA256SU0 : N2SHA2Op<"256su0", 0b10, 0b011, 1, 1, int_arm_neon_sha256su0>; 71890b57cec5SDimitry Andricdef SHA1C : N3SHA3Op<"1c", 0b00100, 0b00, null_frag>; 71900b57cec5SDimitry Andricdef SHA1M : N3SHA3Op<"1m", 0b00100, 0b10, null_frag>; 71910b57cec5SDimitry Andricdef SHA1P : N3SHA3Op<"1p", 0b00100, 0b01, null_frag>; 71920b57cec5SDimitry Andricdef SHA1SU0 : N3SHA3Op<"1su0", 0b00100, 0b11, int_arm_neon_sha1su0>; 71930b57cec5SDimitry Andricdef SHA256H : N3SHA3Op<"256h", 0b00110, 0b00, int_arm_neon_sha256h>; 71940b57cec5SDimitry Andricdef SHA256H2 : N3SHA3Op<"256h2", 0b00110, 0b01, int_arm_neon_sha256h2>; 71950b57cec5SDimitry Andricdef SHA256SU1 : N3SHA3Op<"256su1", 0b00110, 0b10, int_arm_neon_sha256su1>; 71960b57cec5SDimitry Andric 71970b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 71980b57cec5SDimitry Andricdef : Pat<(i32 (int_arm_neon_sha1h i32:$Rn)), 71990b57cec5SDimitry Andric (COPY_TO_REGCLASS (f32 (EXTRACT_SUBREG 72000b57cec5SDimitry Andric (SHA1H (SUBREG_TO_REG (i64 0), 72010b57cec5SDimitry Andric (f32 (COPY_TO_REGCLASS i32:$Rn, SPR)), 72020b57cec5SDimitry Andric ssub_0)), 72030b57cec5SDimitry Andric ssub_0)), GPR)>; 72040b57cec5SDimitry Andric 72050b57cec5SDimitry Andricdef : Pat<(v4i32 (int_arm_neon_sha1c v4i32:$hash_abcd, i32:$hash_e, v4i32:$wk)), 72060b57cec5SDimitry Andric (SHA1C v4i32:$hash_abcd, 72070b57cec5SDimitry Andric (SUBREG_TO_REG (i64 0), 72080b57cec5SDimitry Andric (f32 (COPY_TO_REGCLASS i32:$hash_e, SPR)), 72090b57cec5SDimitry Andric ssub_0), 72100b57cec5SDimitry Andric v4i32:$wk)>; 72110b57cec5SDimitry Andric 72120b57cec5SDimitry Andricdef : Pat<(v4i32 (int_arm_neon_sha1m v4i32:$hash_abcd, i32:$hash_e, v4i32:$wk)), 72130b57cec5SDimitry Andric (SHA1M v4i32:$hash_abcd, 72140b57cec5SDimitry Andric (SUBREG_TO_REG (i64 0), 72150b57cec5SDimitry Andric (f32 (COPY_TO_REGCLASS i32:$hash_e, SPR)), 72160b57cec5SDimitry Andric ssub_0), 72170b57cec5SDimitry Andric v4i32:$wk)>; 72180b57cec5SDimitry Andric 72190b57cec5SDimitry Andricdef : Pat<(v4i32 (int_arm_neon_sha1p v4i32:$hash_abcd, i32:$hash_e, v4i32:$wk)), 72200b57cec5SDimitry Andric (SHA1P v4i32:$hash_abcd, 72210b57cec5SDimitry Andric (SUBREG_TO_REG (i64 0), 72220b57cec5SDimitry Andric (f32 (COPY_TO_REGCLASS i32:$hash_e, SPR)), 72230b57cec5SDimitry Andric ssub_0), 72240b57cec5SDimitry Andric v4i32:$wk)>; 72250b57cec5SDimitry Andric} 72260b57cec5SDimitry Andric 72270b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 72280b57cec5SDimitry Andric// NEON instructions for single-precision FP math 72290b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 72300b57cec5SDimitry Andric 72310b57cec5SDimitry Andricclass N2VSPat<SDNode OpNode, NeonI Inst> 72320b57cec5SDimitry Andric : NEONFPPat<(f32 (OpNode SPR:$a)), 72330b57cec5SDimitry Andric (EXTRACT_SUBREG 72340b57cec5SDimitry Andric (v2f32 (COPY_TO_REGCLASS (Inst 72350b57cec5SDimitry Andric (INSERT_SUBREG 72360b57cec5SDimitry Andric (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)), 72370b57cec5SDimitry Andric SPR:$a, ssub_0)), DPR_VFP2)), ssub_0)>; 72380b57cec5SDimitry Andric 72390b57cec5SDimitry Andricclass N3VSPat<SDNode OpNode, NeonI Inst> 72400b57cec5SDimitry Andric : NEONFPPat<(f32 (OpNode SPR:$a, SPR:$b)), 72410b57cec5SDimitry Andric (EXTRACT_SUBREG 72420b57cec5SDimitry Andric (v2f32 (COPY_TO_REGCLASS (Inst 72430b57cec5SDimitry Andric (INSERT_SUBREG 72440b57cec5SDimitry Andric (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)), 72450b57cec5SDimitry Andric SPR:$a, ssub_0), 72460b57cec5SDimitry Andric (INSERT_SUBREG 72470b57cec5SDimitry Andric (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)), 72480b57cec5SDimitry Andric SPR:$b, ssub_0)), DPR_VFP2)), ssub_0)>; 72490b57cec5SDimitry Andric 72500b57cec5SDimitry Andricclass N3VSPatFP16<SDNode OpNode, NeonI Inst> 72510b57cec5SDimitry Andric : NEONFPPat<(f16 (OpNode HPR:$a, HPR:$b)), 72520b57cec5SDimitry Andric (EXTRACT_SUBREG 72530b57cec5SDimitry Andric (v4f16 (COPY_TO_REGCLASS (Inst 72540b57cec5SDimitry Andric (INSERT_SUBREG 72550b57cec5SDimitry Andric (v4f16 (COPY_TO_REGCLASS (v4f16 (IMPLICIT_DEF)), DPR_VFP2)), 72560b57cec5SDimitry Andric HPR:$a, ssub_0), 72570b57cec5SDimitry Andric (INSERT_SUBREG 72580b57cec5SDimitry Andric (v4f16 (COPY_TO_REGCLASS (v4f16 (IMPLICIT_DEF)), DPR_VFP2)), 72590b57cec5SDimitry Andric HPR:$b, ssub_0)), DPR_VFP2)), ssub_0)>; 72600b57cec5SDimitry Andric 72610b57cec5SDimitry Andricclass N3VSMulOpPat<SDNode MulNode, SDNode OpNode, NeonI Inst> 72620b57cec5SDimitry Andric : NEONFPPat<(f32 (OpNode SPR:$acc, (f32 (MulNode SPR:$a, SPR:$b)))), 72630b57cec5SDimitry Andric (EXTRACT_SUBREG 72640b57cec5SDimitry Andric (v2f32 (COPY_TO_REGCLASS (Inst 72650b57cec5SDimitry Andric (INSERT_SUBREG 72660b57cec5SDimitry Andric (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)), 72670b57cec5SDimitry Andric SPR:$acc, ssub_0), 72680b57cec5SDimitry Andric (INSERT_SUBREG 72690b57cec5SDimitry Andric (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)), 72700b57cec5SDimitry Andric SPR:$a, ssub_0), 72710b57cec5SDimitry Andric (INSERT_SUBREG 72720b57cec5SDimitry Andric (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)), 72730b57cec5SDimitry Andric SPR:$b, ssub_0)), DPR_VFP2)), ssub_0)>; 72740b57cec5SDimitry Andric 72750b57cec5SDimitry Andricclass NVCVTIFPat<SDNode OpNode, NeonI Inst> 72760b57cec5SDimitry Andric : NEONFPPat<(f32 (OpNode GPR:$a)), 72770b57cec5SDimitry Andric (f32 (EXTRACT_SUBREG 72780b57cec5SDimitry Andric (v2f32 (Inst 72790b57cec5SDimitry Andric (INSERT_SUBREG 72800b57cec5SDimitry Andric (v2f32 (IMPLICIT_DEF)), 72810b57cec5SDimitry Andric (i32 (COPY_TO_REGCLASS GPR:$a, SPR)), ssub_0))), 72820b57cec5SDimitry Andric ssub_0))>; 72830b57cec5SDimitry Andricclass NVCVTFIPat<SDNode OpNode, NeonI Inst> 72840b57cec5SDimitry Andric : NEONFPPat<(i32 (OpNode SPR:$a)), 72850b57cec5SDimitry Andric (i32 (EXTRACT_SUBREG 72860b57cec5SDimitry Andric (v2f32 (Inst (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), 72870b57cec5SDimitry Andric SPR:$a, ssub_0))), 72880b57cec5SDimitry Andric ssub_0))>; 72890b57cec5SDimitry Andric 72900b57cec5SDimitry Andricdef : N3VSPat<fadd, VADDfd>; 72910b57cec5SDimitry Andricdef : N3VSPat<fsub, VSUBfd>; 72920b57cec5SDimitry Andricdef : N3VSPat<fmul, VMULfd>; 72930b57cec5SDimitry Andricdef : N3VSMulOpPat<fmul, fadd, VMLAfd>, 72940b57cec5SDimitry Andric Requires<[HasNEON, UseNEONForFP, UseFPVMLx]>; 72950b57cec5SDimitry Andricdef : N3VSMulOpPat<fmul, fsub, VMLSfd>, 72960b57cec5SDimitry Andric Requires<[HasNEON, UseNEONForFP, UseFPVMLx]>; 72970b57cec5SDimitry Andricdef : N3VSMulOpPat<fmul, fadd, VFMAfd>, 72980b57cec5SDimitry Andric Requires<[HasVFP4, UseNEONForFP, UseFusedMAC]>; 72990b57cec5SDimitry Andricdef : N3VSMulOpPat<fmul, fsub, VFMSfd>, 73000b57cec5SDimitry Andric Requires<[HasVFP4, UseNEONForFP, UseFusedMAC]>; 73010b57cec5SDimitry Andricdef : N2VSPat<fabs, VABSfd>; 73020b57cec5SDimitry Andricdef : N2VSPat<fneg, VNEGfd>; 73030b57cec5SDimitry Andricdef : N3VSPatFP16<fmaximum, VMAXhd>, Requires<[HasFullFP16]>; 73040b57cec5SDimitry Andricdef : N3VSPatFP16<fminimum, VMINhd>, Requires<[HasFullFP16]>; 73050b57cec5SDimitry Andricdef : N3VSPat<fmaximum, VMAXfd>, Requires<[HasNEON]>; 73060b57cec5SDimitry Andricdef : N3VSPat<fminimum, VMINfd>, Requires<[HasNEON]>; 73070b57cec5SDimitry Andricdef : NVCVTFIPat<fp_to_sint, VCVTf2sd>; 73080b57cec5SDimitry Andricdef : NVCVTFIPat<fp_to_uint, VCVTf2ud>; 73090b57cec5SDimitry Andricdef : NVCVTIFPat<sint_to_fp, VCVTs2fd>; 73100b57cec5SDimitry Andricdef : NVCVTIFPat<uint_to_fp, VCVTu2fd>; 73110b57cec5SDimitry Andric 73120b57cec5SDimitry Andric// NEON doesn't have any f64 conversions, so provide patterns to make 73130b57cec5SDimitry Andric// sure the VFP conversions match when extracting from a vector. 73140b57cec5SDimitry Andricdef : VFPPat<(f64 (sint_to_fp (extractelt (v2i32 DPR:$src), imm:$lane))), 73150b57cec5SDimitry Andric (VSITOD (EXTRACT_SUBREG DPR:$src, (SSubReg_f32_reg imm:$lane)))>; 73160b57cec5SDimitry Andricdef : VFPPat<(f64 (sint_to_fp (extractelt (v4i32 QPR:$src), imm:$lane))), 73170b57cec5SDimitry Andric (VSITOD (EXTRACT_SUBREG QPR:$src, (SSubReg_f32_reg imm:$lane)))>; 73180b57cec5SDimitry Andricdef : VFPPat<(f64 (uint_to_fp (extractelt (v2i32 DPR:$src), imm:$lane))), 73190b57cec5SDimitry Andric (VUITOD (EXTRACT_SUBREG DPR:$src, (SSubReg_f32_reg imm:$lane)))>; 73200b57cec5SDimitry Andricdef : VFPPat<(f64 (uint_to_fp (extractelt (v4i32 QPR:$src), imm:$lane))), 73210b57cec5SDimitry Andric (VUITOD (EXTRACT_SUBREG QPR:$src, (SSubReg_f32_reg imm:$lane)))>; 73220b57cec5SDimitry Andric 73230b57cec5SDimitry Andric 73240b57cec5SDimitry Andric// Prefer VMOVDRR for i32 -> f32 bitcasts, it can write all DPR registers. 73250b57cec5SDimitry Andricdef : Pat<(f32 (bitconvert GPR:$a)), 73260b57cec5SDimitry Andric (EXTRACT_SUBREG (VMOVDRR GPR:$a, GPR:$a), ssub_0)>, 73270b57cec5SDimitry Andric Requires<[HasNEON, DontUseVMOVSR]>; 73280b57cec5SDimitry Andricdef : Pat<(arm_vmovsr GPR:$a), 73290b57cec5SDimitry Andric (EXTRACT_SUBREG (VMOVDRR GPR:$a, GPR:$a), ssub_0)>, 73300b57cec5SDimitry Andric Requires<[HasNEON, DontUseVMOVSR]>; 73310b57cec5SDimitry Andric 73320b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 73330b57cec5SDimitry Andric// Non-Instruction Patterns or Endiness - Revert Patterns 73340b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 73350b57cec5SDimitry Andric 73360b57cec5SDimitry Andric// bit_convert 73370b57cec5SDimitry Andric// 64 bit conversions 73380b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 73390b57cec5SDimitry Andricdef : Pat<(f64 (bitconvert (v1i64 DPR:$src))), (f64 DPR:$src)>; 73400b57cec5SDimitry Andricdef : Pat<(v1i64 (bitconvert (f64 DPR:$src))), (v1i64 DPR:$src)>; 73410b57cec5SDimitry Andric 73420b57cec5SDimitry Andricdef : Pat<(v2f32 (bitconvert (v2i32 DPR:$src))), (v2f32 DPR:$src)>; 73430b57cec5SDimitry Andricdef : Pat<(v2i32 (bitconvert (v2f32 DPR:$src))), (v2i32 DPR:$src)>; 73440b57cec5SDimitry Andric 73450b57cec5SDimitry Andricdef : Pat<(v4i16 (bitconvert (v4f16 DPR:$src))), (v4i16 DPR:$src)>; 73460b57cec5SDimitry Andricdef : Pat<(v4f16 (bitconvert (v4i16 DPR:$src))), (v4f16 DPR:$src)>; 73470b57cec5SDimitry Andric 73480b57cec5SDimitry Andric// 128 bit conversions 73490b57cec5SDimitry Andricdef : Pat<(v2f64 (bitconvert (v2i64 QPR:$src))), (v2f64 QPR:$src)>; 73500b57cec5SDimitry Andricdef : Pat<(v2i64 (bitconvert (v2f64 QPR:$src))), (v2i64 QPR:$src)>; 73510b57cec5SDimitry Andric 73520b57cec5SDimitry Andricdef : Pat<(v4i32 (bitconvert (v4f32 QPR:$src))), (v4i32 QPR:$src)>; 73530b57cec5SDimitry Andricdef : Pat<(v4f32 (bitconvert (v4i32 QPR:$src))), (v4f32 QPR:$src)>; 73540b57cec5SDimitry Andric 73550b57cec5SDimitry Andricdef : Pat<(v8i16 (bitconvert (v8f16 QPR:$src))), (v8i16 QPR:$src)>; 73560b57cec5SDimitry Andricdef : Pat<(v8f16 (bitconvert (v8i16 QPR:$src))), (v8f16 QPR:$src)>; 73570b57cec5SDimitry Andric} 73580b57cec5SDimitry Andric 73590b57cec5SDimitry Andriclet Predicates = [IsLE,HasNEON] in { 73600b57cec5SDimitry Andric // 64 bit conversions 73610b57cec5SDimitry Andric def : Pat<(f64 (bitconvert (v2f32 DPR:$src))), (f64 DPR:$src)>; 73620b57cec5SDimitry Andric def : Pat<(f64 (bitconvert (v2i32 DPR:$src))), (f64 DPR:$src)>; 73630b57cec5SDimitry Andric def : Pat<(f64 (bitconvert (v4f16 DPR:$src))), (f64 DPR:$src)>; 73640b57cec5SDimitry Andric def : Pat<(f64 (bitconvert (v4i16 DPR:$src))), (f64 DPR:$src)>; 73650b57cec5SDimitry Andric def : Pat<(f64 (bitconvert (v8i8 DPR:$src))), (f64 DPR:$src)>; 73660b57cec5SDimitry Andric 73670b57cec5SDimitry Andric def : Pat<(v1i64 (bitconvert (v2f32 DPR:$src))), (v1i64 DPR:$src)>; 73680b57cec5SDimitry Andric def : Pat<(v1i64 (bitconvert (v2i32 DPR:$src))), (v1i64 DPR:$src)>; 73690b57cec5SDimitry Andric def : Pat<(v1i64 (bitconvert (v4f16 DPR:$src))), (v1i64 DPR:$src)>; 73700b57cec5SDimitry Andric def : Pat<(v1i64 (bitconvert (v4i16 DPR:$src))), (v1i64 DPR:$src)>; 73710b57cec5SDimitry Andric def : Pat<(v1i64 (bitconvert (v8i8 DPR:$src))), (v1i64 DPR:$src)>; 73720b57cec5SDimitry Andric 73730b57cec5SDimitry Andric def : Pat<(v2f32 (bitconvert (f64 DPR:$src))), (v2f32 DPR:$src)>; 73740b57cec5SDimitry Andric def : Pat<(v2f32 (bitconvert (v1i64 DPR:$src))), (v2f32 DPR:$src)>; 73750b57cec5SDimitry Andric def : Pat<(v2f32 (bitconvert (v4f16 DPR:$src))), (v2f32 DPR:$src)>; 73760b57cec5SDimitry Andric def : Pat<(v2f32 (bitconvert (v4i16 DPR:$src))), (v2f32 DPR:$src)>; 73770b57cec5SDimitry Andric def : Pat<(v2f32 (bitconvert (v8i8 DPR:$src))), (v2f32 DPR:$src)>; 73780b57cec5SDimitry Andric 73790b57cec5SDimitry Andric def : Pat<(v2i32 (bitconvert (f64 DPR:$src))), (v2i32 DPR:$src)>; 73800b57cec5SDimitry Andric def : Pat<(v2i32 (bitconvert (v1i64 DPR:$src))), (v2i32 DPR:$src)>; 73810b57cec5SDimitry Andric def : Pat<(v2i32 (bitconvert (v4f16 DPR:$src))), (v2i32 DPR:$src)>; 73820b57cec5SDimitry Andric def : Pat<(v2i32 (bitconvert (v4i16 DPR:$src))), (v2i32 DPR:$src)>; 73830b57cec5SDimitry Andric def : Pat<(v2i32 (bitconvert (v8i8 DPR:$src))), (v2i32 DPR:$src)>; 73840b57cec5SDimitry Andric 73850b57cec5SDimitry Andric def : Pat<(v4f16 (bitconvert (f64 DPR:$src))), (v4f16 DPR:$src)>; 73860b57cec5SDimitry Andric def : Pat<(v4f16 (bitconvert (v1i64 DPR:$src))), (v4f16 DPR:$src)>; 73870b57cec5SDimitry Andric def : Pat<(v4f16 (bitconvert (v2f32 DPR:$src))), (v4f16 DPR:$src)>; 73880b57cec5SDimitry Andric def : Pat<(v4f16 (bitconvert (v2i32 DPR:$src))), (v4f16 DPR:$src)>; 73890b57cec5SDimitry Andric def : Pat<(v4f16 (bitconvert (v8i8 DPR:$src))), (v4f16 DPR:$src)>; 73900b57cec5SDimitry Andric 73910b57cec5SDimitry Andric def : Pat<(v4i16 (bitconvert (f64 DPR:$src))), (v4i16 DPR:$src)>; 73920b57cec5SDimitry Andric def : Pat<(v4i16 (bitconvert (v1i64 DPR:$src))), (v4i16 DPR:$src)>; 73930b57cec5SDimitry Andric def : Pat<(v4i16 (bitconvert (v2f32 DPR:$src))), (v4i16 DPR:$src)>; 73940b57cec5SDimitry Andric def : Pat<(v4i16 (bitconvert (v2i32 DPR:$src))), (v4i16 DPR:$src)>; 73950b57cec5SDimitry Andric def : Pat<(v4i16 (bitconvert (v8i8 DPR:$src))), (v4i16 DPR:$src)>; 73960b57cec5SDimitry Andric 73970b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (f64 DPR:$src))), (v8i8 DPR:$src)>; 73980b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (v1i64 DPR:$src))), (v8i8 DPR:$src)>; 73990b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (v2f32 DPR:$src))), (v8i8 DPR:$src)>; 74000b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (v2i32 DPR:$src))), (v8i8 DPR:$src)>; 74010b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (v4f16 DPR:$src))), (v8i8 DPR:$src)>; 74020b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (v4i16 DPR:$src))), (v8i8 DPR:$src)>; 74030b57cec5SDimitry Andric 74040b57cec5SDimitry Andric // 128 bit conversions 74050b57cec5SDimitry Andric def : Pat<(v2f64 (bitconvert (v4f32 QPR:$src))), (v2f64 QPR:$src)>; 74060b57cec5SDimitry Andric def : Pat<(v2f64 (bitconvert (v4i32 QPR:$src))), (v2f64 QPR:$src)>; 74070b57cec5SDimitry Andric def : Pat<(v2f64 (bitconvert (v8f16 QPR:$src))), (v2f64 QPR:$src)>; 74080b57cec5SDimitry Andric def : Pat<(v2f64 (bitconvert (v8i16 QPR:$src))), (v2f64 QPR:$src)>; 74090b57cec5SDimitry Andric def : Pat<(v2f64 (bitconvert (v16i8 QPR:$src))), (v2f64 QPR:$src)>; 74100b57cec5SDimitry Andric 74110b57cec5SDimitry Andric def : Pat<(v2i64 (bitconvert (v4f32 QPR:$src))), (v2i64 QPR:$src)>; 74120b57cec5SDimitry Andric def : Pat<(v2i64 (bitconvert (v4i32 QPR:$src))), (v2i64 QPR:$src)>; 74130b57cec5SDimitry Andric def : Pat<(v2i64 (bitconvert (v8f16 QPR:$src))), (v2i64 QPR:$src)>; 74140b57cec5SDimitry Andric def : Pat<(v2i64 (bitconvert (v8i16 QPR:$src))), (v2i64 QPR:$src)>; 74150b57cec5SDimitry Andric def : Pat<(v2i64 (bitconvert (v16i8 QPR:$src))), (v2i64 QPR:$src)>; 74160b57cec5SDimitry Andric 74170b57cec5SDimitry Andric def : Pat<(v4f32 (bitconvert (v2f64 QPR:$src))), (v4f32 QPR:$src)>; 74180b57cec5SDimitry Andric def : Pat<(v4f32 (bitconvert (v2i64 QPR:$src))), (v4f32 QPR:$src)>; 74190b57cec5SDimitry Andric def : Pat<(v4f32 (bitconvert (v8f16 QPR:$src))), (v4f32 QPR:$src)>; 74200b57cec5SDimitry Andric def : Pat<(v4f32 (bitconvert (v8i16 QPR:$src))), (v4f32 QPR:$src)>; 74210b57cec5SDimitry Andric def : Pat<(v4f32 (bitconvert (v16i8 QPR:$src))), (v4f32 QPR:$src)>; 74220b57cec5SDimitry Andric 74230b57cec5SDimitry Andric def : Pat<(v4i32 (bitconvert (v2f64 QPR:$src))), (v4i32 QPR:$src)>; 74240b57cec5SDimitry Andric def : Pat<(v4i32 (bitconvert (v2i64 QPR:$src))), (v4i32 QPR:$src)>; 74250b57cec5SDimitry Andric def : Pat<(v4i32 (bitconvert (v8f16 QPR:$src))), (v4i32 QPR:$src)>; 74260b57cec5SDimitry Andric def : Pat<(v4i32 (bitconvert (v8i16 QPR:$src))), (v4i32 QPR:$src)>; 74270b57cec5SDimitry Andric def : Pat<(v4i32 (bitconvert (v16i8 QPR:$src))), (v4i32 QPR:$src)>; 74280b57cec5SDimitry Andric 74290b57cec5SDimitry Andric def : Pat<(v8f16 (bitconvert (v2f64 QPR:$src))), (v8f16 QPR:$src)>; 74300b57cec5SDimitry Andric def : Pat<(v8f16 (bitconvert (v2i64 QPR:$src))), (v8f16 QPR:$src)>; 74310b57cec5SDimitry Andric def : Pat<(v8f16 (bitconvert (v4f32 QPR:$src))), (v8f16 QPR:$src)>; 74320b57cec5SDimitry Andric def : Pat<(v8f16 (bitconvert (v4i32 QPR:$src))), (v8f16 QPR:$src)>; 74330b57cec5SDimitry Andric def : Pat<(v8f16 (bitconvert (v16i8 QPR:$src))), (v8f16 QPR:$src)>; 74340b57cec5SDimitry Andric 74350b57cec5SDimitry Andric def : Pat<(v8i16 (bitconvert (v2f64 QPR:$src))), (v8i16 QPR:$src)>; 74360b57cec5SDimitry Andric def : Pat<(v8i16 (bitconvert (v2i64 QPR:$src))), (v8i16 QPR:$src)>; 74370b57cec5SDimitry Andric def : Pat<(v8i16 (bitconvert (v4f32 QPR:$src))), (v8i16 QPR:$src)>; 74380b57cec5SDimitry Andric def : Pat<(v8i16 (bitconvert (v4i32 QPR:$src))), (v8i16 QPR:$src)>; 74390b57cec5SDimitry Andric def : Pat<(v8i16 (bitconvert (v16i8 QPR:$src))), (v8i16 QPR:$src)>; 74400b57cec5SDimitry Andric 74410b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v2f64 QPR:$src))), (v16i8 QPR:$src)>; 74420b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v2i64 QPR:$src))), (v16i8 QPR:$src)>; 74430b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v4f32 QPR:$src))), (v16i8 QPR:$src)>; 74440b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v4i32 QPR:$src))), (v16i8 QPR:$src)>; 74450b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v8f16 QPR:$src))), (v16i8 QPR:$src)>; 74460b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v8i16 QPR:$src))), (v16i8 QPR:$src)>; 74470b57cec5SDimitry Andric} 74480b57cec5SDimitry Andric 74490b57cec5SDimitry Andriclet Predicates = [IsBE,HasNEON] in { 74500b57cec5SDimitry Andric // 64 bit conversions 74510b57cec5SDimitry Andric def : Pat<(f64 (bitconvert (v2f32 DPR:$src))), (VREV64d32 DPR:$src)>; 74520b57cec5SDimitry Andric def : Pat<(f64 (bitconvert (v2i32 DPR:$src))), (VREV64d32 DPR:$src)>; 74530b57cec5SDimitry Andric def : Pat<(f64 (bitconvert (v4f16 DPR:$src))), (VREV64d16 DPR:$src)>; 74540b57cec5SDimitry Andric def : Pat<(f64 (bitconvert (v4i16 DPR:$src))), (VREV64d16 DPR:$src)>; 74550b57cec5SDimitry Andric def : Pat<(f64 (bitconvert (v8i8 DPR:$src))), (VREV64d8 DPR:$src)>; 74560b57cec5SDimitry Andric 74570b57cec5SDimitry Andric def : Pat<(v1i64 (bitconvert (v2f32 DPR:$src))), (VREV64d32 DPR:$src)>; 74580b57cec5SDimitry Andric def : Pat<(v1i64 (bitconvert (v2i32 DPR:$src))), (VREV64d32 DPR:$src)>; 74590b57cec5SDimitry Andric def : Pat<(v1i64 (bitconvert (v4f16 DPR:$src))), (VREV64d16 DPR:$src)>; 74600b57cec5SDimitry Andric def : Pat<(v1i64 (bitconvert (v4i16 DPR:$src))), (VREV64d16 DPR:$src)>; 74610b57cec5SDimitry Andric def : Pat<(v1i64 (bitconvert (v8i8 DPR:$src))), (VREV64d8 DPR:$src)>; 74620b57cec5SDimitry Andric 74630b57cec5SDimitry Andric def : Pat<(v2f32 (bitconvert (f64 DPR:$src))), (VREV64d32 DPR:$src)>; 74640b57cec5SDimitry Andric def : Pat<(v2f32 (bitconvert (v1i64 DPR:$src))), (VREV64d32 DPR:$src)>; 74650b57cec5SDimitry Andric def : Pat<(v2f32 (bitconvert (v4f16 DPR:$src))), (VREV32d16 DPR:$src)>; 74660b57cec5SDimitry Andric def : Pat<(v2f32 (bitconvert (v4i16 DPR:$src))), (VREV32d16 DPR:$src)>; 74670b57cec5SDimitry Andric def : Pat<(v2f32 (bitconvert (v8i8 DPR:$src))), (VREV32d8 DPR:$src)>; 74680b57cec5SDimitry Andric 74690b57cec5SDimitry Andric def : Pat<(v2i32 (bitconvert (f64 DPR:$src))), (VREV64d32 DPR:$src)>; 74700b57cec5SDimitry Andric def : Pat<(v2i32 (bitconvert (v1i64 DPR:$src))), (VREV64d32 DPR:$src)>; 74710b57cec5SDimitry Andric def : Pat<(v2i32 (bitconvert (v4f16 DPR:$src))), (VREV32d16 DPR:$src)>; 74720b57cec5SDimitry Andric def : Pat<(v2i32 (bitconvert (v4i16 DPR:$src))), (VREV32d16 DPR:$src)>; 74730b57cec5SDimitry Andric def : Pat<(v2i32 (bitconvert (v8i8 DPR:$src))), (VREV32d8 DPR:$src)>; 74740b57cec5SDimitry Andric 74750b57cec5SDimitry Andric def : Pat<(v4f16 (bitconvert (f64 DPR:$src))), (VREV64d16 DPR:$src)>; 74760b57cec5SDimitry Andric def : Pat<(v4f16 (bitconvert (v1i64 DPR:$src))), (VREV64d16 DPR:$src)>; 74770b57cec5SDimitry Andric def : Pat<(v4f16 (bitconvert (v2f32 DPR:$src))), (VREV32d16 DPR:$src)>; 74780b57cec5SDimitry Andric def : Pat<(v4f16 (bitconvert (v2i32 DPR:$src))), (VREV32d16 DPR:$src)>; 74790b57cec5SDimitry Andric def : Pat<(v4f16 (bitconvert (v8i8 DPR:$src))), (VREV16d8 DPR:$src)>; 74800b57cec5SDimitry Andric 74810b57cec5SDimitry Andric def : Pat<(v4i16 (bitconvert (f64 DPR:$src))), (VREV64d16 DPR:$src)>; 74820b57cec5SDimitry Andric def : Pat<(v4i16 (bitconvert (v1i64 DPR:$src))), (VREV64d16 DPR:$src)>; 74830b57cec5SDimitry Andric def : Pat<(v4i16 (bitconvert (v2f32 DPR:$src))), (VREV32d16 DPR:$src)>; 74840b57cec5SDimitry Andric def : Pat<(v4i16 (bitconvert (v2i32 DPR:$src))), (VREV32d16 DPR:$src)>; 74850b57cec5SDimitry Andric def : Pat<(v4i16 (bitconvert (v8i8 DPR:$src))), (VREV16d8 DPR:$src)>; 74860b57cec5SDimitry Andric 74870b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (f64 DPR:$src))), (VREV64d8 DPR:$src)>; 74880b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (v1i64 DPR:$src))), (VREV64d8 DPR:$src)>; 74890b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (v2f32 DPR:$src))), (VREV32d8 DPR:$src)>; 74900b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (v2i32 DPR:$src))), (VREV32d8 DPR:$src)>; 74910b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (v4f16 DPR:$src))), (VREV16d8 DPR:$src)>; 74920b57cec5SDimitry Andric def : Pat<(v8i8 (bitconvert (v4i16 DPR:$src))), (VREV16d8 DPR:$src)>; 74930b57cec5SDimitry Andric 74940b57cec5SDimitry Andric // 128 bit conversions 74950b57cec5SDimitry Andric def : Pat<(v2f64 (bitconvert (v4f32 QPR:$src))), (VREV64q32 QPR:$src)>; 74960b57cec5SDimitry Andric def : Pat<(v2f64 (bitconvert (v4i32 QPR:$src))), (VREV64q32 QPR:$src)>; 74970b57cec5SDimitry Andric def : Pat<(v2f64 (bitconvert (v8f16 QPR:$src))), (VREV64q16 QPR:$src)>; 74980b57cec5SDimitry Andric def : Pat<(v2f64 (bitconvert (v8i16 QPR:$src))), (VREV64q16 QPR:$src)>; 74990b57cec5SDimitry Andric def : Pat<(v2f64 (bitconvert (v16i8 QPR:$src))), (VREV64q8 QPR:$src)>; 75000b57cec5SDimitry Andric 75010b57cec5SDimitry Andric def : Pat<(v2i64 (bitconvert (v4f32 QPR:$src))), (VREV64q32 QPR:$src)>; 75020b57cec5SDimitry Andric def : Pat<(v2i64 (bitconvert (v4i32 QPR:$src))), (VREV64q32 QPR:$src)>; 75030b57cec5SDimitry Andric def : Pat<(v2i64 (bitconvert (v8f16 QPR:$src))), (VREV64q16 QPR:$src)>; 75040b57cec5SDimitry Andric def : Pat<(v2i64 (bitconvert (v8i16 QPR:$src))), (VREV64q16 QPR:$src)>; 75050b57cec5SDimitry Andric def : Pat<(v2i64 (bitconvert (v16i8 QPR:$src))), (VREV64q8 QPR:$src)>; 75060b57cec5SDimitry Andric 75070b57cec5SDimitry Andric def : Pat<(v4f32 (bitconvert (v2f64 QPR:$src))), (VREV64q32 QPR:$src)>; 75080b57cec5SDimitry Andric def : Pat<(v4f32 (bitconvert (v2i64 QPR:$src))), (VREV64q32 QPR:$src)>; 75090b57cec5SDimitry Andric def : Pat<(v4f32 (bitconvert (v8f16 QPR:$src))), (VREV32q16 QPR:$src)>; 75100b57cec5SDimitry Andric def : Pat<(v4f32 (bitconvert (v8i16 QPR:$src))), (VREV32q16 QPR:$src)>; 75110b57cec5SDimitry Andric def : Pat<(v4f32 (bitconvert (v16i8 QPR:$src))), (VREV32q8 QPR:$src)>; 75120b57cec5SDimitry Andric 75130b57cec5SDimitry Andric def : Pat<(v4i32 (bitconvert (v2f64 QPR:$src))), (VREV64q32 QPR:$src)>; 75140b57cec5SDimitry Andric def : Pat<(v4i32 (bitconvert (v2i64 QPR:$src))), (VREV64q32 QPR:$src)>; 75150b57cec5SDimitry Andric def : Pat<(v4i32 (bitconvert (v8f16 QPR:$src))), (VREV32q16 QPR:$src)>; 75160b57cec5SDimitry Andric def : Pat<(v4i32 (bitconvert (v8i16 QPR:$src))), (VREV32q16 QPR:$src)>; 75170b57cec5SDimitry Andric def : Pat<(v4i32 (bitconvert (v16i8 QPR:$src))), (VREV32q8 QPR:$src)>; 75180b57cec5SDimitry Andric 75190b57cec5SDimitry Andric def : Pat<(v8f16 (bitconvert (v2f64 QPR:$src))), (VREV64q16 QPR:$src)>; 75200b57cec5SDimitry Andric def : Pat<(v8f16 (bitconvert (v2i64 QPR:$src))), (VREV64q16 QPR:$src)>; 75210b57cec5SDimitry Andric def : Pat<(v8f16 (bitconvert (v4f32 QPR:$src))), (VREV32q16 QPR:$src)>; 75220b57cec5SDimitry Andric def : Pat<(v8f16 (bitconvert (v4i32 QPR:$src))), (VREV32q16 QPR:$src)>; 75230b57cec5SDimitry Andric def : Pat<(v8f16 (bitconvert (v16i8 QPR:$src))), (VREV16q8 QPR:$src)>; 75240b57cec5SDimitry Andric 75250b57cec5SDimitry Andric def : Pat<(v8i16 (bitconvert (v2f64 QPR:$src))), (VREV64q16 QPR:$src)>; 75260b57cec5SDimitry Andric def : Pat<(v8i16 (bitconvert (v2i64 QPR:$src))), (VREV64q16 QPR:$src)>; 75270b57cec5SDimitry Andric def : Pat<(v8i16 (bitconvert (v4f32 QPR:$src))), (VREV32q16 QPR:$src)>; 75280b57cec5SDimitry Andric def : Pat<(v8i16 (bitconvert (v4i32 QPR:$src))), (VREV32q16 QPR:$src)>; 75290b57cec5SDimitry Andric def : Pat<(v8i16 (bitconvert (v16i8 QPR:$src))), (VREV16q8 QPR:$src)>; 75300b57cec5SDimitry Andric 75310b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v2f64 QPR:$src))), (VREV64q8 QPR:$src)>; 75320b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v2i64 QPR:$src))), (VREV64q8 QPR:$src)>; 75330b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v4f32 QPR:$src))), (VREV32q8 QPR:$src)>; 75340b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v4i32 QPR:$src))), (VREV32q8 QPR:$src)>; 75350b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v8f16 QPR:$src))), (VREV16q8 QPR:$src)>; 75360b57cec5SDimitry Andric def : Pat<(v16i8 (bitconvert (v8i16 QPR:$src))), (VREV16q8 QPR:$src)>; 75370b57cec5SDimitry Andric} 75380b57cec5SDimitry Andric 75390b57cec5SDimitry Andric// Use VLD1/VST1 + VREV for non-word-aligned v2f64 load/store on Big Endian 75400b57cec5SDimitry Andriclet Predicates = [IsBE,HasNEON] in { 75410b57cec5SDimitry Andricdef : Pat<(v2f64 (byte_alignedload addrmode6:$addr)), 75420b57cec5SDimitry Andric (VREV64q8 (VLD1q8 addrmode6:$addr))>; 75430b57cec5SDimitry Andricdef : Pat<(byte_alignedstore (v2f64 QPR:$value), addrmode6:$addr), 75440b57cec5SDimitry Andric (VST1q8 addrmode6:$addr, (VREV64q8 QPR:$value))>; 75450b57cec5SDimitry Andricdef : Pat<(v2f64 (hword_alignedload addrmode6:$addr)), 75460b57cec5SDimitry Andric (VREV64q16 (VLD1q16 addrmode6:$addr))>; 75470b57cec5SDimitry Andricdef : Pat<(hword_alignedstore (v2f64 QPR:$value), addrmode6:$addr), 75480b57cec5SDimitry Andric (VST1q16 addrmode6:$addr, (VREV64q16 QPR:$value))>; 75490b57cec5SDimitry Andric} 75500b57cec5SDimitry Andric 75510b57cec5SDimitry Andric// Fold extracting an element out of a v2i32 into a vfp register. 75520b57cec5SDimitry Andricdef : Pat<(f32 (bitconvert (i32 (extractelt (v2i32 DPR:$src), imm:$lane)))), 75530b57cec5SDimitry Andric (f32 (EXTRACT_SUBREG DPR:$src, (SSubReg_f32_reg imm:$lane)))>, 75540b57cec5SDimitry Andric Requires<[HasNEON]>; 75550b57cec5SDimitry Andric 75560b57cec5SDimitry Andric// Vector lengthening move with load, matching extending loads. 75570b57cec5SDimitry Andric 75580b57cec5SDimitry Andric// extload, zextload and sextload for a standard lengthening load. Example: 75590b57cec5SDimitry Andric// Lengthen_Single<"8", "i16", "8"> = 75600b57cec5SDimitry Andric// Pat<(v8i16 (extloadvi8 addrmode6:$addr)) 75610b57cec5SDimitry Andric// (VMOVLuv8i16 (VLD1d8 addrmode6:$addr, 75620b57cec5SDimitry Andric// (f64 (IMPLICIT_DEF)), (i32 0)))>; 75630b57cec5SDimitry Andricmulticlass Lengthen_Single<string DestLanes, string DestTy, string SrcTy> { 75640b57cec5SDimitry Andric let AddedComplexity = 10 in { 75650b57cec5SDimitry Andric def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 75660b57cec5SDimitry Andric (!cast<PatFrag>("extloadvi" # SrcTy) addrmode6:$addr)), 75670b57cec5SDimitry Andric (!cast<Instruction>("VMOVLuv" # DestLanes # DestTy) 75680b57cec5SDimitry Andric (!cast<Instruction>("VLD1d" # SrcTy) addrmode6:$addr))>, 75690b57cec5SDimitry Andric Requires<[HasNEON]>; 75700b57cec5SDimitry Andric 75710b57cec5SDimitry Andric def _Z : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 75720b57cec5SDimitry Andric (!cast<PatFrag>("zextloadvi" # SrcTy) addrmode6:$addr)), 75730b57cec5SDimitry Andric (!cast<Instruction>("VMOVLuv" # DestLanes # DestTy) 75740b57cec5SDimitry Andric (!cast<Instruction>("VLD1d" # SrcTy) addrmode6:$addr))>, 75750b57cec5SDimitry Andric Requires<[HasNEON]>; 75760b57cec5SDimitry Andric 75770b57cec5SDimitry Andric def _S : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 75780b57cec5SDimitry Andric (!cast<PatFrag>("sextloadvi" # SrcTy) addrmode6:$addr)), 75790b57cec5SDimitry Andric (!cast<Instruction>("VMOVLsv" # DestLanes # DestTy) 75800b57cec5SDimitry Andric (!cast<Instruction>("VLD1d" # SrcTy) addrmode6:$addr))>, 75810b57cec5SDimitry Andric Requires<[HasNEON]>; 75820b57cec5SDimitry Andric } 75830b57cec5SDimitry Andric} 75840b57cec5SDimitry Andric 75850b57cec5SDimitry Andric// extload, zextload and sextload for a lengthening load which only uses 75860b57cec5SDimitry Andric// half the lanes available. Example: 75870b57cec5SDimitry Andric// Lengthen_HalfSingle<"4", "i16", "8", "i16", "i8"> = 75880b57cec5SDimitry Andric// Pat<(v4i16 (extloadvi8 addrmode6oneL32:$addr)), 75890b57cec5SDimitry Andric// (EXTRACT_SUBREG (VMOVLuv8i16 (VLD1LNd32 addrmode6oneL32:$addr, 75900b57cec5SDimitry Andric// (f64 (IMPLICIT_DEF)), (i32 0))), 75910b57cec5SDimitry Andric// dsub_0)>; 75920b57cec5SDimitry Andricmulticlass Lengthen_HalfSingle<string DestLanes, string DestTy, string SrcTy, 75930b57cec5SDimitry Andric string InsnLanes, string InsnTy> { 75940b57cec5SDimitry Andric def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 75950b57cec5SDimitry Andric (!cast<PatFrag>("extloadv" # SrcTy) addrmode6oneL32:$addr)), 75960b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # InsnLanes # InsnTy) 75970b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))), 75980b57cec5SDimitry Andric dsub_0)>, 75990b57cec5SDimitry Andric Requires<[HasNEON]>; 76000b57cec5SDimitry Andric def _Z : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 76010b57cec5SDimitry Andric (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6oneL32:$addr)), 76020b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # InsnLanes # InsnTy) 76030b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))), 76040b57cec5SDimitry Andric dsub_0)>, 76050b57cec5SDimitry Andric Requires<[HasNEON]>; 76060b57cec5SDimitry Andric def _S : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 76070b57cec5SDimitry Andric (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6oneL32:$addr)), 76080b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # InsnLanes # InsnTy) 76090b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))), 76100b57cec5SDimitry Andric dsub_0)>, 76110b57cec5SDimitry Andric Requires<[HasNEON]>; 76120b57cec5SDimitry Andric} 76130b57cec5SDimitry Andric 76140b57cec5SDimitry Andric// The following class definition is basically a copy of the 76150b57cec5SDimitry Andric// Lengthen_HalfSingle definition above, however with an additional parameter 76160b57cec5SDimitry Andric// "RevLanes" to select the correct VREV32dXX instruction. This is to convert 76170b57cec5SDimitry Andric// data loaded by VLD1LN into proper vector format in big endian mode. 76180b57cec5SDimitry Andricmulticlass Lengthen_HalfSingle_Big_Endian<string DestLanes, string DestTy, string SrcTy, 76190b57cec5SDimitry Andric string InsnLanes, string InsnTy, string RevLanes> { 76200b57cec5SDimitry Andric def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 76210b57cec5SDimitry Andric (!cast<PatFrag>("extloadv" # SrcTy) addrmode6oneL32:$addr)), 76220b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # InsnLanes # InsnTy) 76230b57cec5SDimitry Andric (!cast<Instruction>("VREV32d" # RevLanes) 76240b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))), 76250b57cec5SDimitry Andric dsub_0)>, 76260b57cec5SDimitry Andric Requires<[HasNEON]>; 76270b57cec5SDimitry Andric def _Z : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 76280b57cec5SDimitry Andric (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6oneL32:$addr)), 76290b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # InsnLanes # InsnTy) 76300b57cec5SDimitry Andric (!cast<Instruction>("VREV32d" # RevLanes) 76310b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))), 76320b57cec5SDimitry Andric dsub_0)>, 76330b57cec5SDimitry Andric Requires<[HasNEON]>; 76340b57cec5SDimitry Andric def _S : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 76350b57cec5SDimitry Andric (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6oneL32:$addr)), 76360b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # InsnLanes # InsnTy) 76370b57cec5SDimitry Andric (!cast<Instruction>("VREV32d" # RevLanes) 76380b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))), 76390b57cec5SDimitry Andric dsub_0)>, 76400b57cec5SDimitry Andric Requires<[HasNEON]>; 76410b57cec5SDimitry Andric} 76420b57cec5SDimitry Andric 76430b57cec5SDimitry Andric// extload, zextload and sextload for a lengthening load followed by another 76440b57cec5SDimitry Andric// lengthening load, to quadruple the initial length. 76450b57cec5SDimitry Andric// 76460b57cec5SDimitry Andric// Lengthen_Double<"4", "i32", "i8", "8", "i16", "4", "i32"> = 76470b57cec5SDimitry Andric// Pat<(v4i32 (extloadvi8 addrmode6oneL32:$addr)) 76480b57cec5SDimitry Andric// (EXTRACT_SUBREG (VMOVLuv4i32 76490b57cec5SDimitry Andric// (EXTRACT_SUBREG (VMOVLuv8i16 (VLD1LNd32 addrmode6oneL32:$addr, 76500b57cec5SDimitry Andric// (f64 (IMPLICIT_DEF)), 76510b57cec5SDimitry Andric// (i32 0))), 76520b57cec5SDimitry Andric// dsub_0)), 76530b57cec5SDimitry Andric// dsub_0)>; 76540b57cec5SDimitry Andricmulticlass Lengthen_Double<string DestLanes, string DestTy, string SrcTy, 76550b57cec5SDimitry Andric string Insn1Lanes, string Insn1Ty, string Insn2Lanes, 76560b57cec5SDimitry Andric string Insn2Ty> { 76570b57cec5SDimitry Andric def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 76580b57cec5SDimitry Andric (!cast<PatFrag>("extloadv" # SrcTy) addrmode6oneL32:$addr)), 76590b57cec5SDimitry Andric (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty) 76600b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty) 76610b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))), 76620b57cec5SDimitry Andric dsub_0))>, 76630b57cec5SDimitry Andric Requires<[HasNEON]>; 76640b57cec5SDimitry Andric def _Z : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 76650b57cec5SDimitry Andric (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6oneL32:$addr)), 76660b57cec5SDimitry Andric (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty) 76670b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty) 76680b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))), 76690b57cec5SDimitry Andric dsub_0))>, 76700b57cec5SDimitry Andric Requires<[HasNEON]>; 76710b57cec5SDimitry Andric def _S : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 76720b57cec5SDimitry Andric (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6oneL32:$addr)), 76730b57cec5SDimitry Andric (!cast<Instruction>("VMOVLsv" # Insn2Lanes # Insn2Ty) 76740b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn1Lanes # Insn1Ty) 76750b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))), 76760b57cec5SDimitry Andric dsub_0))>, 76770b57cec5SDimitry Andric Requires<[HasNEON]>; 76780b57cec5SDimitry Andric} 76790b57cec5SDimitry Andric 76800b57cec5SDimitry Andric// The following class definition is basically a copy of the 76810b57cec5SDimitry Andric// Lengthen_Double definition above, however with an additional parameter 76820b57cec5SDimitry Andric// "RevLanes" to select the correct VREV32dXX instruction. This is to convert 76830b57cec5SDimitry Andric// data loaded by VLD1LN into proper vector format in big endian mode. 76840b57cec5SDimitry Andricmulticlass Lengthen_Double_Big_Endian<string DestLanes, string DestTy, string SrcTy, 76850b57cec5SDimitry Andric string Insn1Lanes, string Insn1Ty, string Insn2Lanes, 76860b57cec5SDimitry Andric string Insn2Ty, string RevLanes> { 76870b57cec5SDimitry Andric def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 76880b57cec5SDimitry Andric (!cast<PatFrag>("extloadv" # SrcTy) addrmode6oneL32:$addr)), 76890b57cec5SDimitry Andric (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty) 76900b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty) 76910b57cec5SDimitry Andric (!cast<Instruction>("VREV32d" # RevLanes) 76920b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))), 76930b57cec5SDimitry Andric dsub_0))>, 76940b57cec5SDimitry Andric Requires<[HasNEON]>; 76950b57cec5SDimitry Andric def _Z : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 76960b57cec5SDimitry Andric (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6oneL32:$addr)), 76970b57cec5SDimitry Andric (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty) 76980b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty) 76990b57cec5SDimitry Andric (!cast<Instruction>("VREV32d" # RevLanes) 77000b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))), 77010b57cec5SDimitry Andric dsub_0))>, 77020b57cec5SDimitry Andric Requires<[HasNEON]>; 77030b57cec5SDimitry Andric def _S : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 77040b57cec5SDimitry Andric (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6oneL32:$addr)), 77050b57cec5SDimitry Andric (!cast<Instruction>("VMOVLsv" # Insn2Lanes # Insn2Ty) 77060b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn1Lanes # Insn1Ty) 77070b57cec5SDimitry Andric (!cast<Instruction>("VREV32d" # RevLanes) 77080b57cec5SDimitry Andric (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))), 77090b57cec5SDimitry Andric dsub_0))>, 77100b57cec5SDimitry Andric Requires<[HasNEON]>; 77110b57cec5SDimitry Andric} 77120b57cec5SDimitry Andric 77130b57cec5SDimitry Andric// extload, zextload and sextload for a lengthening load followed by another 77140b57cec5SDimitry Andric// lengthening load, to quadruple the initial length, but which ends up only 77150b57cec5SDimitry Andric// requiring half the available lanes (a 64-bit outcome instead of a 128-bit). 77160b57cec5SDimitry Andric// 77170b57cec5SDimitry Andric// Lengthen_HalfDouble<"2", "i32", "i8", "8", "i16", "4", "i32"> = 77180b57cec5SDimitry Andric// Pat<(v2i32 (extloadvi8 addrmode6:$addr)) 77190b57cec5SDimitry Andric// (EXTRACT_SUBREG (VMOVLuv4i32 77200b57cec5SDimitry Andric// (EXTRACT_SUBREG (VMOVLuv8i16 (VLD1LNd16 addrmode6:$addr, 77210b57cec5SDimitry Andric// (f64 (IMPLICIT_DEF)), (i32 0))), 77220b57cec5SDimitry Andric// dsub_0)), 77230b57cec5SDimitry Andric// dsub_0)>; 77240b57cec5SDimitry Andricmulticlass Lengthen_HalfDouble<string DestLanes, string DestTy, string SrcTy, 77250b57cec5SDimitry Andric string Insn1Lanes, string Insn1Ty, string Insn2Lanes, 77260b57cec5SDimitry Andric string Insn2Ty> { 77270b57cec5SDimitry Andric def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 77280b57cec5SDimitry Andric (!cast<PatFrag>("extloadv" # SrcTy) addrmode6:$addr)), 77290b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty) 77300b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty) 77310b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0))), 77320b57cec5SDimitry Andric dsub_0)), 77330b57cec5SDimitry Andric dsub_0)>, 77340b57cec5SDimitry Andric Requires<[HasNEON]>; 77350b57cec5SDimitry Andric def _Z : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 77360b57cec5SDimitry Andric (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6:$addr)), 77370b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty) 77380b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty) 77390b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0))), 77400b57cec5SDimitry Andric dsub_0)), 77410b57cec5SDimitry Andric dsub_0)>, 77420b57cec5SDimitry Andric Requires<[HasNEON]>; 77430b57cec5SDimitry Andric def _S : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 77440b57cec5SDimitry Andric (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6:$addr)), 77450b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn2Lanes # Insn2Ty) 77460b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn1Lanes # Insn1Ty) 77470b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0))), 77480b57cec5SDimitry Andric dsub_0)), 77490b57cec5SDimitry Andric dsub_0)>, 77500b57cec5SDimitry Andric Requires<[HasNEON]>; 77510b57cec5SDimitry Andric} 77520b57cec5SDimitry Andric 77530b57cec5SDimitry Andric// The following class definition is basically a copy of the 77540b57cec5SDimitry Andric// Lengthen_HalfDouble definition above, however with an additional VREV16d8 77550b57cec5SDimitry Andric// instruction to convert data loaded by VLD1LN into proper vector format 77560b57cec5SDimitry Andric// in big endian mode. 77570b57cec5SDimitry Andricmulticlass Lengthen_HalfDouble_Big_Endian<string DestLanes, string DestTy, string SrcTy, 77580b57cec5SDimitry Andric string Insn1Lanes, string Insn1Ty, string Insn2Lanes, 77590b57cec5SDimitry Andric string Insn2Ty> { 77600b57cec5SDimitry Andric def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 77610b57cec5SDimitry Andric (!cast<PatFrag>("extloadv" # SrcTy) addrmode6:$addr)), 77620b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty) 77630b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty) 77640b57cec5SDimitry Andric (!cast<Instruction>("VREV16d8") 77650b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))), 77660b57cec5SDimitry Andric dsub_0)), 77670b57cec5SDimitry Andric dsub_0)>, 77680b57cec5SDimitry Andric Requires<[HasNEON]>; 77690b57cec5SDimitry Andric def _Z : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 77700b57cec5SDimitry Andric (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6:$addr)), 77710b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty) 77720b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty) 77730b57cec5SDimitry Andric (!cast<Instruction>("VREV16d8") 77740b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))), 77750b57cec5SDimitry Andric dsub_0)), 77760b57cec5SDimitry Andric dsub_0)>, 77770b57cec5SDimitry Andric Requires<[HasNEON]>; 77780b57cec5SDimitry Andric def _S : Pat<(!cast<ValueType>("v" # DestLanes # DestTy) 77790b57cec5SDimitry Andric (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6:$addr)), 77800b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn2Lanes # Insn2Ty) 77810b57cec5SDimitry Andric (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn1Lanes # Insn1Ty) 77820b57cec5SDimitry Andric (!cast<Instruction>("VREV16d8") 77830b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))), 77840b57cec5SDimitry Andric dsub_0)), 77850b57cec5SDimitry Andric dsub_0)>, 77860b57cec5SDimitry Andric Requires<[HasNEON]>; 77870b57cec5SDimitry Andric} 77880b57cec5SDimitry Andric 77890b57cec5SDimitry Andricdefm : Lengthen_Single<"8", "i16", "8">; // v8i8 -> v8i16 77900b57cec5SDimitry Andricdefm : Lengthen_Single<"4", "i32", "16">; // v4i16 -> v4i32 77910b57cec5SDimitry Andricdefm : Lengthen_Single<"2", "i64", "32">; // v2i32 -> v2i64 77920b57cec5SDimitry Andric 77930b57cec5SDimitry Andriclet Predicates = [HasNEON,IsLE] in { 77940b57cec5SDimitry Andric defm : Lengthen_HalfSingle<"4", "i16", "i8", "8", "i16">; // v4i8 -> v4i16 77950b57cec5SDimitry Andric defm : Lengthen_HalfSingle<"2", "i32", "i16", "4", "i32">; // v2i16 -> v2i32 77960b57cec5SDimitry Andric 77970b57cec5SDimitry Andric // Double lengthening - v4i8 -> v4i16 -> v4i32 77980b57cec5SDimitry Andric defm : Lengthen_Double<"4", "i32", "i8", "8", "i16", "4", "i32">; 77990b57cec5SDimitry Andric // v2i8 -> v2i16 -> v2i32 78000b57cec5SDimitry Andric defm : Lengthen_HalfDouble<"2", "i32", "i8", "8", "i16", "4", "i32">; 78010b57cec5SDimitry Andric // v2i16 -> v2i32 -> v2i64 78020b57cec5SDimitry Andric defm : Lengthen_Double<"2", "i64", "i16", "4", "i32", "2", "i64">; 78030b57cec5SDimitry Andric} 78040b57cec5SDimitry Andric 78050b57cec5SDimitry Andriclet Predicates = [HasNEON,IsBE] in { 78060b57cec5SDimitry Andric defm : Lengthen_HalfSingle_Big_Endian<"4", "i16", "i8", "8", "i16", "8">; // v4i8 -> v4i16 78070b57cec5SDimitry Andric defm : Lengthen_HalfSingle_Big_Endian<"2", "i32", "i16", "4", "i32", "16">; // v2i16 -> v2i32 78080b57cec5SDimitry Andric 78090b57cec5SDimitry Andric // Double lengthening - v4i8 -> v4i16 -> v4i32 78100b57cec5SDimitry Andric defm : Lengthen_Double_Big_Endian<"4", "i32", "i8", "8", "i16", "4", "i32", "8">; 78110b57cec5SDimitry Andric // v2i8 -> v2i16 -> v2i32 78120b57cec5SDimitry Andric defm : Lengthen_HalfDouble_Big_Endian<"2", "i32", "i8", "8", "i16", "4", "i32">; 78130b57cec5SDimitry Andric // v2i16 -> v2i32 -> v2i64 78140b57cec5SDimitry Andric defm : Lengthen_Double_Big_Endian<"2", "i64", "i16", "4", "i32", "2", "i64", "16">; 78150b57cec5SDimitry Andric} 78160b57cec5SDimitry Andric 78170b57cec5SDimitry Andric// Triple lengthening - v2i8 -> v2i16 -> v2i32 -> v2i64 78180b57cec5SDimitry Andriclet Predicates = [HasNEON,IsLE] in { 78190b57cec5SDimitry Andric def : Pat<(v2i64 (extloadvi8 addrmode6:$addr)), 78200b57cec5SDimitry Andric (VMOVLuv2i64 (EXTRACT_SUBREG (VMOVLuv4i32 (EXTRACT_SUBREG (VMOVLuv8i16 78210b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, 78220b57cec5SDimitry Andric (f64 (IMPLICIT_DEF)), (i32 0))), dsub_0)), dsub_0))>; 78230b57cec5SDimitry Andric def : Pat<(v2i64 (zextloadvi8 addrmode6:$addr)), 78240b57cec5SDimitry Andric (VMOVLuv2i64 (EXTRACT_SUBREG (VMOVLuv4i32 (EXTRACT_SUBREG (VMOVLuv8i16 78250b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, 78260b57cec5SDimitry Andric (f64 (IMPLICIT_DEF)), (i32 0))), dsub_0)), dsub_0))>; 78270b57cec5SDimitry Andric def : Pat<(v2i64 (sextloadvi8 addrmode6:$addr)), 78280b57cec5SDimitry Andric (VMOVLsv2i64 (EXTRACT_SUBREG (VMOVLsv4i32 (EXTRACT_SUBREG (VMOVLsv8i16 78290b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, 78300b57cec5SDimitry Andric (f64 (IMPLICIT_DEF)), (i32 0))), dsub_0)), dsub_0))>; 78310b57cec5SDimitry Andric} 78320b57cec5SDimitry Andric// The following patterns are basically a copy of the patterns above, 78330b57cec5SDimitry Andric// however with an additional VREV16d instruction to convert data 78340b57cec5SDimitry Andric// loaded by VLD1LN into proper vector format in big endian mode. 78350b57cec5SDimitry Andriclet Predicates = [HasNEON,IsBE] in { 78360b57cec5SDimitry Andric def : Pat<(v2i64 (extloadvi8 addrmode6:$addr)), 78370b57cec5SDimitry Andric (VMOVLuv2i64 (EXTRACT_SUBREG (VMOVLuv4i32 (EXTRACT_SUBREG (VMOVLuv8i16 78380b57cec5SDimitry Andric (!cast<Instruction>("VREV16d8") 78390b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, 78400b57cec5SDimitry Andric (f64 (IMPLICIT_DEF)), (i32 0)))), dsub_0)), dsub_0))>; 78410b57cec5SDimitry Andric def : Pat<(v2i64 (zextloadvi8 addrmode6:$addr)), 78420b57cec5SDimitry Andric (VMOVLuv2i64 (EXTRACT_SUBREG (VMOVLuv4i32 (EXTRACT_SUBREG (VMOVLuv8i16 78430b57cec5SDimitry Andric (!cast<Instruction>("VREV16d8") 78440b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, 78450b57cec5SDimitry Andric (f64 (IMPLICIT_DEF)), (i32 0)))), dsub_0)), dsub_0))>; 78460b57cec5SDimitry Andric def : Pat<(v2i64 (sextloadvi8 addrmode6:$addr)), 78470b57cec5SDimitry Andric (VMOVLsv2i64 (EXTRACT_SUBREG (VMOVLsv4i32 (EXTRACT_SUBREG (VMOVLsv8i16 78480b57cec5SDimitry Andric (!cast<Instruction>("VREV16d8") 78490b57cec5SDimitry Andric (VLD1LNd16 addrmode6:$addr, 78500b57cec5SDimitry Andric (f64 (IMPLICIT_DEF)), (i32 0)))), dsub_0)), dsub_0))>; 78510b57cec5SDimitry Andric} 78520b57cec5SDimitry Andric 78530b57cec5SDimitry Andriclet Predicates = [HasNEON] in { 78540b57cec5SDimitry Andricdef : Pat<(v2i64 (concat_vectors DPR:$Dn, DPR:$Dm)), 78550b57cec5SDimitry Andric (REG_SEQUENCE QPR, DPR:$Dn, dsub_0, DPR:$Dm, dsub_1)>; 78560b57cec5SDimitry Andricdef : Pat<(v4i32 (concat_vectors DPR:$Dn, DPR:$Dm)), 78570b57cec5SDimitry Andric (REG_SEQUENCE QPR, DPR:$Dn, dsub_0, DPR:$Dm, dsub_1)>; 78580b57cec5SDimitry Andricdef : Pat<(v8i16 (concat_vectors DPR:$Dn, DPR:$Dm)), 78590b57cec5SDimitry Andric (REG_SEQUENCE QPR, DPR:$Dn, dsub_0, DPR:$Dm, dsub_1)>; 78600b57cec5SDimitry Andricdef : Pat<(v16i8 (concat_vectors DPR:$Dn, DPR:$Dm)), 78610b57cec5SDimitry Andric (REG_SEQUENCE QPR, DPR:$Dn, dsub_0, DPR:$Dm, dsub_1)>; 78620b57cec5SDimitry Andricdef : Pat<(v4f32 (concat_vectors DPR:$Dn, DPR:$Dm)), 78630b57cec5SDimitry Andric (REG_SEQUENCE QPR, DPR:$Dn, dsub_0, DPR:$Dm, dsub_1)>; 78640b57cec5SDimitry Andricdef : Pat<(v8f16 (concat_vectors DPR:$Dn, DPR:$Dm)), 78650b57cec5SDimitry Andric (REG_SEQUENCE QPR, DPR:$Dn, dsub_0, DPR:$Dm, dsub_1)>; 78660b57cec5SDimitry Andric} 78670b57cec5SDimitry Andric 78680b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 78690b57cec5SDimitry Andric// Assembler aliases 78700b57cec5SDimitry Andric// 78710b57cec5SDimitry Andric 78720b57cec5SDimitry Andricdef : VFP2InstAlias<"fmdhr${p} $Dd, $Rn", 78730b57cec5SDimitry Andric (VSETLNi32 DPR:$Dd, GPR:$Rn, 1, pred:$p)>; 78740b57cec5SDimitry Andricdef : VFP2InstAlias<"fmdlr${p} $Dd, $Rn", 78750b57cec5SDimitry Andric (VSETLNi32 DPR:$Dd, GPR:$Rn, 0, pred:$p)>; 78760b57cec5SDimitry Andric 78770b57cec5SDimitry Andric// VAND/VBIC/VEOR/VORR accept but do not require a type suffix. 78780b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vand${p}", "$Vd, $Vn, $Vm", 78790b57cec5SDimitry Andric (VANDd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>; 78800b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vand${p}", "$Vd, $Vn, $Vm", 78810b57cec5SDimitry Andric (VANDq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>; 78820b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vbic${p}", "$Vd, $Vn, $Vm", 78830b57cec5SDimitry Andric (VBICd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>; 78840b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vbic${p}", "$Vd, $Vn, $Vm", 78850b57cec5SDimitry Andric (VBICq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>; 78860b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"veor${p}", "$Vd, $Vn, $Vm", 78870b57cec5SDimitry Andric (VEORd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>; 78880b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"veor${p}", "$Vd, $Vn, $Vm", 78890b57cec5SDimitry Andric (VEORq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>; 78900b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vorr${p}", "$Vd, $Vn, $Vm", 78910b57cec5SDimitry Andric (VORRd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>; 78920b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vorr${p}", "$Vd, $Vn, $Vm", 78930b57cec5SDimitry Andric (VORRq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>; 78940b57cec5SDimitry Andric// ... two-operand aliases 78950b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vand${p}", "$Vdn, $Vm", 78960b57cec5SDimitry Andric (VANDd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>; 78970b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vand${p}", "$Vdn, $Vm", 78980b57cec5SDimitry Andric (VANDq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>; 78990b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"veor${p}", "$Vdn, $Vm", 79000b57cec5SDimitry Andric (VEORd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>; 79010b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"veor${p}", "$Vdn, $Vm", 79020b57cec5SDimitry Andric (VEORq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>; 79030b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vorr${p}", "$Vdn, $Vm", 79040b57cec5SDimitry Andric (VORRd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>; 79050b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vorr${p}", "$Vdn, $Vm", 79060b57cec5SDimitry Andric (VORRq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>; 79070b57cec5SDimitry Andric// ... immediates 79080b57cec5SDimitry Andricdef : NEONInstAlias<"vand${p}.i16 $Vd, $imm", 79090b57cec5SDimitry Andric (VBICiv4i16 DPR:$Vd, nImmSplatNotI16:$imm, pred:$p)>; 79100b57cec5SDimitry Andricdef : NEONInstAlias<"vand${p}.i32 $Vd, $imm", 79110b57cec5SDimitry Andric (VBICiv2i32 DPR:$Vd, nImmSplatNotI32:$imm, pred:$p)>; 79120b57cec5SDimitry Andricdef : NEONInstAlias<"vand${p}.i16 $Vd, $imm", 79130b57cec5SDimitry Andric (VBICiv8i16 QPR:$Vd, nImmSplatNotI16:$imm, pred:$p)>; 79140b57cec5SDimitry Andricdef : NEONInstAlias<"vand${p}.i32 $Vd, $imm", 79150b57cec5SDimitry Andric (VBICiv4i32 QPR:$Vd, nImmSplatNotI32:$imm, pred:$p)>; 79160b57cec5SDimitry Andric 79170b57cec5SDimitry Andric 79180b57cec5SDimitry Andric// VLD1 single-lane pseudo-instructions. These need special handling for 79190b57cec5SDimitry Andric// the lane index that an InstAlias can't handle, so we use these instead. 79200b57cec5SDimitry Andricdef VLD1LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld1${p}", ".8", "$list, $addr", 79210b57cec5SDimitry Andric (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr, 79220b57cec5SDimitry Andric pred:$p)>; 79230b57cec5SDimitry Andricdef VLD1LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld1${p}", ".16", "$list, $addr", 79240b57cec5SDimitry Andric (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr, 79250b57cec5SDimitry Andric pred:$p)>; 79260b57cec5SDimitry Andricdef VLD1LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld1${p}", ".32", "$list, $addr", 79270b57cec5SDimitry Andric (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr, 79280b57cec5SDimitry Andric pred:$p)>; 79290b57cec5SDimitry Andric 79300b57cec5SDimitry Andricdef VLD1LNdWB_fixed_Asm_8 : 79310b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld1${p}", ".8", "$list, $addr!", 79320b57cec5SDimitry Andric (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr, 79330b57cec5SDimitry Andric pred:$p)>; 79340b57cec5SDimitry Andricdef VLD1LNdWB_fixed_Asm_16 : 79350b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld1${p}", ".16", "$list, $addr!", 79360b57cec5SDimitry Andric (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr, 79370b57cec5SDimitry Andric pred:$p)>; 79380b57cec5SDimitry Andricdef VLD1LNdWB_fixed_Asm_32 : 79390b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld1${p}", ".32", "$list, $addr!", 79400b57cec5SDimitry Andric (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr, 79410b57cec5SDimitry Andric pred:$p)>; 79420b57cec5SDimitry Andricdef VLD1LNdWB_register_Asm_8 : 79430b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld1${p}", ".8", "$list, $addr, $Rm", 79440b57cec5SDimitry Andric (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr, 79450b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 79460b57cec5SDimitry Andricdef VLD1LNdWB_register_Asm_16 : 79470b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld1${p}", ".16", "$list, $addr, $Rm", 79480b57cec5SDimitry Andric (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr, 79490b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 79500b57cec5SDimitry Andricdef VLD1LNdWB_register_Asm_32 : 79510b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld1${p}", ".32", "$list, $addr, $Rm", 79520b57cec5SDimitry Andric (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr, 79530b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 79540b57cec5SDimitry Andric 79550b57cec5SDimitry Andric 79560b57cec5SDimitry Andric// VST1 single-lane pseudo-instructions. These need special handling for 79570b57cec5SDimitry Andric// the lane index that an InstAlias can't handle, so we use these instead. 79580b57cec5SDimitry Andricdef VST1LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst1${p}", ".8", "$list, $addr", 79590b57cec5SDimitry Andric (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr, 79600b57cec5SDimitry Andric pred:$p)>; 79610b57cec5SDimitry Andricdef VST1LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst1${p}", ".16", "$list, $addr", 79620b57cec5SDimitry Andric (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr, 79630b57cec5SDimitry Andric pred:$p)>; 79640b57cec5SDimitry Andricdef VST1LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst1${p}", ".32", "$list, $addr", 79650b57cec5SDimitry Andric (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr, 79660b57cec5SDimitry Andric pred:$p)>; 79670b57cec5SDimitry Andric 79680b57cec5SDimitry Andricdef VST1LNdWB_fixed_Asm_8 : 79690b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst1${p}", ".8", "$list, $addr!", 79700b57cec5SDimitry Andric (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr, 79710b57cec5SDimitry Andric pred:$p)>; 79720b57cec5SDimitry Andricdef VST1LNdWB_fixed_Asm_16 : 79730b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst1${p}", ".16", "$list, $addr!", 79740b57cec5SDimitry Andric (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr, 79750b57cec5SDimitry Andric pred:$p)>; 79760b57cec5SDimitry Andricdef VST1LNdWB_fixed_Asm_32 : 79770b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst1${p}", ".32", "$list, $addr!", 79780b57cec5SDimitry Andric (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr, 79790b57cec5SDimitry Andric pred:$p)>; 79800b57cec5SDimitry Andricdef VST1LNdWB_register_Asm_8 : 79810b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst1${p}", ".8", "$list, $addr, $Rm", 79820b57cec5SDimitry Andric (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr, 79830b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 79840b57cec5SDimitry Andricdef VST1LNdWB_register_Asm_16 : 79850b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst1${p}", ".16", "$list, $addr, $Rm", 79860b57cec5SDimitry Andric (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr, 79870b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 79880b57cec5SDimitry Andricdef VST1LNdWB_register_Asm_32 : 79890b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst1${p}", ".32", "$list, $addr, $Rm", 79900b57cec5SDimitry Andric (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr, 79910b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 79920b57cec5SDimitry Andric 79930b57cec5SDimitry Andric// VLD2 single-lane pseudo-instructions. These need special handling for 79940b57cec5SDimitry Andric// the lane index that an InstAlias can't handle, so we use these instead. 79950b57cec5SDimitry Andricdef VLD2LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".8", "$list, $addr", 79960b57cec5SDimitry Andric (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr, 79970b57cec5SDimitry Andric pred:$p)>; 79980b57cec5SDimitry Andricdef VLD2LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr", 79990b57cec5SDimitry Andric (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr, 80000b57cec5SDimitry Andric pred:$p)>; 80010b57cec5SDimitry Andricdef VLD2LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr", 80020b57cec5SDimitry Andric (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr, pred:$p)>; 80030b57cec5SDimitry Andricdef VLD2LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr", 80040b57cec5SDimitry Andric (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr, 80050b57cec5SDimitry Andric pred:$p)>; 80060b57cec5SDimitry Andricdef VLD2LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr", 80070b57cec5SDimitry Andric (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr, 80080b57cec5SDimitry Andric pred:$p)>; 80090b57cec5SDimitry Andric 80100b57cec5SDimitry Andricdef VLD2LNdWB_fixed_Asm_8 : 80110b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld2${p}", ".8", "$list, $addr!", 80120b57cec5SDimitry Andric (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr, 80130b57cec5SDimitry Andric pred:$p)>; 80140b57cec5SDimitry Andricdef VLD2LNdWB_fixed_Asm_16 : 80150b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr!", 80160b57cec5SDimitry Andric (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr, 80170b57cec5SDimitry Andric pred:$p)>; 80180b57cec5SDimitry Andricdef VLD2LNdWB_fixed_Asm_32 : 80190b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr!", 80200b57cec5SDimitry Andric (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr, 80210b57cec5SDimitry Andric pred:$p)>; 80220b57cec5SDimitry Andricdef VLD2LNqWB_fixed_Asm_16 : 80230b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr!", 80240b57cec5SDimitry Andric (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr, 80250b57cec5SDimitry Andric pred:$p)>; 80260b57cec5SDimitry Andricdef VLD2LNqWB_fixed_Asm_32 : 80270b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr!", 80280b57cec5SDimitry Andric (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr, 80290b57cec5SDimitry Andric pred:$p)>; 80300b57cec5SDimitry Andricdef VLD2LNdWB_register_Asm_8 : 80310b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld2${p}", ".8", "$list, $addr, $Rm", 80320b57cec5SDimitry Andric (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr, 80330b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 80340b57cec5SDimitry Andricdef VLD2LNdWB_register_Asm_16 : 80350b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr, $Rm", 80360b57cec5SDimitry Andric (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr, 80370b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 80380b57cec5SDimitry Andricdef VLD2LNdWB_register_Asm_32 : 80390b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr, $Rm", 80400b57cec5SDimitry Andric (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr, 80410b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 80420b57cec5SDimitry Andricdef VLD2LNqWB_register_Asm_16 : 80430b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr, $Rm", 80440b57cec5SDimitry Andric (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr, 80450b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 80460b57cec5SDimitry Andricdef VLD2LNqWB_register_Asm_32 : 80470b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr, $Rm", 80480b57cec5SDimitry Andric (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr, 80490b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 80500b57cec5SDimitry Andric 80510b57cec5SDimitry Andric 80520b57cec5SDimitry Andric// VST2 single-lane pseudo-instructions. These need special handling for 80530b57cec5SDimitry Andric// the lane index that an InstAlias can't handle, so we use these instead. 80540b57cec5SDimitry Andricdef VST2LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".8", "$list, $addr", 80550b57cec5SDimitry Andric (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr, 80560b57cec5SDimitry Andric pred:$p)>; 80570b57cec5SDimitry Andricdef VST2LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr", 80580b57cec5SDimitry Andric (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr, 80590b57cec5SDimitry Andric pred:$p)>; 80600b57cec5SDimitry Andricdef VST2LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr", 80610b57cec5SDimitry Andric (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr, 80620b57cec5SDimitry Andric pred:$p)>; 80630b57cec5SDimitry Andricdef VST2LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr", 80640b57cec5SDimitry Andric (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr, 80650b57cec5SDimitry Andric pred:$p)>; 80660b57cec5SDimitry Andricdef VST2LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr", 80670b57cec5SDimitry Andric (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr, 80680b57cec5SDimitry Andric pred:$p)>; 80690b57cec5SDimitry Andric 80700b57cec5SDimitry Andricdef VST2LNdWB_fixed_Asm_8 : 80710b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst2${p}", ".8", "$list, $addr!", 80720b57cec5SDimitry Andric (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr, 80730b57cec5SDimitry Andric pred:$p)>; 80740b57cec5SDimitry Andricdef VST2LNdWB_fixed_Asm_16 : 80750b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr!", 80760b57cec5SDimitry Andric (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr, 80770b57cec5SDimitry Andric pred:$p)>; 80780b57cec5SDimitry Andricdef VST2LNdWB_fixed_Asm_32 : 80790b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr!", 80800b57cec5SDimitry Andric (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr, 80810b57cec5SDimitry Andric pred:$p)>; 80820b57cec5SDimitry Andricdef VST2LNqWB_fixed_Asm_16 : 80830b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr!", 80840b57cec5SDimitry Andric (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr, 80850b57cec5SDimitry Andric pred:$p)>; 80860b57cec5SDimitry Andricdef VST2LNqWB_fixed_Asm_32 : 80870b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr!", 80880b57cec5SDimitry Andric (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr, 80890b57cec5SDimitry Andric pred:$p)>; 80900b57cec5SDimitry Andricdef VST2LNdWB_register_Asm_8 : 80910b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst2${p}", ".8", "$list, $addr, $Rm", 80920b57cec5SDimitry Andric (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr, 80930b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 80940b57cec5SDimitry Andricdef VST2LNdWB_register_Asm_16 : 80950b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst2${p}", ".16","$list, $addr, $Rm", 80960b57cec5SDimitry Andric (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr, 80970b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 80980b57cec5SDimitry Andricdef VST2LNdWB_register_Asm_32 : 80990b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr, $Rm", 81000b57cec5SDimitry Andric (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr, 81010b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 81020b57cec5SDimitry Andricdef VST2LNqWB_register_Asm_16 : 81030b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst2${p}", ".16","$list, $addr, $Rm", 81040b57cec5SDimitry Andric (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr, 81050b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 81060b57cec5SDimitry Andricdef VST2LNqWB_register_Asm_32 : 81070b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr, $Rm", 81080b57cec5SDimitry Andric (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr, 81090b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 81100b57cec5SDimitry Andric 81110b57cec5SDimitry Andric// VLD3 all-lanes pseudo-instructions. These need special handling for 81120b57cec5SDimitry Andric// the lane index that an InstAlias can't handle, so we use these instead. 81130b57cec5SDimitry Andricdef VLD3DUPdAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr", 81140b57cec5SDimitry Andric (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr, 81150b57cec5SDimitry Andric pred:$p)>; 81160b57cec5SDimitry Andricdef VLD3DUPdAsm_16: NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr", 81170b57cec5SDimitry Andric (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr, 81180b57cec5SDimitry Andric pred:$p)>; 81190b57cec5SDimitry Andricdef VLD3DUPdAsm_32: NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr", 81200b57cec5SDimitry Andric (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr, 81210b57cec5SDimitry Andric pred:$p)>; 81220b57cec5SDimitry Andricdef VLD3DUPqAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr", 81230b57cec5SDimitry Andric (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr, 81240b57cec5SDimitry Andric pred:$p)>; 81250b57cec5SDimitry Andricdef VLD3DUPqAsm_16: NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr", 81260b57cec5SDimitry Andric (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr, 81270b57cec5SDimitry Andric pred:$p)>; 81280b57cec5SDimitry Andricdef VLD3DUPqAsm_32: NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr", 81290b57cec5SDimitry Andric (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr, 81300b57cec5SDimitry Andric pred:$p)>; 81310b57cec5SDimitry Andric 81320b57cec5SDimitry Andricdef VLD3DUPdWB_fixed_Asm_8 : 81330b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!", 81340b57cec5SDimitry Andric (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr, 81350b57cec5SDimitry Andric pred:$p)>; 81360b57cec5SDimitry Andricdef VLD3DUPdWB_fixed_Asm_16 : 81370b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!", 81380b57cec5SDimitry Andric (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr, 81390b57cec5SDimitry Andric pred:$p)>; 81400b57cec5SDimitry Andricdef VLD3DUPdWB_fixed_Asm_32 : 81410b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!", 81420b57cec5SDimitry Andric (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr, 81430b57cec5SDimitry Andric pred:$p)>; 81440b57cec5SDimitry Andricdef VLD3DUPqWB_fixed_Asm_8 : 81450b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!", 81460b57cec5SDimitry Andric (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr, 81470b57cec5SDimitry Andric pred:$p)>; 81480b57cec5SDimitry Andricdef VLD3DUPqWB_fixed_Asm_16 : 81490b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!", 81500b57cec5SDimitry Andric (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr, 81510b57cec5SDimitry Andric pred:$p)>; 81520b57cec5SDimitry Andricdef VLD3DUPqWB_fixed_Asm_32 : 81530b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!", 81540b57cec5SDimitry Andric (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr, 81550b57cec5SDimitry Andric pred:$p)>; 81560b57cec5SDimitry Andricdef VLD3DUPdWB_register_Asm_8 : 81570b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm", 81580b57cec5SDimitry Andric (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr, 81590b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 81600b57cec5SDimitry Andricdef VLD3DUPdWB_register_Asm_16 : 81610b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm", 81620b57cec5SDimitry Andric (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr, 81630b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 81640b57cec5SDimitry Andricdef VLD3DUPdWB_register_Asm_32 : 81650b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm", 81660b57cec5SDimitry Andric (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr, 81670b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 81680b57cec5SDimitry Andricdef VLD3DUPqWB_register_Asm_8 : 81690b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm", 81700b57cec5SDimitry Andric (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr, 81710b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 81720b57cec5SDimitry Andricdef VLD3DUPqWB_register_Asm_16 : 81730b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm", 81740b57cec5SDimitry Andric (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr, 81750b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 81760b57cec5SDimitry Andricdef VLD3DUPqWB_register_Asm_32 : 81770b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm", 81780b57cec5SDimitry Andric (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr, 81790b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 81800b57cec5SDimitry Andric 81810b57cec5SDimitry Andric 81820b57cec5SDimitry Andric// VLD3 single-lane pseudo-instructions. These need special handling for 81830b57cec5SDimitry Andric// the lane index that an InstAlias can't handle, so we use these instead. 81840b57cec5SDimitry Andricdef VLD3LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr", 81850b57cec5SDimitry Andric (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr, 81860b57cec5SDimitry Andric pred:$p)>; 81870b57cec5SDimitry Andricdef VLD3LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr", 81880b57cec5SDimitry Andric (ins VecListThreeDHWordIndexed:$list, addrmode6alignNone:$addr, 81890b57cec5SDimitry Andric pred:$p)>; 81900b57cec5SDimitry Andricdef VLD3LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr", 81910b57cec5SDimitry Andric (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr, 81920b57cec5SDimitry Andric pred:$p)>; 81930b57cec5SDimitry Andricdef VLD3LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr", 81940b57cec5SDimitry Andric (ins VecListThreeQHWordIndexed:$list, addrmode6alignNone:$addr, 81950b57cec5SDimitry Andric pred:$p)>; 81960b57cec5SDimitry Andricdef VLD3LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr", 81970b57cec5SDimitry Andric (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr, 81980b57cec5SDimitry Andric pred:$p)>; 81990b57cec5SDimitry Andric 82000b57cec5SDimitry Andricdef VLD3LNdWB_fixed_Asm_8 : 82010b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!", 82020b57cec5SDimitry Andric (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr, 82030b57cec5SDimitry Andric pred:$p)>; 82040b57cec5SDimitry Andricdef VLD3LNdWB_fixed_Asm_16 : 82050b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!", 82060b57cec5SDimitry Andric (ins VecListThreeDHWordIndexed:$list, addrmode6alignNone:$addr, 82070b57cec5SDimitry Andric pred:$p)>; 82080b57cec5SDimitry Andricdef VLD3LNdWB_fixed_Asm_32 : 82090b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!", 82100b57cec5SDimitry Andric (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr, 82110b57cec5SDimitry Andric pred:$p)>; 82120b57cec5SDimitry Andricdef VLD3LNqWB_fixed_Asm_16 : 82130b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!", 82140b57cec5SDimitry Andric (ins VecListThreeQHWordIndexed:$list, addrmode6alignNone:$addr, 82150b57cec5SDimitry Andric pred:$p)>; 82160b57cec5SDimitry Andricdef VLD3LNqWB_fixed_Asm_32 : 82170b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!", 82180b57cec5SDimitry Andric (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr, 82190b57cec5SDimitry Andric pred:$p)>; 82200b57cec5SDimitry Andricdef VLD3LNdWB_register_Asm_8 : 82210b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm", 82220b57cec5SDimitry Andric (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr, 82230b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 82240b57cec5SDimitry Andricdef VLD3LNdWB_register_Asm_16 : 82250b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm", 82260b57cec5SDimitry Andric (ins VecListThreeDHWordIndexed:$list, 82270b57cec5SDimitry Andric addrmode6alignNone:$addr, rGPR:$Rm, pred:$p)>; 82280b57cec5SDimitry Andricdef VLD3LNdWB_register_Asm_32 : 82290b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm", 82300b57cec5SDimitry Andric (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr, 82310b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 82320b57cec5SDimitry Andricdef VLD3LNqWB_register_Asm_16 : 82330b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm", 82340b57cec5SDimitry Andric (ins VecListThreeQHWordIndexed:$list, 82350b57cec5SDimitry Andric addrmode6alignNone:$addr, rGPR:$Rm, pred:$p)>; 82360b57cec5SDimitry Andricdef VLD3LNqWB_register_Asm_32 : 82370b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm", 82380b57cec5SDimitry Andric (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr, 82390b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 82400b57cec5SDimitry Andric 82410b57cec5SDimitry Andric// VLD3 multiple structure pseudo-instructions. These need special handling for 82420b57cec5SDimitry Andric// the vector operands that the normal instructions don't yet model. 82430b57cec5SDimitry Andric// FIXME: Remove these when the register classes and instructions are updated. 82440b57cec5SDimitry Andricdef VLD3dAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr", 82450b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 82460b57cec5SDimitry Andricdef VLD3dAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr", 82470b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 82480b57cec5SDimitry Andricdef VLD3dAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr", 82490b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 82500b57cec5SDimitry Andricdef VLD3qAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr", 82510b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 82520b57cec5SDimitry Andricdef VLD3qAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr", 82530b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 82540b57cec5SDimitry Andricdef VLD3qAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr", 82550b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 82560b57cec5SDimitry Andric 82570b57cec5SDimitry Andricdef VLD3dWB_fixed_Asm_8 : 82580b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!", 82590b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 82600b57cec5SDimitry Andricdef VLD3dWB_fixed_Asm_16 : 82610b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!", 82620b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 82630b57cec5SDimitry Andricdef VLD3dWB_fixed_Asm_32 : 82640b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!", 82650b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 82660b57cec5SDimitry Andricdef VLD3qWB_fixed_Asm_8 : 82670b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!", 82680b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 82690b57cec5SDimitry Andricdef VLD3qWB_fixed_Asm_16 : 82700b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!", 82710b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 82720b57cec5SDimitry Andricdef VLD3qWB_fixed_Asm_32 : 82730b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!", 82740b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 82750b57cec5SDimitry Andricdef VLD3dWB_register_Asm_8 : 82760b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm", 82770b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, 82780b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 82790b57cec5SDimitry Andricdef VLD3dWB_register_Asm_16 : 82800b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm", 82810b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, 82820b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 82830b57cec5SDimitry Andricdef VLD3dWB_register_Asm_32 : 82840b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm", 82850b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, 82860b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 82870b57cec5SDimitry Andricdef VLD3qWB_register_Asm_8 : 82880b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm", 82890b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, 82900b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 82910b57cec5SDimitry Andricdef VLD3qWB_register_Asm_16 : 82920b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm", 82930b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, 82940b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 82950b57cec5SDimitry Andricdef VLD3qWB_register_Asm_32 : 82960b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm", 82970b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, 82980b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 82990b57cec5SDimitry Andric 83000b57cec5SDimitry Andric// VST3 single-lane pseudo-instructions. These need special handling for 83010b57cec5SDimitry Andric// the lane index that an InstAlias can't handle, so we use these instead. 83020b57cec5SDimitry Andricdef VST3LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr", 83030b57cec5SDimitry Andric (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr, 83040b57cec5SDimitry Andric pred:$p)>; 83050b57cec5SDimitry Andricdef VST3LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr", 83060b57cec5SDimitry Andric (ins VecListThreeDHWordIndexed:$list, addrmode6alignNone:$addr, 83070b57cec5SDimitry Andric pred:$p)>; 83080b57cec5SDimitry Andricdef VST3LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr", 83090b57cec5SDimitry Andric (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr, 83100b57cec5SDimitry Andric pred:$p)>; 83110b57cec5SDimitry Andricdef VST3LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr", 83120b57cec5SDimitry Andric (ins VecListThreeQHWordIndexed:$list, addrmode6alignNone:$addr, 83130b57cec5SDimitry Andric pred:$p)>; 83140b57cec5SDimitry Andricdef VST3LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr", 83150b57cec5SDimitry Andric (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr, 83160b57cec5SDimitry Andric pred:$p)>; 83170b57cec5SDimitry Andric 83180b57cec5SDimitry Andricdef VST3LNdWB_fixed_Asm_8 : 83190b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr!", 83200b57cec5SDimitry Andric (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr, 83210b57cec5SDimitry Andric pred:$p)>; 83220b57cec5SDimitry Andricdef VST3LNdWB_fixed_Asm_16 : 83230b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!", 83240b57cec5SDimitry Andric (ins VecListThreeDHWordIndexed:$list, addrmode6alignNone:$addr, 83250b57cec5SDimitry Andric pred:$p)>; 83260b57cec5SDimitry Andricdef VST3LNdWB_fixed_Asm_32 : 83270b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!", 83280b57cec5SDimitry Andric (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr, 83290b57cec5SDimitry Andric pred:$p)>; 83300b57cec5SDimitry Andricdef VST3LNqWB_fixed_Asm_16 : 83310b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!", 83320b57cec5SDimitry Andric (ins VecListThreeQHWordIndexed:$list, addrmode6alignNone:$addr, 83330b57cec5SDimitry Andric pred:$p)>; 83340b57cec5SDimitry Andricdef VST3LNqWB_fixed_Asm_32 : 83350b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!", 83360b57cec5SDimitry Andric (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr, 83370b57cec5SDimitry Andric pred:$p)>; 83380b57cec5SDimitry Andricdef VST3LNdWB_register_Asm_8 : 83390b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr, $Rm", 83400b57cec5SDimitry Andric (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr, 83410b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 83420b57cec5SDimitry Andricdef VST3LNdWB_register_Asm_16 : 83430b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm", 83440b57cec5SDimitry Andric (ins VecListThreeDHWordIndexed:$list, 83450b57cec5SDimitry Andric addrmode6alignNone:$addr, rGPR:$Rm, pred:$p)>; 83460b57cec5SDimitry Andricdef VST3LNdWB_register_Asm_32 : 83470b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm", 83480b57cec5SDimitry Andric (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr, 83490b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 83500b57cec5SDimitry Andricdef VST3LNqWB_register_Asm_16 : 83510b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm", 83520b57cec5SDimitry Andric (ins VecListThreeQHWordIndexed:$list, 83530b57cec5SDimitry Andric addrmode6alignNone:$addr, rGPR:$Rm, pred:$p)>; 83540b57cec5SDimitry Andricdef VST3LNqWB_register_Asm_32 : 83550b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm", 83560b57cec5SDimitry Andric (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr, 83570b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 83580b57cec5SDimitry Andric 83590b57cec5SDimitry Andric 83600b57cec5SDimitry Andric// VST3 multiple structure pseudo-instructions. These need special handling for 83610b57cec5SDimitry Andric// the vector operands that the normal instructions don't yet model. 83620b57cec5SDimitry Andric// FIXME: Remove these when the register classes and instructions are updated. 83630b57cec5SDimitry Andricdef VST3dAsm_8 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr", 83640b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 83650b57cec5SDimitry Andricdef VST3dAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr", 83660b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 83670b57cec5SDimitry Andricdef VST3dAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr", 83680b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 83690b57cec5SDimitry Andricdef VST3qAsm_8 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr", 83700b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 83710b57cec5SDimitry Andricdef VST3qAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr", 83720b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 83730b57cec5SDimitry Andricdef VST3qAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr", 83740b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 83750b57cec5SDimitry Andric 83760b57cec5SDimitry Andricdef VST3dWB_fixed_Asm_8 : 83770b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr!", 83780b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 83790b57cec5SDimitry Andricdef VST3dWB_fixed_Asm_16 : 83800b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!", 83810b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 83820b57cec5SDimitry Andricdef VST3dWB_fixed_Asm_32 : 83830b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!", 83840b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>; 83850b57cec5SDimitry Andricdef VST3qWB_fixed_Asm_8 : 83860b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr!", 83870b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 83880b57cec5SDimitry Andricdef VST3qWB_fixed_Asm_16 : 83890b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!", 83900b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 83910b57cec5SDimitry Andricdef VST3qWB_fixed_Asm_32 : 83920b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!", 83930b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>; 83940b57cec5SDimitry Andricdef VST3dWB_register_Asm_8 : 83950b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr, $Rm", 83960b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, 83970b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 83980b57cec5SDimitry Andricdef VST3dWB_register_Asm_16 : 83990b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm", 84000b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, 84010b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 84020b57cec5SDimitry Andricdef VST3dWB_register_Asm_32 : 84030b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm", 84040b57cec5SDimitry Andric (ins VecListThreeD:$list, addrmode6align64:$addr, 84050b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 84060b57cec5SDimitry Andricdef VST3qWB_register_Asm_8 : 84070b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr, $Rm", 84080b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, 84090b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 84100b57cec5SDimitry Andricdef VST3qWB_register_Asm_16 : 84110b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm", 84120b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, 84130b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 84140b57cec5SDimitry Andricdef VST3qWB_register_Asm_32 : 84150b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm", 84160b57cec5SDimitry Andric (ins VecListThreeQ:$list, addrmode6align64:$addr, 84170b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 84180b57cec5SDimitry Andric 84190b57cec5SDimitry Andric// VLD4 all-lanes pseudo-instructions. These need special handling for 84200b57cec5SDimitry Andric// the lane index that an InstAlias can't handle, so we use these instead. 84210b57cec5SDimitry Andricdef VLD4DUPdAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr", 84220b57cec5SDimitry Andric (ins VecListFourDAllLanes:$list, addrmode6dupalign32:$addr, 84230b57cec5SDimitry Andric pred:$p)>; 84240b57cec5SDimitry Andricdef VLD4DUPdAsm_16: NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr", 84250b57cec5SDimitry Andric (ins VecListFourDAllLanes:$list, addrmode6dupalign64:$addr, 84260b57cec5SDimitry Andric pred:$p)>; 84270b57cec5SDimitry Andricdef VLD4DUPdAsm_32: NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr", 84280b57cec5SDimitry Andric (ins VecListFourDAllLanes:$list, addrmode6dupalign64or128:$addr, 84290b57cec5SDimitry Andric pred:$p)>; 84300b57cec5SDimitry Andricdef VLD4DUPqAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr", 84310b57cec5SDimitry Andric (ins VecListFourQAllLanes:$list, addrmode6dupalign32:$addr, 84320b57cec5SDimitry Andric pred:$p)>; 84330b57cec5SDimitry Andricdef VLD4DUPqAsm_16: NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr", 84340b57cec5SDimitry Andric (ins VecListFourQAllLanes:$list, addrmode6dupalign64:$addr, 84350b57cec5SDimitry Andric pred:$p)>; 84360b57cec5SDimitry Andricdef VLD4DUPqAsm_32: NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr", 84370b57cec5SDimitry Andric (ins VecListFourQAllLanes:$list, addrmode6dupalign64or128:$addr, 84380b57cec5SDimitry Andric pred:$p)>; 84390b57cec5SDimitry Andric 84400b57cec5SDimitry Andricdef VLD4DUPdWB_fixed_Asm_8 : 84410b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!", 84420b57cec5SDimitry Andric (ins VecListFourDAllLanes:$list, addrmode6dupalign32:$addr, 84430b57cec5SDimitry Andric pred:$p)>; 84440b57cec5SDimitry Andricdef VLD4DUPdWB_fixed_Asm_16 : 84450b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!", 84460b57cec5SDimitry Andric (ins VecListFourDAllLanes:$list, addrmode6dupalign64:$addr, 84470b57cec5SDimitry Andric pred:$p)>; 84480b57cec5SDimitry Andricdef VLD4DUPdWB_fixed_Asm_32 : 84490b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!", 84500b57cec5SDimitry Andric (ins VecListFourDAllLanes:$list, addrmode6dupalign64or128:$addr, 84510b57cec5SDimitry Andric pred:$p)>; 84520b57cec5SDimitry Andricdef VLD4DUPqWB_fixed_Asm_8 : 84530b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!", 84540b57cec5SDimitry Andric (ins VecListFourQAllLanes:$list, addrmode6dupalign32:$addr, 84550b57cec5SDimitry Andric pred:$p)>; 84560b57cec5SDimitry Andricdef VLD4DUPqWB_fixed_Asm_16 : 84570b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!", 84580b57cec5SDimitry Andric (ins VecListFourQAllLanes:$list, addrmode6dupalign64:$addr, 84590b57cec5SDimitry Andric pred:$p)>; 84600b57cec5SDimitry Andricdef VLD4DUPqWB_fixed_Asm_32 : 84610b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!", 84620b57cec5SDimitry Andric (ins VecListFourQAllLanes:$list, addrmode6dupalign64or128:$addr, 84630b57cec5SDimitry Andric pred:$p)>; 84640b57cec5SDimitry Andricdef VLD4DUPdWB_register_Asm_8 : 84650b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm", 84660b57cec5SDimitry Andric (ins VecListFourDAllLanes:$list, addrmode6dupalign32:$addr, 84670b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 84680b57cec5SDimitry Andricdef VLD4DUPdWB_register_Asm_16 : 84690b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm", 84700b57cec5SDimitry Andric (ins VecListFourDAllLanes:$list, addrmode6dupalign64:$addr, 84710b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 84720b57cec5SDimitry Andricdef VLD4DUPdWB_register_Asm_32 : 84730b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm", 84740b57cec5SDimitry Andric (ins VecListFourDAllLanes:$list, 84750b57cec5SDimitry Andric addrmode6dupalign64or128:$addr, rGPR:$Rm, pred:$p)>; 84760b57cec5SDimitry Andricdef VLD4DUPqWB_register_Asm_8 : 84770b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm", 84780b57cec5SDimitry Andric (ins VecListFourQAllLanes:$list, addrmode6dupalign32:$addr, 84790b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 84800b57cec5SDimitry Andricdef VLD4DUPqWB_register_Asm_16 : 84810b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm", 84820b57cec5SDimitry Andric (ins VecListFourQAllLanes:$list, addrmode6dupalign64:$addr, 84830b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 84840b57cec5SDimitry Andricdef VLD4DUPqWB_register_Asm_32 : 84850b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm", 84860b57cec5SDimitry Andric (ins VecListFourQAllLanes:$list, 84870b57cec5SDimitry Andric addrmode6dupalign64or128:$addr, rGPR:$Rm, pred:$p)>; 84880b57cec5SDimitry Andric 84890b57cec5SDimitry Andric 84900b57cec5SDimitry Andric// VLD4 single-lane pseudo-instructions. These need special handling for 84910b57cec5SDimitry Andric// the lane index that an InstAlias can't handle, so we use these instead. 84920b57cec5SDimitry Andricdef VLD4LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr", 84930b57cec5SDimitry Andric (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr, 84940b57cec5SDimitry Andric pred:$p)>; 84950b57cec5SDimitry Andricdef VLD4LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr", 84960b57cec5SDimitry Andric (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr, 84970b57cec5SDimitry Andric pred:$p)>; 84980b57cec5SDimitry Andricdef VLD4LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr", 84990b57cec5SDimitry Andric (ins VecListFourDWordIndexed:$list, addrmode6align64or128:$addr, 85000b57cec5SDimitry Andric pred:$p)>; 85010b57cec5SDimitry Andricdef VLD4LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr", 85020b57cec5SDimitry Andric (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr, 85030b57cec5SDimitry Andric pred:$p)>; 85040b57cec5SDimitry Andricdef VLD4LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr", 85050b57cec5SDimitry Andric (ins VecListFourQWordIndexed:$list, addrmode6align64or128:$addr, 85060b57cec5SDimitry Andric pred:$p)>; 85070b57cec5SDimitry Andric 85080b57cec5SDimitry Andricdef VLD4LNdWB_fixed_Asm_8 : 85090b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!", 85100b57cec5SDimitry Andric (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr, 85110b57cec5SDimitry Andric pred:$p)>; 85120b57cec5SDimitry Andricdef VLD4LNdWB_fixed_Asm_16 : 85130b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!", 85140b57cec5SDimitry Andric (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr, 85150b57cec5SDimitry Andric pred:$p)>; 85160b57cec5SDimitry Andricdef VLD4LNdWB_fixed_Asm_32 : 85170b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!", 85180b57cec5SDimitry Andric (ins VecListFourDWordIndexed:$list, addrmode6align64or128:$addr, 85190b57cec5SDimitry Andric pred:$p)>; 85200b57cec5SDimitry Andricdef VLD4LNqWB_fixed_Asm_16 : 85210b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!", 85220b57cec5SDimitry Andric (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr, 85230b57cec5SDimitry Andric pred:$p)>; 85240b57cec5SDimitry Andricdef VLD4LNqWB_fixed_Asm_32 : 85250b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!", 85260b57cec5SDimitry Andric (ins VecListFourQWordIndexed:$list, addrmode6align64or128:$addr, 85270b57cec5SDimitry Andric pred:$p)>; 85280b57cec5SDimitry Andricdef VLD4LNdWB_register_Asm_8 : 85290b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm", 85300b57cec5SDimitry Andric (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr, 85310b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 85320b57cec5SDimitry Andricdef VLD4LNdWB_register_Asm_16 : 85330b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm", 85340b57cec5SDimitry Andric (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr, 85350b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 85360b57cec5SDimitry Andricdef VLD4LNdWB_register_Asm_32 : 85370b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm", 85380b57cec5SDimitry Andric (ins VecListFourDWordIndexed:$list, 85390b57cec5SDimitry Andric addrmode6align64or128:$addr, rGPR:$Rm, pred:$p)>; 85400b57cec5SDimitry Andricdef VLD4LNqWB_register_Asm_16 : 85410b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm", 85420b57cec5SDimitry Andric (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr, 85430b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 85440b57cec5SDimitry Andricdef VLD4LNqWB_register_Asm_32 : 85450b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm", 85460b57cec5SDimitry Andric (ins VecListFourQWordIndexed:$list, 85470b57cec5SDimitry Andric addrmode6align64or128:$addr, rGPR:$Rm, pred:$p)>; 85480b57cec5SDimitry Andric 85490b57cec5SDimitry Andric 85500b57cec5SDimitry Andric 85510b57cec5SDimitry Andric// VLD4 multiple structure pseudo-instructions. These need special handling for 85520b57cec5SDimitry Andric// the vector operands that the normal instructions don't yet model. 85530b57cec5SDimitry Andric// FIXME: Remove these when the register classes and instructions are updated. 85540b57cec5SDimitry Andricdef VLD4dAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr", 85550b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 85560b57cec5SDimitry Andric pred:$p)>; 85570b57cec5SDimitry Andricdef VLD4dAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr", 85580b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 85590b57cec5SDimitry Andric pred:$p)>; 85600b57cec5SDimitry Andricdef VLD4dAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr", 85610b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 85620b57cec5SDimitry Andric pred:$p)>; 85630b57cec5SDimitry Andricdef VLD4qAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr", 85640b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 85650b57cec5SDimitry Andric pred:$p)>; 85660b57cec5SDimitry Andricdef VLD4qAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr", 85670b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 85680b57cec5SDimitry Andric pred:$p)>; 85690b57cec5SDimitry Andricdef VLD4qAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr", 85700b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 85710b57cec5SDimitry Andric pred:$p)>; 85720b57cec5SDimitry Andric 85730b57cec5SDimitry Andricdef VLD4dWB_fixed_Asm_8 : 85740b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!", 85750b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 85760b57cec5SDimitry Andric pred:$p)>; 85770b57cec5SDimitry Andricdef VLD4dWB_fixed_Asm_16 : 85780b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!", 85790b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 85800b57cec5SDimitry Andric pred:$p)>; 85810b57cec5SDimitry Andricdef VLD4dWB_fixed_Asm_32 : 85820b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!", 85830b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 85840b57cec5SDimitry Andric pred:$p)>; 85850b57cec5SDimitry Andricdef VLD4qWB_fixed_Asm_8 : 85860b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!", 85870b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 85880b57cec5SDimitry Andric pred:$p)>; 85890b57cec5SDimitry Andricdef VLD4qWB_fixed_Asm_16 : 85900b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!", 85910b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 85920b57cec5SDimitry Andric pred:$p)>; 85930b57cec5SDimitry Andricdef VLD4qWB_fixed_Asm_32 : 85940b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!", 85950b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 85960b57cec5SDimitry Andric pred:$p)>; 85970b57cec5SDimitry Andricdef VLD4dWB_register_Asm_8 : 85980b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm", 85990b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 86000b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 86010b57cec5SDimitry Andricdef VLD4dWB_register_Asm_16 : 86020b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm", 86030b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 86040b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 86050b57cec5SDimitry Andricdef VLD4dWB_register_Asm_32 : 86060b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm", 86070b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 86080b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 86090b57cec5SDimitry Andricdef VLD4qWB_register_Asm_8 : 86100b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm", 86110b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 86120b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 86130b57cec5SDimitry Andricdef VLD4qWB_register_Asm_16 : 86140b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm", 86150b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 86160b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 86170b57cec5SDimitry Andricdef VLD4qWB_register_Asm_32 : 86180b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm", 86190b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 86200b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 86210b57cec5SDimitry Andric 86220b57cec5SDimitry Andric// VST4 single-lane pseudo-instructions. These need special handling for 86230b57cec5SDimitry Andric// the lane index that an InstAlias can't handle, so we use these instead. 86240b57cec5SDimitry Andricdef VST4LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr", 86250b57cec5SDimitry Andric (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr, 86260b57cec5SDimitry Andric pred:$p)>; 86270b57cec5SDimitry Andricdef VST4LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr", 86280b57cec5SDimitry Andric (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr, 86290b57cec5SDimitry Andric pred:$p)>; 86300b57cec5SDimitry Andricdef VST4LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr", 86310b57cec5SDimitry Andric (ins VecListFourDWordIndexed:$list, addrmode6align64or128:$addr, 86320b57cec5SDimitry Andric pred:$p)>; 86330b57cec5SDimitry Andricdef VST4LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr", 86340b57cec5SDimitry Andric (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr, 86350b57cec5SDimitry Andric pred:$p)>; 86360b57cec5SDimitry Andricdef VST4LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr", 86370b57cec5SDimitry Andric (ins VecListFourQWordIndexed:$list, addrmode6align64or128:$addr, 86380b57cec5SDimitry Andric pred:$p)>; 86390b57cec5SDimitry Andric 86400b57cec5SDimitry Andricdef VST4LNdWB_fixed_Asm_8 : 86410b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr!", 86420b57cec5SDimitry Andric (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr, 86430b57cec5SDimitry Andric pred:$p)>; 86440b57cec5SDimitry Andricdef VST4LNdWB_fixed_Asm_16 : 86450b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!", 86460b57cec5SDimitry Andric (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr, 86470b57cec5SDimitry Andric pred:$p)>; 86480b57cec5SDimitry Andricdef VST4LNdWB_fixed_Asm_32 : 86490b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!", 86500b57cec5SDimitry Andric (ins VecListFourDWordIndexed:$list, addrmode6align64or128:$addr, 86510b57cec5SDimitry Andric pred:$p)>; 86520b57cec5SDimitry Andricdef VST4LNqWB_fixed_Asm_16 : 86530b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!", 86540b57cec5SDimitry Andric (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr, 86550b57cec5SDimitry Andric pred:$p)>; 86560b57cec5SDimitry Andricdef VST4LNqWB_fixed_Asm_32 : 86570b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!", 86580b57cec5SDimitry Andric (ins VecListFourQWordIndexed:$list, addrmode6align64or128:$addr, 86590b57cec5SDimitry Andric pred:$p)>; 86600b57cec5SDimitry Andricdef VST4LNdWB_register_Asm_8 : 86610b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr, $Rm", 86620b57cec5SDimitry Andric (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr, 86630b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 86640b57cec5SDimitry Andricdef VST4LNdWB_register_Asm_16 : 86650b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm", 86660b57cec5SDimitry Andric (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr, 86670b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 86680b57cec5SDimitry Andricdef VST4LNdWB_register_Asm_32 : 86690b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm", 86700b57cec5SDimitry Andric (ins VecListFourDWordIndexed:$list, 86710b57cec5SDimitry Andric addrmode6align64or128:$addr, rGPR:$Rm, pred:$p)>; 86720b57cec5SDimitry Andricdef VST4LNqWB_register_Asm_16 : 86730b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm", 86740b57cec5SDimitry Andric (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr, 86750b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 86760b57cec5SDimitry Andricdef VST4LNqWB_register_Asm_32 : 86770b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm", 86780b57cec5SDimitry Andric (ins VecListFourQWordIndexed:$list, 86790b57cec5SDimitry Andric addrmode6align64or128:$addr, rGPR:$Rm, pred:$p)>; 86800b57cec5SDimitry Andric 86810b57cec5SDimitry Andric 86820b57cec5SDimitry Andric// VST4 multiple structure pseudo-instructions. These need special handling for 86830b57cec5SDimitry Andric// the vector operands that the normal instructions don't yet model. 86840b57cec5SDimitry Andric// FIXME: Remove these when the register classes and instructions are updated. 86850b57cec5SDimitry Andricdef VST4dAsm_8 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr", 86860b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 86870b57cec5SDimitry Andric pred:$p)>; 86880b57cec5SDimitry Andricdef VST4dAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr", 86890b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 86900b57cec5SDimitry Andric pred:$p)>; 86910b57cec5SDimitry Andricdef VST4dAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr", 86920b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 86930b57cec5SDimitry Andric pred:$p)>; 86940b57cec5SDimitry Andricdef VST4qAsm_8 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr", 86950b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 86960b57cec5SDimitry Andric pred:$p)>; 86970b57cec5SDimitry Andricdef VST4qAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr", 86980b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 86990b57cec5SDimitry Andric pred:$p)>; 87000b57cec5SDimitry Andricdef VST4qAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr", 87010b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 87020b57cec5SDimitry Andric pred:$p)>; 87030b57cec5SDimitry Andric 87040b57cec5SDimitry Andricdef VST4dWB_fixed_Asm_8 : 87050b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr!", 87060b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 87070b57cec5SDimitry Andric pred:$p)>; 87080b57cec5SDimitry Andricdef VST4dWB_fixed_Asm_16 : 87090b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!", 87100b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 87110b57cec5SDimitry Andric pred:$p)>; 87120b57cec5SDimitry Andricdef VST4dWB_fixed_Asm_32 : 87130b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!", 87140b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 87150b57cec5SDimitry Andric pred:$p)>; 87160b57cec5SDimitry Andricdef VST4qWB_fixed_Asm_8 : 87170b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr!", 87180b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 87190b57cec5SDimitry Andric pred:$p)>; 87200b57cec5SDimitry Andricdef VST4qWB_fixed_Asm_16 : 87210b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!", 87220b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 87230b57cec5SDimitry Andric pred:$p)>; 87240b57cec5SDimitry Andricdef VST4qWB_fixed_Asm_32 : 87250b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!", 87260b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 87270b57cec5SDimitry Andric pred:$p)>; 87280b57cec5SDimitry Andricdef VST4dWB_register_Asm_8 : 87290b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr, $Rm", 87300b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 87310b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 87320b57cec5SDimitry Andricdef VST4dWB_register_Asm_16 : 87330b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm", 87340b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 87350b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 87360b57cec5SDimitry Andricdef VST4dWB_register_Asm_32 : 87370b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm", 87380b57cec5SDimitry Andric (ins VecListFourD:$list, addrmode6align64or128or256:$addr, 87390b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 87400b57cec5SDimitry Andricdef VST4qWB_register_Asm_8 : 87410b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr, $Rm", 87420b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 87430b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 87440b57cec5SDimitry Andricdef VST4qWB_register_Asm_16 : 87450b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm", 87460b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 87470b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 87480b57cec5SDimitry Andricdef VST4qWB_register_Asm_32 : 87490b57cec5SDimitry Andric NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm", 87500b57cec5SDimitry Andric (ins VecListFourQ:$list, addrmode6align64or128or256:$addr, 87510b57cec5SDimitry Andric rGPR:$Rm, pred:$p)>; 87520b57cec5SDimitry Andric 87530b57cec5SDimitry Andric// VMOV/VMVN takes an optional datatype suffix 87540b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vmov${p}", "$Vd, $Vm", 87550b57cec5SDimitry Andric (VORRd DPR:$Vd, DPR:$Vm, DPR:$Vm, pred:$p)>; 87560b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vmov${p}", "$Vd, $Vm", 87570b57cec5SDimitry Andric (VORRq QPR:$Vd, QPR:$Vm, QPR:$Vm, pred:$p)>; 87580b57cec5SDimitry Andric 87590b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vmvn${p}", "$Vd, $Vm", 87600b57cec5SDimitry Andric (VMVNd DPR:$Vd, DPR:$Vm, pred:$p)>; 87610b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vmvn${p}", "$Vd, $Vm", 87620b57cec5SDimitry Andric (VMVNq QPR:$Vd, QPR:$Vm, pred:$p)>; 87630b57cec5SDimitry Andric 87640b57cec5SDimitry Andric// VCLT (register) is an assembler alias for VCGT w/ the operands reversed. 87650b57cec5SDimitry Andric// D-register versions. 87660b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.s8 $Dd, $Dn, $Dm", 87670b57cec5SDimitry Andric (VCGEsv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 87680b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.s16 $Dd, $Dn, $Dm", 87690b57cec5SDimitry Andric (VCGEsv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 87700b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.s32 $Dd, $Dn, $Dm", 87710b57cec5SDimitry Andric (VCGEsv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 87720b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.u8 $Dd, $Dn, $Dm", 87730b57cec5SDimitry Andric (VCGEuv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 87740b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.u16 $Dd, $Dn, $Dm", 87750b57cec5SDimitry Andric (VCGEuv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 87760b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.u32 $Dd, $Dn, $Dm", 87770b57cec5SDimitry Andric (VCGEuv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 87780b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.f32 $Dd, $Dn, $Dm", 87790b57cec5SDimitry Andric (VCGEfd DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 87800b57cec5SDimitry Andriclet Predicates = [HasNEON, HasFullFP16] in 87810b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.f16 $Dd, $Dn, $Dm", 87820b57cec5SDimitry Andric (VCGEhd DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 87830b57cec5SDimitry Andric// Q-register versions. 87840b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.s8 $Qd, $Qn, $Qm", 87850b57cec5SDimitry Andric (VCGEsv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 87860b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.s16 $Qd, $Qn, $Qm", 87870b57cec5SDimitry Andric (VCGEsv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 87880b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.s32 $Qd, $Qn, $Qm", 87890b57cec5SDimitry Andric (VCGEsv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 87900b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.u8 $Qd, $Qn, $Qm", 87910b57cec5SDimitry Andric (VCGEuv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 87920b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.u16 $Qd, $Qn, $Qm", 87930b57cec5SDimitry Andric (VCGEuv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 87940b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.u32 $Qd, $Qn, $Qm", 87950b57cec5SDimitry Andric (VCGEuv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 87960b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.f32 $Qd, $Qn, $Qm", 87970b57cec5SDimitry Andric (VCGEfq QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 87980b57cec5SDimitry Andriclet Predicates = [HasNEON, HasFullFP16] in 87990b57cec5SDimitry Andricdef : NEONInstAlias<"vcle${p}.f16 $Qd, $Qn, $Qm", 88000b57cec5SDimitry Andric (VCGEhq QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 88010b57cec5SDimitry Andric 88020b57cec5SDimitry Andric// VCLT (register) is an assembler alias for VCGT w/ the operands reversed. 88030b57cec5SDimitry Andric// D-register versions. 88040b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.s8 $Dd, $Dn, $Dm", 88050b57cec5SDimitry Andric (VCGTsv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 88060b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.s16 $Dd, $Dn, $Dm", 88070b57cec5SDimitry Andric (VCGTsv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 88080b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.s32 $Dd, $Dn, $Dm", 88090b57cec5SDimitry Andric (VCGTsv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 88100b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.u8 $Dd, $Dn, $Dm", 88110b57cec5SDimitry Andric (VCGTuv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 88120b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.u16 $Dd, $Dn, $Dm", 88130b57cec5SDimitry Andric (VCGTuv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 88140b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.u32 $Dd, $Dn, $Dm", 88150b57cec5SDimitry Andric (VCGTuv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 88160b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.f32 $Dd, $Dn, $Dm", 88170b57cec5SDimitry Andric (VCGTfd DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 88180b57cec5SDimitry Andriclet Predicates = [HasNEON, HasFullFP16] in 88190b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.f16 $Dd, $Dn, $Dm", 88200b57cec5SDimitry Andric (VCGThd DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>; 88210b57cec5SDimitry Andric// Q-register versions. 88220b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.s8 $Qd, $Qn, $Qm", 88230b57cec5SDimitry Andric (VCGTsv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 88240b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.s16 $Qd, $Qn, $Qm", 88250b57cec5SDimitry Andric (VCGTsv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 88260b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.s32 $Qd, $Qn, $Qm", 88270b57cec5SDimitry Andric (VCGTsv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 88280b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.u8 $Qd, $Qn, $Qm", 88290b57cec5SDimitry Andric (VCGTuv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 88300b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.u16 $Qd, $Qn, $Qm", 88310b57cec5SDimitry Andric (VCGTuv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 88320b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.u32 $Qd, $Qn, $Qm", 88330b57cec5SDimitry Andric (VCGTuv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 88340b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.f32 $Qd, $Qn, $Qm", 88350b57cec5SDimitry Andric (VCGTfq QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 88360b57cec5SDimitry Andriclet Predicates = [HasNEON, HasFullFP16] in 88370b57cec5SDimitry Andricdef : NEONInstAlias<"vclt${p}.f16 $Qd, $Qn, $Qm", 88380b57cec5SDimitry Andric (VCGThq QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>; 88390b57cec5SDimitry Andric 88400b57cec5SDimitry Andric// VSWP allows, but does not require, a type suffix. 88410b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vswp${p}", "$Vd, $Vm", 88420b57cec5SDimitry Andric (VSWPd DPR:$Vd, DPR:$Vm, pred:$p)>; 88430b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vswp${p}", "$Vd, $Vm", 88440b57cec5SDimitry Andric (VSWPq QPR:$Vd, QPR:$Vm, pred:$p)>; 88450b57cec5SDimitry Andric 88460b57cec5SDimitry Andric// VBIF, VBIT, and VBSL allow, but do not require, a type suffix. 88470b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vbif${p}", "$Vd, $Vn, $Vm", 88480b57cec5SDimitry Andric (VBIFd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>; 88490b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vbit${p}", "$Vd, $Vn, $Vm", 88500b57cec5SDimitry Andric (VBITd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>; 88510b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vbsl${p}", "$Vd, $Vn, $Vm", 88520b57cec5SDimitry Andric (VBSLd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>; 88530b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vbif${p}", "$Vd, $Vn, $Vm", 88540b57cec5SDimitry Andric (VBIFq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>; 88550b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vbit${p}", "$Vd, $Vn, $Vm", 88560b57cec5SDimitry Andric (VBITq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>; 88570b57cec5SDimitry Andricdefm : NEONDTAnyInstAlias<"vbsl${p}", "$Vd, $Vn, $Vm", 88580b57cec5SDimitry Andric (VBSLq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>; 88590b57cec5SDimitry Andric 88600b57cec5SDimitry Andric// "vmov Rd, #-imm" can be handled via "vmvn". 88610b57cec5SDimitry Andricdef : NEONInstAlias<"vmov${p}.i32 $Vd, $imm", 88620b57cec5SDimitry Andric (VMVNv2i32 DPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>; 88630b57cec5SDimitry Andricdef : NEONInstAlias<"vmov${p}.i32 $Vd, $imm", 88640b57cec5SDimitry Andric (VMVNv4i32 QPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>; 88650b57cec5SDimitry Andricdef : NEONInstAlias<"vmvn${p}.i32 $Vd, $imm", 88660b57cec5SDimitry Andric (VMOVv2i32 DPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>; 88670b57cec5SDimitry Andricdef : NEONInstAlias<"vmvn${p}.i32 $Vd, $imm", 88680b57cec5SDimitry Andric (VMOVv4i32 QPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>; 88690b57cec5SDimitry Andric 88700b57cec5SDimitry Andric// 'gas' compatibility aliases for quad-word instructions. Strictly speaking, 88710b57cec5SDimitry Andric// these should restrict to just the Q register variants, but the register 88720b57cec5SDimitry Andric// classes are enough to match correctly regardless, so we keep it simple 88730b57cec5SDimitry Andric// and just use MnemonicAlias. 88740b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vbicq", "vbic">; 88750b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vandq", "vand">; 88760b57cec5SDimitry Andricdef : NEONMnemonicAlias<"veorq", "veor">; 88770b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vorrq", "vorr">; 88780b57cec5SDimitry Andric 88790b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vmovq", "vmov">; 88800b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vmvnq", "vmvn">; 88810b57cec5SDimitry Andric// Explicit versions for floating point so that the FPImm variants get 88820b57cec5SDimitry Andric// handled early. The parser gets confused otherwise. 88830b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vmovq.f32", "vmov.f32">; 88840b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vmovq.f64", "vmov.f64">; 88850b57cec5SDimitry Andric 88860b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vaddq", "vadd">; 88870b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vsubq", "vsub">; 88880b57cec5SDimitry Andric 88890b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vminq", "vmin">; 88900b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vmaxq", "vmax">; 88910b57cec5SDimitry Andric 88920b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vmulq", "vmul">; 88930b57cec5SDimitry Andric 88940b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vabsq", "vabs">; 88950b57cec5SDimitry Andric 88960b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vshlq", "vshl">; 88970b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vshrq", "vshr">; 88980b57cec5SDimitry Andric 88990b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vcvtq", "vcvt">; 89000b57cec5SDimitry Andric 89010b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vcleq", "vcle">; 89020b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vceqq", "vceq">; 89030b57cec5SDimitry Andric 89040b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vzipq", "vzip">; 89050b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vswpq", "vswp">; 89060b57cec5SDimitry Andric 89070b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vrecpeq.f32", "vrecpe.f32">; 89080b57cec5SDimitry Andricdef : NEONMnemonicAlias<"vrecpeq.u32", "vrecpe.u32">; 89090b57cec5SDimitry Andric 89100b57cec5SDimitry Andric 89110b57cec5SDimitry Andric// Alias for loading floating point immediates that aren't representable 89120b57cec5SDimitry Andric// using the vmov.f32 encoding but the bitpattern is representable using 89130b57cec5SDimitry Andric// the .i32 encoding. 89140b57cec5SDimitry Andricdef : NEONInstAlias<"vmov${p}.f32 $Vd, $imm", 89150b57cec5SDimitry Andric (VMOVv4i32 QPR:$Vd, nImmVMOVI32:$imm, pred:$p)>; 89160b57cec5SDimitry Andricdef : NEONInstAlias<"vmov${p}.f32 $Vd, $imm", 89170b57cec5SDimitry Andric (VMOVv2i32 DPR:$Vd, nImmVMOVI32:$imm, pred:$p)>; 8918