phibug.ref 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. ; ModuleID = 'dxil_cleanup\phibug.ll'
  2. %dx.types.Handle = type { i8* }
  3. %dx.types.ResRet.i32 = type { i32, i32, i32, i32, i32 }
  4. %dx.types.CBufRet.f32 = type { float, float, float, float }
  5. %dx.types.ResRet.f32 = type { float, float, float, float, i32 }
  6. %dx.types.f32 = type { float }
  7. %dx.types.i8x48 = type { [48 x i8] }
  8. %dx.types.i8x4 = type { [4 x i8] }
  9. %dx.types.i8x16 = type { [16 x i8] }
  10. %dx.types.i8x32 = type { [32 x i8] }
  11. @TGSM0 = internal addrspace(3) global [2048 x i8] undef, align 4
  12. @llvm.used = appending global [1 x i8*] [i8* addrspacecast (i8 addrspace(3)* getelementptr inbounds ([2048 x i8], [2048 x i8] addrspace(3)* @TGSM0, i32 0, i32 0) to i8*)], section "llvm.metadata"
  13. define void @main() {
  14. entry:
  15. %0 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 0, i32 0, i1 false)
  16. %1 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 1, i32 1, i1 false)
  17. %2 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 1, i32 0, i32 0, i1 false)
  18. %3 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 0, i32 0, i1 false)
  19. %4 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 1, i32 1, i1 false)
  20. %5 = call i32 @dx.op.groupId.i32(i32 94, i32 0)
  21. %6 = call i32 @dx.op.threadIdInGroup.i32(i32 95, i32 0)
  22. %7 = call i32 @dx.op.tertiary.i32(i32 48, i32 %5, i32 64, i32 %6)
  23. %8 = call %dx.types.ResRet.i32 @dx.op.bufferLoad.i32(i32 68, %dx.types.Handle %1, i32 %7, i32 0)
  24. %9 = extractvalue %dx.types.ResRet.i32 %8, 0
  25. %10 = call float @dx.op.bitcastI32toF32(i32 126, i32 %9)
  26. %11 = extractvalue %dx.types.ResRet.i32 %8, 1
  27. %12 = call float @dx.op.bitcastI32toF32(i32 126, i32 %11)
  28. %13 = extractvalue %dx.types.ResRet.i32 %8, 2
  29. %14 = call float @dx.op.bitcastI32toF32(i32 126, i32 %13)
  30. %15 = extractvalue %dx.types.ResRet.i32 %8, 3
  31. %16 = call float @dx.op.bitcastI32toF32(i32 126, i32 %15)
  32. %17 = call %dx.types.ResRet.i32 @dx.op.bufferLoad.i32(i32 68, %dx.types.Handle %1, i32 %7, i32 16)
  33. %18 = extractvalue %dx.types.ResRet.i32 %17, 0
  34. %19 = extractvalue %dx.types.ResRet.i32 %17, 1
  35. %20 = extractvalue %dx.types.ResRet.i32 %17, 2
  36. %21 = extractvalue %dx.types.ResRet.i32 %17, 3
  37. %22 = icmp slt i32 %18, 18
  38. %23 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 0)
  39. %24 = extractvalue %dx.types.CBufRet.f32 %23, 0
  40. %25 = extractvalue %dx.types.CBufRet.f32 %23, 1
  41. %26 = fmul fast float %14, %24
  42. %27 = fmul fast float %16, %25
  43. %28 = call float @dx.op.dot2.f32(i32 54, float %26, float %27, float %26, float %27)
  44. %29 = call float @dx.op.unary.f32(i32 25, float %28)
  45. %30 = fmul fast float %29, %26
  46. %31 = fmul fast float %29, %27
  47. %32 = select i1 %22, i32 128, i32 -128
  48. %33 = select i1 %22, i32 0, i32 1
  49. %34 = select i1 %22, i32 -128, i32 128
  50. %35 = call i32 @dx.op.quaternary.i32(i32 53, i32 31, i32 1, i32 %21, i32 %33)
  51. %36 = icmp sge i32 0, %20
  52. br i1 %36, label %if0.then, label %if0.end
  53. if0.then: ; preds = %entry
  54. call void @dx.op.bufferStore.i32(i32 69, %dx.types.Handle %2, i32 %35, i32 0, i32 -1140821790, i32 undef, i32 undef, i32 undef, i8 1)
  55. %37 = add i32 %32, %35
  56. br label %if0.end
  57. if0.end: ; preds = %if0.then, %entry
  58. %dx.v32.r0.0 = phi i32 [ %37, %if0.then ], [ %35, %entry ]
  59. %38 = call float @dx.op.tertiary.f32(i32 46, float %10, float 1.000000e+00, float 0.000000e+00)
  60. %39 = call float @dx.op.tertiary.f32(i32 46, float %12, float -1.000000e+00, float 1.000000e+00)
  61. %40 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 0)
  62. %41 = extractvalue %dx.types.CBufRet.f32 %40, 0
  63. %42 = extractvalue %dx.types.CBufRet.f32 %40, 1
  64. %43 = fmul fast float %38, %41
  65. %44 = fmul fast float %39, %42
  66. %45 = fptosi float %43 to i32
  67. %46 = fptosi float %44 to i32
  68. %47 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 0)
  69. %48 = extractvalue %dx.types.CBufRet.f32 %47, 0
  70. %49 = extractvalue %dx.types.CBufRet.f32 %47, 1
  71. %50 = fptosi float %48 to i32
  72. %51 = fptosi float %49 to i32
  73. %52 = add i32 %50, -1
  74. %53 = add i32 %51, -1
  75. %54 = call i32 @dx.op.binary.i32(i32 37, i32 %45, i32 0)
  76. %55 = call i32 @dx.op.binary.i32(i32 37, i32 %46, i32 0)
  77. %56 = call i32 @dx.op.binary.i32(i32 38, i32 %52, i32 %54)
  78. %57 = call i32 @dx.op.binary.i32(i32 38, i32 %53, i32 %55)
  79. %58 = call %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32 66, %dx.types.Handle %0, i32 0, i32 %56, i32 %57, i32 undef, i32 0, i32 0, i32 undef)
  80. %59 = extractvalue %dx.types.ResRet.f32 %58, 0
  81. %60 = uitofp i32 %56 to float
  82. %61 = uitofp i32 %57 to float
  83. %62 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  84. %63 = extractvalue %dx.types.CBufRet.f32 %62, 2
  85. %64 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 1)
  86. %65 = extractvalue %dx.types.CBufRet.f32 %64, 0
  87. %66 = call float @dx.op.tertiary.f32(i32 46, float %63, float %60, float %65)
  88. %67 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  89. %68 = extractvalue %dx.types.CBufRet.f32 %67, 3
  90. %69 = fsub fast float -0.000000e+00, %68
  91. %70 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 1)
  92. %71 = extractvalue %dx.types.CBufRet.f32 %70, 1
  93. %72 = fsub fast float -0.000000e+00, %71
  94. %73 = call float @dx.op.tertiary.f32(i32 46, float %69, float %61, float %72)
  95. %74 = fmul fast float %59, %66
  96. %75 = fmul fast float %59, %73
  97. %76 = fsub fast float -0.000000e+00, %31
  98. %77 = fsub fast float -0.000000e+00, %75
  99. %78 = call float @dx.op.dot2.f32(i32 54, float %30, float %76, float %74, float %77)
  100. %79 = call i32 @dx.op.bitcastF32toI32(i32 127, float %78)
  101. %80 = fadd fast float %14, %10
  102. %81 = fadd fast float %16, %12
  103. %82 = add i32 %20, -1
  104. %83 = add i32 %19, -2
  105. %84 = icmp sge i32 0, %82
  106. br i1 %84, label %if1.then, label %if1.end
  107. if1.then: ; preds = %if0.end
  108. %85 = call float @dx.op.binary.f32(i32 35, float %78, float -6.550400e+04)
  109. %86 = call float @dx.op.binary.f32(i32 35, float %59, float -6.550400e+04)
  110. %87 = call float @dx.op.binary.f32(i32 36, float %85, float 6.550400e+04)
  111. %88 = call float @dx.op.binary.f32(i32 36, float %86, float 6.550400e+04)
  112. %89 = call i32 @dx.op.legacyF32ToF16(i32 130, float %87)
  113. %90 = call i32 @dx.op.legacyF32ToF16(i32 130, float %88)
  114. %91 = call i32 @dx.op.tertiary.i32(i32 48, i32 %90, i32 65536, i32 %89)
  115. call void @dx.op.bufferStore.i32(i32 69, %dx.types.Handle %2, i32 %dx.v32.r0.0, i32 0, i32 %91, i32 undef, i32 undef, i32 undef, i8 1)
  116. %92 = add i32 %32, %dx.v32.r0.0
  117. br label %if1.end
  118. if1.end: ; preds = %if1.then, %if0.end
  119. %dx.v32.r0.1 = phi i32 [ %92, %if1.then ], [ %dx.v32.r0.0, %if0.end ]
  120. %93 = add i32 %34, %dx.v32.r0.1
  121. %94 = fsub fast float -0.000000e+00, %81
  122. %95 = fadd fast float %94, 1.000000e+00
  123. %96 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 0)
  124. %97 = extractvalue %dx.types.CBufRet.f32 %96, 0
  125. %98 = extractvalue %dx.types.CBufRet.f32 %96, 1
  126. %99 = fmul fast float %80, %97
  127. %100 = fmul fast float %95, %98
  128. %101 = fptosi float %99 to i32
  129. %102 = fptosi float %100 to i32
  130. %103 = call i32 @dx.op.binary.i32(i32 37, i32 %101, i32 0)
  131. %104 = call i32 @dx.op.binary.i32(i32 37, i32 %102, i32 0)
  132. %105 = call i32 @dx.op.binary.i32(i32 38, i32 %52, i32 %103)
  133. %106 = call i32 @dx.op.binary.i32(i32 38, i32 %53, i32 %104)
  134. %107 = call %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32 66, %dx.types.Handle %0, i32 0, i32 %105, i32 %106, i32 undef, i32 0, i32 0, i32 undef)
  135. %108 = extractvalue %dx.types.ResRet.f32 %107, 0
  136. %109 = call i32 @dx.op.bitcastF32toI32(i32 127, float %108)
  137. %110 = uitofp i32 %105 to float
  138. %111 = uitofp i32 %106 to float
  139. %112 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  140. %113 = extractvalue %dx.types.CBufRet.f32 %112, 2
  141. %114 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 1)
  142. %115 = extractvalue %dx.types.CBufRet.f32 %114, 0
  143. %116 = call float @dx.op.tertiary.f32(i32 46, float %113, float %110, float %115)
  144. %117 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  145. %118 = extractvalue %dx.types.CBufRet.f32 %117, 3
  146. %119 = fsub fast float -0.000000e+00, %118
  147. %120 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 1)
  148. %121 = extractvalue %dx.types.CBufRet.f32 %120, 1
  149. %122 = fsub fast float -0.000000e+00, %121
  150. %123 = call float @dx.op.tertiary.f32(i32 46, float %119, float %111, float %122)
  151. %124 = fmul fast float %108, %116
  152. %125 = fmul fast float %108, %123
  153. %126 = fsub fast float -0.000000e+00, %125
  154. %127 = call float @dx.op.dot2.f32(i32 54, float %30, float %76, float %124, float %126)
  155. %128 = call i32 @dx.op.bitcastF32toI32(i32 127, float %127)
  156. %129 = fadd fast float %14, %80
  157. %130 = fadd fast float %16, %81
  158. %131 = call i32 @dx.op.threadIdInGroup.i32(i32 95, i32 0)
  159. %132 = shl i32 %131, 2
  160. %133 = call i32 @dx.op.bitcastF32toI32(i32 127, float %59)
  161. %134 = call float @dx.op.bitcastI32toF32(i32 126, i32 -1082130432)
  162. br label %loop0
  163. loop0: ; preds = %if3.end, %if1.end
  164. %dx.v32.r14.0 = phi i32 [ %93, %if1.end ], [ %230, %if3.end ]
  165. %dx.v32.r18.0 = phi float [ %129, %if1.end ], [ %227, %if3.end ]
  166. %dx.v32.r19.0 = phi float [ %130, %if1.end ], [ %228, %if3.end ]
  167. %dx.v32.r28.0 = phi i32 [ %128, %if1.end ], [ %211, %if3.end ]
  168. %dx.v32.r29.0 = phi i32 [ %109, %if1.end ], [ %213, %if3.end ]
  169. %dx.v32.r29.01 = phi float [ %108, %if1.end ], [ %385, %if3.end ]
  170. %dx.v32.r32.0 = phi i32 [ %79, %if1.end ], [ %dx.v32.r32.1, %if3.end ]
  171. %dx.v32.r33.0 = phi i32 [ %133, %if1.end ], [ %dx.v32.r33.1, %if3.end ]
  172. %dx.v32.r33.03 = phi float [ %59, %if1.end ], [ %dx.v32.r33.12, %if3.end ]
  173. %dx.v32.r30.0 = phi i32 [ 1176256512, %if1.end ], [ %dx.v32.r30.1, %if3.end ]
  174. %dx.v32.r31.0 = phi i32 [ -1082130432, %if1.end ], [ %dx.v32.r31.1, %if3.end ]
  175. %dx.v32.r31.05 = phi float [ %134, %if1.end ], [ %dx.v32.r31.14, %if3.end ]
  176. %dx.v32.r11.0 = phi i32 [ %83, %if1.end ], [ %229, %if3.end ]
  177. %dx.v32.r34.0 = phi i32 [ 1, %if1.end ], [ %369, %if3.end ]
  178. %135 = icmp sge i32 0, %dx.v32.r11.0
  179. br i1 %135, label %loop0.end, label %loop0.breakc0
  180. loop0.breakc0: ; preds = %loop0
  181. %136 = call float @dx.op.tertiary.f32(i32 46, float %dx.v32.r18.0, float 1.000000e+00, float 0.000000e+00)
  182. %137 = call float @dx.op.tertiary.f32(i32 46, float %dx.v32.r19.0, float -1.000000e+00, float 1.000000e+00)
  183. %138 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 0)
  184. %139 = extractvalue %dx.types.CBufRet.f32 %138, 0
  185. %140 = extractvalue %dx.types.CBufRet.f32 %138, 1
  186. %141 = fmul fast float %136, %139
  187. %142 = fmul fast float %137, %140
  188. %143 = fptosi float %141 to i32
  189. %144 = fptosi float %142 to i32
  190. %145 = call i32 @dx.op.binary.i32(i32 37, i32 %143, i32 0)
  191. %146 = call i32 @dx.op.binary.i32(i32 37, i32 %144, i32 0)
  192. %147 = call i32 @dx.op.binary.i32(i32 38, i32 %52, i32 %145)
  193. %148 = call i32 @dx.op.binary.i32(i32 38, i32 %53, i32 %146)
  194. %149 = call %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32 66, %dx.types.Handle %0, i32 0, i32 %147, i32 %148, i32 undef, i32 0, i32 0, i32 undef)
  195. %150 = extractvalue %dx.types.ResRet.f32 %149, 0
  196. %151 = uitofp i32 %147 to float
  197. %152 = uitofp i32 %148 to float
  198. %153 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  199. %154 = extractvalue %dx.types.CBufRet.f32 %153, 2
  200. %155 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 1)
  201. %156 = extractvalue %dx.types.CBufRet.f32 %155, 0
  202. %157 = call float @dx.op.tertiary.f32(i32 46, float %154, float %151, float %156)
  203. %158 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  204. %159 = extractvalue %dx.types.CBufRet.f32 %158, 3
  205. %160 = fsub fast float -0.000000e+00, %159
  206. %161 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 1)
  207. %162 = extractvalue %dx.types.CBufRet.f32 %161, 1
  208. %163 = fsub fast float -0.000000e+00, %162
  209. %164 = call float @dx.op.tertiary.f32(i32 46, float %160, float %152, float %163)
  210. %165 = fmul fast float %150, %157
  211. %166 = fmul fast float %150, %164
  212. %167 = fsub fast float -0.000000e+00, %166
  213. %168 = call float @dx.op.dot2.f32(i32 54, float %30, float %76, float %165, float %167)
  214. %169 = fsub fast float -0.000000e+00, %14
  215. %170 = fsub fast float -0.000000e+00, %16
  216. %171 = call float @dx.op.tertiary.f32(i32 46, float %169, float 5.000000e-01, float %dx.v32.r18.0)
  217. %172 = call float @dx.op.tertiary.f32(i32 46, float %170, float 5.000000e-01, float %dx.v32.r19.0)
  218. %173 = fsub fast float -0.000000e+00, %172
  219. %174 = fadd fast float %173, 1.000000e+00
  220. %175 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 0)
  221. %176 = extractvalue %dx.types.CBufRet.f32 %175, 0
  222. %177 = extractvalue %dx.types.CBufRet.f32 %175, 1
  223. %178 = fmul fast float %171, %176
  224. %179 = fmul fast float %174, %177
  225. %180 = fptosi float %178 to i32
  226. %181 = fptosi float %179 to i32
  227. %182 = call i32 @dx.op.binary.i32(i32 37, i32 %180, i32 0)
  228. %183 = call i32 @dx.op.binary.i32(i32 37, i32 %181, i32 0)
  229. %184 = call i32 @dx.op.binary.i32(i32 38, i32 %52, i32 %182)
  230. %185 = call i32 @dx.op.binary.i32(i32 38, i32 %53, i32 %183)
  231. %186 = call %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32 66, %dx.types.Handle %0, i32 0, i32 %184, i32 %185, i32 undef, i32 0, i32 0, i32 undef)
  232. %187 = extractvalue %dx.types.ResRet.f32 %186, 0
  233. %188 = uitofp i32 %184 to float
  234. %189 = uitofp i32 %185 to float
  235. %190 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  236. %191 = extractvalue %dx.types.CBufRet.f32 %190, 2
  237. %192 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 1)
  238. %193 = extractvalue %dx.types.CBufRet.f32 %192, 0
  239. %194 = call float @dx.op.tertiary.f32(i32 46, float %191, float %188, float %193)
  240. %195 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  241. %196 = extractvalue %dx.types.CBufRet.f32 %195, 3
  242. %197 = fsub fast float -0.000000e+00, %196
  243. %198 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 1)
  244. %199 = extractvalue %dx.types.CBufRet.f32 %198, 1
  245. %200 = fsub fast float -0.000000e+00, %199
  246. %201 = call float @dx.op.tertiary.f32(i32 46, float %197, float %189, float %200)
  247. %202 = fmul fast float %187, %194
  248. %203 = fmul fast float %187, %201
  249. %204 = fsub fast float -0.000000e+00, %203
  250. %205 = call float @dx.op.dot2.f32(i32 54, float %30, float %76, float %202, float %204)
  251. %206 = fcmp fast olt float %187, %150
  252. %207 = call i32 @dx.op.bitcastF32toI32(i32 127, float %205)
  253. %208 = call i32 @dx.op.bitcastF32toI32(i32 127, float %187)
  254. %209 = call i32 @dx.op.bitcastF32toI32(i32 127, float %168)
  255. %210 = call i32 @dx.op.bitcastF32toI32(i32 127, float %150)
  256. %211 = select i1 %206, i32 %207, i32 %209
  257. %212 = call float @dx.op.bitcastI32toF32(i32 126, i32 %211)
  258. %213 = select i1 %206, i32 %208, i32 %210
  259. %214 = call float @dx.op.bitcastI32toF32(i32 126, i32 %213)
  260. %215 = fmul fast float %214, 0x3FEFD70A40000000
  261. %216 = fmul fast float %214, 0x3FEFD70A40000000
  262. %217 = fsub fast float -0.000000e+00, %212
  263. %218 = fsub fast float -0.000000e+00, %216
  264. %219 = fsub fast float -0.000000e+00, %212
  265. %220 = fsub fast float -0.000000e+00, %216
  266. %221 = call float @dx.op.dot2.f32(i32 54, float %217, float %218, float %219, float %220)
  267. %222 = call float @dx.op.unary.f32(i32 25, float %221)
  268. %223 = fsub fast float -0.000000e+00, %212
  269. %224 = fsub fast float -0.000000e+00, %216
  270. %225 = fmul fast float %222, %223
  271. %226 = fmul fast float %222, %224
  272. %227 = fadd fast float %14, %dx.v32.r18.0
  273. %228 = fadd fast float %16, %dx.v32.r19.0
  274. %229 = add i32 %dx.v32.r11.0, -1
  275. %230 = add i32 %32, %dx.v32.r14.0
  276. %231 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r28.0)
  277. %232 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r29.0)
  278. %233 = fsub fast float -0.000000e+00, %212
  279. %234 = fsub fast float -0.000000e+00, %216
  280. %235 = fadd fast float %231, %233
  281. %236 = fadd fast float %232, %234
  282. %237 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r32.0)
  283. %238 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r33.0)
  284. %239 = fsub fast float -0.000000e+00, %212
  285. %240 = fsub fast float -0.000000e+00, %216
  286. %241 = fadd fast float %237, %239
  287. %242 = fadd fast float %238, %240
  288. %243 = call float @dx.op.dot2.f32(i32 54, float %235, float %236, float %235, float %236)
  289. %244 = call float @dx.op.unary.f32(i32 25, float %243)
  290. %245 = fmul fast float %244, %235
  291. %246 = fmul fast float %244, %236
  292. %247 = call float @dx.op.dot2.f32(i32 54, float %225, float %226, float %245, float %246)
  293. %248 = fadd fast float %247, 1.000000e+00
  294. %249 = call float @dx.op.dot2.f32(i32 54, float %241, float %242, float %241, float %242)
  295. %250 = call float @dx.op.unary.f32(i32 25, float %249)
  296. %251 = fmul fast float %250, %241
  297. %252 = fmul fast float %250, %242
  298. %253 = call float @dx.op.dot2.f32(i32 54, float %225, float %226, float %251, float %252)
  299. %254 = fadd fast float %253, 1.000000e+00
  300. %255 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  301. %256 = extractvalue %dx.types.CBufRet.f32 %255, 1
  302. %257 = call float @dx.op.tertiary.f32(i32 46, float %256, float %243, float %215)
  303. %258 = fdiv fast float %215, %257
  304. %259 = call float @dx.op.binary.f32(i32 36, float %258, float 0x3FECCCCCC0000000)
  305. %260 = fmul fast float %259, %248
  306. %261 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  307. %262 = extractvalue %dx.types.CBufRet.f32 %261, 1
  308. %263 = call float @dx.op.tertiary.f32(i32 46, float %262, float %249, float %215)
  309. %264 = fdiv fast float %215, %263
  310. %265 = call float @dx.op.binary.f32(i32 36, float %264, float 0x3FECCCCCC0000000)
  311. %266 = fmul fast float %265, %254
  312. %267 = icmp ne i32 %dx.v32.r34.0, 0
  313. %268 = sext i1 %267 to i32
  314. %269 = fcmp fast oge float %266, %260
  315. %270 = sext i1 %269 to i32
  316. %271 = and i32 %270, %268
  317. %272 = fcmp fast oge float %254, %248
  318. %273 = sext i1 %272 to i32
  319. %274 = and i32 %271, %273
  320. %275 = icmp ne i32 %274, 0
  321. br i1 %275, label %if2.then, label %if2.else
  322. if2.then: ; preds = %loop0.breakc0
  323. %276 = add i32 %dx.v32.r34.0, -1
  324. %277 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r30.0)
  325. %278 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r31.0)
  326. %279 = fsub fast float -0.000000e+00, %212
  327. %280 = fsub fast float -0.000000e+00, %216
  328. %281 = fadd fast float %277, %279
  329. %282 = fadd fast float %278, %280
  330. %283 = call float @dx.op.dot2.f32(i32 54, float %281, float %282, float %281, float %282)
  331. %284 = call float @dx.op.unary.f32(i32 25, float %283)
  332. %285 = fmul fast float %284, %281
  333. %286 = fmul fast float %284, %282
  334. %287 = call float @dx.op.dot2.f32(i32 54, float %225, float %226, float %285, float %286)
  335. %288 = fadd fast float %287, 1.000000e+00
  336. %289 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  337. %290 = extractvalue %dx.types.CBufRet.f32 %289, 1
  338. %291 = call float @dx.op.tertiary.f32(i32 46, float %290, float %283, float %215)
  339. %292 = fdiv fast float %215, %291
  340. %293 = call float @dx.op.binary.f32(i32 36, float %292, float 0x3FECCCCCC0000000)
  341. %294 = fmul fast float %293, %288
  342. %295 = fmul fast float %214, 0x3FEFD70A40000000
  343. %296 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r32.0)
  344. %297 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r33.0)
  345. %298 = call i32 @dx.op.bitcastF32toI32(i32 127, float %254)
  346. %299 = call i32 @dx.op.bitcastF32toI32(i32 127, float %266)
  347. %300 = call i32 @dx.op.bitcastF32toI32(i32 127, float %288)
  348. %301 = call i32 @dx.op.bitcastF32toI32(i32 127, float %294)
  349. %302 = call float @dx.op.bitcastI32toF32(i32 126, i32 %211)
  350. br label %loop1
  351. loop1: ; preds = %loop1.breakc0, %if2.then
  352. %dx.v32.r34.1 = phi i32 [ %276, %if2.then ], [ %319, %loop1.breakc0 ]
  353. %dx.v32.r42.0 = phi float [ %296, %if2.then ], [ %348, %loop1.breakc0 ]
  354. %dx.v32.r43.0 = phi float [ %297, %if2.then ], [ %349, %loop1.breakc0 ]
  355. %dx.v32.r46.0 = phi i32 [ %dx.v32.r30.0, %if2.then ], [ %350, %loop1.breakc0 ]
  356. %dx.v32.r47.0 = phi i32 [ %dx.v32.r31.0, %if2.then ], [ %351, %loop1.breakc0 ]
  357. %dx.v32.r47.06 = phi float [ %dx.v32.r31.05, %if2.then ], [ %330, %loop1.breakc0 ]
  358. %dx.v32.r48.0 = phi i32 [ %298, %if2.then ], [ %dx.v32.r52.0, %loop1.breakc0 ]
  359. %dx.v32.r49.0 = phi i32 [ %299, %if2.then ], [ %dx.v32.r53.0, %loop1.breakc0 ]
  360. %dx.v32.r52.0 = phi i32 [ %300, %if2.then ], [ %352, %loop1.breakc0 ]
  361. %dx.v32.r53.0 = phi i32 [ %301, %if2.then ], [ %353, %loop1.breakc0 ]
  362. %dx.v32.r50.0 = phi i32 [ 6, %if2.then ], [ %331, %loop1.breakc0 ]
  363. %303 = icmp ne i32 %dx.v32.r50.0, 0
  364. %304 = sext i1 %303 to i32
  365. %305 = icmp ne i32 %dx.v32.r34.1, 0
  366. %306 = sext i1 %305 to i32
  367. %307 = and i32 %304, %306
  368. %308 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r53.0)
  369. %309 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r52.0)
  370. %310 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r49.0)
  371. %311 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r48.0)
  372. %312 = fcmp fast oge float %308, %310
  373. %313 = fcmp fast oge float %309, %311
  374. %314 = sext i1 %312 to i32
  375. %315 = sext i1 %313 to i32
  376. %316 = and i32 %307, %314
  377. %317 = and i32 %315, %316
  378. %318 = icmp eq i32 %317, 0
  379. br i1 %318, label %loop1.end, label %loop1.breakc0
  380. loop1.breakc0: ; preds = %loop1
  381. %319 = add i32 %dx.v32.r34.1, -1
  382. %320 = and i32 %319, 7
  383. %321 = mul i32 %320, 256
  384. %322 = add i32 %321, %132
  385. %323 = getelementptr [2048 x i8], [2048 x i8] addrspace(3)* @TGSM0, i32 0, i32 %322
  386. %324 = bitcast i8 addrspace(3)* %323 to float addrspace(3)*
  387. %325 = load float, float addrspace(3)* %324, align 4
  388. %326 = call i32 @dx.op.bitcastF32toI32(i32 127, float %325)
  389. %327 = and i32 %326, 65535
  390. %328 = lshr i32 %326, 16
  391. %329 = call float @dx.op.legacyF16ToF32(i32 131, i32 %327)
  392. %330 = call float @dx.op.legacyF16ToF32(i32 131, i32 %328)
  393. %331 = add i32 %dx.v32.r50.0, -1
  394. %332 = fsub fast float -0.000000e+00, %302
  395. %333 = fsub fast float -0.000000e+00, %295
  396. %334 = fadd fast float %332, %329
  397. %335 = fadd fast float %333, %330
  398. %336 = call float @dx.op.dot2.f32(i32 54, float %334, float %335, float %334, float %335)
  399. %337 = call float @dx.op.unary.f32(i32 25, float %336)
  400. %338 = fmul fast float %334, %337
  401. %339 = fmul fast float %335, %337
  402. %340 = call float @dx.op.dot2.f32(i32 54, float %225, float %226, float %338, float %339)
  403. %341 = fadd fast float %340, 1.000000e+00
  404. %342 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %4, i32 0)
  405. %343 = extractvalue %dx.types.CBufRet.f32 %342, 1
  406. %344 = call float @dx.op.tertiary.f32(i32 46, float %343, float %336, float %215)
  407. %345 = fdiv fast float %215, %344
  408. %346 = call float @dx.op.binary.f32(i32 36, float %345, float 0x3FECCCCCC0000000)
  409. %347 = fmul fast float %346, %341
  410. %348 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r46.0)
  411. %349 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r47.0)
  412. %350 = call i32 @dx.op.bitcastF32toI32(i32 127, float %329)
  413. %351 = call i32 @dx.op.bitcastF32toI32(i32 127, float %330)
  414. %352 = call i32 @dx.op.bitcastF32toI32(i32 127, float %341)
  415. %353 = call i32 @dx.op.bitcastF32toI32(i32 127, float %347)
  416. br label %loop1
  417. loop1.end: ; preds = %loop1
  418. %354 = call i32 @dx.op.bitcastF32toI32(i32 127, float %dx.v32.r42.0)
  419. %355 = call i32 @dx.op.bitcastF32toI32(i32 127, float %dx.v32.r43.0)
  420. br label %if2.end
  421. if2.else: ; preds = %loop0.breakc0
  422. br label %if2.end
  423. if2.end: ; preds = %if2.else, %loop1.end
  424. %dx.v32.r32.1 = phi i32 [ %354, %loop1.end ], [ %dx.v32.r28.0, %if2.else ]
  425. %dx.v32.r33.1 = phi i32 [ %355, %loop1.end ], [ %dx.v32.r29.0, %if2.else ]
  426. %dx.v32.r33.12 = phi float [ %dx.v32.r43.0, %loop1.end ], [ %dx.v32.r29.01, %if2.else ]
  427. %dx.v32.r30.1 = phi i32 [ %dx.v32.r46.0, %loop1.end ], [ %dx.v32.r32.0, %if2.else ]
  428. %dx.v32.r31.1 = phi i32 [ %dx.v32.r47.0, %loop1.end ], [ %dx.v32.r33.0, %if2.else ]
  429. %dx.v32.r31.14 = phi float [ %dx.v32.r47.06, %loop1.end ], [ %dx.v32.r33.03, %if2.else ]
  430. %dx.v32.r34.2 = phi i32 [ %dx.v32.r34.1, %loop1.end ], [ %dx.v32.r34.0, %if2.else ]
  431. %dx.v32.r50.1 = phi i32 [ %dx.v32.r50.0, %loop1.end ], [ 7, %if2.else ]
  432. %356 = call i32 @dx.op.bitcastF32toI32(i32 127, float %dx.v32.r33.12)
  433. %357 = icmp eq i32 %dx.v32.r50.1, 7
  434. br i1 %357, label %if3.then, label %if3.end
  435. if3.then: ; preds = %if2.end
  436. %358 = and i32 %dx.v32.r34.2, 7
  437. %359 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r30.1)
  438. %360 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r31.1)
  439. %361 = call i32 @dx.op.legacyF32ToF16(i32 130, float %359)
  440. %362 = call i32 @dx.op.legacyF32ToF16(i32 130, float %360)
  441. %363 = call i32 @dx.op.tertiary.i32(i32 48, i32 %362, i32 65536, i32 %361)
  442. %364 = call float @dx.op.bitcastI32toF32(i32 126, i32 %363)
  443. %365 = mul i32 %358, 256
  444. %366 = add i32 %365, %132
  445. %367 = getelementptr [2048 x i8], [2048 x i8] addrspace(3)* @TGSM0, i32 0, i32 %366
  446. %368 = bitcast i8 addrspace(3)* %367 to float addrspace(3)*
  447. store float %364, float addrspace(3)* %368, align 4
  448. br label %if3.end
  449. if3.end: ; preds = %if3.then, %if2.end
  450. %369 = add i32 %dx.v32.r34.2, 1
  451. %370 = call float @dx.op.bitcastI32toF32(i32 126, i32 %dx.v32.r33.1)
  452. %371 = fcmp fast olt float %214, %370
  453. %372 = select i1 %371, i32 %211, i32 %dx.v32.r32.1
  454. %373 = select i1 %371, i32 %213, i32 %dx.v32.r33.1
  455. %374 = select i1 %206, i32 %372, i32 %dx.v32.r32.1
  456. %375 = call float @dx.op.bitcastI32toF32(i32 126, i32 %374)
  457. %376 = select i1 %206, i32 %373, i32 %356
  458. %377 = call float @dx.op.bitcastI32toF32(i32 126, i32 %376)
  459. %378 = call float @dx.op.binary.f32(i32 35, float %375, float -6.550400e+04)
  460. %379 = call float @dx.op.binary.f32(i32 35, float %377, float -6.550400e+04)
  461. %380 = call float @dx.op.binary.f32(i32 36, float %378, float 6.550400e+04)
  462. %381 = call float @dx.op.binary.f32(i32 36, float %379, float 6.550400e+04)
  463. %382 = call i32 @dx.op.legacyF32ToF16(i32 130, float %380)
  464. %383 = call i32 @dx.op.legacyF32ToF16(i32 130, float %381)
  465. %384 = call i32 @dx.op.tertiary.i32(i32 48, i32 %383, i32 65536, i32 %382)
  466. call void @dx.op.bufferStore.i32(i32 69, %dx.types.Handle %2, i32 %230, i32 0, i32 %384, i32 undef, i32 undef, i32 undef, i8 1)
  467. %385 = call float @dx.op.bitcastI32toF32(i32 126, i32 %213)
  468. br label %loop0
  469. loop0.end: ; preds = %loop0
  470. ret void
  471. }
  472. ; Function Attrs: nounwind readonly
  473. declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #0
  474. ; Function Attrs: nounwind readnone
  475. declare i32 @dx.op.tertiary.i32(i32, i32, i32, i32) #1
  476. ; Function Attrs: nounwind readnone
  477. declare i32 @dx.op.groupId.i32(i32, i32) #1
  478. ; Function Attrs: nounwind readnone
  479. declare i32 @dx.op.threadIdInGroup.i32(i32, i32) #1
  480. ; Function Attrs: nounwind
  481. declare void @dx.op.tempRegStore.i32(i32, i32, i32) #2
  482. ; Function Attrs: nounwind readonly
  483. declare i32 @dx.op.tempRegLoad.i32(i32, i32) #0
  484. ; Function Attrs: nounwind readonly
  485. declare %dx.types.ResRet.i32 @dx.op.bufferLoad.i32(i32, %dx.types.Handle, i32, i32) #0
  486. ; Function Attrs: nounwind readonly
  487. declare float @dx.op.tempRegLoad.f32(i32, i32) #0
  488. ; Function Attrs: nounwind readonly
  489. declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #0
  490. ; Function Attrs: nounwind
  491. declare void @dx.op.tempRegStore.f32(i32, i32, float) #2
  492. ; Function Attrs: nounwind readnone
  493. declare float @dx.op.dot2.f32(i32, float, float, float, float) #1
  494. ; Function Attrs: nounwind readnone
  495. declare float @dx.op.unary.f32(i32, float) #1
  496. ; Function Attrs: nounwind readnone
  497. declare i32 @dx.op.quaternary.i32(i32, i32, i32, i32, i32) #1
  498. ; Function Attrs: nounwind
  499. declare void @dx.op.bufferStore.i32(i32, %dx.types.Handle, i32, i32, i32, i32, i32, i32, i8) #2
  500. ; Function Attrs: nounwind readnone
  501. declare float @dx.op.tertiary.f32(i32, float, float, float) #1
  502. ; Function Attrs: nounwind readnone
  503. declare i32 @dx.op.binary.i32(i32, i32, i32) #1
  504. ; Function Attrs: nounwind readonly
  505. declare %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32, %dx.types.Handle, i32, i32, i32, i32, i32, i32, i32) #0
  506. ; Function Attrs: nounwind readnone
  507. declare float @dx.op.binary.f32(i32, float, float) #1
  508. ; Function Attrs: nounwind readnone
  509. declare i32 @dx.op.legacyF32ToF16(i32, float) #1
  510. ; Function Attrs: nounwind readnone
  511. declare float @dx.op.legacyF16ToF32(i32, i32) #1
  512. ; Function Attrs: nounwind readnone
  513. declare float @dx.op.bitcastI32toF32(i32, i32) #1
  514. ; Function Attrs: nounwind readnone
  515. declare i32 @dx.op.bitcastF32toI32(i32, float) #1
  516. attributes #0 = { nounwind readonly }
  517. attributes #1 = { nounwind readnone }
  518. attributes #2 = { nounwind }
  519. !dx.version = !{!0}
  520. !dx.valver = !{!0}
  521. !dx.shaderModel = !{!1}
  522. !dx.resources = !{!2}
  523. !dx.entryPoints = !{!14}
  524. !llvm.ident = !{!17}
  525. !0 = !{i32 1, i32 0}
  526. !1 = !{!"cs", i32 6, i32 0}
  527. !2 = !{!3, !8, !11, null}
  528. !3 = !{!4, !6}
  529. !4 = !{i32 0, %dx.types.f32 addrspace(1)* undef, !"T0", i32 0, i32 0, i32 1, i32 2, i32 0, !5}
  530. !5 = !{i32 0, i32 9}
  531. !6 = !{i32 1, %dx.types.i8x48 addrspace(1)* undef, !"T1", i32 0, i32 1, i32 1, i32 12, i32 0, !7}
  532. !7 = !{i32 1, i32 48}
  533. !8 = !{!9}
  534. !9 = !{i32 0, %dx.types.i8x4 addrspace(1)* undef, !"U0", i32 0, i32 0, i32 1, i32 12, i1 false, i1 false, i1 false, !10}
  535. !10 = !{i32 1, i32 4}
  536. !11 = !{!12, !13}
  537. !12 = !{i32 0, %dx.types.i8x16 addrspace(2)* undef, !"CB0", i32 0, i32 0, i32 1, i32 16, null}
  538. !13 = !{i32 1, %dx.types.i8x32 addrspace(2)* undef, !"CB1", i32 0, i32 1, i32 1, i32 32, null}
  539. !14 = !{void ()* @main, !"main", null, !2, !15}
  540. !15 = !{i32 4, !16}
  541. !16 = !{i32 64, i32 1, i32 1}
  542. !17 = !{!"dxbc2dxil 1.0"}