diff options
author | Dale Johannesen <dalej@apple.com> | 2010-05-25 18:47:23 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-05-25 18:47:23 +0000 |
commit | 86234c30a7dea821e970323df4f168b9632d0bb7 (patch) | |
tree | 18917f65ab6db94553081b65d2e5d5bad6d5461b | |
parent | 79373680ed7f2b92df4a5c45d0d9bbd47af77c58 (diff) |
Fix another variant of PR 7191. Also add a testcase
Mon Ping provided; unfortunately bugpoint failed to
reduce it, but I think it's important to have a test for
this in the suite. 8023512.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104624 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 | ||||
-rw-r--r-- | test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll | 2718 |
2 files changed, 2723 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index df1a0a353e..6bddd784fe 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3832,8 +3832,12 @@ SDValue DAGCombiner::visitANY_EXTEND(SDNode *N) { if (N0.getOpcode() == ISD::TRUNCATE) { SDValue NarrowLoad = ReduceLoadWidth(N0.getNode()); if (NarrowLoad.getNode()) { - if (NarrowLoad.getNode() != N0.getNode()) + SDNode* oye = N0.getNode()->getOperand(0).getNode(); + if (NarrowLoad.getNode() != N0.getNode()) { CombineTo(N0.getNode(), NarrowLoad); + // CombineTo deleted the truncate, if needed, but not what's under it. + AddToWorkList(oye); + } return DAG.getNode(ISD::ANY_EXTEND, N->getDebugLoc(), VT, NarrowLoad); } } diff --git a/test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll b/test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll new file mode 100644 index 0000000000..617b889858 --- /dev/null +++ b/test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll @@ -0,0 +1,2718 @@ +; RUN: llc -O0 -march=x86 -mattr=+sse3 %s +; Formerly crashed - PR 7191 / 8023512 +; ModuleID = '<stdin>' +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32" +target triple = "i386-apple-darwin11.0" + +%0 = type { i16, i16, i32 } +%1 = type { i32, i32, i16, i16, i16, i16 } +%2 = type { i16, i16, %struct.GLTColor4, %struct.GLTColor4 } +%3 = type { void (i8*, i8*, i32, i8*)*, i32 (i8*, ...)*, i8* (%struct.GLDContextRec*, %struct.GLDFramebufferRec*, i8, i32, i32)* } +%struct.GLDActiveTextureTargets = type { i64, i64, i64, i64, i64, i64 } +%struct.GLDAlphaTest = type { float, i16, i8, i8 } +%struct.GLDArrayRange = type { i8, i8, i8, i8 } +%struct.GLDBlendMode = type { i16, i16, i16, i16, %struct.GLTColor4, i16, i16, i8, i8, i8, i8 } +%struct.GLDBufferData = type { i8*, i32, i32, i16, i16, i8, i8, i8, i8 } +%struct.GLDBufferRec = type { %struct.GLDBufferData*, %struct.GLDPluginBufferData* } +%struct.GLDBufferstate = type { %struct.GLTDimensions, %struct.GLTDimensions, %struct.GLTFixedColor4, %struct.GLTFixedColor4, i8, i8, i8, i8, [0 x i32], %union.GLSBuffer, %union.GLSBuffer, %union.GLSBuffer, [8 x %union.GLSBuffer], %union.GLSBuffer } +%struct.GLDClearColor = type { double, %struct.GLTColor4, %struct.GLTColor4, float, i32 } +%struct.GLDClipPlane = type { i32, [6 x %struct.GLTColor4] } +%struct.GLDColorBuffer = type { i16, i8, i8, [8 x i16], i8, i8, i8, i8 } +%struct.GLDColorMatrix = type { [16 x float]*, %struct.GLDImagingColorScale } +%struct.GLDConfig = type { i32, float, %struct.GLTDimensions, %struct.GLTDimensions, i8, i8, i8, i8, i8, i8, i16, i32, i32, i32, %struct.GLDPixelFormatInfo, %struct.GLDPointLineLimits, %struct.GLDPointLineLimits, %struct.GLDRenderFeatures, i32, i32, i32, i32, i32, i32, i32, i32, %struct.GLDMultisamplePositions, %struct.GLDTextureLimits, [3 x %struct.GLDPipelineProgramLimits], %struct.GLDFragmentProgramLimits, %struct.GLDVertexProgramLimits, %struct.GLDGeometryShaderLimits, %struct.GLDGeometryShaderLimits, %struct.GLDTransformFeedbackLimits, i16, i8, i8, %struct.GLDVertexDescriptor*, %struct.GLDVertexDescriptor*, [4 x i32], [8 x i32], %struct.GLDMultisamplePositions* } +%struct.GLDContextRec = type { float, float, float, float, float, float, float, float, %struct.GLTColor4, %struct.GLTColor4, %struct.GLVMFPContext, [16 x [2 x %union.PPStreamToken]], %struct.GLGProcessor, %struct._GLVMConstants*, void (%struct.GLDContextRec*, i32, i32, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, i32)*, %struct._GLVMFunction*, %union.PPStreamToken*, void (%struct.GLDContextRec*, %struct.GLDVertex*)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, %struct.GLDVertex*)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, %struct.GLDVertex*, %struct.GLDVertex*)*, %struct._GLVMFunction*, %struct._GLVMFunction*, %struct._GLVMFunction*, [4 x i32], [3 x i32], [3 x i32], %union.PPStreamToken, %struct.GLDConfig*, %struct.GLDFramebufferRec*, %struct.GLDFramebufferRec*, %struct.GLDBufferstate, %struct.GLDReadBufferstate, %struct.GLDLayeredBufferstate, [64 x %struct.GLTColor4*], %struct.GLDSharedRec*, %struct.GLDState*, %struct.GLDPluginState*, %struct.GLDVertex*, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, %struct.GLDProgramRec*, %struct.GLDPipelineProgramRec*, %struct.GLVMTextures, %struct.GLDQueryRec*, %struct.GLDQueryRec*, %struct.GLDQueryRec*, %struct.GLTDimensions, i64 ()*, %struct.GLDFallback, %3, %union.GLSDrawable, i32, float, float, %struct.GLDRect, %struct.GLDFormat, %struct.GLDFormat, %struct.GLDFormat, %struct.GLDStippleData, i32, i32, i32, i32, i16, i8, i8, i8, i8, [2 x i8], [0 x i32] } +%struct.GLDConvolution = type { %struct.GLTColor4, %struct.GLDImagingColorScale, i16, i16, [0 x i32], float*, i32, i32 } +%struct.GLDCurrent = type { [8 x %struct.GLTColor4], [16 x %struct.GLTColor4], %struct.GLTColor4, %struct.GLDPointLineLimits, float, %struct.GLDPointLineLimits, float, [4 x float], float, float, float, i8, i8, i8, i8, i32, i32, i32, i32 } +%struct.GLDDepthTest = type { i16, i16, i8, i8, i8, i8, double, double } +%struct.GLDDitherMode = type { i8, i8, i8, i8 } +%struct.GLDDrawableOffscreen = type { i32, i32, i32, [0 x i32], i8* } +%struct.GLDDrawableWindow = type { i32, i32, i32 } +%struct.GLDFallback = type { float*, %struct.GLDRenderDispatch*, %struct.GLDConfig*, i8*, i8*, i32, i32 } +%struct.GLDFixedFunction = type { %union.PPStreamToken* } +%struct.GLDFogMode = type { %struct.GLTColor4, float, float, float, float, float, i16, i16, i16, i8, i8 } +%struct.GLDFormat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, i32, i32, i32 } +%struct.GLDFragmentProgramLimits = type { i32, i32, i32, i16, i16, i32, i16, i16, i16, i16 } +%struct.GLDFramebufferAttachment = type { i16, i16, i32, i32, i32 } +%struct.GLDFramebufferData = type { [10 x %struct.GLDFramebufferAttachment], [8 x i16], i16, i16, i16, i8, i8, i32, i32, i32 } +%struct.GLDFramebufferRec = type { %struct.GLDFramebufferData*, %struct.GLDPluginFramebufferData*, [10 x %struct.GLDFormat], i8, i8, i16, [0 x i32] } +%struct.GLDGeometryShaderLimits = type { i32, i32, i32, i32, i32, i16, i16 } +%struct.GLDHintMode = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 } +%struct.GLDHistogram = type { %struct.GLTFixedColor4*, i32, i16, i8, i8 } +%struct.GLDImagingColorScale = type { %struct.GLDMultisamplePositions, %struct.GLDMultisamplePositions, %struct.GLDMultisamplePositions, %struct.GLDMultisamplePositions } +%struct.GLDImagingSubset = type { %struct.GLDConvolution, %struct.GLDConvolution, %struct.GLDConvolution, %struct.GLDColorMatrix, %struct.GLDMinmax, %struct.GLDHistogram, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, i32, [0 x i32] } +%struct.GLDLayeredBufferstate = type { %union.GLSBuffer, %union.GLSBuffer, [8 x %union.GLSBuffer] } +%struct.GLDLight = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLDPointLineLimits, float, float, float, float, float, %struct.GLDPointLineLimits, float, %struct.GLDPointLineLimits, float, %struct.GLDPointLineLimits, float, float, float, float, float } +%struct.GLDLightModel = type { %struct.GLTColor4, [8 x %struct.GLDLight], [2 x %struct.GLDMaterial], i32, i16, i16, i16, i8, i8, i8, i8, i8, i8 } +%struct.GLDLightProduct = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4 } +%struct.GLDLineMode = type { float, i32, i16, i16, i8, i8, i8, i8 } +%struct.GLDLogicOp = type { i16, i8, i8 } +%struct.GLDMaskMode = type { i32, [3 x i32], i8, i8, i8, i8, i8, i8, i8, i8 } +%struct.GLDMaterial = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, float, float, float, float, [8 x %struct.GLDLightProduct], %struct.GLTColor4, [8 x i32] } +%struct.GLDMinmax = type { %struct.GLDMinmaxTable*, i16, i8, i8, [0 x i32] } +%struct.GLDMinmaxTable = type { %struct.GLTColor4, %struct.GLTColor4 } +%struct.GLDMipmaplevel = type { [4 x i32], [4 x i32], [4 x float], [4 x i32], i32, i32, float*, i8*, i16, i16, i16, i16, [2 x float] } +%struct.GLDMultisample = type { float, [1 x i32], [0 x i32], i8, i8, i8, i8, i8, i8, i8, i8 } +%struct.GLDMultisamplePositions = type { float, float } +%struct.GLDPipelineProgramData = type { i16, i8, i8, i32, %union.PPStreamToken*, i64, %struct.GLTColor4*, i32, [0 x i32] } +%struct.GLDPipelineProgramLimits = type { i32, i16, i16, i32, i16, i16, i32, i32 } +%struct.GLDPipelineProgramRec = type { %struct.GLDPipelineProgramData*, %union.PPStreamToken*, %struct.GLDContextRec*, %struct.GLVMProgramData*, i32, i32 } +%struct.GLDPipelineProgramState = type { i8, i8, i8, i8, [0 x i32], %struct.GLTColor4* } +%struct.GLDPixelFormatInfo = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } +%struct.GLDPixelMap = type { i32*, float*, float*, float*, float*, float*, float*, float*, float*, i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } +%struct.GLDPixelMode = type { float, float, %struct.GLDPixelStore, %struct.GLDPixelTransfer, %struct.GLDPixelMap, %struct.GLDImagingSubset, i32, [0 x i32] } +%struct.GLDPixelPack = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8 } +%struct.GLDPixelStore = type { %struct.GLDPixelPack, %struct.GLDPixelPack } +%struct.GLDPixelTransfer = type { float, float, float, float, float, float, float, float, float, float, i32, i32 } +%struct.GLDPluginBufferData = type { i32 } +%struct.GLDPluginFramebufferData = type { [10 x %struct.GLDTextureRec*], i8, i8, i8, i8 } +%struct.GLDPluginProgramData = type { [3 x %struct.GLDPipelineProgramRec*], %struct.GLDBufferRec**, i32, [0 x i32] } +%struct.GLDPluginState = type { [16 x [11 x %struct.GLDTextureRec*]], [3 x %struct.GLDTextureRec*], [3 x %struct.GLDPipelineProgramRec*], [3 x %struct.GLDPipelineProgramRec*], %struct.GLDProgramRec*, %struct.GLDVertexArrayRec*, [16 x %struct.GLDBufferRec*], %struct.GLDFramebufferRec*, %struct.GLDFramebufferRec*, [6 x %struct.GLDQueryRec*], [64 x %struct.GLDBufferRec*] } +%struct.GLDPluginTextureState = type { %struct.GLDBufferRec*, [6 x i16], i8, i8, i16 } +%struct.GLDPointLineLimits = type { float, float, float } +%struct.GLDPointMode = type { float, float, float, float, %struct.GLDPointLineLimits, float, i8, i8, i8, i8, i16, i16, i32, i16, i16 } +%struct.GLDPolygonMode = type { [128 x i8], float, float, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8 } +%struct.GLDPolygonOffset = type { float, float } +%struct.GLDPrimitiveRestart = type { i8, i8, i8, i8, i32 } +%struct.GLDProgramData = type { i32, i32, i32, i32, %union.PPStreamToken*, i32*, i32, i32, i32, i32, i8, i8, i8, i8, i32, [64 x i32] } +%struct.GLDProgramLimits = type { i32, i32, i32, i32, i32, i16, i16 } +%struct.GLDProgramRec = type { %struct.GLDProgramData*, %struct.GLDPluginProgramData*, i32, [0 x i32] } +%struct.GLDProgramState = type { i8, i8, i8, i8 } +%struct.GLDQueryRec = type { i64, i64, i64 } +%struct.GLDQueryState = type { i16, i16 } +%struct.GLDReadBufferstate = type { %struct.GLTDimensions, %struct.GLTDimensions, %union.GLSBuffer, %union.GLSBuffer, %union.GLSBuffer, %union.GLSBuffer } +%struct.GLDRect = type { i32, i32, i32, i32, i32, i32 } +%struct.GLDRenderDispatch = type { void (%struct.GLDContextRec*, i32, float)*, void (%struct.GLDContextRec*, i32)*, i32 (%struct.GLDContextRec*, %struct.GLDMultisamplePositions*, i32, i32, i32, i32, i8*, i32, %struct.GLDBufferRec*)*, void (%struct.GLDContextRec*, %struct.GLDMultisamplePositions*, i32, i32, i32, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex**, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex**, i32, i32)*, void (%struct.GLDContextRec*, %struct.GLDVertex**, i32, i32)*, i8* (%struct.GLDContextRec*, i32, i32*)*, void (%struct.GLDContextRec*, i32, i32, i32)*, i8* (%struct.GLDContextRec*, i32, i32, i32, i32, i32)*, void (%struct.GLDContextRec*, i32, i32, i32, i32, i32, i8*)*, void (%struct.GLDContextRec*)*, void (%struct.GLDContextRec*)*, void (%struct.GLDContextRec*)*, i32 (%struct.GLDContextRec*, i32, i32, i32, i32, i32, i8*, %struct.GLTColor4*, i32)*, i32 (%struct.GLDContextRec*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)* } +%struct.GLDRenderFeatures = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } +%struct.GLDScissorTest = type { %struct.GLTFixedColor4, i8, i8, i8, i8 } +%struct.GLDSeamlessCubemap = type { i8, i8, i16 } +%struct.GLDSharedData = type {} +%struct.GLDSharedRec = type { %struct.pthread_mutex_t, %struct.GLDSharedData*, %struct.GLGProcessor, i32, i16, i16, i8, i8, i8, i8, [0 x i32] } +%struct.GLDState = type <{ i16, i16, i16, i16, i32, i32, [256 x %struct.GLTColor4], [128 x %struct.GLTColor4], %struct.GLDCurrent, %struct.GLDViewport, %struct.GLDTransform, %struct.GLDLightModel, %struct.GLDActiveTextureTargets, %struct.GLDAlphaTest, %struct.GLDBlendMode, %struct.GLDClearColor, %struct.GLDColorBuffer, %struct.GLDDepthTest, %struct.GLDArrayRange, %struct.GLDFogMode, %struct.GLDHintMode, %struct.GLDLineMode, %struct.GLDLogicOp, %struct.GLDMaskMode, %struct.GLDPixelMode, %struct.GLDPointMode, %struct.GLDPolygonMode, %struct.GLDScissorTest, i32, %struct.GLDStencilTest, [8 x %struct.GLDTextureMode], [16 x %struct.GLDTextureImageMode], [8 x %struct.GLDTextureCoordGen], %struct.GLDClipPlane, %struct.GLDMultisample, %struct.GLDArrayRange, %struct.GLDArrayRange, [3 x %struct.GLDPipelineProgramState], %struct.GLDArrayRange, %struct.GLDTransformFeedback, %struct.GLDUniformBuffer, i32*, %struct.GLDFixedFunction, i32, %struct.GLDQueryState, %struct.GLDSeamlessCubemap, %struct.GLDPrimitiveRestart, [2 x i32] }> +%struct.GLDStencilTest = type { [3 x %1], i32, [4 x i8] } +%struct.GLDStippleData = type { i32, i16, i16, [32 x [32 x i8]] } +%struct.GLDTextureCoordGen = type { %2, %2, %2, %2, i8, i8, i8, i8 } +%struct.GLDTextureGeomState = type { i16, i16, i16, i16, i16, i8, i8, i8, i8, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, [6 x i16], [6 x i16] } +%struct.GLDTextureImageMode = type { float } +%struct.GLDTextureLevel = type { i32, i32, i16, i16, i16, i8, i8, i16, i16, i16, i16, i8* } +%struct.GLDTextureLimits = type { float, float, i16, i16, i16, i16, i16, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i32, i32 } +%struct.GLDTextureMode = type { %struct.GLTColor4, i32, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, float, float } +%struct.GLDTextureParamState = type { i16, i16, i16, i16, i16, i16, %struct.GLTColor4, float, float, float, float, i16, i16, i16, i16, float, i16, i16, i32, i8* } +%struct.GLDTextureRec = type { [4 x float], %struct.GLDTextureState*, %struct.GLDPluginTextureState*, %struct.GLDMipmaplevel*, %struct.GLDMipmaplevel*, float, float, float, float, i8, i8, i8, i8, i16, i16, i16, i16, i32, float, [0 x i32], [2 x %union.PPStreamToken] } +%struct.GLDTextureState = type { i16, i8, i8, i16, i16, float, i32, %struct.GLISWRSurface*, %struct.GLDTextureParamState, %struct.GLDTextureGeomState, i16, i16, i8*, %struct.GLDTextureLevel, [1 x [15 x %struct.GLDTextureLevel]] } +%struct.GLDTransform = type <{ [24 x [16 x float]], [24 x [16 x float]], [16 x float], float, float, float, float, float, i8, i8, i8, i8, i32, i32, i32, i16, i16, i8, i8, i8, i8, i32 }> +%struct.GLDTransformFeedback = type { i8, i8, i16, [0 x i32], [16 x i32], [16 x i32] } +%struct.GLDTransformFeedbackLimits = type { i32, i32, i32, i32, i32 } +%struct.GLDUniformBuffer = type { [64 x %struct.GLTDimensions] } +%struct.GLDVertex = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLDPointLineLimits, float, %struct.GLTColor4, float, i8, i8, i8, i8, float, float, i32, i32, i32, [4 x i8], [4 x float], [2 x %struct.GLDMaterial*], [2 x i32], [16 x %struct.GLTColor4] } +%struct.GLDVertexArrayRec = type opaque +%struct.GLDVertexBlend = type { i8, i8, i8, i8 } +%struct.GLDVertexDescriptor = type { i8, i8, i8, i8, [0 x i32] } +%struct.GLDVertexProgramLimits = type { i16, i16, i32, i32, i16, i16 } +%struct.GLDViewport = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, double, double, i32, i32, i32, i32, float, float, float, float } +%struct.GLGColorTable = type { i32, i32, i32, i8* } +%struct.GLGOperation = type { i8*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, %struct.GLGColorTable, %struct.GLGColorTable, %struct.GLGColorTable } +%struct.GLGProcessor = type { void (%struct.GLDPixelMode*, %struct.GLGOperation*, %struct._GLGProcessorData*, %union._GLGFunctionKey*)*, %struct._GLVMFunction*, %union._GLGFunctionKey*, %struct._GLGProcessorData* } +%struct.GLISWRSurface = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i8*, i8*, [4 x i8*], i32 } +%struct.GLSGenericRec = type { %struct.GLTDimensions, %struct.GLTDimensions, i32, i32, %union.GLSDrawable, i8*, i8*, i8*, i8*, i8*, [4 x i8*], i32, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8 } +%struct.GLSOffScreenRec = type { %struct.GLTDimensions, %struct.GLTDimensions, i32, i32, %union.GLSDrawable, i8*, i8*, i8*, i8*, i8*, [4 x i8*], i32, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, %struct.GLDDrawableOffscreen } +%struct.GLSSWRSurfaceRec = type { %struct.GLTDimensions, %struct.GLTDimensions, i32, i32, %union.GLSDrawable, i8*, i8*, i8*, i8*, i8*, [4 x i8*], i32, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, %struct.GLISWRSurface*, i32, i32 } +%struct.GLSWindowRec = type { %struct.GLTDimensions, %struct.GLTDimensions, i32, i32, %union.GLSDrawable, i8*, i8*, i8*, i8*, i8*, [4 x i8*], i32, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, %struct.GLDDrawableWindow, i32, i32, [0 x i32], i8*, i8* } +%struct.GLTColor3 = type { float, float, float } +%struct.GLTColor4 = type { float, float, float, float } +%struct.GLTCoord2 = type { float, float } +%struct.GLTCoord3 = type { float, float, float } +%struct.GLTCoord4 = type { float, float, float, float } +%struct.GLTDimensions = type { i32, i32 } +%struct.GLTFixedColor4 = type { i32, i32, i32, i32 } +%struct.GLTPlane = type { float, float, float, float } +%struct.GLTRectangle = type { i32, i32, i32, i32 } +%struct.GLTTexCoord4 = type { float, float, float, float } +%struct.GLVMFPContext = type { float, i32, i32, i32, i32, [3 x i32] } +%struct.GLVMFragmentAttribRec = type opaque +%struct.GLVMProgramData = type { %struct._GLVMFunction*, %struct.GLVMProgramData*, %struct.GLVMProgramData*, [42 x i32], [64 x i32], i32, i32, i32, [0 x i32] } +%struct.GLVMTextures = type { [16 x %struct.GLDTextureRec*] } +%struct._GLGProcessorData = type opaque +%struct._GLVMConstants = type opaque +%struct._GLVMFunction = type opaque +%struct.anon = type { float, float, float, float } +%struct.mach_timebase_info_data_t = type { i32, i32 } +%struct.pthread_mutex_t = type { i32, [40 x i8] } +%union.GLSBuffer = type { i8* } +%union.GLSDrawable = type { %struct.GLSWindowRec* } +%union.PPStreamToken = type { %0 } +%union._GLGFunctionKey = type opaque +%union.anon = type { %struct.GLTDimensions } + +declare i16 @_OSSwapInt16(i16 zeroext %_data) nounwind inlinehint ssp + +declare i32 @_OSSwapInt32(i32 %_data) nounwind inlinehint ssp + +declare i32 @llvm.bswap.i32(i32) nounwind readnone + +define void @gldAccumReturn(%struct.GLDContextRec* %ctx, %struct.GLDState* %state, float %value) nounwind ssp { +entry: + %ctx_addr = alloca %struct.GLDContextRec* ; <%struct.GLDContextRec**> [#uses=99] + %state_addr = alloca %struct.GLDState* ; <%struct.GLDState**> [#uses=21] + %value_addr = alloca float ; <float*> [#uses=33] + %iftmp.210 = alloca float ; <float*> [#uses=3] + %iftmp.209 = alloca float ; <float*> [#uses=3] + %iftmp.208 = alloca float ; <float*> [#uses=3] + %iftmp.207 = alloca float ; <float*> [#uses=3] + %iftmp.206 = alloca float ; <float*> [#uses=3] + %iftmp.205 = alloca float ; <float*> [#uses=3] + %iftmp.204 = alloca float ; <float*> [#uses=3] + %iftmp.203 = alloca float ; <float*> [#uses=3] + %iftmp.202 = alloca float ; <float*> [#uses=3] + %iftmp.201 = alloca float ; <float*> [#uses=3] + %iftmp.200 = alloca float ; <float*> [#uses=3] + %iftmp.199 = alloca float ; <float*> [#uses=3] + %iftmp.198 = alloca float ; <float*> [#uses=3] + %iftmp.197 = alloca float ; <float*> [#uses=3] + %iftmp.196 = alloca float ; <float*> [#uses=3] + %iftmp.195 = alloca float ; <float*> [#uses=3] + %iftmp.192 = alloca i8 ; <i8*> [#uses=3] + %iftmp.190 = alloca i32 ; <i32*> [#uses=3] + %iftmp.189 = alloca i32 ; <i32*> [#uses=3] + %iftmp.188 = alloca i32 ; <i32*> [#uses=3] + %iftmp.187 = alloca i32 ; <i32*> [#uses=3] + %iftmp.186 = alloca i32 ; <i32*> [#uses=3] + %iftmp.185 = alloca i32 ; <i32*> [#uses=3] + %iftmp.184 = alloca i32 ; <i32*> [#uses=3] + %iftmp.183 = alloca i32 ; <i32*> [#uses=3] + %iftmp.182 = alloca i8 ; <i8*> [#uses=3] + %iftmp.181 = alloca i8 ; <i8*> [#uses=3] + %iftmp.180 = alloca i8 ; <i8*> [#uses=3] + %iftmp.179 = alloca i8 ; <i8*> [#uses=3] + %iftmp.178 = alloca i8 ; <i8*> [#uses=3] + %iftmp.177 = alloca i8 ; <i8*> [#uses=3] + %iftmp.176 = alloca i8 ; <i8*> [#uses=3] + %iftmp.175 = alloca i8 ; <i8*> [#uses=3] + %iftmp.174 = alloca i8 ; <i8*> [#uses=3] + %iftmp.173 = alloca i8 ; <i8*> [#uses=3] + %iftmp.172 = alloca i8 ; <i8*> [#uses=3] + %iftmp.171 = alloca i8 ; <i8*> [#uses=3] + %iftmp.170 = alloca i8 ; <i8*> [#uses=3] + %iftmp.169 = alloca i8 ; <i8*> [#uses=3] + %iftmp.168 = alloca i8 ; <i8*> [#uses=3] + %iftmp.167 = alloca i8 ; <i8*> [#uses=3] + %iftmp.164 = alloca i8 ; <i8*> [#uses=3] + %iftmp.163 = alloca float ; <float*> [#uses=3] + %iftmp.162 = alloca float ; <float*> [#uses=3] + %iftmp.161 = alloca float ; <float*> [#uses=3] + %iftmp.160 = alloca float ; <float*> [#uses=3] + %iftmp.159 = alloca float ; <float*> [#uses=3] + %iftmp.158 = alloca float ; <float*> [#uses=3] + %iftmp.157 = alloca float ; <float*> [#uses=3] + %iftmp.156 = alloca float ; <float*> [#uses=3] + %iftmp.155 = alloca float ; <float*> [#uses=3] + %iftmp.154 = alloca float ; <float*> [#uses=3] + %iftmp.153 = alloca float ; <float*> [#uses=3] + %iftmp.152 = alloca float ; <float*> [#uses=3] + %iftmp.151 = alloca float ; <float*> [#uses=3] + %iftmp.150 = alloca float ; <float*> [#uses=3] + %iftmp.149 = alloca float ; <float*> [#uses=3] + %iftmp.148 = alloca float ; <float*> [#uses=3] + %iftmp.145 = alloca i8 ; <i8*> [#uses=3] + %iftmp.144 = alloca i8 ; <i8*> [#uses=3] + %iftmp.141 = alloca i8 ; <i8*> [#uses=3] + %iftmp.140 = alloca i32 ; <i32*> [#uses=3] + %accum = alloca double* ; <double**> [#uses=56] + %accum_end = alloca double* ; <double**> [#uses=9] + %y = alloca i32 ; <i32*> [#uses=12] + %yl = alloca i32 ; <i32*> [#uses=4] + %cw4 = alloca i32 ; <i32*> [#uses=4] + %cx = alloca i32 ; <i32*> [#uses=2] + %cy = alloca i32 ; <i32*> [#uses=7] + %ch = alloca i32 ; <i32*> [#uses=3] + %cw = alloca i32 ; <i32*> [#uses=3] + %offset = alloca i32 ; <i32*> [#uses=19] + %y_inc = alloca i32 ; <i32*> [#uses=6] + %swap = alloca i8 ; <i8*> [#uses=6] + %draw_buffer = alloca i32 ; <i32*> [#uses=21] + %all_bits_mask = alloca i32 ; <i32*> [#uses=9] + %color_mask_enabled = alloca i8 ; <i8*> [#uses=4] + %color_ptr = alloca i16* ; <i16**> [#uses=8] + %thirtyOne = alloca float ; <float*> [#uses=23] + %start_offset = alloca i32 ; <i32*> [#uses=2] + %cur_draw_buffer_mask_bit = alloca i32 ; <i32*> [#uses=5] + %r = alloca float ; <float*> [#uses=12] + %g = alloca float ; <float*> [#uses=12] + %b = alloca float ; <float*> [#uses=12] + %a = alloca float ; <float*> [#uses=12] + %pixl = alloca i16 ; <i16*> [#uses=24] + %color_ptr111 = alloca i8* ; <i8**> [#uses=14] + %twoFiftyFive = alloca float ; <float*> [#uses=17] + %start_offset112 = alloca i32 ; <i32*> [#uses=2] + %cur_draw_buffer_mask_bit115 = alloca i32 ; <i32*> [#uses=9] + %r119 = alloca float ; <float*> [#uses=7] + %g120 = alloca float ; <float*> [#uses=7] + %b121 = alloca float ; <float*> [#uses=7] + %a122 = alloca float ; <float*> [#uses=7] + %r193 = alloca i32 ; <i32*> [#uses=2] + %g194 = alloca i32 ; <i32*> [#uses=2] + %b195 = alloca i32 ; <i32*> [#uses=2] + %a196 = alloca i32 ; <i32*> [#uses=2] + %color = alloca i32 ; <i32*> [#uses=4] + %color_ptr235 = alloca float* ; <float**> [#uses=13] + %start_offset236 = alloca i32 ; <i32*> [#uses=2] + %cur_draw_buffer_mask_bit239 = alloca i32 ; <i32*> [#uses=5] + %r243 = alloca float ; <float*> [#uses=4] + %g244 = alloca float ; <float*> [#uses=4] + %b245 = alloca float ; <float*> [#uses=4] + %a246 = alloca float ; <float*> [#uses=4] + %r283 = alloca float ; <float*> [#uses=4] + %g284 = alloca float ; <float*> [#uses=4] + %b285 = alloca float ; <float*> [#uses=4] + %a286 = alloca float ; <float*> [#uses=4] + %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] + store %struct.GLDContextRec* %ctx, %struct.GLDContextRec** %ctx_addr + store %struct.GLDState* %state, %struct.GLDState** %state_addr + store float %value, float* %value_addr + %0 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %1 = getelementptr inbounds %struct.GLDContextRec* %0, i32 0, i32 51 ; <%union.GLSDrawable*> [#uses=1] + %2 = getelementptr inbounds %union.GLSDrawable* %1, i32 0, i32 0 ; <%struct.GLSWindowRec**> [#uses=1] + %3 = bitcast %struct.GLSWindowRec** %2 to %struct.GLSGenericRec** ; <%struct.GLSGenericRec**> [#uses=1] + %4 = load %struct.GLSGenericRec** %3, align 4 ; <%struct.GLSGenericRec*> [#uses=1] + %5 = getelementptr inbounds %struct.GLSGenericRec* %4, i32 0, i32 16 ; <i8*> [#uses=1] + %6 = load i8* %5, align 4 ; <i8> [#uses=1] + store i8 %6, i8* %swap, align 1 + store i32 255, i32* %all_bits_mask, align 4 + %7 = load %struct.GLDState** %state_addr, align 4 ; <%struct.GLDState*> [#uses=1] + %8 = getelementptr inbounds %struct.GLDState* %7, i32 0, i32 23 ; <%struct.GLDMaskMode*> [#uses=1] + %9 = getelementptr inbounds %struct.GLDMaskMode* %8, i32 0, i32 5 ; <i8*> [#uses=1] + %10 = load i8* %9, align 1 ; <i8> [#uses=1] + %11 = zext i8 %10 to i32 ; <i32> [#uses=1] + %12 = load i32* %all_bits_mask, align 4 ; <i32> [#uses=1] + %13 = and i32 %11, %12 ; <i32> [#uses=1] + %14 = load i32* %all_bits_mask, align 4 ; <i32> [#uses=1] + %15 = icmp ne i32 %13, %14 ; <i1> [#uses=1] + %16 = zext i1 %15 to i8 ; <i8> [#uses=1] + %17 = load %struct.GLDState** %state_addr, align 4 ; <%struct.GLDState*> [#uses=1] + %18 = getelementptr inbounds %struct.GLDState* %17, i32 0, i32 23 ; <%struct.GLDMaskMode*> [#uses=1] + %19 = getelementptr inbounds %struct.GLDMaskMode* %18, i32 0, i32 2 ; <i8*> [#uses=1] + %20 = load i8* %19, align 16 ; <i8> [#uses=1] + %21 = zext i8 %20 to i32 ; <i32> [#uses=1] + %22 = load i32* %all_bits_mask, align 4 ; <i32> [#uses=1] + %23 = and i32 %21, %22 ; <i32> [#uses=1] + %24 = load i32* %all_bits_mask, align 4 ; <i32> [#uses=1] + %25 = icmp ne i32 %23, %24 ; <i1> [#uses=1] + %26 = zext i1 %25 to i8 ; <i8> [#uses=1] + %toBool = icmp ne i8 %16, 0 ; <i1> [#uses=1] + %toBool1 = icmp ne i8 %26, 0 ; <i1> [#uses=1] + %27 = or i1 %toBool, %toBool1 ; <i1> [#uses=1] + %28 = zext i1 %27 to i8 ; <i8> [#uses=1] + %29 = load %struct.GLDState** %state_addr, align 4 ; <%struct.GLDState*> [#uses=1] + %30 = getelementptr inbounds %struct.GLDState* %29, i32 0, i32 23 ; <%struct.GLDMaskMode*> [#uses=1] + %31 = getelementptr inbounds %struct.GLDMaskMode* %30, i32 0, i32 4 ; <i8*> [#uses=1] + %32 = load i8* %31, align 2 ; <i8> [#uses=1] + %33 = zext i8 %32 to i32 ; <i32> [#uses=1] + %34 = load i32* %all_bits_mask, align 4 ; <i32> [#uses=1] + %35 = and i32 %33, %34 ; <i32> [#uses=1] + %36 = load i32* %all_bits_mask, align 4 ; <i32> [#uses=1] + %37 = icmp ne i32 %35, %36 ; <i1> [#uses=1] + %38 = zext i1 %37 to i8 ; <i8> [#uses=1] + %toBool2 = icmp ne i8 %28, 0 ; <i1> [#uses=1] + %toBool3 = icmp ne i8 %38, 0 ; <i1> [#uses=1] + %39 = or i1 %toBool2, %toBool3 ; <i1> [#uses=1] + %40 = zext i1 %39 to i8 ; <i8> [#uses=1] + %41 = load %struct.GLDState** %state_addr, align 4 ; <%struct.GLDState*> [#uses=1] + %42 = getelementptr inbounds %struct.GLDState* %41, i32 0, i32 23 ; <%struct.GLDMaskMode*> [#uses=1] + %43 = getelementptr inbounds %struct.GLDMaskMode* %42, i32 0, i32 3 ; <i8*> [#uses=1] + %44 = load i8* %43, align 1 ; <i8> [#uses=1] + %45 = zext i8 %44 to i32 ; <i32> [#uses=1] + %46 = load i32* %all_bits_mask, align 4 ; <i32> [#uses=1] + %47 = and i32 %45, %46 ; <i32> [#uses=1] + %48 = load i32* %all_bits_mask, align 4 ; <i32> [#uses=1] + %49 = icmp ne i32 %47, %48 ; <i1> [#uses=1] + %50 = zext i1 %49 to i8 ; <i8> [#uses=1] + %toBool4 = icmp ne i8 %40, 0 ; <i1> [#uses=1] + %toBool5 = icmp ne i8 %50, 0 ; <i1> [#uses=1] + %51 = or i1 %toBool4, %toBool5 ; <i1> [#uses=1] + %52 = zext i1 %51 to i8 ; <i8> [#uses=1] + store i8 %52, i8* %color_mask_enabled, align 1 + %53 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %54 = getelementptr inbounds %struct.GLDContextRec* %53, i32 0, i32 55 ; <%struct.GLDRect*> [#uses=1] + %55 = getelementptr inbounds %struct.GLDRect* %54, i32 0, i32 0 ; <i32*> [#uses=1] + %56 = load i32* %55, align 4 ; <i32> [#uses=1] + store i32 %56, i32* %cx, align 4 + %57 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %58 = getelementptr inbounds %struct.GLDContextRec* %57, i32 0, i32 55 ; <%struct.GLDRect*> [#uses=1] + %59 = getelementptr inbounds %struct.GLDRect* %58, i32 0, i32 1 ; <i32*> [#uses=1] + %60 = load i32* %59, align 4 ; <i32> [#uses=1] + store i32 %60, i32* %cy, align 4 + %61 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %62 = getelementptr inbounds %struct.GLDContextRec* %61, i32 0, i32 55 ; <%struct.GLDRect*> [#uses=1] + %63 = getelementptr inbounds %struct.GLDRect* %62, i32 0, i32 4 ; <i32*> [#uses=1] + %64 = load i32* %63, align 4 ; <i32> [#uses=1] + store i32 %64, i32* %cw, align 4 + %65 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %66 = getelementptr inbounds %struct.GLDContextRec* %65, i32 0, i32 55 ; <%struct.GLDRect*> [#uses=1] + %67 = getelementptr inbounds %struct.GLDRect* %66, i32 0, i32 5 ; <i32*> [#uses=1] + %68 = load i32* %67, align 4 ; <i32> [#uses=1] + store i32 %68, i32* %ch, align 4 + %69 = load i32* %cw, align 4 ; <i32> [#uses=1] + %70 = icmp eq i32 %69, 0 ; <i1> [#uses=1] + br i1 %70, label %bb6, label %bb + +bb: ; preds = %entry + %71 = load i32* %ch, align 4 ; <i32> [#uses=1] + %72 = icmp eq i32 %71, 0 ; <i1> [#uses=1] + br i1 %72, label %bb6, label %bb7 + +bb6: ; preds = %bb, %entry + br label %bb316 + +bb7: ; preds = %bb + %73 = load i32* %cw, align 4 ; <i32> [#uses=1] + %74 = mul i32 %73, 4 ; <i32> [#uses=1] + store i32 %74, i32* %cw4, align 4 + %75 = load i32* %cy, align 4 ; <i32> [#uses=1] + %76 = load i32* %ch, align 4 ; <i32> [#uses=1] + %77 = add i32 %75, %76 ; <i32> [#uses=1] + store i32 %77, i32* %yl, align 4 + %78 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %79 = getelementptr inbounds %struct.GLDContextRec* %78, i32 0, i32 30 ; <%struct.GLDBufferstate*> [#uses=1] + %80 = getelementptr inbounds %struct.GLDBufferstate* %79, i32 0, i32 1 ; <%struct.GLTDimensions*> [#uses=1] + %81 = getelementptr inbounds %struct.GLTDimensions* %80, i32 0, i32 0 ; <i32*> [#uses=1] + %82 = load i32* %81, align 4 ; <i32> [#uses=1] + %83 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %84 = getelementptr inbounds %struct.GLDContextRec* %83, i32 0, i32 28 ; <%struct.GLDFramebufferRec**> [#uses=1] + %85 = load %struct.GLDFramebufferRec** %84, align 4 ; <%struct.GLDFramebufferRec*> [#uses=1] + %86 = icmp ne %struct.GLDFramebufferRec* %85, null ; <i1> [#uses=1] + br i1 %86, label %bb8, label %bb9 + +bb8: ; preds = %bb7 + %87 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %88 = getelementptr inbounds %struct.GLDContextRec* %87, i32 0, i32 57 ; <%struct.GLDFormat*> [#uses=1] + %89 = getelementptr inbounds %struct.GLDFormat* %88, i32 0, i32 12 ; <i8*> [#uses=1] + %90 = load i8* %89, align 2 ; <i8> [#uses=1] + %91 = icmp ne i8 %90, 0 ; <i1> [#uses=1] + %92 = zext i1 %91 to i8 ; <i8> [#uses=1] + store i8 %92, i8* %iftmp.141, align 1 + br label %bb10 + +bb9: ; preds = %bb7 + %93 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %94 = getelementptr inbounds %struct.GLDContextRec* %93, i32 0, i32 56 ; <%struct.GLDFormat*> [#uses=1] + %95 = getelementptr inbounds %struct.GLDFormat* %94, i32 0, i32 12 ; <i8*> [#uses=1] + %96 = load i8* %95, align 2 ; <i8> [#uses=1] + %97 = icmp ne i8 %96, 0 ; <i1> [#uses=1] + %98 = zext i1 %97 to i8 ; <i8> [#uses=1] + store i8 %98, i8* %iftmp.141, align 1 + br label %bb10 + +bb10: ; preds = %bb9, %bb8 + %99 = load i8* %iftmp.141, align 1 ; <i8> [#uses=1] + %toBool11 = icmp ne i8 %99, 0 ; <i1> [#uses=1] + br i1 %toBool11, label %bb12, label %bb13 + +bb12: ; preds = %bb10 + %100 = load i32* %cy, align 4 ; <i32> [#uses=1] + store i32 %100, i32* %iftmp.140, align 4 + br label %bb14 + +bb13: ; preds = %bb10 + %101 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %102 = getelementptr inbounds %struct.GLDContextRec* %101, i32 0, i32 30 ; <%struct.GLDBufferstate*> [#uses=1] + %103 = getelementptr inbounds %struct.GLDBufferstate* %102, i32 0, i32 1 ; <%struct.GLTDimensions*> [#uses=1] + %104 = getelementptr inbounds %struct.GLTDimensions* %103, i32 0, i32 1 ; <i32*> [#uses=1] + %105 = load i32* %104, align 4 ; <i32> [#uses=1] + %106 = sub nsw i32 %105, 1 ; <i32> [#uses=1] + %107 = load i32* %cy, align 4 ; <i32> [#uses=1] + %108 = sub nsw i32 %106, %107 ; <i32> [#uses=1] + store i32 %108, i32* %iftmp.140, align 4 + br label %bb14 + +bb14: ; preds = %bb13, %bb12 + %109 = load i32* %iftmp.140, align 4 ; <i32> [#uses=1] + %110 = mul nsw i32 %82, %109 ; <i32> [#uses=1] + %111 = load i32* %cx, align 4 ; <i32> [#uses=1] + %112 = add nsw i32 %110, %111 ; <i32> [#uses=1] + store i32 %112, i32* %offset, align 4 + %113 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %114 = getelementptr inbounds %struct.GLDContextRec* %113, i32 0, i32 30 ; <%struct.GLDBufferstate*> [#uses=1] + %115 = getelementptr inbounds %struct.GLDBufferstate* %114, i32 0, i32 1 ; <%struct.GLTDimensions*> [#uses=1] + %116 = getelementptr inbounds %struct.GLTDimensions* %115, i32 0, i32 0 ; <i32*> [#uses=1] + %117 = load i32* %116, align 4 ; <i32> [#uses=1] + store i32 %117, i32* %y_inc, align 4 + %118 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %119 = getelementptr inbounds %struct.GLDContextRec* %118, i32 0, i32 28 ; <%struct.GLDFramebufferRec**> [#uses=1] + %120 = load %struct.GLDFramebufferRec** %119, align 4 ; <%struct.GLDFramebufferRec*> [#uses=1] + %121 = icmp ne %struct.GLDFramebufferRec* %120, null ; <i1> [#uses=1] + br i1 %121, label %bb15, label %bb16 + +bb15: ; preds = %bb14 + %122 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %123 = getelementptr inbounds %struct.GLDContextRec* %122, i32 0, i32 57 ; <%struct.GLDFormat*> [#uses=1] + %124 = getelementptr inbounds %struct.GLDFormat* %123, i32 0, i32 12 ; <i8*> [#uses=1] + %125 = load i8* %124, align 2 ; <i8> [#uses=1] + %126 = icmp eq i8 %125, 0 ; <i1> [#uses=1] + %127 = zext i1 %126 to i8 ; <i8> [#uses=1] + store i8 %127, i8* %iftmp.144, align 1 + br label %bb17 + +bb16: ; preds = %bb14 + %128 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %129 = getelementptr inbounds %struct.GLDContextRec* %128, i32 0, i32 56 ; <%struct.GLDFormat*> [#uses=1] + %130 = getelementptr inbounds %struct.GLDFormat* %129, i32 0, i32 12 ; <i8*> [#uses=1] + %131 = load i8* %130, align 2 ; <i8> [#uses=1] + %132 = icmp eq i8 %131, 0 ; <i1> [#uses=1] + %133 = zext i1 %132 to i8 ; <i8> [#uses=1] + store i8 %133, i8* %iftmp.144, align 1 + br label %bb17 + +bb17: ; preds = %bb16, %bb15 + %134 = load i8* %iftmp.144, align 1 ; <i8> [#uses=1] + %toBool18 = icmp ne i8 %134, 0 ; <i1> [#uses=1] + br i1 %toBool18, label %bb19, label %bb20 + +bb19: ; preds = %bb17 + %135 = load i32* %y_inc, align 4 ; <i32> [#uses=1] + %136 = sub i32 0, %135 ; <i32> [#uses=1] + store i32 %136, i32* %y_inc, align 4 + br label %bb20 + +bb20: ; preds = %bb19, %bb17 + %137 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %138 = getelementptr inbounds %struct.GLDContextRec* %137, i32 0, i32 28 ; <%struct.GLDFramebufferRec**> [#uses=1] + %139 = load %struct.GLDFramebufferRec** %138, align 4 ; <%struct.GLDFramebufferRec*> [#uses=1] + %140 = icmp ne %struct.GLDFramebufferRec* %139, null ; <i1> [#uses=1] + br i1 %140, label %bb21, label %bb22 + +bb21: ; preds = %bb20 + %141 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %142 = getelementptr inbounds %struct.GLDContextRec* %141, i32 0, i32 28 ; <%struct.GLDFramebufferRec**> [#uses=1] + %143 = load %struct.GLDFramebufferRec** %142, align 4 ; <%struct.GLDFramebufferRec*> [#uses=1] + %144 = getelementptr inbounds %struct.GLDFramebufferRec* %143, i32 0, i32 2 ; <[10 x %struct.GLDFormat]*> [#uses=1] + %145 = getelementptr inbounds [10 x %struct.GLDFormat]* %144, i32 0, i32 0 ; <%struct.GLDFormat*> [#uses=1] + %146 = getelementptr inbounds %struct.GLDFormat* %145, i32 0, i32 7 ; <i32*> [#uses=1] + %147 = load i32* %146, align 4 ; <i32> [#uses=1] + %148 = icmp eq i32 %147, 33638 ; <i1> [#uses=1] + %149 = zext i1 %148 to i8 ; <i8> [#uses=1] + store i8 %149, i8* %iftmp.145, align 1 + br label %bb23 + +bb22: ; preds = %bb20 + %150 = load %struct.GLDContextRec** %ctx_addr, align 4 ; <%struct.GLDContextRec*> [#uses=1] + %151 = getelementptr inbounds %struct.GLDContextRec* %150, i32 0, i32 56 ; <%struct.GLDFormat*> [#uses=1] + %152 = getelementptr inbounds %struct.GLDFormat* %151, i32 0, i32 7 ; <i32*> [#uses=1] + %153 = load i32* %152, align 4 ; |