allocation.ll 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113
  1. target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32-S64"
  2. target triple = "armv7-none-linux-gnueabi"
  3. declare i8* @rsOffset([1 x i32] %a.coerce, i32 %sizeOf, i32 %x, i32 %y, i32 %z)
  4. declare i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z)
  5. ; The loads and stores in this file are annotated with RenderScript-specific
  6. ; information for the type based alias analysis, such that the TBAA analysis
  7. ; understands that loads and stores from two allocations with different types
  8. ; can never access the same memory element. This is different from C, where
  9. ; a char or uchar load/store is special as it can alias with about everything.
  10. ;
  11. ; The TBAA tree in this file has the the node "RenderScript Distinct TBAA" as
  12. ; its root.
  13. ; This means all loads/stores that share this common root can be proven to not
  14. ; alias. However, the alias analysis still has to assume MayAlias between
  15. ; memory accesses in this file and memory accesses annotated with the C/C++
  16. ; TBAA metadata.
  17. ; A node named "RenderScript TBAA" wraps our distinct TBAA root node.
  18. ; If we can ensure that all accesses to elements loaded from RenderScript
  19. ; allocations are either annotated with the RenderScript TBAA information or
  20. ; not annotated at all, but never annotated with the C/C++ metadata, we
  21. ; can add the "RenderScript TBAA" tree under the C/C++ TBAA tree. This enables
  22. ; TBAA to prove that an access to data from the RenderScript allocation
  23. ; does not alias with a load/store accessing something not part of a RenderScript
  24. ; allocation.
  25. ; We do this by swapping the second operand of "RenderScript TBAA" with the node
  26. ; for "Simple C/C++ TBAA", thus connecting these TBAA groups. The other root
  27. ; node (with no children) can then safely be dropped from the analysis.
  28. !13 = !{!"RenderScript Distinct TBAA"}
  29. !14 = !{!"RenderScript TBAA", !13}
  30. !15 = !{!"allocation", !14}
  31. !21 = !{!"char", !15}
  32. define void @rsSetElementAtImpl_char([1 x i32] %a.coerce, i8 signext %val, i32 %x, i32 %y, i32 %z) #1 {
  33. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 1, i32 %x, i32 %y, i32 %z) #2
  34. store i8 %val, i8* %1, align 1, !tbaa !21
  35. ret void
  36. }
  37. define signext i8 @rsGetElementAtImpl_char([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  38. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 1, i32 %x, i32 %y, i32 %z) #2
  39. %2 = load i8, i8* %1, align 1, !tbaa !21
  40. ret i8 %2
  41. }
  42. !22 = !{!"char2", !15}
  43. define void @rsSetElementAtImpl_char2([1 x i32] %a.coerce, <2 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  44. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 2, i32 %x, i32 %y, i32 %z) #2
  45. %2 = bitcast i8* %1 to <2 x i8>*
  46. store <2 x i8> %val, <2 x i8>* %2, align 2, !tbaa !22
  47. ret void
  48. }
  49. define <2 x i8> @rsGetElementAtImpl_char2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  50. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 2, i32 %x, i32 %y, i32 %z) #2
  51. %2 = bitcast i8* %1 to <2 x i8>*
  52. %3 = load <2 x i8>, <2 x i8>* %2, align 2, !tbaa !22
  53. ret <2 x i8> %3
  54. }
  55. !23 = !{!"char3", !15}
  56. define void @rsSetElementAtImpl_char3([1 x i32] %a.coerce, <3 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  57. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  58. %2 = shufflevector <3 x i8> %val, <3 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
  59. %3 = bitcast i8* %1 to <4 x i8>*
  60. store <4 x i8> %2, <4 x i8>* %3, align 4, !tbaa !23
  61. ret void
  62. }
  63. define <3 x i8> @rsGetElementAtImpl_char3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  64. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  65. %2 = bitcast i8* %1 to <4 x i8>*
  66. %3 = load <4 x i8>, <4 x i8>* %2, align 4, !tbaa !23
  67. %4 = shufflevector <4 x i8> %3, <4 x i8> undef, <3 x i32> <i32 0, i32 1, i32 2>
  68. ret <3 x i8> %4
  69. }
  70. !24 = !{!"char4", !15}
  71. define void @rsSetElementAtImpl_char4([1 x i32] %a.coerce, <4 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  72. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  73. %2 = bitcast i8* %1 to <4 x i8>*
  74. store <4 x i8> %val, <4 x i8>* %2, align 4, !tbaa !24
  75. ret void
  76. }
  77. define <4 x i8> @rsGetElementAtImpl_char4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  78. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  79. %2 = bitcast i8* %1 to <4 x i8>*
  80. %3 = load <4 x i8>, <4 x i8>* %2, align 4, !tbaa !24
  81. ret <4 x i8> %3
  82. }
  83. !25 = !{!"uchar", !15}
  84. define void @rsSetElementAtImpl_uchar([1 x i32] %a.coerce, i8 zeroext %val, i32 %x, i32 %y, i32 %z) #1 {
  85. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 1, i32 %x, i32 %y, i32 %z) #2
  86. store i8 %val, i8* %1, align 1, !tbaa !25
  87. ret void
  88. }
  89. define zeroext i8 @rsGetElementAtImpl_uchar([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  90. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 1, i32 %x, i32 %y, i32 %z) #2
  91. %2 = load i8, i8* %1, align 1, !tbaa !25
  92. ret i8 %2
  93. }
  94. !26 = !{!"uchar2", !15}
  95. define void @rsSetElementAtImpl_uchar2([1 x i32] %a.coerce, <2 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  96. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 2, i32 %x, i32 %y, i32 %z) #2
  97. %2 = bitcast i8* %1 to <2 x i8>*
  98. store <2 x i8> %val, <2 x i8>* %2, align 2, !tbaa !26
  99. ret void
  100. }
  101. define <2 x i8> @rsGetElementAtImpl_uchar2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  102. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 2, i32 %x, i32 %y, i32 %z) #2
  103. %2 = bitcast i8* %1 to <2 x i8>*
  104. %3 = load <2 x i8>, <2 x i8>* %2, align 2, !tbaa !26
  105. ret <2 x i8> %3
  106. }
  107. !27 = !{!"uchar3", !15}
  108. define void @rsSetElementAtImpl_uchar3([1 x i32] %a.coerce, <3 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  109. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  110. %2 = shufflevector <3 x i8> %val, <3 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
  111. %3 = bitcast i8* %1 to <4 x i8>*
  112. store <4 x i8> %2, <4 x i8>* %3, align 4, !tbaa !27
  113. ret void
  114. }
  115. define <3 x i8> @rsGetElementAtImpl_uchar3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  116. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  117. %2 = bitcast i8* %1 to <4 x i8>*
  118. %3 = load <4 x i8>, <4 x i8>* %2, align 4, !tbaa !27
  119. %4 = shufflevector <4 x i8> %3, <4 x i8> undef, <3 x i32> <i32 0, i32 1, i32 2>
  120. ret <3 x i8> %4
  121. }
  122. !28 = !{!"uchar4", !15}
  123. define void @rsSetElementAtImpl_uchar4([1 x i32] %a.coerce, <4 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  124. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  125. %2 = bitcast i8* %1 to <4 x i8>*
  126. store <4 x i8> %val, <4 x i8>* %2, align 4, !tbaa !28
  127. ret void
  128. }
  129. define <4 x i8> @rsGetElementAtImpl_uchar4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  130. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  131. %2 = bitcast i8* %1 to <4 x i8>*
  132. %3 = load <4 x i8>, <4 x i8>* %2, align 4, !tbaa !28
  133. ret <4 x i8> %3
  134. }
  135. !29 = !{!"short", !15}
  136. define void @rsSetElementAtImpl_short([1 x i32] %a.coerce, i16 signext %val, i32 %x, i32 %y, i32 %z) #1 {
  137. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 2, i32 %x, i32 %y, i32 %z) #2
  138. %2 = bitcast i8* %1 to i16*
  139. store i16 %val, i16* %2, align 2, !tbaa !29
  140. ret void
  141. }
  142. define signext i16 @rsGetElementAtImpl_short([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  143. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 2, i32 %x, i32 %y, i32 %z) #2
  144. %2 = bitcast i8* %1 to i16*
  145. %3 = load i16, i16* %2, align 2, !tbaa !29
  146. ret i16 %3
  147. }
  148. !30 = !{!"short2", !15}
  149. define void @rsSetElementAtImpl_short2([1 x i32] %a.coerce, <2 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  150. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  151. %2 = bitcast i8* %1 to <2 x i16>*
  152. store <2 x i16> %val, <2 x i16>* %2, align 4, !tbaa !30
  153. ret void
  154. }
  155. define <2 x i16> @rsGetElementAtImpl_short2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  156. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  157. %2 = bitcast i8* %1 to <2 x i16>*
  158. %3 = load <2 x i16>, <2 x i16>* %2, align 4, !tbaa !30
  159. ret <2 x i16> %3
  160. }
  161. !31 = !{!"short3", !15}
  162. define void @rsSetElementAtImpl_short3([1 x i32] %a.coerce, <3 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  163. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  164. %2 = shufflevector <3 x i16> %val, <3 x i16> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
  165. %3 = bitcast i8* %1 to <4 x i16>*
  166. store <4 x i16> %2, <4 x i16>* %3, align 8, !tbaa !31
  167. ret void
  168. }
  169. define <3 x i16> @rsGetElementAtImpl_short3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  170. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  171. %2 = bitcast i8* %1 to <4 x i16>*
  172. %3 = load <4 x i16>, <4 x i16>* %2, align 8, !tbaa !31
  173. %4 = shufflevector <4 x i16> %3, <4 x i16> undef, <3 x i32> <i32 0, i32 1, i32 2>
  174. ret <3 x i16> %4
  175. }
  176. !32 = !{!"short4", !15}
  177. define void @rsSetElementAtImpl_short4([1 x i32] %a.coerce, <4 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  178. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  179. %2 = bitcast i8* %1 to <4 x i16>*
  180. store <4 x i16> %val, <4 x i16>* %2, align 8, !tbaa !32
  181. ret void
  182. }
  183. define <4 x i16> @rsGetElementAtImpl_short4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  184. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  185. %2 = bitcast i8* %1 to <4 x i16>*
  186. %3 = load <4 x i16>, <4 x i16>* %2, align 8, !tbaa !32
  187. ret <4 x i16> %3
  188. }
  189. !33 = !{!"ushort", !15}
  190. define void @rsSetElementAtImpl_ushort([1 x i32] %a.coerce, i16 zeroext %val, i32 %x, i32 %y, i32 %z) #1 {
  191. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 2, i32 %x, i32 %y, i32 %z) #2
  192. %2 = bitcast i8* %1 to i16*
  193. store i16 %val, i16* %2, align 2, !tbaa !33
  194. ret void
  195. }
  196. define zeroext i16 @rsGetElementAtImpl_ushort([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  197. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 2, i32 %x, i32 %y, i32 %z) #2
  198. %2 = bitcast i8* %1 to i16*
  199. %3 = load i16, i16* %2, align 2, !tbaa !33
  200. ret i16 %3
  201. }
  202. !34 = !{!"ushort2", !15}
  203. define void @rsSetElementAtImpl_ushort2([1 x i32] %a.coerce, <2 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  204. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  205. %2 = bitcast i8* %1 to <2 x i16>*
  206. store <2 x i16> %val, <2 x i16>* %2, align 4, !tbaa !34
  207. ret void
  208. }
  209. define <2 x i16> @rsGetElementAtImpl_ushort2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  210. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  211. %2 = bitcast i8* %1 to <2 x i16>*
  212. %3 = load <2 x i16>, <2 x i16>* %2, align 4, !tbaa !34
  213. ret <2 x i16> %3
  214. }
  215. !35 = !{!"ushort3", !15}
  216. define void @rsSetElementAtImpl_ushort3([1 x i32] %a.coerce, <3 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  217. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  218. %2 = shufflevector <3 x i16> %val, <3 x i16> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
  219. %3 = bitcast i8* %1 to <4 x i16>*
  220. store <4 x i16> %2, <4 x i16>* %3, align 8, !tbaa !35
  221. ret void
  222. }
  223. define <3 x i16> @rsGetElementAtImpl_ushort3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  224. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  225. %2 = bitcast i8* %1 to <4 x i16>*
  226. %3 = load <4 x i16>, <4 x i16>* %2, align 8, !tbaa !35
  227. %4 = shufflevector <4 x i16> %3, <4 x i16> undef, <3 x i32> <i32 0, i32 1, i32 2>
  228. ret <3 x i16> %4
  229. }
  230. !36 = !{!"ushort4", !15}
  231. define void @rsSetElementAtImpl_ushort4([1 x i32] %a.coerce, <4 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  232. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  233. %2 = bitcast i8* %1 to <4 x i16>*
  234. store <4 x i16> %val, <4 x i16>* %2, align 8, !tbaa !36
  235. ret void
  236. }
  237. define <4 x i16> @rsGetElementAtImpl_ushort4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  238. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  239. %2 = bitcast i8* %1 to <4 x i16>*
  240. %3 = load <4 x i16>, <4 x i16>* %2, align 8, !tbaa !36
  241. ret <4 x i16> %3
  242. }
  243. !37 = !{!"int", !15}
  244. define void @rsSetElementAtImpl_int([1 x i32] %a.coerce, i32 %val, i32 %x, i32 %y, i32 %z) #1 {
  245. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  246. %2 = bitcast i8* %1 to i32*
  247. store i32 %val, i32* %2, align 4, !tbaa !37
  248. ret void
  249. }
  250. define i32 @rsGetElementAtImpl_int([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  251. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  252. %2 = bitcast i8* %1 to i32*
  253. %3 = load i32, i32* %2, align 4, !tbaa !37
  254. ret i32 %3
  255. }
  256. !38 = !{!"int2", !15}
  257. define void @rsSetElementAtImpl_int2([1 x i32] %a.coerce, <2 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  258. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  259. %2 = bitcast i8* %1 to <2 x i32>*
  260. store <2 x i32> %val, <2 x i32>* %2, align 8, !tbaa !38
  261. ret void
  262. }
  263. define <2 x i32> @rsGetElementAtImpl_int2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  264. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  265. %2 = bitcast i8* %1 to <2 x i32>*
  266. %3 = load <2 x i32>, <2 x i32>* %2, align 8, !tbaa !38
  267. ret <2 x i32> %3
  268. }
  269. !39 = !{!"int3", !15}
  270. define void @rsSetElementAtImpl_int3([1 x i32] %a.coerce, <3 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  271. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  272. %2 = shufflevector <3 x i32> %val, <3 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
  273. %3 = bitcast i8* %1 to <4 x i32>*
  274. store <4 x i32> %2, <4 x i32>* %3, align 16, !tbaa !39
  275. ret void
  276. }
  277. define <3 x i32> @rsGetElementAtImpl_int3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  278. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  279. %2 = bitcast i8* %1 to <4 x i32>*
  280. %3 = load <4 x i32>, <4 x i32>* %2, align 8, !tbaa !39
  281. %4 = shufflevector <4 x i32> %3, <4 x i32> undef, <3 x i32> <i32 0, i32 1, i32 2>
  282. ret <3 x i32> %4
  283. }
  284. !40 = !{!"int4", !15}
  285. define void @rsSetElementAtImpl_int4([1 x i32] %a.coerce, <4 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  286. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  287. %2 = bitcast i8* %1 to <4 x i32>*
  288. store <4 x i32> %val, <4 x i32>* %2, align 16, !tbaa !40
  289. ret void
  290. }
  291. define <4 x i32> @rsGetElementAtImpl_int4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  292. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  293. %2 = bitcast i8* %1 to <4 x i32>*
  294. %3 = load <4 x i32>, <4 x i32>* %2, align 16, !tbaa !40
  295. ret <4 x i32> %3
  296. }
  297. !41 = !{!"uint", !15}
  298. define void @rsSetElementAtImpl_uint([1 x i32] %a.coerce, i32 %val, i32 %x, i32 %y, i32 %z) #1 {
  299. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  300. %2 = bitcast i8* %1 to i32*
  301. store i32 %val, i32* %2, align 4, !tbaa !41
  302. ret void
  303. }
  304. define i32 @rsGetElementAtImpl_uint([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  305. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  306. %2 = bitcast i8* %1 to i32*
  307. %3 = load i32, i32* %2, align 4, !tbaa !41
  308. ret i32 %3
  309. }
  310. !42 = !{!"uint2", !15}
  311. define void @rsSetElementAtImpl_uint2([1 x i32] %a.coerce, <2 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  312. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  313. %2 = bitcast i8* %1 to <2 x i32>*
  314. store <2 x i32> %val, <2 x i32>* %2, align 8, !tbaa !42
  315. ret void
  316. }
  317. define <2 x i32> @rsGetElementAtImpl_uint2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  318. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  319. %2 = bitcast i8* %1 to <2 x i32>*
  320. %3 = load <2 x i32>, <2 x i32>* %2, align 8, !tbaa !42
  321. ret <2 x i32> %3
  322. }
  323. !43 = !{!"uint3", !15}
  324. define void @rsSetElementAtImpl_uint3([1 x i32] %a.coerce, <3 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  325. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  326. %2 = shufflevector <3 x i32> %val, <3 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
  327. %3 = bitcast i8* %1 to <4 x i32>*
  328. store <4 x i32> %2, <4 x i32>* %3, align 16, !tbaa !43
  329. ret void
  330. }
  331. define <3 x i32> @rsGetElementAtImpl_uint3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  332. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  333. %2 = bitcast i8* %1 to <4 x i32>*
  334. %3 = load <4 x i32>, <4 x i32>* %2, align 8, !tbaa !43
  335. %4 = shufflevector <4 x i32> %3, <4 x i32> undef, <3 x i32> <i32 0, i32 1, i32 2>
  336. ret <3 x i32> %4
  337. }
  338. !44 = !{!"uint4", !15}
  339. define void @rsSetElementAtImpl_uint4([1 x i32] %a.coerce, <4 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  340. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  341. %2 = bitcast i8* %1 to <4 x i32>*
  342. store <4 x i32> %val, <4 x i32>* %2, align 16, !tbaa !44
  343. ret void
  344. }
  345. define <4 x i32> @rsGetElementAtImpl_uint4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  346. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  347. %2 = bitcast i8* %1 to <4 x i32>*
  348. %3 = load <4 x i32>, <4 x i32>* %2, align 16, !tbaa !44
  349. ret <4 x i32> %3
  350. }
  351. !45 = !{!"long", !15}
  352. define void @rsSetElementAtImpl_long([1 x i32] %a.coerce, i64 %val, i32 %x, i32 %y, i32 %z) #1 {
  353. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  354. %2 = bitcast i8* %1 to i64*
  355. store i64 %val, i64* %2, align 8, !tbaa !45
  356. ret void
  357. }
  358. define i64 @rsGetElementAtImpl_long([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  359. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  360. %2 = bitcast i8* %1 to i64*
  361. %3 = load i64, i64* %2, align 8, !tbaa !45
  362. ret i64 %3
  363. }
  364. !46 = !{!"long2", !15}
  365. define void @rsSetElementAtImpl_long2([1 x i32] %a.coerce, <2 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  366. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  367. %2 = bitcast i8* %1 to <2 x i64>*
  368. store <2 x i64> %val, <2 x i64>* %2, align 16, !tbaa !46
  369. ret void
  370. }
  371. define <2 x i64> @rsGetElementAtImpl_long2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  372. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  373. %2 = bitcast i8* %1 to <2 x i64>*
  374. %3 = load <2 x i64>, <2 x i64>* %2, align 16, !tbaa !46
  375. ret <2 x i64> %3
  376. }
  377. !47 = !{!"long3", !15}
  378. define void @rsSetElementAtImpl_long3([1 x i32] %a.coerce, <3 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  379. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  380. %2 = shufflevector <3 x i64> %val, <3 x i64> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
  381. %3 = bitcast i8* %1 to <4 x i64>*
  382. store <4 x i64> %2, <4 x i64>* %3, align 32, !tbaa !47
  383. ret void
  384. }
  385. define void @rsGetElementAtImpl_long3(<3 x i64>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  386. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  387. %2 = bitcast i8* %1 to <4 x i64>*
  388. %3 = load <4 x i64>, <4 x i64>* %2, align 32
  389. %4 = bitcast <3 x i64>* %agg.result to <4 x i64>*
  390. store <4 x i64> %3, <4 x i64>* %4, align 32, !tbaa !47
  391. ret void
  392. }
  393. !48 = !{!"long4", !15}
  394. define void @rsSetElementAtImpl_long4([1 x i32] %a.coerce, <4 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  395. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  396. %2 = bitcast i8* %1 to <4 x i64>*
  397. store <4 x i64> %val, <4 x i64>* %2, align 32, !tbaa !48
  398. ret void
  399. }
  400. define void @rsGetElementAtImpl_long4(<4 x i64>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  401. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  402. %2 = bitcast i8* %1 to <4 x i64>*
  403. %3 = load <4 x i64>, <4 x i64>* %2, align 32, !tbaa !15
  404. store <4 x i64> %3, <4 x i64>* %agg.result, align 32, !tbaa !48
  405. ret void
  406. }
  407. !49 = !{!"ulong", !15}
  408. define void @rsSetElementAtImpl_ulong([1 x i32] %a.coerce, i64 %val, i32 %x, i32 %y, i32 %z) #1 {
  409. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  410. %2 = bitcast i8* %1 to i64*
  411. store i64 %val, i64* %2, align 8, !tbaa !49
  412. ret void
  413. }
  414. define i64 @rsGetElementAtImpl_ulong([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  415. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  416. %2 = bitcast i8* %1 to i64*
  417. %3 = load i64, i64* %2, align 8, !tbaa !49
  418. ret i64 %3
  419. }
  420. !50 = !{!"ulong2", !15}
  421. define void @rsSetElementAtImpl_ulong2([1 x i32] %a.coerce, <2 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  422. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  423. %2 = bitcast i8* %1 to <2 x i64>*
  424. store <2 x i64> %val, <2 x i64>* %2, align 16, !tbaa !50
  425. ret void
  426. }
  427. define <2 x i64> @rsGetElementAtImpl_ulong2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  428. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  429. %2 = bitcast i8* %1 to <2 x i64>*
  430. %3 = load <2 x i64>, <2 x i64>* %2, align 16, !tbaa !50
  431. ret <2 x i64> %3
  432. }
  433. !51 = !{!"ulong3", !15}
  434. define void @rsSetElementAtImpl_ulong3([1 x i32] %a.coerce, <3 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  435. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  436. %2 = shufflevector <3 x i64> %val, <3 x i64> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
  437. %3 = bitcast i8* %1 to <4 x i64>*
  438. store <4 x i64> %2, <4 x i64>* %3, align 32, !tbaa !51
  439. ret void
  440. }
  441. define void @rsGetElementAtImpl_ulong3(<3 x i64>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  442. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  443. %2 = bitcast i8* %1 to <4 x i64>*
  444. %3 = load <4 x i64>, <4 x i64>* %2, align 32
  445. %4 = bitcast <3 x i64>* %agg.result to <4 x i64>*
  446. store <4 x i64> %3, <4 x i64>* %4, align 32, !tbaa !51
  447. ret void
  448. }
  449. !52 = !{!"ulong4", !15}
  450. define void @rsSetElementAtImpl_ulong4([1 x i32] %a.coerce, <4 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  451. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  452. %2 = bitcast i8* %1 to <4 x i64>*
  453. store <4 x i64> %val, <4 x i64>* %2, align 32, !tbaa !52
  454. ret void
  455. }
  456. define void @rsGetElementAtImpl_ulong4(<4 x i64>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  457. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  458. %2 = bitcast i8* %1 to <4 x i64>*
  459. %3 = load <4 x i64>, <4 x i64>* %2, align 32, !tbaa !15
  460. store <4 x i64> %3, <4 x i64>* %agg.result, align 32, !tbaa !52
  461. ret void
  462. }
  463. !53 = !{!"float", !15}
  464. define void @rsSetElementAtImpl_float([1 x i32] %a.coerce, float %val, i32 %x, i32 %y, i32 %z) #1 {
  465. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  466. %2 = bitcast i8* %1 to float*
  467. store float %val, float* %2, align 4, !tbaa !53
  468. ret void
  469. }
  470. define float @rsGetElementAtImpl_float([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  471. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  472. %2 = bitcast i8* %1 to float*
  473. %3 = load float, float* %2, align 4, !tbaa !53
  474. ret float %3
  475. }
  476. !54 = !{!"float2", !15}
  477. define void @rsSetElementAtImpl_float2([1 x i32] %a.coerce, <2 x float> %val, i32 %x, i32 %y, i32 %z) #1 {
  478. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  479. %2 = bitcast i8* %1 to <2 x float>*
  480. store <2 x float> %val, <2 x float>* %2, align 8, !tbaa !54
  481. ret void
  482. }
  483. define <2 x float> @rsGetElementAtImpl_float2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  484. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  485. %2 = bitcast i8* %1 to <2 x float>*
  486. %3 = load <2 x float>, <2 x float>* %2, align 8, !tbaa !54
  487. ret <2 x float> %3
  488. }
  489. !55 = !{!"float3", !15}
  490. define void @rsSetElementAtImpl_float3([1 x i32] %a.coerce, <3 x float> %val, i32 %x, i32 %y, i32 %z) #1 {
  491. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  492. %2 = shufflevector <3 x float> %val, <3 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
  493. %3 = bitcast i8* %1 to <4 x float>*
  494. store <4 x float> %2, <4 x float>* %3, align 16, !tbaa !55
  495. ret void
  496. }
  497. define <3 x float> @rsGetElementAtImpl_float3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  498. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  499. %2 = bitcast i8* %1 to <4 x float>*
  500. %3 = load <4 x float>, <4 x float>* %2, align 8, !tbaa !55
  501. %4 = shufflevector <4 x float> %3, <4 x float> undef, <3 x i32> <i32 0, i32 1, i32 2>
  502. ret <3 x float> %4
  503. }
  504. !56 = !{!"float4", !15}
  505. define void @rsSetElementAtImpl_float4([1 x i32] %a.coerce, <4 x float> %val, i32 %x, i32 %y, i32 %z) #1 {
  506. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  507. %2 = bitcast i8* %1 to <4 x float>*
  508. store <4 x float> %val, <4 x float>* %2, align 16, !tbaa !56
  509. ret void
  510. }
  511. define <4 x float> @rsGetElementAtImpl_float4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  512. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  513. %2 = bitcast i8* %1 to <4 x float>*
  514. %3 = load <4 x float>, <4 x float>* %2, align 16, !tbaa !56
  515. ret <4 x float> %3
  516. }
  517. !57 = !{!"double", !15}
  518. define void @rsSetElementAtImpl_double([1 x i32] %a.coerce, double %val, i32 %x, i32 %y, i32 %z) #1 {
  519. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  520. %2 = bitcast i8* %1 to double*
  521. store double %val, double* %2, align 8, !tbaa !57
  522. ret void
  523. }
  524. define double @rsGetElementAtImpl_double([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  525. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  526. %2 = bitcast i8* %1 to double*
  527. %3 = load double, double* %2, align 8, !tbaa !57
  528. ret double %3
  529. }
  530. !58 = !{!"double2", !15}
  531. define void @rsSetElementAtImpl_double2([1 x i32] %a.coerce, <2 x double> %val, i32 %x, i32 %y, i32 %z) #1 {
  532. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  533. %2 = bitcast i8* %1 to <2 x double>*
  534. store <2 x double> %val, <2 x double>* %2, align 16, !tbaa !58
  535. ret void
  536. }
  537. define <2 x double> @rsGetElementAtImpl_double2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  538. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 16, i32 %x, i32 %y, i32 %z) #2
  539. %2 = bitcast i8* %1 to <2 x double>*
  540. %3 = load <2 x double>, <2 x double>* %2, align 16, !tbaa !58
  541. ret <2 x double> %3
  542. }
  543. !59 = !{!"double3", !15}
  544. define void @rsSetElementAtImpl_double3([1 x i32] %a.coerce, <3 x double> %val, i32 %x, i32 %y, i32 %z) #1 {
  545. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  546. %2 = shufflevector <3 x double> %val, <3 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
  547. %3 = bitcast i8* %1 to <4 x double>*
  548. store <4 x double> %2, <4 x double>* %3, align 32, !tbaa !59
  549. ret void
  550. }
  551. define void @rsGetElementAtImpl_double3(<3 x double>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  552. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  553. %2 = bitcast i8* %1 to <4 x double>*
  554. %3 = load <4 x double>, <4 x double>* %2, align 32
  555. %4 = bitcast <3 x double>* %agg.result to <4 x double>*
  556. store <4 x double> %3, <4 x double>* %4, align 32, !tbaa !59
  557. ret void
  558. }
  559. !60 = !{!"double4", !15}
  560. define void @rsSetElementAtImpl_double4([1 x i32] %a.coerce, <4 x double> %val, i32 %x, i32 %y, i32 %z) #1 {
  561. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  562. %2 = bitcast i8* %1 to <4 x double>*
  563. store <4 x double> %val, <4 x double>* %2, align 32, !tbaa !60
  564. ret void
  565. }
  566. define void @rsGetElementAtImpl_double4(<4 x double>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  567. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 32, i32 %x, i32 %y, i32 %z) #2
  568. %2 = bitcast i8* %1 to <4 x double>*
  569. %3 = load <4 x double>, <4 x double>* %2, align 32, !tbaa !15
  570. store <4 x double> %3, <4 x double>* %agg.result, align 32, !tbaa !60
  571. ret void
  572. }
  573. !61 = !{!"half", !15}
  574. define void @rsSetElementAtImpl_half([1 x i32] %a.coerce, half %val, i32 %x, i32 %y, i32 %z) #1 {
  575. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 2, i32 %x, i32 %y, i32 %z) #2
  576. %2 = bitcast i8* %1 to half*
  577. store half %val, half* %2, align 2, !tbaa !61
  578. ret void
  579. }
  580. define half @rsGetElementAtImpl_half([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  581. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 2, i32 %x, i32 %y, i32 %z) #2
  582. %2 = bitcast i8* %1 to half*
  583. %3 = load half, half* %2, align 2, !tbaa !61
  584. ret half %3
  585. }
  586. !62 = !{!"half2", !15}
  587. define void @rsSetElementAtImpl_half2([1 x i32] %a.coerce, <2 x half> %val, i32 %x, i32 %y, i32 %z) #1 {
  588. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  589. %2 = bitcast i8* %1 to <2 x half>*
  590. store <2 x half> %val, <2 x half>* %2, align 4, !tbaa !62
  591. ret void
  592. }
  593. define <2 x half> @rsGetElementAtImpl_half2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  594. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 4, i32 %x, i32 %y, i32 %z) #2
  595. %2 = bitcast i8* %1 to <2 x half>*
  596. %3 = load <2 x half>, <2 x half>* %2, align 4, !tbaa !62
  597. ret <2 x half> %3
  598. }
  599. !63 = !{!"half3", !15}
  600. define void @rsSetElementAtImpl_half3([1 x i32] %a.coerce, <3 x half> %val, i32 %x, i32 %y, i32 %z) #1 {
  601. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  602. %2 = shufflevector <3 x half> %val, <3 x half> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
  603. %3 = bitcast i8* %1 to <4 x half>*
  604. store <4 x half> %2, <4 x half>* %3, align 8, !tbaa !63
  605. ret void
  606. }
  607. define <3 x half> @rsGetElementAtImpl_half3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  608. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  609. %2 = bitcast i8* %1 to <4 x half>*
  610. %3 = load <4 x half>, <4 x half>* %2, align 8, !tbaa !63
  611. %4 = shufflevector <4 x half> %3, <4 x half> undef, <3 x i32> <i32 0, i32 1, i32 2>
  612. ret <3 x half> %4
  613. }
  614. !64 = !{!"half4", !15}
  615. define void @rsSetElementAtImpl_half4([1 x i32] %a.coerce, <4 x half> %val, i32 %x, i32 %y, i32 %z) #1 {
  616. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  617. %2 = bitcast i8* %1 to <4 x half>*
  618. store <4 x half> %val, <4 x half>* %2, align 8, !tbaa !64
  619. ret void
  620. }
  621. define <4 x half> @rsGetElementAtImpl_half4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  622. %1 = tail call i8* @rsOffset([1 x i32] %a.coerce, i32 8, i32 %x, i32 %y, i32 %z) #2
  623. %2 = bitcast i8* %1 to <4 x half>*
  624. %3 = load <4 x half>, <4 x half>* %2, align 8, !tbaa !64
  625. ret <4 x half> %3
  626. }
  627. define void @__rsAllocationVLoadXImpl_long4(<4 x i64>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  628. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  629. %2 = bitcast i8* %1 to <4 x i64>*
  630. %3 = load <4 x i64>, <4 x i64>* %2, align 8
  631. store <4 x i64> %3, <4 x i64>* %agg.result, align 32, !tbaa !52
  632. ret void
  633. }
  634. define void @__rsAllocationVLoadXImpl_long3(<3 x i64>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  635. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  636. %2 = bitcast i8* %1 to <4 x i64>*
  637. %3 = load <4 x i64>, <4 x i64>* %2, align 8
  638. %4 = bitcast <3 x i64>* %agg.result to <4 x i64>*
  639. store <4 x i64> %3, <4 x i64>* %4, align 32, !tbaa !47
  640. ret void
  641. }
  642. define <2 x i64> @__rsAllocationVLoadXImpl_long2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  643. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  644. %2 = bitcast i8* %1 to <2 x i64>*
  645. %3 = load <2 x i64>, <2 x i64>* %2, align 8
  646. ret <2 x i64> %3
  647. }
  648. define void @__rsAllocationVLoadXImpl_ulong4(<4 x i64>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  649. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  650. %2 = bitcast i8* %1 to <4 x i64>*
  651. %3 = load <4 x i64>, <4 x i64>* %2, align 8
  652. store <4 x i64> %3, <4 x i64>* %agg.result, align 32, !tbaa !48
  653. ret void
  654. }
  655. define void @__rsAllocationVLoadXImpl_ulong3(<3 x i64>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  656. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  657. %2 = bitcast i8* %1 to <4 x i64>*
  658. %3 = load <4 x i64>, <4 x i64>* %2, align 8
  659. %4 = bitcast <3 x i64>* %agg.result to <4 x i64>*
  660. store <4 x i64> %3, <4 x i64>* %4, align 32, !tbaa !51
  661. ret void
  662. }
  663. define <2 x i64> @__rsAllocationVLoadXImpl_ulong2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  664. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  665. %2 = bitcast i8* %1 to <2 x i64>*
  666. %3 = load <2 x i64>, <2 x i64>* %2, align 8
  667. ret <2 x i64> %3
  668. }
  669. define <4 x i32> @__rsAllocationVLoadXImpl_int4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  670. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  671. %2 = bitcast i8* %1 to <4 x i32>*
  672. %3 = load <4 x i32>, <4 x i32>* %2, align 4
  673. ret <4 x i32> %3
  674. }
  675. define <3 x i32> @__rsAllocationVLoadXImpl_int3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  676. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  677. %2 = bitcast i8* %1 to <3 x i32>*
  678. %3 = load <3 x i32>, <3 x i32>* %2, align 4
  679. ret <3 x i32> %3
  680. }
  681. define <2 x i32> @__rsAllocationVLoadXImpl_int2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  682. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  683. %2 = bitcast i8* %1 to <2 x i32>*
  684. %3 = load <2 x i32>, <2 x i32>* %2, align 4
  685. ret <2 x i32> %3
  686. }
  687. define <4 x i32> @__rsAllocationVLoadXImpl_uint4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  688. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  689. %2 = bitcast i8* %1 to <4 x i32>*
  690. %3 = load <4 x i32>, <4 x i32>* %2, align 4
  691. ret <4 x i32> %3
  692. }
  693. define <3 x i32> @__rsAllocationVLoadXImpl_uint3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  694. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  695. %2 = bitcast i8* %1 to <3 x i32>*
  696. %3 = load <3 x i32>, <3 x i32>* %2, align 4
  697. ret <3 x i32> %3
  698. }
  699. define <2 x i32> @__rsAllocationVLoadXImpl_uint2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  700. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  701. %2 = bitcast i8* %1 to <2 x i32>*
  702. %3 = load <2 x i32>, <2 x i32>* %2, align 4
  703. ret <2 x i32> %3
  704. }
  705. define <4 x i16> @__rsAllocationVLoadXImpl_short4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  706. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  707. %2 = bitcast i8* %1 to <4 x i16>*
  708. %3 = load <4 x i16>, <4 x i16>* %2, align 2
  709. ret <4 x i16> %3
  710. }
  711. define <3 x i16> @__rsAllocationVLoadXImpl_short3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  712. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  713. %2 = bitcast i8* %1 to <3 x i16>*
  714. %3 = load <3 x i16>, <3 x i16>* %2, align 2
  715. ret <3 x i16> %3
  716. }
  717. define <2 x i16> @__rsAllocationVLoadXImpl_short2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  718. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  719. %2 = bitcast i8* %1 to <2 x i16>*
  720. %3 = load <2 x i16>, <2 x i16>* %2, align 2
  721. ret <2 x i16> %3
  722. }
  723. define <4 x i16> @__rsAllocationVLoadXImpl_ushort4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  724. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  725. %2 = bitcast i8* %1 to <4 x i16>*
  726. %3 = load <4 x i16>, <4 x i16>* %2, align 2
  727. ret <4 x i16> %3
  728. }
  729. define <3 x i16> @__rsAllocationVLoadXImpl_ushort3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  730. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  731. %2 = bitcast i8* %1 to <3 x i16>*
  732. %3 = load <3 x i16>, <3 x i16>* %2, align 2
  733. ret <3 x i16> %3
  734. }
  735. define <2 x i16> @__rsAllocationVLoadXImpl_ushort2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  736. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  737. %2 = bitcast i8* %1 to <2 x i16>*
  738. %3 = load <2 x i16>, <2 x i16>* %2, align 2
  739. ret <2 x i16> %3
  740. }
  741. define <4 x i8> @__rsAllocationVLoadXImpl_char4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  742. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  743. %2 = bitcast i8* %1 to <4 x i8>*
  744. %3 = load <4 x i8>, <4 x i8>* %2, align 1
  745. ret <4 x i8> %3
  746. }
  747. define <3 x i8> @__rsAllocationVLoadXImpl_char3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  748. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  749. %2 = bitcast i8* %1 to <3 x i8>*
  750. %3 = load <3 x i8>, <3 x i8>* %2, align 1
  751. ret <3 x i8> %3
  752. }
  753. define <2 x i8> @__rsAllocationVLoadXImpl_char2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  754. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  755. %2 = bitcast i8* %1 to <2 x i8>*
  756. %3 = load <2 x i8>, <2 x i8>* %2, align 1
  757. ret <2 x i8> %3
  758. }
  759. define <4 x i8> @__rsAllocationVLoadXImpl_uchar4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  760. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  761. %2 = bitcast i8* %1 to <4 x i8>*
  762. %3 = load <4 x i8>, <4 x i8>* %2, align 1
  763. ret <4 x i8> %3
  764. }
  765. define <3 x i8> @__rsAllocationVLoadXImpl_uchar3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  766. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  767. %2 = bitcast i8* %1 to <3 x i8>*
  768. %3 = load <3 x i8>, <3 x i8>* %2, align 1
  769. ret <3 x i8> %3
  770. }
  771. define <2 x i8> @__rsAllocationVLoadXImpl_uchar2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  772. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  773. %2 = bitcast i8* %1 to <2 x i8>*
  774. %3 = load <2 x i8>, <2 x i8>* %2, align 1
  775. ret <2 x i8> %3
  776. }
  777. define <4 x float> @__rsAllocationVLoadXImpl_float4([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  778. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  779. %2 = bitcast i8* %1 to <4 x float>*
  780. %3 = load <4 x float>, <4 x float>* %2, align 4
  781. ret <4 x float> %3
  782. }
  783. define <3 x float> @__rsAllocationVLoadXImpl_float3([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  784. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  785. %2 = bitcast i8* %1 to <3 x float>*
  786. %3 = load <3 x float>, <3 x float>* %2, align 4
  787. ret <3 x float> %3
  788. }
  789. define <2 x float> @__rsAllocationVLoadXImpl_float2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  790. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  791. %2 = bitcast i8* %1 to <2 x float>*
  792. %3 = load <2 x float>, <2 x float>* %2, align 4
  793. ret <2 x float> %3
  794. }
  795. define void @__rsAllocationVLoadXImpl_double4(<4 x double>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  796. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  797. %2 = bitcast i8* %1 to <4 x double>*
  798. %3 = load <4 x double>, <4 x double>* %2, align 8
  799. store <4 x double> %3, <4 x double>* %agg.result, align 32, !tbaa !60
  800. ret void
  801. }
  802. define void @__rsAllocationVLoadXImpl_double3(<3 x double>* noalias nocapture sret %agg.result, [1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #1 {
  803. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  804. %2 = bitcast i8* %1 to <4 x double>*
  805. %3 = load <4 x double>, <4 x double>* %2, align 8
  806. %4 = bitcast <3 x double>* %agg.result to <4 x double>*
  807. store <4 x double> %3, <4 x double>* %4, align 32, !tbaa !59
  808. ret void
  809. }
  810. define <2 x double> @__rsAllocationVLoadXImpl_double2([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 {
  811. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  812. %2 = bitcast i8* %1 to <2 x double>*
  813. %3 = load <2 x double>, <2 x double>* %2, align 8
  814. ret <2 x double> %3
  815. }
  816. define void @__rsAllocationVStoreXImpl_long4([1 x i32] %a.coerce, <4 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  817. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  818. %2 = bitcast i8* %1 to <4 x i64>*
  819. store <4 x i64> %val, <4 x i64>* %2, align 8
  820. ret void
  821. }
  822. define void @__rsAllocationVStoreXImpl_long3([1 x i32] %a.coerce, <3 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  823. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  824. %2 = bitcast i8* %1 to <3 x i64>*
  825. store <3 x i64> %val, <3 x i64>* %2, align 8
  826. ret void
  827. }
  828. define void @__rsAllocationVStoreXImpl_long2([1 x i32] %a.coerce, <2 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  829. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  830. %2 = bitcast i8* %1 to <2 x i64>*
  831. store <2 x i64> %val, <2 x i64>* %2, align 8
  832. ret void
  833. }
  834. define void @__rsAllocationVStoreXImpl_ulong4([1 x i32] %a.coerce, <4 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  835. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  836. %2 = bitcast i8* %1 to <4 x i64>*
  837. store <4 x i64> %val, <4 x i64>* %2, align 8
  838. ret void
  839. }
  840. define void @__rsAllocationVStoreXImpl_ulong3([1 x i32] %a.coerce, <3 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  841. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  842. %2 = bitcast i8* %1 to <3 x i64>*
  843. store <3 x i64> %val, <3 x i64>* %2, align 8
  844. ret void
  845. }
  846. define void @__rsAllocationVStoreXImpl_ulong2([1 x i32] %a.coerce, <2 x i64> %val, i32 %x, i32 %y, i32 %z) #1 {
  847. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  848. %2 = bitcast i8* %1 to <2 x i64>*
  849. store <2 x i64> %val, <2 x i64>* %2, align 8
  850. ret void
  851. }
  852. define void @__rsAllocationVStoreXImpl_int4([1 x i32] %a.coerce, <4 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  853. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  854. %2 = bitcast i8* %1 to <4 x i32>*
  855. store <4 x i32> %val, <4 x i32>* %2, align 4
  856. ret void
  857. }
  858. define void @__rsAllocationVStoreXImpl_int3([1 x i32] %a.coerce, <3 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  859. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  860. %2 = bitcast i8* %1 to <3 x i32>*
  861. store <3 x i32> %val, <3 x i32>* %2, align 4
  862. ret void
  863. }
  864. define void @__rsAllocationVStoreXImpl_int2([1 x i32] %a.coerce, <2 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  865. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  866. %2 = bitcast i8* %1 to <2 x i32>*
  867. store <2 x i32> %val, <2 x i32>* %2, align 4
  868. ret void
  869. }
  870. define void @__rsAllocationVStoreXImpl_uint4([1 x i32] %a.coerce, <4 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  871. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  872. %2 = bitcast i8* %1 to <4 x i32>*
  873. store <4 x i32> %val, <4 x i32>* %2, align 4
  874. ret void
  875. }
  876. define void @__rsAllocationVStoreXImpl_uint3([1 x i32] %a.coerce, <3 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  877. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  878. %2 = bitcast i8* %1 to <3 x i32>*
  879. store <3 x i32> %val, <3 x i32>* %2, align 4
  880. ret void
  881. }
  882. define void @__rsAllocationVStoreXImpl_uint2([1 x i32] %a.coerce, <2 x i32> %val, i32 %x, i32 %y, i32 %z) #1 {
  883. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  884. %2 = bitcast i8* %1 to <2 x i32>*
  885. store <2 x i32> %val, <2 x i32>* %2, align 4
  886. ret void
  887. }
  888. define void @__rsAllocationVStoreXImpl_short4([1 x i32] %a.coerce, <4 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  889. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  890. %2 = bitcast i8* %1 to <4 x i16>*
  891. store <4 x i16> %val, <4 x i16>* %2, align 2
  892. ret void
  893. }
  894. define void @__rsAllocationVStoreXImpl_short3([1 x i32] %a.coerce, <3 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  895. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  896. %2 = bitcast i8* %1 to <3 x i16>*
  897. store <3 x i16> %val, <3 x i16>* %2, align 2
  898. ret void
  899. }
  900. define void @__rsAllocationVStoreXImpl_short2([1 x i32] %a.coerce, <2 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  901. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  902. %2 = bitcast i8* %1 to <2 x i16>*
  903. store <2 x i16> %val, <2 x i16>* %2, align 2
  904. ret void
  905. }
  906. define void @__rsAllocationVStoreXImpl_ushort4([1 x i32] %a.coerce, <4 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  907. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  908. %2 = bitcast i8* %1 to <4 x i16>*
  909. store <4 x i16> %val, <4 x i16>* %2, align 2
  910. ret void
  911. }
  912. define void @__rsAllocationVStoreXImpl_ushort3([1 x i32] %a.coerce, <3 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  913. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  914. %2 = bitcast i8* %1 to <3 x i16>*
  915. store <3 x i16> %val, <3 x i16>* %2, align 2
  916. ret void
  917. }
  918. define void @__rsAllocationVStoreXImpl_ushort2([1 x i32] %a.coerce, <2 x i16> %val, i32 %x, i32 %y, i32 %z) #1 {
  919. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  920. %2 = bitcast i8* %1 to <2 x i16>*
  921. store <2 x i16> %val, <2 x i16>* %2, align 2
  922. ret void
  923. }
  924. define void @__rsAllocationVStoreXImpl_char4([1 x i32] %a.coerce, <4 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  925. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  926. %2 = bitcast i8* %1 to <4 x i8>*
  927. store <4 x i8> %val, <4 x i8>* %2, align 1
  928. ret void
  929. }
  930. define void @__rsAllocationVStoreXImpl_char3([1 x i32] %a.coerce, <3 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  931. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  932. %2 = bitcast i8* %1 to <3 x i8>*
  933. store <3 x i8> %val, <3 x i8>* %2, align 1
  934. ret void
  935. }
  936. define void @__rsAllocationVStoreXImpl_char2([1 x i32] %a.coerce, <2 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  937. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  938. %2 = bitcast i8* %1 to <2 x i8>*
  939. store <2 x i8> %val, <2 x i8>* %2, align 1
  940. ret void
  941. }
  942. define void @__rsAllocationVStoreXImpl_uchar4([1 x i32] %a.coerce, <4 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  943. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  944. %2 = bitcast i8* %1 to <4 x i8>*
  945. store <4 x i8> %val, <4 x i8>* %2, align 1
  946. ret void
  947. }
  948. define void @__rsAllocationVStoreXImpl_uchar3([1 x i32] %a.coerce, <3 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  949. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  950. %2 = bitcast i8* %1 to <3 x i8>*
  951. store <3 x i8> %val, <3 x i8>* %2, align 1
  952. ret void
  953. }
  954. define void @__rsAllocationVStoreXImpl_uchar2([1 x i32] %a.coerce, <2 x i8> %val, i32 %x, i32 %y, i32 %z) #1 {
  955. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  956. %2 = bitcast i8* %1 to <2 x i8>*
  957. store <2 x i8> %val, <2 x i8>* %2, align 1
  958. ret void
  959. }
  960. define void @__rsAllocationVStoreXImpl_float4([1 x i32] %a.coerce, <4 x float> %val, i32 %x, i32 %y, i32 %z) #1 {
  961. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  962. %2 = bitcast i8* %1 to <4 x float>*
  963. store <4 x float> %val, <4 x float>* %2, align 4
  964. ret void
  965. }
  966. define void @__rsAllocationVStoreXImpl_float3([1 x i32] %a.coerce, <3 x float> %val, i32 %x, i32 %y, i32 %z) #1 {
  967. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  968. %2 = bitcast i8* %1 to <3 x float>*
  969. store <3 x float> %val, <3 x float>* %2, align 4
  970. ret void
  971. }
  972. define void @__rsAllocationVStoreXImpl_float2([1 x i32] %a.coerce, <2 x float> %val, i32 %x, i32 %y, i32 %z) #1 {
  973. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  974. %2 = bitcast i8* %1 to <2 x float>*
  975. store <2 x float> %val, <2 x float>* %2, align 4
  976. ret void
  977. }
  978. define void @__rsAllocationVStoreXImpl_double4([1 x i32] %a.coerce, <4 x double> %val, i32 %x, i32 %y, i32 %z) #1 {
  979. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  980. %2 = bitcast i8* %1 to <4 x double>*
  981. store <4 x double> %val, <4 x double>* %2, align 8
  982. ret void
  983. }
  984. define void @__rsAllocationVStoreXImpl_double3([1 x i32] %a.coerce, <3 x double> %val, i32 %x, i32 %y, i32 %z) #1 {
  985. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  986. %2 = bitcast i8* %1 to <3 x double>*
  987. store <3 x double> %val, <3 x double>* %2, align 8
  988. ret void
  989. }
  990. define void @__rsAllocationVStoreXImpl_double2([1 x i32] %a.coerce, <2 x double> %val, i32 %x, i32 %y, i32 %z) #1 {
  991. %1 = tail call i8* @rsOffsetNs([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #2
  992. %2 = bitcast i8* %1 to <2 x double>*
  993. store <2 x double> %val, <2 x double>* %2, align 8
  994. ret void
  995. }
  996. attributes #0 = { nounwind readonly "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
  997. attributes #1 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
  998. attributes #2 = { nobuiltin }