2 target triple = "x86_64-mingw"
5 %0 = type opaque ; type %0
6 %1 = type opaque ; type %1
8 define internal fastcc float @computeMipmappingRho(ptr %shaderExecutionStatePtr, i32 %index, <4 x float> %texCoord, <4 x float> %texCoordDX, <4 x float> %texCoordDY) readonly {
10 %indexCmp = icmp ugt i32 %index, 16 ; <i1> [#uses=1]
11 br i1 %indexCmp, label %zeroReturnBlock, label %primitiveTextureFetchBlock
13 primitiveTextureFetchBlock: ; preds = %indexCheckBlock
14 %pointerArithmeticTmp1 = getelementptr i8, ptr %shaderExecutionStatePtr, i64 1808 ; <ptr> [#uses=1]
15 %primitivePtr = load ptr, ptr %pointerArithmeticTmp1 ; <ptr> [#uses=1]
16 %pointerArithmeticTmp4 = getelementptr i8, ptr %primitivePtr, i64 19408 ; <ptr> [#uses=1]
17 %primitiveTexturePtr = getelementptr ptr, ptr %pointerArithmeticTmp4, i32 %index ; <ptr> [#uses=1]
18 %primitiveTexturePtr6 = load ptr, ptr %primitiveTexturePtr ; <ptr> [#uses=2]
19 br label %textureCheckBlock
21 textureCheckBlock: ; preds = %primitiveTextureFetchBlock
22 %texturePtrInt = ptrtoint ptr %primitiveTexturePtr6 to i64 ; <i64> [#uses=1]
23 %testTextureNULL = icmp eq i64 %texturePtrInt, 0 ; <i1> [#uses=1]
24 br i1 %testTextureNULL, label %zeroReturnBlock, label %rhoCalculateBlock
26 rhoCalculateBlock: ; preds = %textureCheckBlock
27 %pointerArithmeticTmp8 = getelementptr i8, ptr %primitiveTexturePtr6, i64 640 ; <ptr> [#uses=1]
28 %dimensionsPtr = load <4 x float>, ptr %pointerArithmeticTmp8, align 1 ; <<4 x float>> [#uses=2]
29 %texDiffDX = fsub <4 x float> %texCoordDX, %texCoord ; <<4 x float>> [#uses=1]
30 %texDiffDY = fsub <4 x float> %texCoordDY, %texCoord ; <<4 x float>> [#uses=1]
31 %ddx = fmul <4 x float> %texDiffDX, %dimensionsPtr ; <<4 x float>> [#uses=2]
32 %ddx10 = fmul <4 x float> %texDiffDY, %dimensionsPtr ; <<4 x float>> [#uses=2]
33 %ddxSquared = fmul <4 x float> %ddx, %ddx ; <<4 x float>> [#uses=3]
34 %0 = shufflevector <4 x float> %ddxSquared, <4 x float> %ddxSquared, <4 x i32> <i32 1, i32 0, i32 0, i32 0> ; <<4 x float>> [#uses=1]
35 %dxSquared = fadd <4 x float> %ddxSquared, %0 ; <<4 x float>> [#uses=1]
36 %1 = call <4 x float> @llvm.x86.sse.sqrt.ss(<4 x float> %dxSquared) ; <<4 x float>> [#uses=1]
37 %ddySquared = fmul <4 x float> %ddx10, %ddx10 ; <<4 x float>> [#uses=3]
38 %2 = shufflevector <4 x float> %ddySquared, <4 x float> %ddySquared, <4 x i32> <i32 1, i32 0, i32 0, i32 0> ; <<4 x float>> [#uses=1]
39 %dySquared = fadd <4 x float> %ddySquared, %2 ; <<4 x float>> [#uses=1]
40 %3 = call <4 x float> @llvm.x86.sse.sqrt.ss(<4 x float> %dySquared) ; <<4 x float>> [#uses=1]
41 %4 = call <4 x float> @llvm.x86.sse.max.ss(<4 x float> %1, <4 x float> %3) ; <<4 x float>> [#uses=1]
42 %rho = extractelement <4 x float> %4, i32 0 ; <float> [#uses=1]
45 zeroReturnBlock: ; preds = %textureCheckBlock, %indexCheckBlock
46 ret float 0.000000e+00
49 declare <4 x float> @llvm.x86.sse.sqrt.ss(<4 x float>) nounwind readnone
51 declare <4 x float> @llvm.x86.sse.max.ss(<4 x float>, <4 x float>) nounwind readnone