LCOV - code coverage report
Current view: top level - build-llvm/lib/Target/AMDGPU - AMDGPUGenCallingConv.inc (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 154 159 96.9 %
Date: 2017-09-14 15:23:50 Functions: 7 7 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
       2             : |*                                                                            *|
       3             : |* Calling Convention Implementation Fragment                                 *|
       4             : |*                                                                            *|
       5             : |* Automatically generated file, do not edit!                                 *|
       6             : |*                                                                            *|
       7             : \*===----------------------------------------------------------------------===*/
       8             : 
       9             : static bool CC_AMDGPU(unsigned ValNo, MVT ValVT,
      10             :                       MVT LocVT, CCValAssign::LocInfo LocInfo,
      11             :                       ISD::ArgFlagsTy ArgFlags, CCState &State);
      12             : static bool CC_AMDGPU_Func(unsigned ValNo, MVT ValVT,
      13             :                            MVT LocVT, CCValAssign::LocInfo LocInfo,
      14             :                            ISD::ArgFlagsTy ArgFlags, CCState &State);
      15             : static bool CC_AMDGPU_Kernel(unsigned ValNo, MVT ValVT,
      16             :                              MVT LocVT, CCValAssign::LocInfo LocInfo,
      17             :                              ISD::ArgFlagsTy ArgFlags, CCState &State);
      18             : static bool CC_R600(unsigned ValNo, MVT ValVT,
      19             :                     MVT LocVT, CCValAssign::LocInfo LocInfo,
      20             :                     ISD::ArgFlagsTy ArgFlags, CCState &State);
      21             : static bool CC_SI(unsigned ValNo, MVT ValVT,
      22             :                   MVT LocVT, CCValAssign::LocInfo LocInfo,
      23             :                   ISD::ArgFlagsTy ArgFlags, CCState &State);
      24             : static bool RetCC_AMDGPU_Func(unsigned ValNo, MVT ValVT,
      25             :                               MVT LocVT, CCValAssign::LocInfo LocInfo,
      26             :                               ISD::ArgFlagsTy ArgFlags, CCState &State);
      27             : static bool RetCC_SI_Shader(unsigned ValNo, MVT ValVT,
      28             :                             MVT LocVT, CCValAssign::LocInfo LocInfo,
      29             :                             ISD::ArgFlagsTy ArgFlags, CCState &State);
      30             : 
      31             : 
      32        3077 : static bool CC_AMDGPU(unsigned ValNo, MVT ValVT,
      33             :                       MVT LocVT, CCValAssign::LocInfo LocInfo,
      34             :                       ISD::ArgFlagsTy ArgFlags, CCState &State) {
      35             : 
      36        3077 :   if (static_cast<const AMDGPUSubtarget&>(State.getMachineFunction().getSubtarget()).getGeneration() >=AMDGPUSubtarget::SOUTHERN_ISLANDS && !AMDGPU::isShader(State.getCallingConv())) {
      37             :     if (!CC_AMDGPU_Kernel(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
      38             :       return false;
      39             :   }
      40             : 
      41        3077 :   if (static_cast<const AMDGPUSubtarget&>(State.getMachineFunction().getSubtarget()).getGeneration() < AMDGPUSubtarget::SOUTHERN_ISLANDS && !AMDGPU::isShader(State.getCallingConv())) {
      42             :     if (!CC_AMDGPU_Kernel(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
      43             :       return false;
      44             :   }
      45             : 
      46        3077 :   if (static_cast<const AMDGPUSubtarget&>(State.getMachineFunction().getSubtarget()).getGeneration() >= AMDGPUSubtarget::SOUTHERN_ISLANDS) {
      47        3014 :     if (!CC_SI(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
      48             :       return false;
      49             :   }
      50             : 
      51          63 :   if (static_cast<const AMDGPUSubtarget&>(State.getMachineFunction().getSubtarget()).getGeneration() >= AMDGPUSubtarget::SOUTHERN_ISLANDS && State.getCallingConv() == CallingConv::C) {
      52           0 :     if (!CC_AMDGPU_Func(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
      53             :       return false;
      54             :   }
      55             : 
      56          63 :   if (static_cast<const AMDGPUSubtarget&>(State.getMachineFunction().getSubtarget()).getGeneration() < AMDGPUSubtarget::SOUTHERN_ISLANDS) {
      57          63 :     if (!CC_R600(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
      58             :       return false;
      59             :   }
      60             : 
      61             :   return true;  // CC didn't match.
      62             : }
      63             : 
      64             : 
      65        3488 : static bool CC_AMDGPU_Func(unsigned ValNo, MVT ValVT,
      66             :                            MVT LocVT, CCValAssign::LocInfo LocInfo,
      67             :                            ISD::ArgFlagsTy ArgFlags, CCState &State) {
      68             : 
      69        3488 :   if (ArgFlags.isByVal()) {
      70          64 :     State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, 4, 4, ArgFlags);
      71          64 :     return false;
      72             :   }
      73             : 
      74        3424 :   if (LocVT == MVT::i1) {
      75          27 :     LocVT = MVT::i32;
      76          27 :     if (ArgFlags.isSExt())
      77             :         LocInfo = CCValAssign::SExt;
      78          20 :     else if (ArgFlags.isZExt())
      79             :         LocInfo = CCValAssign::ZExt;
      80             :     else
      81          13 :         LocInfo = CCValAssign::AExt;
      82             :   }
      83             : 
      84        6848 :   if (LocVT == MVT::i1 ||
      85        6848 :       LocVT == MVT::i8 ||
      86        3424 :       LocVT == MVT::i16) {
      87         396 :     if (ArgFlags.isSExt() || ArgFlags.isZExt()) {
      88          20 :       LocVT = MVT::i32;
      89          20 :       if (ArgFlags.isSExt())
      90             :             LocInfo = CCValAssign::SExt;
      91          10 :       else if (ArgFlags.isZExt())
      92             :             LocInfo = CCValAssign::ZExt;
      93             :       else
      94           0 :             LocInfo = CCValAssign::AExt;
      95             :     }
      96             :   }
      97             : 
      98        4336 :   if (LocVT == MVT::i32 ||
      99        1650 :       LocVT == MVT::f32 ||
     100        1293 :       LocVT == MVT::i16 ||
     101         939 :       LocVT == MVT::f16 ||
     102         751 :       LocVT == MVT::v2i16 ||
     103        4123 :       LocVT == MVT::v2f16 ||
     104         332 :       LocVT == MVT::i1) {
     105             :     static const MCPhysReg RegList1[] = {
     106             :       AMDGPU::VGPR0, AMDGPU::VGPR1, AMDGPU::VGPR2, AMDGPU::VGPR3, AMDGPU::VGPR4, AMDGPU::VGPR5, AMDGPU::VGPR6, AMDGPU::VGPR7, AMDGPU::VGPR8, AMDGPU::VGPR9, AMDGPU::VGPR10, AMDGPU::VGPR11, AMDGPU::VGPR12, AMDGPU::VGPR13, AMDGPU::VGPR14, AMDGPU::VGPR15, AMDGPU::VGPR16, AMDGPU::VGPR17, AMDGPU::VGPR18, AMDGPU::VGPR19, AMDGPU::VGPR20, AMDGPU::VGPR21, AMDGPU::VGPR22, AMDGPU::VGPR23, AMDGPU::VGPR24, AMDGPU::VGPR25, AMDGPU::VGPR26, AMDGPU::VGPR27, AMDGPU::VGPR28, AMDGPU::VGPR29, AMDGPU::VGPR30, AMDGPU::VGPR31
     107             :     };
     108        3092 :     if (unsigned Reg = State.AllocateReg(RegList1)) {
     109        5820 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
     110        2910 :       return false;
     111             :     }
     112             :   }
     113             : 
     114         963 :   if (LocVT == MVT::i64 ||
     115         882 :       LocVT == MVT::f64 ||
     116         856 :       LocVT == MVT::v2i32 ||
     117         840 :       LocVT == MVT::v2f32 ||
     118         817 :       LocVT == MVT::v4i32 ||
     119         789 :       LocVT == MVT::v4f32 ||
     120         765 :       LocVT == MVT::v8i32 ||
     121         746 :       LocVT == MVT::v8f32 ||
     122         654 :       LocVT == MVT::v16i32 ||
     123         562 :       LocVT == MVT::v16f32 ||
     124        1022 :       LocVT == MVT::v2i64 ||
     125         230 :       LocVT == MVT::v2f64) {
     126         332 :     if (allocateVGPRTuple(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
     127             :         return false;
     128             :   }
     129             : 
     130         295 :   if (LocVT == MVT::i32 ||
     131         157 :       LocVT == MVT::f32 ||
     132         153 :       LocVT == MVT::v2i16 ||
     133         151 :       LocVT == MVT::v2f16 ||
     134         112 :       LocVT == MVT::i16 ||
     135         285 :       LocVT == MVT::f16 ||
     136          33 :       LocVT == MVT::i1) {
     137         182 :     unsigned Offset2 = State.AllocateStack(4, 4);
     138         364 :     State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset2, LocVT, LocInfo));
     139         182 :     return false;
     140             :   }
     141             : 
     142          63 :   if (LocVT == MVT::i64 ||
     143          60 :       LocVT == MVT::f64 ||
     144          90 :       LocVT == MVT::v2i32 ||
     145          27 :       LocVT == MVT::v2f32) {
     146           9 :     unsigned Offset3 = State.AllocateStack(8, 4);
     147          18 :     State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset3, LocVT, LocInfo));
     148           9 :     return false;
     149             :   }
     150             : 
     151          45 :   if (LocVT == MVT::v4i32 ||
     152          39 :       LocVT == MVT::v4f32 ||
     153          57 :       LocVT == MVT::v2i64 ||
     154          15 :       LocVT == MVT::v2f64) {
     155          12 :     unsigned Offset4 = State.AllocateStack(16, 4);
     156          24 :     State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset4, LocVT, LocInfo));
     157          12 :     return false;
     158             :   }
     159             : 
     160          21 :   if (LocVT == MVT::v8i32 ||
     161           9 :       LocVT == MVT::v8f32) {
     162           6 :     unsigned Offset5 = State.AllocateStack(32, 4);
     163          12 :     State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset5, LocVT, LocInfo));
     164           6 :     return false;
     165             :   }
     166             : 
     167           9 :   if (LocVT == MVT::v16i32 ||
     168           3 :       LocVT == MVT::v16f32) {
     169           6 :     unsigned Offset6 = State.AllocateStack(64, 4);
     170          12 :     State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset6, LocVT, LocInfo));
     171           6 :     return false;
     172             :   }
     173             : 
     174             :   return true;  // CC didn't match.
     175             : }
     176             : 
     177             : 
     178          26 : static bool CC_AMDGPU_Kernel(unsigned ValNo, MVT ValVT,
     179             :                              MVT LocVT, CCValAssign::LocInfo LocInfo,
     180             :                              ISD::ArgFlagsTy ArgFlags, CCState &State) {
     181             : 
     182          26 :   if (allocateKernArg(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
     183             :     return false;
     184             : 
     185           0 :   return true;  // CC didn't match.
     186             : }
     187             : 
     188             : 
     189          63 : static bool CC_R600(unsigned ValNo, MVT ValVT,
     190             :                     MVT LocVT, CCValAssign::LocInfo LocInfo,
     191             :                     ISD::ArgFlagsTy ArgFlags, CCState &State) {
     192             : 
     193          63 :   if (ArgFlags.isInReg()) {
     194          63 :     if (LocVT == MVT::v4f32 ||
     195           0 :         LocVT == MVT::v4i32) {
     196             :       static const MCPhysReg RegList1[] = {
     197             :         AMDGPU::T0_XYZW, AMDGPU::T1_XYZW, AMDGPU::T2_XYZW, AMDGPU::T3_XYZW, AMDGPU::T4_XYZW, AMDGPU::T5_XYZW, AMDGPU::T6_XYZW, AMDGPU::T7_XYZW, AMDGPU::T8_XYZW, AMDGPU::T9_XYZW, AMDGPU::T10_XYZW, AMDGPU::T11_XYZW, AMDGPU::T12_XYZW, AMDGPU::T13_XYZW, AMDGPU::T14_XYZW, AMDGPU::T15_XYZW, AMDGPU::T16_XYZW, AMDGPU::T17_XYZW, AMDGPU::T18_XYZW, AMDGPU::T19_XYZW, AMDGPU::T20_XYZW, AMDGPU::T21_XYZW, AMDGPU::T22_XYZW, AMDGPU::T23_XYZW, AMDGPU::T24_XYZW, AMDGPU::T25_XYZW, AMDGPU::T26_XYZW, AMDGPU::T27_XYZW, AMDGPU::T28_XYZW, AMDGPU::T29_XYZW, AMDGPU::T30_XYZW, AMDGPU::T31_XYZW, AMDGPU::T32_XYZW
     198             :       };
     199          63 :       if (unsigned Reg = State.AllocateReg(RegList1)) {
     200         126 :         State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
     201          63 :         return false;
     202             :       }
     203             :     }
     204             :   }
     205             : 
     206             :   return true;  // CC didn't match.
     207             : }
     208             : 
     209             : 
     210        3014 : static bool CC_SI(unsigned ValNo, MVT ValVT,
     211             :                   MVT LocVT, CCValAssign::LocInfo LocInfo,
     212             :                   ISD::ArgFlagsTy ArgFlags, CCState &State) {
     213             : 
     214        3014 :   if (ArgFlags.isInReg()) {
     215        3289 :     if (LocVT == MVT::f32 ||
     216        1817 :         LocVT == MVT::i32 ||
     217         147 :         LocVT == MVT::f16) {
     218             :       static const MCPhysReg RegList1[] = {
     219             :         AMDGPU::SGPR0, AMDGPU::SGPR1, AMDGPU::SGPR2, AMDGPU::SGPR3, AMDGPU::SGPR4, AMDGPU::SGPR5, AMDGPU::SGPR6, AMDGPU::SGPR7, AMDGPU::SGPR8, AMDGPU::SGPR9, AMDGPU::SGPR10, AMDGPU::SGPR11, AMDGPU::SGPR12, AMDGPU::SGPR13, AMDGPU::SGPR14, AMDGPU::SGPR15, AMDGPU::SGPR16, AMDGPU::SGPR17, AMDGPU::SGPR18, AMDGPU::SGPR19, AMDGPU::SGPR20, AMDGPU::SGPR21, AMDGPU::SGPR22, AMDGPU::SGPR23, AMDGPU::SGPR24, AMDGPU::SGPR25, AMDGPU::SGPR26, AMDGPU::SGPR27, AMDGPU::SGPR28, AMDGPU::SGPR29, AMDGPU::SGPR30, AMDGPU::SGPR31, AMDGPU::SGPR32, AMDGPU::SGPR33, AMDGPU::SGPR34, AMDGPU::SGPR35, AMDGPU::SGPR36, AMDGPU::SGPR37, AMDGPU::SGPR38, AMDGPU::SGPR39
     220             :       };
     221        1524 :       if (unsigned Reg = State.AllocateReg(RegList1)) {
     222        3048 :         State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
     223        1524 :         return false;
     224             :       }
     225             :     }
     226             :   }
     227             : 
     228        1490 :   if (ArgFlags.isInReg()) {
     229         146 :     if (LocVT == MVT::i64) {
     230         146 :       if (allocateSGPRTuple(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
     231             :             return false;
     232             :     }
     233             :   }
     234             : 
     235        1344 :   if (ArgFlags.isByVal()) {
     236         171 :     if (LocVT == MVT::i64) {
     237         171 :       if (allocateSGPRTuple(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
     238             :             return false;
     239             :     }
     240             :   }
     241             : 
     242        1173 :   if (!ArgFlags.isInReg()) {
     243        1828 :     if (LocVT == MVT::f32 ||
     244        1177 :         LocVT == MVT::i32 ||
     245           4 :         LocVT == MVT::f16) {
     246             :       static const MCPhysReg RegList2[] = {
     247             :         AMDGPU::VGPR0, AMDGPU::VGPR1, AMDGPU::VGPR2, AMDGPU::VGPR3, AMDGPU::VGPR4, AMDGPU::VGPR5, AMDGPU::VGPR6, AMDGPU::VGPR7, AMDGPU::VGPR8, AMDGPU::VGPR9, AMDGPU::VGPR10, AMDGPU::VGPR11, AMDGPU::VGPR12, AMDGPU::VGPR13, AMDGPU::VGPR14, AMDGPU::VGPR15, AMDGPU::VGPR16, AMDGPU::VGPR17, AMDGPU::VGPR18, AMDGPU::VGPR19, AMDGPU::VGPR20, AMDGPU::VGPR21, AMDGPU::VGPR22, AMDGPU::VGPR23, AMDGPU::VGPR24, AMDGPU::VGPR25, AMDGPU::VGPR26, AMDGPU::VGPR27, AMDGPU::VGPR28, AMDGPU::VGPR29, AMDGPU::VGPR30, AMDGPU::VGPR31, AMDGPU::VGPR32, AMDGPU::VGPR33, AMDGPU::VGPR34, AMDGPU::VGPR35, AMDGPU::VGPR36, AMDGPU::VGPR37, AMDGPU::VGPR38, AMDGPU::VGPR39, AMDGPU::VGPR40, AMDGPU::VGPR41, AMDGPU::VGPR42, AMDGPU::VGPR43, AMDGPU::VGPR44, AMDGPU::VGPR45, AMDGPU::VGPR46, AMDGPU::VGPR47, AMDGPU::VGPR48, AMDGPU::VGPR49, AMDGPU::VGPR50, AMDGPU::VGPR51, AMDGPU::VGPR52, AMDGPU::VGPR53, AMDGPU::VGPR54, AMDGPU::VGPR55, AMDGPU::VGPR56, AMDGPU::VGPR57, AMDGPU::VGPR58, AMDGPU::VGPR59, AMDGPU::VGPR60, AMDGPU::VGPR61, AMDGPU::VGPR62, AMDGPU::VGPR63, AMDGPU::VGPR64, AMDGPU::VGPR65, AMDGPU::VGPR66, AMDGPU::VGPR67, AMDGPU::VGPR68, AMDGPU::VGPR69, AMDGPU::VGPR70, AMDGPU::VGPR71, AMDGPU::VGPR72, AMDGPU::VGPR73, AMDGPU::VGPR74, AMDGPU::VGPR75, AMDGPU::VGPR76, AMDGPU::VGPR77, AMDGPU::VGPR78, AMDGPU::VGPR79, AMDGPU::VGPR80, AMDGPU::VGPR81, AMDGPU::VGPR82, AMDGPU::VGPR83, AMDGPU::VGPR84, AMDGPU::VGPR85, AMDGPU::VGPR86, AMDGPU::VGPR87, AMDGPU::VGPR88, AMDGPU::VGPR89, AMDGPU::VGPR90, AMDGPU::VGPR91, AMDGPU::VGPR92, AMDGPU::VGPR93, AMDGPU::VGPR94, AMDGPU::VGPR95, AMDGPU::VGPR96, AMDGPU::VGPR97, AMDGPU::VGPR98, AMDGPU::VGPR99, AMDGPU::VGPR100, AMDGPU::VGPR101, AMDGPU::VGPR102, AMDGPU::VGPR103, AMDGPU::VGPR104, AMDGPU::VGPR105, AMDGPU::VGPR106, AMDGPU::VGPR107, AMDGPU::VGPR108, AMDGPU::VGPR109, AMDGPU::VGPR110, AMDGPU::VGPR111, AMDGPU::VGPR112, AMDGPU::VGPR113, AMDGPU::VGPR114, AMDGPU::VGPR115, AMDGPU::VGPR116, AMDGPU::VGPR117, AMDGPU::VGPR118, AMDGPU::VGPR119, AMDGPU::VGPR120, AMDGPU::VGPR121, AMDGPU::VGPR122, AMDGPU::VGPR123, AMDGPU::VGPR124, AMDGPU::VGPR125, AMDGPU::VGPR126, AMDGPU::VGPR127, AMDGPU::VGPR128, AMDGPU::VGPR129, AMDGPU::VGPR130, AMDGPU::VGPR131, AMDGPU::VGPR132, AMDGPU::VGPR133, AMDGPU::VGPR134, AMDGPU::VGPR135
     248             :       };
     249        1173 :       if (unsigned Reg = State.AllocateReg(RegList2)) {
     250        2346 :         State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
     251        1173 :         return false;
     252             :       }
     253             :     }
     254             :   }
     255             : 
     256             :   return true;  // CC didn't match.
     257             : }
     258             : 
     259             : 
     260        1217 : static bool RetCC_AMDGPU_Func(unsigned ValNo, MVT ValVT,
     261             :                               MVT LocVT, CCValAssign::LocInfo LocInfo,
     262             :                               ISD::ArgFlagsTy ArgFlags, CCState &State) {
     263             : 
     264        1217 :   if (LocVT == MVT::i1) {
     265          18 :     LocVT = MVT::i32;
     266          18 :     if (ArgFlags.isSExt())
     267             :         LocInfo = CCValAssign::SExt;
     268          15 :     else if (ArgFlags.isZExt())
     269             :         LocInfo = CCValAssign::ZExt;
     270             :     else
     271          12 :         LocInfo = CCValAssign::AExt;
     272             :   }
     273             : 
     274        2434 :   if (LocVT == MVT::i1 ||
     275        1217 :       LocVT == MVT::i16) {
     276         404 :     if (ArgFlags.isSExt() || ArgFlags.isZExt()) {
     277           8 :       LocVT = MVT::i32;
     278           8 :       if (ArgFlags.isSExt())
     279             :             LocInfo = CCValAssign::SExt;
     280           4 :       else if (ArgFlags.isZExt())
     281             :             LocInfo = CCValAssign::ZExt;
     282             :       else
     283           0 :             LocInfo = CCValAssign::AExt;
     284             :     }
     285             :   }
     286             : 
     287        1941 :   if (LocVT == MVT::i32 ||
     288        1276 :       LocVT == MVT::f32 ||
     289         908 :       LocVT == MVT::i16 ||
     290         704 :       LocVT == MVT::f16 ||
     291        1881 :       LocVT == MVT::v2i16 ||
     292         316 :       LocVT == MVT::v2f16) {
     293             :     static const MCPhysReg RegList1[] = {
     294             :       AMDGPU::VGPR0, AMDGPU::VGPR1, AMDGPU::VGPR2, AMDGPU::VGPR3, AMDGPU::VGPR4, AMDGPU::VGPR5, AMDGPU::VGPR6, AMDGPU::VGPR7, AMDGPU::VGPR8, AMDGPU::VGPR9, AMDGPU::VGPR10, AMDGPU::VGPR11, AMDGPU::VGPR12, AMDGPU::VGPR13, AMDGPU::VGPR14, AMDGPU::VGPR15, AMDGPU::VGPR16, AMDGPU::VGPR17, AMDGPU::VGPR18, AMDGPU::VGPR19, AMDGPU::VGPR20, AMDGPU::VGPR21, AMDGPU::VGPR22, AMDGPU::VGPR23, AMDGPU::VGPR24, AMDGPU::VGPR25, AMDGPU::VGPR26, AMDGPU::VGPR27, AMDGPU::VGPR28, AMDGPU::VGPR29, AMDGPU::VGPR30, AMDGPU::VGPR31
     295             :     };
     296         903 :     if (unsigned Reg = State.AllocateReg(RegList1)) {
     297        1788 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
     298         894 :       return false;
     299             :     }
     300             :   }
     301             : 
     302         578 :   if (LocVT == MVT::i64 ||
     303         498 :       LocVT == MVT::f64 ||
     304         474 :       LocVT == MVT::v2i32 ||
     305         432 :       LocVT == MVT::v2f32 ||
     306         378 :       LocVT == MVT::v4i32 ||
     307         354 :       LocVT == MVT::v4f32 ||
     308         330 :       LocVT == MVT::v8i32 ||
     309         306 :       LocVT == MVT::v8f32 ||
     310         252 :       LocVT == MVT::v16i32 ||
     311         198 :       LocVT == MVT::v16f32 ||
     312         431 :       LocVT == MVT::v2i64 ||
     313           9 :       LocVT == MVT::v2f64) {
     314         314 :     if (allocateVGPRTuple(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
     315             :         return false;
     316             :   }
     317             : 
     318             :   return true;  // CC didn't match.
     319             : }
     320             : 
     321             : 
     322         819 : static bool RetCC_SI_Shader(unsigned ValNo, MVT ValVT,
     323             :                             MVT LocVT, CCValAssign::LocInfo LocInfo,
     324             :                             ISD::ArgFlagsTy ArgFlags, CCState &State) {
     325             : 
     326         819 :   if (LocVT == MVT::i32) {
     327             :     static const MCPhysReg RegList1[] = {
     328             :       AMDGPU::SGPR0, AMDGPU::SGPR1, AMDGPU::SGPR2, AMDGPU::SGPR3, AMDGPU::SGPR4, AMDGPU::SGPR5, AMDGPU::SGPR6, AMDGPU::SGPR7, AMDGPU::SGPR8, AMDGPU::SGPR9, AMDGPU::SGPR10, AMDGPU::SGPR11, AMDGPU::SGPR12, AMDGPU::SGPR13, AMDGPU::SGPR14, AMDGPU::SGPR15, AMDGPU::SGPR16, AMDGPU::SGPR17, AMDGPU::SGPR18, AMDGPU::SGPR19, AMDGPU::SGPR20, AMDGPU::SGPR21, AMDGPU::SGPR22, AMDGPU::SGPR23, AMDGPU::SGPR24, AMDGPU::SGPR25, AMDGPU::SGPR26, AMDGPU::SGPR27, AMDGPU::SGPR28, AMDGPU::SGPR29, AMDGPU::SGPR30, AMDGPU::SGPR31, AMDGPU::SGPR32, AMDGPU::SGPR33, AMDGPU::SGPR34, AMDGPU::SGPR35, AMDGPU::SGPR36, AMDGPU::SGPR37, AMDGPU::SGPR38, AMDGPU::SGPR39
     329             :     };
     330         104 :     if (unsigned Reg = State.AllocateReg(RegList1)) {
     331         208 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
     332         104 :       return false;
     333             :     }
     334             :   }
     335             : 
     336         717 :   if (LocVT == MVT::f32 ||
     337           2 :       LocVT == MVT::f16) {
     338             :     static const MCPhysReg RegList2[] = {
     339             :       AMDGPU::VGPR0, AMDGPU::VGPR1, AMDGPU::VGPR2, AMDGPU::VGPR3, AMDGPU::VGPR4, AMDGPU::VGPR5, AMDGPU::VGPR6, AMDGPU::VGPR7, AMDGPU::VGPR8, AMDGPU::VGPR9, AMDGPU::VGPR10, AMDGPU::VGPR11, AMDGPU::VGPR12, AMDGPU::VGPR13, AMDGPU::VGPR14, AMDGPU::VGPR15, AMDGPU::VGPR16, AMDGPU::VGPR17, AMDGPU::VGPR18, AMDGPU::VGPR19, AMDGPU::VGPR20, AMDGPU::VGPR21, AMDGPU::VGPR22, AMDGPU::VGPR23, AMDGPU::VGPR24, AMDGPU::VGPR25, AMDGPU::VGPR26, AMDGPU::VGPR27, AMDGPU::VGPR28, AMDGPU::VGPR29, AMDGPU::VGPR30, AMDGPU::VGPR31, AMDGPU::VGPR32, AMDGPU::VGPR33, AMDGPU::VGPR34, AMDGPU::VGPR35, AMDGPU::VGPR36, AMDGPU::VGPR37, AMDGPU::VGPR38, AMDGPU::VGPR39, AMDGPU::VGPR40, AMDGPU::VGPR41, AMDGPU::VGPR42, AMDGPU::VGPR43, AMDGPU::VGPR44, AMDGPU::VGPR45, AMDGPU::VGPR46, AMDGPU::VGPR47, AMDGPU::VGPR48, AMDGPU::VGPR49, AMDGPU::VGPR50, AMDGPU::VGPR51, AMDGPU::VGPR52, AMDGPU::VGPR53, AMDGPU::VGPR54, AMDGPU::VGPR55, AMDGPU::VGPR56, AMDGPU::VGPR57, AMDGPU::VGPR58, AMDGPU::VGPR59, AMDGPU::VGPR60, AMDGPU::VGPR61, AMDGPU::VGPR62, AMDGPU::VGPR63, AMDGPU::VGPR64, AMDGPU::VGPR65, AMDGPU::VGPR66, AMDGPU::VGPR67, AMDGPU::VGPR68, AMDGPU::VGPR69, AMDGPU::VGPR70, AMDGPU::VGPR71, AMDGPU::VGPR72, AMDGPU::VGPR73, AMDGPU::VGPR74, AMDGPU::VGPR75, AMDGPU::VGPR76, AMDGPU::VGPR77, AMDGPU::VGPR78, AMDGPU::VGPR79, AMDGPU::VGPR80, AMDGPU::VGPR81, AMDGPU::VGPR82, AMDGPU::VGPR83, AMDGPU::VGPR84, AMDGPU::VGPR85, AMDGPU::VGPR86, AMDGPU::VGPR87, AMDGPU::VGPR88, AMDGPU::VGPR89, AMDGPU::VGPR90, AMDGPU::VGPR91, AMDGPU::VGPR92, AMDGPU::VGPR93, AMDGPU::VGPR94, AMDGPU::VGPR95, AMDGPU::VGPR96, AMDGPU::VGPR97, AMDGPU::VGPR98, AMDGPU::VGPR99, AMDGPU::VGPR100, AMDGPU::VGPR101, AMDGPU::VGPR102, AMDGPU::VGPR103, AMDGPU::VGPR104, AMDGPU::VGPR105, AMDGPU::VGPR106, AMDGPU::VGPR107, AMDGPU::VGPR108, AMDGPU::VGPR109, AMDGPU::VGPR110, AMDGPU::VGPR111, AMDGPU::VGPR112, AMDGPU::VGPR113, AMDGPU::VGPR114, AMDGPU::VGPR115, AMDGPU::VGPR116, AMDGPU::VGPR117, AMDGPU::VGPR118, AMDGPU::VGPR119, AMDGPU::VGPR120, AMDGPU::VGPR121, AMDGPU::VGPR122, AMDGPU::VGPR123, AMDGPU::VGPR124, AMDGPU::VGPR125, AMDGPU::VGPR126, AMDGPU::VGPR127, AMDGPU::VGPR128, AMDGPU::VGPR129, AMDGPU::VGPR130, AMDGPU::VGPR131, AMDGPU::VGPR132, AMDGPU::VGPR133, AMDGPU::VGPR134, AMDGPU::VGPR135
     340             :     };
     341         715 :     if (unsigned Reg = State.AllocateReg(RegList2)) {
     342        1430 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
     343         715 :       return false;
     344             :     }
     345             :   }
     346             : 
     347             :   return true;  // CC didn't match.
     348             : }

Generated by: LCOV version 1.13