394 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 42; RUN: llc -mtriple=riscv32 -global-isel -stop-after=irtranslator -verify-machineinstrs < %s \3; RUN: | FileCheck -check-prefixes=RV32 %s4; RUN: llc -mtriple=riscv64 -global-isel -stop-after=irtranslator -verify-machineinstrs < %s \5; RUN: | FileCheck -check-prefixes=RV64 %s6 7define void @va1arg(ptr %a, ...) {8 ; RV32-LABEL: name: va1arg9 ; RV32: bb.1 (%ir-block.0):10 ; RV32-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x1711 ; RV32-NEXT: {{ $}}12 ; RV32-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x1013 ; RV32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.114 ; RV32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 415 ; RV32-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1116 ; RV32-NEXT: G_STORE [[COPY1]](s32), [[FRAME_INDEX]](p0) :: (store (s32) into %fixed-stack.1)17 ; RV32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s32)18 ; RV32-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x1219 ; RV32-NEXT: G_STORE [[COPY2]](s32), [[PTR_ADD]](p0) :: (store (s32) into %fixed-stack.1 + 4)20 ; RV32-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s32)21 ; RV32-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x1322 ; RV32-NEXT: G_STORE [[COPY3]](s32), [[PTR_ADD1]](p0) :: (store (s32) into %fixed-stack.1 + 8)23 ; RV32-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32)24 ; RV32-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $x1425 ; RV32-NEXT: G_STORE [[COPY4]](s32), [[PTR_ADD2]](p0) :: (store (s32) into %fixed-stack.1 + 12)26 ; RV32-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD2]], [[C]](s32)27 ; RV32-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $x1528 ; RV32-NEXT: G_STORE [[COPY5]](s32), [[PTR_ADD3]](p0) :: (store (s32) into %fixed-stack.1 + 16)29 ; RV32-NEXT: [[PTR_ADD4:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD3]], [[C]](s32)30 ; RV32-NEXT: [[COPY6:%[0-9]+]]:_(s32) = COPY $x1631 ; RV32-NEXT: G_STORE [[COPY6]](s32), [[PTR_ADD4]](p0) :: (store (s32) into %fixed-stack.1 + 20)32 ; RV32-NEXT: [[PTR_ADD5:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD4]], [[C]](s32)33 ; RV32-NEXT: [[COPY7:%[0-9]+]]:_(s32) = COPY $x1734 ; RV32-NEXT: G_STORE [[COPY7]](s32), [[PTR_ADD5]](p0) :: (store (s32) into %fixed-stack.1 + 24)35 ; RV32-NEXT: [[PTR_ADD6:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD5]], [[C]](s32)36 ; RV32-NEXT: PseudoRET37 ;38 ; RV64-LABEL: name: va1arg39 ; RV64: bb.1 (%ir-block.0):40 ; RV64-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x1741 ; RV64-NEXT: {{ $}}42 ; RV64-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x1043 ; RV64-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.144 ; RV64-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 845 ; RV64-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1146 ; RV64-NEXT: G_STORE [[COPY1]](s64), [[FRAME_INDEX]](p0) :: (store (s64) into %fixed-stack.1)47 ; RV64-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s64)48 ; RV64-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x1249 ; RV64-NEXT: G_STORE [[COPY2]](s64), [[PTR_ADD]](p0) :: (store (s64) into %fixed-stack.1 + 8)50 ; RV64-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s64)51 ; RV64-NEXT: [[COPY3:%[0-9]+]]:_(s64) = COPY $x1352 ; RV64-NEXT: G_STORE [[COPY3]](s64), [[PTR_ADD1]](p0) :: (store (s64) into %fixed-stack.1 + 16)53 ; RV64-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD1]], [[C]](s64)54 ; RV64-NEXT: [[COPY4:%[0-9]+]]:_(s64) = COPY $x1455 ; RV64-NEXT: G_STORE [[COPY4]](s64), [[PTR_ADD2]](p0) :: (store (s64) into %fixed-stack.1 + 24)56 ; RV64-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD2]], [[C]](s64)57 ; RV64-NEXT: [[COPY5:%[0-9]+]]:_(s64) = COPY $x1558 ; RV64-NEXT: G_STORE [[COPY5]](s64), [[PTR_ADD3]](p0) :: (store (s64) into %fixed-stack.1 + 32)59 ; RV64-NEXT: [[PTR_ADD4:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD3]], [[C]](s64)60 ; RV64-NEXT: [[COPY6:%[0-9]+]]:_(s64) = COPY $x1661 ; RV64-NEXT: G_STORE [[COPY6]](s64), [[PTR_ADD4]](p0) :: (store (s64) into %fixed-stack.1 + 40)62 ; RV64-NEXT: [[PTR_ADD5:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD4]], [[C]](s64)63 ; RV64-NEXT: [[COPY7:%[0-9]+]]:_(s64) = COPY $x1764 ; RV64-NEXT: G_STORE [[COPY7]](s64), [[PTR_ADD5]](p0) :: (store (s64) into %fixed-stack.1 + 48)65 ; RV64-NEXT: [[PTR_ADD6:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD5]], [[C]](s64)66 ; RV64-NEXT: PseudoRET67 ret void68}69 70define void @va2arg(ptr %a, ptr %b, ...) {71 ; RV32-LABEL: name: va2arg72 ; RV32: bb.1 (%ir-block.0):73 ; RV32-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x1774 ; RV32-NEXT: {{ $}}75 ; RV32-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x1076 ; RV32-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x1177 ; RV32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.078 ; RV32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 479 ; RV32-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x1280 ; RV32-NEXT: G_STORE [[COPY2]](s32), [[FRAME_INDEX]](p0) :: (store (s32) into %fixed-stack.0, align 8)81 ; RV32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s32)82 ; RV32-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x1383 ; RV32-NEXT: G_STORE [[COPY3]](s32), [[PTR_ADD]](p0) :: (store (s32) into %fixed-stack.0 + 4)84 ; RV32-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s32)85 ; RV32-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $x1486 ; RV32-NEXT: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p0) :: (store (s32) into %fixed-stack.0 + 8, align 8)87 ; RV32-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32)88 ; RV32-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $x1589 ; RV32-NEXT: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p0) :: (store (s32) into %fixed-stack.0 + 12)90 ; RV32-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD2]], [[C]](s32)91 ; RV32-NEXT: [[COPY6:%[0-9]+]]:_(s32) = COPY $x1692 ; RV32-NEXT: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p0) :: (store (s32) into %fixed-stack.0 + 16, align 8)93 ; RV32-NEXT: [[PTR_ADD4:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD3]], [[C]](s32)94 ; RV32-NEXT: [[COPY7:%[0-9]+]]:_(s32) = COPY $x1795 ; RV32-NEXT: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p0) :: (store (s32) into %fixed-stack.0 + 20)96 ; RV32-NEXT: [[PTR_ADD5:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD4]], [[C]](s32)97 ; RV32-NEXT: PseudoRET98 ;99 ; RV64-LABEL: name: va2arg100 ; RV64: bb.1 (%ir-block.0):101 ; RV64-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17102 ; RV64-NEXT: {{ $}}103 ; RV64-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10104 ; RV64-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11105 ; RV64-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0106 ; RV64-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8107 ; RV64-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x12108 ; RV64-NEXT: G_STORE [[COPY2]](s64), [[FRAME_INDEX]](p0) :: (store (s64) into %fixed-stack.0, align 16)109 ; RV64-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s64)110 ; RV64-NEXT: [[COPY3:%[0-9]+]]:_(s64) = COPY $x13111 ; RV64-NEXT: G_STORE [[COPY3]](s64), [[PTR_ADD]](p0) :: (store (s64) into %fixed-stack.0 + 8)112 ; RV64-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s64)113 ; RV64-NEXT: [[COPY4:%[0-9]+]]:_(s64) = COPY $x14114 ; RV64-NEXT: G_STORE [[COPY4]](s64), [[PTR_ADD1]](p0) :: (store (s64) into %fixed-stack.0 + 16, align 16)115 ; RV64-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD1]], [[C]](s64)116 ; RV64-NEXT: [[COPY5:%[0-9]+]]:_(s64) = COPY $x15117 ; RV64-NEXT: G_STORE [[COPY5]](s64), [[PTR_ADD2]](p0) :: (store (s64) into %fixed-stack.0 + 24)118 ; RV64-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD2]], [[C]](s64)119 ; RV64-NEXT: [[COPY6:%[0-9]+]]:_(s64) = COPY $x16120 ; RV64-NEXT: G_STORE [[COPY6]](s64), [[PTR_ADD3]](p0) :: (store (s64) into %fixed-stack.0 + 32, align 16)121 ; RV64-NEXT: [[PTR_ADD4:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD3]], [[C]](s64)122 ; RV64-NEXT: [[COPY7:%[0-9]+]]:_(s64) = COPY $x17123 ; RV64-NEXT: G_STORE [[COPY7]](s64), [[PTR_ADD4]](p0) :: (store (s64) into %fixed-stack.0 + 40)124 ; RV64-NEXT: [[PTR_ADD5:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD4]], [[C]](s64)125 ; RV64-NEXT: PseudoRET126 ret void127}128 129define void @va3arg(ptr %a, ptr %b, ptr %c, ...) {130 ; RV32-LABEL: name: va3arg131 ; RV32: bb.1 (%ir-block.0):132 ; RV32-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17133 ; RV32-NEXT: {{ $}}134 ; RV32-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10135 ; RV32-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11136 ; RV32-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12137 ; RV32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.1138 ; RV32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4139 ; RV32-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x13140 ; RV32-NEXT: G_STORE [[COPY3]](s32), [[FRAME_INDEX]](p0) :: (store (s32) into %fixed-stack.1)141 ; RV32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s32)142 ; RV32-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $x14143 ; RV32-NEXT: G_STORE [[COPY4]](s32), [[PTR_ADD]](p0) :: (store (s32) into %fixed-stack.1 + 4)144 ; RV32-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s32)145 ; RV32-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $x15146 ; RV32-NEXT: G_STORE [[COPY5]](s32), [[PTR_ADD1]](p0) :: (store (s32) into %fixed-stack.1 + 8)147 ; RV32-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32)148 ; RV32-NEXT: [[COPY6:%[0-9]+]]:_(s32) = COPY $x16149 ; RV32-NEXT: G_STORE [[COPY6]](s32), [[PTR_ADD2]](p0) :: (store (s32) into %fixed-stack.1 + 12)150 ; RV32-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD2]], [[C]](s32)151 ; RV32-NEXT: [[COPY7:%[0-9]+]]:_(s32) = COPY $x17152 ; RV32-NEXT: G_STORE [[COPY7]](s32), [[PTR_ADD3]](p0) :: (store (s32) into %fixed-stack.1 + 16)153 ; RV32-NEXT: [[PTR_ADD4:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD3]], [[C]](s32)154 ; RV32-NEXT: PseudoRET155 ;156 ; RV64-LABEL: name: va3arg157 ; RV64: bb.1 (%ir-block.0):158 ; RV64-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17159 ; RV64-NEXT: {{ $}}160 ; RV64-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10161 ; RV64-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11162 ; RV64-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12163 ; RV64-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.1164 ; RV64-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8165 ; RV64-NEXT: [[COPY3:%[0-9]+]]:_(s64) = COPY $x13166 ; RV64-NEXT: G_STORE [[COPY3]](s64), [[FRAME_INDEX]](p0) :: (store (s64) into %fixed-stack.1)167 ; RV64-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s64)168 ; RV64-NEXT: [[COPY4:%[0-9]+]]:_(s64) = COPY $x14169 ; RV64-NEXT: G_STORE [[COPY4]](s64), [[PTR_ADD]](p0) :: (store (s64) into %fixed-stack.1 + 8)170 ; RV64-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s64)171 ; RV64-NEXT: [[COPY5:%[0-9]+]]:_(s64) = COPY $x15172 ; RV64-NEXT: G_STORE [[COPY5]](s64), [[PTR_ADD1]](p0) :: (store (s64) into %fixed-stack.1 + 16)173 ; RV64-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD1]], [[C]](s64)174 ; RV64-NEXT: [[COPY6:%[0-9]+]]:_(s64) = COPY $x16175 ; RV64-NEXT: G_STORE [[COPY6]](s64), [[PTR_ADD2]](p0) :: (store (s64) into %fixed-stack.1 + 24)176 ; RV64-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD2]], [[C]](s64)177 ; RV64-NEXT: [[COPY7:%[0-9]+]]:_(s64) = COPY $x17178 ; RV64-NEXT: G_STORE [[COPY7]](s64), [[PTR_ADD3]](p0) :: (store (s64) into %fixed-stack.1 + 32)179 ; RV64-NEXT: [[PTR_ADD4:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD3]], [[C]](s64)180 ; RV64-NEXT: PseudoRET181 ret void182}183 184define void @va4arg(ptr %a, ptr %b, ptr %c, ptr %d, ...) {185 ; RV32-LABEL: name: va4arg186 ; RV32: bb.1 (%ir-block.0):187 ; RV32-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17188 ; RV32-NEXT: {{ $}}189 ; RV32-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10190 ; RV32-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11191 ; RV32-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12192 ; RV32-NEXT: [[COPY3:%[0-9]+]]:_(p0) = COPY $x13193 ; RV32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0194 ; RV32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4195 ; RV32-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $x14196 ; RV32-NEXT: G_STORE [[COPY4]](s32), [[FRAME_INDEX]](p0) :: (store (s32) into %fixed-stack.0, align 16)197 ; RV32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s32)198 ; RV32-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $x15199 ; RV32-NEXT: G_STORE [[COPY5]](s32), [[PTR_ADD]](p0) :: (store (s32) into %fixed-stack.0 + 4)200 ; RV32-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s32)201 ; RV32-NEXT: [[COPY6:%[0-9]+]]:_(s32) = COPY $x16202 ; RV32-NEXT: G_STORE [[COPY6]](s32), [[PTR_ADD1]](p0) :: (store (s32) into %fixed-stack.0 + 8, align 8)203 ; RV32-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32)204 ; RV32-NEXT: [[COPY7:%[0-9]+]]:_(s32) = COPY $x17205 ; RV32-NEXT: G_STORE [[COPY7]](s32), [[PTR_ADD2]](p0) :: (store (s32) into %fixed-stack.0 + 12)206 ; RV32-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD2]], [[C]](s32)207 ; RV32-NEXT: PseudoRET208 ;209 ; RV64-LABEL: name: va4arg210 ; RV64: bb.1 (%ir-block.0):211 ; RV64-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17212 ; RV64-NEXT: {{ $}}213 ; RV64-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10214 ; RV64-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11215 ; RV64-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12216 ; RV64-NEXT: [[COPY3:%[0-9]+]]:_(p0) = COPY $x13217 ; RV64-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0218 ; RV64-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8219 ; RV64-NEXT: [[COPY4:%[0-9]+]]:_(s64) = COPY $x14220 ; RV64-NEXT: G_STORE [[COPY4]](s64), [[FRAME_INDEX]](p0) :: (store (s64) into %fixed-stack.0, align 16)221 ; RV64-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s64)222 ; RV64-NEXT: [[COPY5:%[0-9]+]]:_(s64) = COPY $x15223 ; RV64-NEXT: G_STORE [[COPY5]](s64), [[PTR_ADD]](p0) :: (store (s64) into %fixed-stack.0 + 8)224 ; RV64-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s64)225 ; RV64-NEXT: [[COPY6:%[0-9]+]]:_(s64) = COPY $x16226 ; RV64-NEXT: G_STORE [[COPY6]](s64), [[PTR_ADD1]](p0) :: (store (s64) into %fixed-stack.0 + 16, align 16)227 ; RV64-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD1]], [[C]](s64)228 ; RV64-NEXT: [[COPY7:%[0-9]+]]:_(s64) = COPY $x17229 ; RV64-NEXT: G_STORE [[COPY7]](s64), [[PTR_ADD2]](p0) :: (store (s64) into %fixed-stack.0 + 24)230 ; RV64-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD2]], [[C]](s64)231 ; RV64-NEXT: PseudoRET232 ret void233}234 235define void @va5arg(ptr %a, ptr %b, ptr %c, ptr %d, ptr %e, ...) {236 ; RV32-LABEL: name: va5arg237 ; RV32: bb.1 (%ir-block.0):238 ; RV32-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17239 ; RV32-NEXT: {{ $}}240 ; RV32-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10241 ; RV32-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11242 ; RV32-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12243 ; RV32-NEXT: [[COPY3:%[0-9]+]]:_(p0) = COPY $x13244 ; RV32-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $x14245 ; RV32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.1246 ; RV32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4247 ; RV32-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $x15248 ; RV32-NEXT: G_STORE [[COPY5]](s32), [[FRAME_INDEX]](p0) :: (store (s32) into %fixed-stack.1)249 ; RV32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s32)250 ; RV32-NEXT: [[COPY6:%[0-9]+]]:_(s32) = COPY $x16251 ; RV32-NEXT: G_STORE [[COPY6]](s32), [[PTR_ADD]](p0) :: (store (s32) into %fixed-stack.1 + 4)252 ; RV32-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s32)253 ; RV32-NEXT: [[COPY7:%[0-9]+]]:_(s32) = COPY $x17254 ; RV32-NEXT: G_STORE [[COPY7]](s32), [[PTR_ADD1]](p0) :: (store (s32) into %fixed-stack.1 + 8)255 ; RV32-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32)256 ; RV32-NEXT: PseudoRET257 ;258 ; RV64-LABEL: name: va5arg259 ; RV64: bb.1 (%ir-block.0):260 ; RV64-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17261 ; RV64-NEXT: {{ $}}262 ; RV64-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10263 ; RV64-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11264 ; RV64-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12265 ; RV64-NEXT: [[COPY3:%[0-9]+]]:_(p0) = COPY $x13266 ; RV64-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $x14267 ; RV64-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.1268 ; RV64-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8269 ; RV64-NEXT: [[COPY5:%[0-9]+]]:_(s64) = COPY $x15270 ; RV64-NEXT: G_STORE [[COPY5]](s64), [[FRAME_INDEX]](p0) :: (store (s64) into %fixed-stack.1)271 ; RV64-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s64)272 ; RV64-NEXT: [[COPY6:%[0-9]+]]:_(s64) = COPY $x16273 ; RV64-NEXT: G_STORE [[COPY6]](s64), [[PTR_ADD]](p0) :: (store (s64) into %fixed-stack.1 + 8)274 ; RV64-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s64)275 ; RV64-NEXT: [[COPY7:%[0-9]+]]:_(s64) = COPY $x17276 ; RV64-NEXT: G_STORE [[COPY7]](s64), [[PTR_ADD1]](p0) :: (store (s64) into %fixed-stack.1 + 16)277 ; RV64-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD1]], [[C]](s64)278 ; RV64-NEXT: PseudoRET279 ret void280}281 282define void @va6arg(ptr %a, ptr %b, ptr %c, ptr %d, ptr %e, ptr %f, ...) {283 ; RV32-LABEL: name: va6arg284 ; RV32: bb.1 (%ir-block.0):285 ; RV32-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17286 ; RV32-NEXT: {{ $}}287 ; RV32-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10288 ; RV32-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11289 ; RV32-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12290 ; RV32-NEXT: [[COPY3:%[0-9]+]]:_(p0) = COPY $x13291 ; RV32-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $x14292 ; RV32-NEXT: [[COPY5:%[0-9]+]]:_(p0) = COPY $x15293 ; RV32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0294 ; RV32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4295 ; RV32-NEXT: [[COPY6:%[0-9]+]]:_(s32) = COPY $x16296 ; RV32-NEXT: G_STORE [[COPY6]](s32), [[FRAME_INDEX]](p0) :: (store (s32) into %fixed-stack.0, align 8)297 ; RV32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s32)298 ; RV32-NEXT: [[COPY7:%[0-9]+]]:_(s32) = COPY $x17299 ; RV32-NEXT: G_STORE [[COPY7]](s32), [[PTR_ADD]](p0) :: (store (s32) into %fixed-stack.0 + 4)300 ; RV32-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s32)301 ; RV32-NEXT: PseudoRET302 ;303 ; RV64-LABEL: name: va6arg304 ; RV64: bb.1 (%ir-block.0):305 ; RV64-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17306 ; RV64-NEXT: {{ $}}307 ; RV64-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10308 ; RV64-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11309 ; RV64-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12310 ; RV64-NEXT: [[COPY3:%[0-9]+]]:_(p0) = COPY $x13311 ; RV64-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $x14312 ; RV64-NEXT: [[COPY5:%[0-9]+]]:_(p0) = COPY $x15313 ; RV64-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0314 ; RV64-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8315 ; RV64-NEXT: [[COPY6:%[0-9]+]]:_(s64) = COPY $x16316 ; RV64-NEXT: G_STORE [[COPY6]](s64), [[FRAME_INDEX]](p0) :: (store (s64) into %fixed-stack.0, align 16)317 ; RV64-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s64)318 ; RV64-NEXT: [[COPY7:%[0-9]+]]:_(s64) = COPY $x17319 ; RV64-NEXT: G_STORE [[COPY7]](s64), [[PTR_ADD]](p0) :: (store (s64) into %fixed-stack.0 + 8)320 ; RV64-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C]](s64)321 ; RV64-NEXT: PseudoRET322 ret void323}324 325define void @va7arg(ptr %a, ptr %b, ptr %c, ptr %d, ptr %e, ptr %f, ptr %g, ...) {326 ; RV32-LABEL: name: va7arg327 ; RV32: bb.1 (%ir-block.0):328 ; RV32-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17329 ; RV32-NEXT: {{ $}}330 ; RV32-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10331 ; RV32-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11332 ; RV32-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12333 ; RV32-NEXT: [[COPY3:%[0-9]+]]:_(p0) = COPY $x13334 ; RV32-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $x14335 ; RV32-NEXT: [[COPY5:%[0-9]+]]:_(p0) = COPY $x15336 ; RV32-NEXT: [[COPY6:%[0-9]+]]:_(p0) = COPY $x16337 ; RV32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.1338 ; RV32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4339 ; RV32-NEXT: [[COPY7:%[0-9]+]]:_(s32) = COPY $x17340 ; RV32-NEXT: G_STORE [[COPY7]](s32), [[FRAME_INDEX]](p0) :: (store (s32) into %fixed-stack.1)341 ; RV32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s32)342 ; RV32-NEXT: PseudoRET343 ;344 ; RV64-LABEL: name: va7arg345 ; RV64: bb.1 (%ir-block.0):346 ; RV64-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17347 ; RV64-NEXT: {{ $}}348 ; RV64-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10349 ; RV64-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11350 ; RV64-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12351 ; RV64-NEXT: [[COPY3:%[0-9]+]]:_(p0) = COPY $x13352 ; RV64-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $x14353 ; RV64-NEXT: [[COPY5:%[0-9]+]]:_(p0) = COPY $x15354 ; RV64-NEXT: [[COPY6:%[0-9]+]]:_(p0) = COPY $x16355 ; RV64-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.1356 ; RV64-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8357 ; RV64-NEXT: [[COPY7:%[0-9]+]]:_(s64) = COPY $x17358 ; RV64-NEXT: G_STORE [[COPY7]](s64), [[FRAME_INDEX]](p0) :: (store (s64) into %fixed-stack.1)359 ; RV64-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FRAME_INDEX]], [[C]](s64)360 ; RV64-NEXT: PseudoRET361 ret void362}363 364define void @va8arg(ptr %a, ptr %b, ptr %c, ptr %d, ptr %e, ptr %f, ptr %g, ptr %h, ...) {365 ; RV32-LABEL: name: va8arg366 ; RV32: bb.1 (%ir-block.0):367 ; RV32-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17368 ; RV32-NEXT: {{ $}}369 ; RV32-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10370 ; RV32-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11371 ; RV32-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12372 ; RV32-NEXT: [[COPY3:%[0-9]+]]:_(p0) = COPY $x13373 ; RV32-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $x14374 ; RV32-NEXT: [[COPY5:%[0-9]+]]:_(p0) = COPY $x15375 ; RV32-NEXT: [[COPY6:%[0-9]+]]:_(p0) = COPY $x16376 ; RV32-NEXT: [[COPY7:%[0-9]+]]:_(p0) = COPY $x17377 ; RV32-NEXT: PseudoRET378 ;379 ; RV64-LABEL: name: va8arg380 ; RV64: bb.1 (%ir-block.0):381 ; RV64-NEXT: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17382 ; RV64-NEXT: {{ $}}383 ; RV64-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10384 ; RV64-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11385 ; RV64-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY $x12386 ; RV64-NEXT: [[COPY3:%[0-9]+]]:_(p0) = COPY $x13387 ; RV64-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $x14388 ; RV64-NEXT: [[COPY5:%[0-9]+]]:_(p0) = COPY $x15389 ; RV64-NEXT: [[COPY6:%[0-9]+]]:_(p0) = COPY $x16390 ; RV64-NEXT: [[COPY7:%[0-9]+]]:_(p0) = COPY $x17391 ; RV64-NEXT: PseudoRET392 ret void393}394