File: 2009-08-14-Win64MemoryIndirectArg.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (51 lines) | stat: -rw-r--r-- 3,028 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
; RUN: llc < %s
target triple = "x86_64-mingw"

; ModuleID = 'mm.bc'
	%0 = type opaque		; type %0
	%1 = type opaque		; type %1

define internal fastcc float @computeMipmappingRho(ptr %shaderExecutionStatePtr, i32 %index, <4 x float> %texCoord, <4 x float> %texCoordDX, <4 x float> %texCoordDY) readonly {
indexCheckBlock:
	%indexCmp = icmp ugt i32 %index, 16		; <i1> [#uses=1]
	br i1 %indexCmp, label %zeroReturnBlock, label %primitiveTextureFetchBlock

primitiveTextureFetchBlock:		; preds = %indexCheckBlock
	%pointerArithmeticTmp1 = getelementptr i8, ptr %shaderExecutionStatePtr, i64 1808		; <ptr> [#uses=1]
	%primitivePtr = load ptr, ptr %pointerArithmeticTmp1		; <ptr> [#uses=1]
	%pointerArithmeticTmp4 = getelementptr i8, ptr %primitivePtr, i64 19408		; <ptr> [#uses=1]
	%primitiveTexturePtr = getelementptr ptr, ptr %pointerArithmeticTmp4, i32 %index		; <ptr> [#uses=1]
	%primitiveTexturePtr6 = load ptr, ptr %primitiveTexturePtr		; <ptr> [#uses=2]
	br label %textureCheckBlock

textureCheckBlock:		; preds = %primitiveTextureFetchBlock
	%texturePtrInt = ptrtoint ptr %primitiveTexturePtr6 to i64		; <i64> [#uses=1]
	%testTextureNULL = icmp eq i64 %texturePtrInt, 0		; <i1> [#uses=1]
	br i1 %testTextureNULL, label %zeroReturnBlock, label %rhoCalculateBlock

rhoCalculateBlock:		; preds = %textureCheckBlock
	%pointerArithmeticTmp8 = getelementptr i8, ptr %primitiveTexturePtr6, i64 640		; <ptr> [#uses=1]
	%dimensionsPtr = load <4 x float>, ptr %pointerArithmeticTmp8, align 1		; <<4 x float>> [#uses=2]
	%texDiffDX = fsub <4 x float> %texCoordDX, %texCoord		; <<4 x float>> [#uses=1]
	%texDiffDY = fsub <4 x float> %texCoordDY, %texCoord		; <<4 x float>> [#uses=1]
	%ddx = fmul <4 x float> %texDiffDX, %dimensionsPtr		; <<4 x float>> [#uses=2]
	%ddx10 = fmul <4 x float> %texDiffDY, %dimensionsPtr		; <<4 x float>> [#uses=2]
	%ddxSquared = fmul <4 x float> %ddx, %ddx		; <<4 x float>> [#uses=3]
	%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]
	%dxSquared = fadd <4 x float> %ddxSquared, %0		; <<4 x float>> [#uses=1]
	%1 = call <4 x float> @llvm.x86.sse.sqrt.ss(<4 x float> %dxSquared)		; <<4 x float>> [#uses=1]
	%ddySquared = fmul <4 x float> %ddx10, %ddx10		; <<4 x float>> [#uses=3]
	%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]
	%dySquared = fadd <4 x float> %ddySquared, %2		; <<4 x float>> [#uses=1]
	%3 = call <4 x float> @llvm.x86.sse.sqrt.ss(<4 x float> %dySquared)		; <<4 x float>> [#uses=1]
	%4 = call <4 x float> @llvm.x86.sse.max.ss(<4 x float> %1, <4 x float> %3)		; <<4 x float>> [#uses=1]
	%rho = extractelement <4 x float> %4, i32 0		; <float> [#uses=1]
	ret float %rho

zeroReturnBlock:		; preds = %textureCheckBlock, %indexCheckBlock
	ret float 0.000000e+00
}

declare <4 x float> @llvm.x86.sse.sqrt.ss(<4 x float>) nounwind readnone

declare <4 x float> @llvm.x86.sse.max.ss(<4 x float>, <4 x float>) nounwind readnone