Index: lib/Target/AMDGPU/AMDGPU.h =================================================================== --- lib/Target/AMDGPU/AMDGPU.h +++ lib/Target/AMDGPU/AMDGPU.h @@ -29,7 +29,6 @@ // R600 Passes FunctionPass *createR600VectorRegMerger(TargetMachine &tm); -FunctionPass *createR600TextureIntrinsicsReplacer(); FunctionPass *createR600ExpandSpecialInstrsPass(TargetMachine &tm); FunctionPass *createR600EmitClauseMarkers(); FunctionPass *createR600ClauseMergePass(TargetMachine &tm); Index: lib/Target/AMDGPU/AMDGPUTargetMachine.cpp =================================================================== --- lib/Target/AMDGPU/AMDGPUTargetMachine.cpp +++ lib/Target/AMDGPU/AMDGPUTargetMachine.cpp @@ -432,7 +432,6 @@ if (EnableR600StructurizeCFG) addPass(createStructurizeCFGPass()); - addPass(createR600TextureIntrinsicsReplacer()); return false; } Index: lib/Target/AMDGPU/CMakeLists.txt =================================================================== --- lib/Target/AMDGPU/CMakeLists.txt +++ lib/Target/AMDGPU/CMakeLists.txt @@ -61,7 +61,6 @@ R600OptimizeVectorRegisters.cpp R600Packetizer.cpp R600RegisterInfo.cpp - R600TextureIntrinsicsReplacer.cpp SIAnnotateControlFlow.cpp SIDebuggerInsertNops.cpp SIFixControlFlowLiveIntervals.cpp Index: lib/Target/AMDGPU/R600ISelLowering.cpp =================================================================== --- lib/Target/AMDGPU/R600ISelLowering.cpp +++ lib/Target/AMDGPU/R600ISelLowering.cpp @@ -760,7 +760,7 @@ }; return DAG.getNode(AMDGPUISD::TEXTURE_FETCH, DL, MVT::v4f32, TexArgs); } - case AMDGPUIntrinsic::AMDGPU_dp4: { + case AMDGPUIntrinsic::r600_dot4: { SDValue Args[8] = { DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, MVT::f32, Op.getOperand(1), DAG.getConstant(0, DL, MVT::i32)), Index: lib/Target/AMDGPU/R600Instructions.td =================================================================== --- lib/Target/AMDGPU/R600Instructions.td +++ lib/Target/AMDGPU/R600Instructions.td @@ -1355,9 +1355,7 @@ (outs R600_Reg128:$dst), (ins R600_Reg128:$src0, R600_Reg128:$src1, R600_Reg128:$src2, i32imm:$resourceId, i32imm:$samplerId, i32imm:$textureTarget), - "TXD $dst, $src0, $src1, $src2, $resourceId, $samplerId, $textureTarget", - [(set v4f32:$dst, (int_AMDGPU_txd v4f32:$src0, v4f32:$src1, v4f32:$src2, - imm:$resourceId, imm:$samplerId, imm:$textureTarget))], + "TXD $dst, $src0, $src1, $src2, $resourceId, $samplerId, $textureTarget", [], NullALU > { let TEXInst = 1; } @@ -1367,10 +1365,7 @@ (ins R600_Reg128:$src0, R600_Reg128:$src1, R600_Reg128:$src2, i32imm:$resourceId, i32imm:$samplerId, i32imm:$textureTarget), "TXD_SHADOW $dst, $src0, $src1, $src2, $resourceId, $samplerId, $textureTarget", - [(set v4f32:$dst, (int_AMDGPU_txd v4f32:$src0, v4f32:$src1, v4f32:$src2, - imm:$resourceId, imm:$samplerId, TEX_SHADOW:$textureTarget))], - NullALU -> { + [], NullALU> { let TEXInst = 1; } } // End isPseudo = 1 Index: lib/Target/AMDGPU/R600Intrinsics.td =================================================================== --- lib/Target/AMDGPU/R600Intrinsics.td +++ lib/Target/AMDGPU/R600Intrinsics.td @@ -12,18 +12,6 @@ //===----------------------------------------------------------------------===// // FIXME: Should migrate to using TargetPrefix that matches triple arch name. -let TargetPrefix = "AMDGPU", isTarget = 1 in { - def int_AMDGPU_dp4 : Intrinsic<[llvm_float_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; - def int_AMDGPU_tex : Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_AMDGPU_txb : Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_AMDGPU_txf : Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_AMDGPU_txq : Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_AMDGPU_txd : Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_AMDGPU_txl : Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_AMDGPU_ddx : Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_AMDGPU_ddy : Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; -} - let TargetPrefix = "R600", isTarget = 1 in { class TextureIntrinsicFloatInput : Intrinsic<[llvm_v4f32_ty], [ @@ -85,4 +73,8 @@ def int_r600_txq : TextureIntrinsicInt32Input; def int_r600_ddx : TextureIntrinsicFloatInput; def int_r600_ddy : TextureIntrinsicFloatInput; + + def int_r600_dot4 : Intrinsic<[llvm_float_ty], + [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem] + >; } // End TargetPrefix = "r600", isTarget = 1 Index: lib/Target/AMDGPU/R600TextureIntrinsicsReplacer.cpp =================================================================== --- lib/Target/AMDGPU/R600TextureIntrinsicsReplacer.cpp +++ /dev/null @@ -1,303 +0,0 @@ -//===-- R600TextureIntrinsicsReplacer.cpp ---------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// \file -/// This pass translates tgsi-like texture intrinsics into R600 texture -/// closer to hardware intrinsics. -//===----------------------------------------------------------------------===// - -#include "AMDGPU.h" -#include "llvm/ADT/Statistic.h" -#include "llvm/Analysis/Passes.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/GlobalValue.h" -#include "llvm/IR/IRBuilder.h" -#include "llvm/IR/InstVisitor.h" - -using namespace llvm; - -namespace { -class R600TextureIntrinsicsReplacer : - public FunctionPass, public InstVisitor { - static char ID; - - Module *Mod; - Type *FloatType; - Type *Int32Type; - Type *V4f32Type; - Type *V4i32Type; - FunctionType *TexSign; - FunctionType *TexQSign; - - void getAdjustmentFromTextureTarget(unsigned TextureType, bool hasLOD, - unsigned SrcSelect[4], unsigned CT[4], - bool &useShadowVariant) { - enum TextureTypes { - TEXTURE_1D = 1, - TEXTURE_2D, - TEXTURE_3D, - TEXTURE_CUBE, - TEXTURE_RECT, - TEXTURE_SHADOW1D, - TEXTURE_SHADOW2D, - TEXTURE_SHADOWRECT, - TEXTURE_1D_ARRAY, - TEXTURE_2D_ARRAY, - TEXTURE_SHADOW1D_ARRAY, - TEXTURE_SHADOW2D_ARRAY, - TEXTURE_SHADOWCUBE, - TEXTURE_2D_MSAA, - TEXTURE_2D_ARRAY_MSAA, - TEXTURE_CUBE_ARRAY, - TEXTURE_SHADOWCUBE_ARRAY - }; - - switch (TextureType) { - case 0: - useShadowVariant = false; - return; - case TEXTURE_RECT: - case TEXTURE_1D: - case TEXTURE_2D: - case TEXTURE_3D: - case TEXTURE_CUBE: - case TEXTURE_1D_ARRAY: - case TEXTURE_2D_ARRAY: - case TEXTURE_CUBE_ARRAY: - case TEXTURE_2D_MSAA: - case TEXTURE_2D_ARRAY_MSAA: - useShadowVariant = false; - break; - case TEXTURE_SHADOW1D: - case TEXTURE_SHADOW2D: - case TEXTURE_SHADOWRECT: - case TEXTURE_SHADOW1D_ARRAY: - case TEXTURE_SHADOW2D_ARRAY: - case TEXTURE_SHADOWCUBE: - case TEXTURE_SHADOWCUBE_ARRAY: - useShadowVariant = true; - break; - default: - llvm_unreachable("Unknow Texture Type"); - } - - if (TextureType == TEXTURE_RECT || - TextureType == TEXTURE_SHADOWRECT) { - CT[0] = 0; - CT[1] = 0; - } - - if (TextureType == TEXTURE_CUBE_ARRAY || - TextureType == TEXTURE_SHADOWCUBE_ARRAY) - CT[2] = 0; - - if (TextureType == TEXTURE_1D_ARRAY || - TextureType == TEXTURE_SHADOW1D_ARRAY) { - if (hasLOD && useShadowVariant) { - CT[1] = 0; - } else { - CT[2] = 0; - SrcSelect[2] = 1; - } - } else if (TextureType == TEXTURE_2D_ARRAY || - TextureType == TEXTURE_SHADOW2D_ARRAY) { - CT[2] = 0; - } - - if ((TextureType == TEXTURE_SHADOW1D || - TextureType == TEXTURE_SHADOW2D || - TextureType == TEXTURE_SHADOWRECT || - TextureType == TEXTURE_SHADOW1D_ARRAY) && - !(hasLOD && useShadowVariant)) - SrcSelect[3] = 2; - } - - void ReplaceCallInst(CallInst &I, FunctionType *FT, const char *Name, - unsigned SrcSelect[4], Value *Offset[3], Value *Resource, - Value *Sampler, unsigned CT[4], Value *Coord) { - IRBuilder<> Builder(&I); - Constant *Mask[] = { - ConstantInt::get(Int32Type, SrcSelect[0]), - ConstantInt::get(Int32Type, SrcSelect[1]), - ConstantInt::get(Int32Type, SrcSelect[2]), - ConstantInt::get(Int32Type, SrcSelect[3]) - }; - Value *SwizzleMask = ConstantVector::get(Mask); - Value *SwizzledCoord = - Builder.CreateShuffleVector(Coord, Coord, SwizzleMask); - - Value *Args[] = { - SwizzledCoord, - Offset[0], - Offset[1], - Offset[2], - Resource, - Sampler, - ConstantInt::get(Int32Type, CT[0]), - ConstantInt::get(Int32Type, CT[1]), - ConstantInt::get(Int32Type, CT[2]), - ConstantInt::get(Int32Type, CT[3]) - }; - - Function *F = Mod->getFunction(Name); - if (!F) { - F = Function::Create(FT, GlobalValue::ExternalLinkage, Name, Mod); - F->addFnAttr(Attribute::ReadNone); - } - I.replaceAllUsesWith(Builder.CreateCall(F, Args)); - I.eraseFromParent(); - } - - void ReplaceTexIntrinsic(CallInst &I, bool hasLOD, FunctionType *FT, - const char *VanillaInt, - const char *ShadowInt) { - Value *Coord = I.getArgOperand(0); - Value *ResourceId = I.getArgOperand(1); - Value *SamplerId = I.getArgOperand(2); - - unsigned TextureType = - cast(I.getArgOperand(3))->getZExtValue(); - - unsigned SrcSelect[4] = { 0, 1, 2, 3 }; - unsigned CT[4] = {1, 1, 1, 1}; - Value *Offset[3] = { - ConstantInt::get(Int32Type, 0), - ConstantInt::get(Int32Type, 0), - ConstantInt::get(Int32Type, 0) - }; - bool useShadowVariant; - - getAdjustmentFromTextureTarget(TextureType, hasLOD, SrcSelect, CT, - useShadowVariant); - - ReplaceCallInst(I, FT, useShadowVariant?ShadowInt:VanillaInt, SrcSelect, - Offset, ResourceId, SamplerId, CT, Coord); - } - - void ReplaceTXF(CallInst &I) { - Value *Coord = I.getArgOperand(0); - Value *ResourceId = I.getArgOperand(4); - Value *SamplerId = I.getArgOperand(5); - - unsigned TextureType = - cast(I.getArgOperand(6))->getZExtValue(); - - unsigned SrcSelect[4] = { 0, 1, 2, 3 }; - unsigned CT[4] = {1, 1, 1, 1}; - Value *Offset[3] = { - I.getArgOperand(1), - I.getArgOperand(2), - I.getArgOperand(3), - }; - bool useShadowVariant; - - getAdjustmentFromTextureTarget(TextureType, false, SrcSelect, CT, - useShadowVariant); - - ReplaceCallInst(I, TexQSign, "llvm.R600.txf", SrcSelect, - Offset, ResourceId, SamplerId, CT, Coord); - } - -public: - R600TextureIntrinsicsReplacer(): - FunctionPass(ID) { - } - - bool doInitialization(Module &M) override { - LLVMContext &Ctx = M.getContext(); - Mod = &M; - FloatType = Type::getFloatTy(Ctx); - Int32Type = Type::getInt32Ty(Ctx); - V4f32Type = VectorType::get(FloatType, 4); - V4i32Type = VectorType::get(Int32Type, 4); - Type *ArgsType[] = { - V4f32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - }; - TexSign = FunctionType::get(V4f32Type, ArgsType, /*isVarArg=*/false); - Type *ArgsQType[] = { - V4i32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - Int32Type, - }; - TexQSign = FunctionType::get(V4f32Type, ArgsQType, /*isVarArg=*/false); - return false; - } - - bool runOnFunction(Function &F) override { - visit(F); - return false; - } - - const char *getPassName() const override { - return "R600 Texture Intrinsics Replacer"; - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - } - - void visitCallInst(CallInst &I) { - if (!I.getCalledFunction()) - return; - - StringRef Name = I.getCalledFunction()->getName(); - if (Name == "llvm.AMDGPU.tex") { - ReplaceTexIntrinsic(I, false, TexSign, "llvm.r600.tex", "llvm.r600.texc"); - return; - } - if (Name == "llvm.AMDGPU.txl") { - ReplaceTexIntrinsic(I, true, TexSign, "llvm.r600.txl", "llvm.r600.txlc"); - return; - } - if (Name == "llvm.AMDGPU.txb") { - ReplaceTexIntrinsic(I, true, TexSign, "llvm.r600.txb", "llvm.r600.txbc"); - return; - } - if (Name == "llvm.AMDGPU.txf") { - ReplaceTXF(I); - return; - } - if (Name == "llvm.AMDGPU.txq") { - ReplaceTexIntrinsic(I, false, TexQSign, "llvm.r600.txq", "llvm.r600.txq"); - return; - } - if (Name == "llvm.AMDGPU.ddx") { - ReplaceTexIntrinsic(I, false, TexSign, "llvm.r600.ddx", "llvm.r600.ddx"); - return; - } - if (Name == "llvm.AMDGPU.ddy") { - ReplaceTexIntrinsic(I, false, TexSign, "llvm.r600.ddy", "llvm.r600.ddy"); - return; - } - } - -}; - -char R600TextureIntrinsicsReplacer::ID = 0; - -} - -FunctionPass *llvm::createR600TextureIntrinsicsReplacer() { - return new R600TextureIntrinsicsReplacer(); -} Index: test/CodeGen/AMDGPU/big_alu.ll =================================================================== --- test/CodeGen/AMDGPU/big_alu.ll +++ test/CodeGen/AMDGPU/big_alu.ll @@ -1,823 +1,834 @@ ; RUN: llc -march=r600 -mcpu=cedar < %s ; This test ensures that R600 backend can handle ifcvt properly -; and do not generate ALU clauses with more than 128 instructions. define amdgpu_ps void @main(<4 x float> inreg %reg0, <4 x float> inreg %reg1, <4 x float> inreg %reg2, <4 x float> inreg %reg3, <4 x float> inreg %reg4, <4 x float> inreg %reg5, <4 x float> inreg %reg6, <4 x float> inreg %reg7, <4 x float> inreg %reg8, <4 x float> inreg %reg9) { main_body: - %0 = extractelement <4 x float> %reg0, i32 0 - %1 = extractelement <4 x float> %reg0, i32 1 - %2 = extractelement <4 x float> %reg0, i32 2 - %3 = extractelement <4 x float> %reg0, i32 3 - %4 = extractelement <4 x float> %reg1, i32 0 - %5 = extractelement <4 x float> %reg9, i32 0 - %6 = extractelement <4 x float> %reg8, i32 0 - %7 = fcmp ugt float %6, 0.000000e+00 - %8 = select i1 %7, float %4, float %5 - %9 = extractelement <4 x float> %reg1, i32 1 - %10 = extractelement <4 x float> %reg9, i32 1 - %11 = extractelement <4 x float> %reg8, i32 0 - %12 = fcmp ugt float %11, 0.000000e+00 - %13 = select i1 %12, float %9, float %10 - %14 = extractelement <4 x float> %reg1, i32 2 - %15 = extractelement <4 x float> %reg9, i32 2 - %16 = extractelement <4 x float> %reg8, i32 0 - %17 = fcmp ugt float %16, 0.000000e+00 - %18 = select i1 %17, float %14, float %15 - %19 = extractelement <4 x float> %reg1, i32 3 - %20 = extractelement <4 x float> %reg9, i32 3 - %21 = extractelement <4 x float> %reg8, i32 0 - %22 = extractelement <4 x float> %reg2, i32 0 - %23 = extractelement <4 x float> %reg2, i32 1 - %24 = extractelement <4 x float> %reg2, i32 2 - %25 = extractelement <4 x float> %reg2, i32 3 - %26 = extractelement <4 x float> %reg3, i32 0 - %27 = extractelement <4 x float> %reg3, i32 1 - %28 = extractelement <4 x float> %reg3, i32 2 - %29 = extractelement <4 x float> %reg3, i32 3 - %30 = extractelement <4 x float> %reg4, i32 0 - %31 = extractelement <4 x float> %reg4, i32 1 - %32 = extractelement <4 x float> %reg4, i32 2 - %33 = extractelement <4 x float> %reg4, i32 3 - %34 = extractelement <4 x float> %reg5, i32 0 - %35 = extractelement <4 x float> %reg5, i32 1 - %36 = extractelement <4 x float> %reg5, i32 2 - %37 = extractelement <4 x float> %reg5, i32 3 - %38 = extractelement <4 x float> %reg6, i32 0 - %39 = extractelement <4 x float> %reg6, i32 1 - %40 = extractelement <4 x float> %reg6, i32 2 - %41 = extractelement <4 x float> %reg6, i32 3 - %42 = extractelement <4 x float> %reg7, i32 0 - %43 = extractelement <4 x float> %reg7, i32 1 - %44 = extractelement <4 x float> %reg7, i32 2 - %45 = extractelement <4 x float> %reg7, i32 3 - %46 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 11) - %47 = extractelement <4 x float> %46, i32 0 - %48 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 11) - %49 = extractelement <4 x float> %48, i32 1 - %50 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 11) - %51 = extractelement <4 x float> %50, i32 2 - %52 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 12) - %53 = extractelement <4 x float> %52, i32 0 - %54 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 14) - %55 = extractelement <4 x float> %54, i32 0 - %56 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 14) - %57 = extractelement <4 x float> %56, i32 1 - %58 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 14) - %59 = extractelement <4 x float> %58, i32 2 - %60 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 14) - %61 = extractelement <4 x float> %60, i32 3 - %62 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 16) - %63 = extractelement <4 x float> %62, i32 0 - %64 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 16) - %65 = extractelement <4 x float> %64, i32 1 - %66 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 16) - %67 = extractelement <4 x float> %66, i32 2 - %68 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) - %69 = extractelement <4 x float> %68, i32 0 - %70 = fcmp oge float %69, 3.500000e+00 - %71 = sext i1 %70 to i32 - %72 = bitcast i32 %71 to float - %73 = bitcast float %72 to i32 - %74 = icmp ne i32 %73, 0 - %. = select i1 %74, float 0.000000e+00, float 0.000000e+00 - %75 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) - %76 = extractelement <4 x float> %75, i32 0 - %77 = fcmp oge float %76, 2.000000e+00 - %78 = sext i1 %77 to i32 - %79 = bitcast i32 %78 to float - %80 = bitcast float %79 to i32 - %81 = icmp ne i32 %80, 0 - br i1 %81, label %IF137, label %ENDIF136 + %tmp = extractelement <4 x float> %reg0, i32 0 + %tmp1 = extractelement <4 x float> %reg0, i32 1 + %tmp2 = extractelement <4 x float> %reg0, i32 2 + %tmp3 = extractelement <4 x float> %reg0, i32 3 + %tmp4 = extractelement <4 x float> %reg1, i32 0 + %tmp5 = extractelement <4 x float> %reg9, i32 0 + %tmp6 = extractelement <4 x float> %reg8, i32 0 + %tmp7 = fcmp ugt float %tmp6, 0.000000e+00 + %tmp8 = select i1 %tmp7, float %tmp4, float %tmp5 + %tmp9 = extractelement <4 x float> %reg1, i32 1 + %tmp10 = extractelement <4 x float> %reg9, i32 1 + %tmp11 = extractelement <4 x float> %reg8, i32 0 + %tmp12 = fcmp ugt float %tmp11, 0.000000e+00 + %tmp13 = select i1 %tmp12, float %tmp9, float %tmp10 + %tmp14 = extractelement <4 x float> %reg1, i32 2 + %tmp15 = extractelement <4 x float> %reg9, i32 2 + %tmp16 = extractelement <4 x float> %reg8, i32 0 + %tmp17 = fcmp ugt float %tmp16, 0.000000e+00 + %tmp18 = select i1 %tmp17, float %tmp14, float %tmp15 + %tmp19 = extractelement <4 x float> %reg1, i32 3 + %tmp20 = extractelement <4 x float> %reg9, i32 3 + %tmp21 = extractelement <4 x float> %reg8, i32 0 + %tmp22 = extractelement <4 x float> %reg2, i32 0 + %tmp23 = extractelement <4 x float> %reg2, i32 1 + %tmp24 = extractelement <4 x float> %reg2, i32 2 + %tmp25 = extractelement <4 x float> %reg2, i32 3 + %tmp26 = extractelement <4 x float> %reg3, i32 0 + %tmp27 = extractelement <4 x float> %reg3, i32 1 + %tmp28 = extractelement <4 x float> %reg3, i32 2 + %tmp29 = extractelement <4 x float> %reg3, i32 3 + %tmp30 = extractelement <4 x float> %reg4, i32 0 + %tmp31 = extractelement <4 x float> %reg4, i32 1 + %tmp32 = extractelement <4 x float> %reg4, i32 2 + %tmp33 = extractelement <4 x float> %reg4, i32 3 + %tmp34 = extractelement <4 x float> %reg5, i32 0 + %tmp35 = extractelement <4 x float> %reg5, i32 1 + %tmp36 = extractelement <4 x float> %reg5, i32 2 + %tmp37 = extractelement <4 x float> %reg5, i32 3 + %tmp38 = extractelement <4 x float> %reg6, i32 0 + %tmp39 = extractelement <4 x float> %reg6, i32 1 + %tmp40 = extractelement <4 x float> %reg6, i32 2 + %tmp41 = extractelement <4 x float> %reg6, i32 3 + %tmp42 = extractelement <4 x float> %reg7, i32 0 + %tmp43 = extractelement <4 x float> %reg7, i32 1 + %tmp44 = extractelement <4 x float> %reg7, i32 2 + %tmp45 = extractelement <4 x float> %reg7, i32 3 + %tmp46 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 11) + %tmp47 = extractelement <4 x float> %tmp46, i32 0 + %tmp48 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 11) + %tmp49 = extractelement <4 x float> %tmp48, i32 1 + %tmp50 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 11) + %tmp51 = extractelement <4 x float> %tmp50, i32 2 + %tmp52 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 12) + %tmp53 = extractelement <4 x float> %tmp52, i32 0 + %tmp54 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 14) + %tmp55 = extractelement <4 x float> %tmp54, i32 0 + %tmp56 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 14) + %tmp57 = extractelement <4 x float> %tmp56, i32 1 + %tmp58 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 14) + %tmp59 = extractelement <4 x float> %tmp58, i32 2 + %tmp60 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 14) + %tmp61 = extractelement <4 x float> %tmp60, i32 3 + %tmp62 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 16) + %tmp63 = extractelement <4 x float> %tmp62, i32 0 + %tmp64 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 16) + %tmp65 = extractelement <4 x float> %tmp64, i32 1 + %tmp66 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 16) + %tmp67 = extractelement <4 x float> %tmp66, i32 2 + %tmp68 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) + %tmp69 = extractelement <4 x float> %tmp68, i32 0 + %tmp70 = fcmp oge float %tmp69, 3.500000e+00 + %tmp71 = sext i1 %tmp70 to i32 + %tmp72 = bitcast i32 %tmp71 to float + %tmp73 = bitcast float %tmp72 to i32 + %tmp74 = icmp ne i32 %tmp73, 0 + %. = select i1 %tmp74, float 0.000000e+00, float 0.000000e+00 + %tmp75 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) + %tmp76 = extractelement <4 x float> %tmp75, i32 0 + %tmp77 = fcmp oge float %tmp76, 2.000000e+00 + %tmp78 = sext i1 %tmp77 to i32 + %tmp79 = bitcast i32 %tmp78 to float + %tmp80 = bitcast float %tmp79 to i32 + %tmp81 = icmp ne i32 %tmp80, 0 + br i1 %tmp81, label %IF137, label %ENDIF136 IF137: ; preds = %main_body - %82 = insertelement <4 x float> undef, float %30, i32 0 - %83 = insertelement <4 x float> %82, float %31, i32 1 - %84 = insertelement <4 x float> %83, float %32, i32 2 - %85 = insertelement <4 x float> %84, float 0.000000e+00, i32 3 - %86 = insertelement <4 x float> undef, float %30, i32 0 - %87 = insertelement <4 x float> %86, float %31, i32 1 - %88 = insertelement <4 x float> %87, float %32, i32 2 - %89 = insertelement <4 x float> %88, float 0.000000e+00, i32 3 - %90 = call float @llvm.AMDGPU.dp4(<4 x float> %85, <4 x float> %89) - %91 = call float @llvm.AMDGPU.rsq.clamped.f32(float %90) - %92 = fmul float %30, %91 - %93 = fmul float %31, %91 - %94 = fmul float %32, %91 - %95 = insertelement <4 x float> undef, float %92, i32 0 - %96 = insertelement <4 x float> %95, float %93, i32 1 - %97 = insertelement <4 x float> %96, float %94, i32 2 - %98 = insertelement <4 x float> %97, float 0.000000e+00, i32 3 - %99 = insertelement <4 x float> undef, float %37, i32 0 - %100 = insertelement <4 x float> %99, float %38, i32 1 - %101 = insertelement <4 x float> %100, float %39, i32 2 - %102 = insertelement <4 x float> %101, float 0.000000e+00, i32 3 - %103 = call float @llvm.AMDGPU.dp4(<4 x float> %98, <4 x float> %102) - %104 = insertelement <4 x float> undef, float %92, i32 0 - %105 = insertelement <4 x float> %104, float %93, i32 1 - %106 = insertelement <4 x float> %105, float %94, i32 2 - %107 = insertelement <4 x float> %106, float 0.000000e+00, i32 3 - %108 = insertelement <4 x float> undef, float %40, i32 0 - %109 = insertelement <4 x float> %108, float %41, i32 1 - %110 = insertelement <4 x float> %109, float %42, i32 2 - %111 = insertelement <4 x float> %110, float 0.000000e+00, i32 3 - %112 = call float @llvm.AMDGPU.dp4(<4 x float> %107, <4 x float> %111) - %113 = fsub float -0.000000e+00, %92 - %114 = fsub float -0.000000e+00, %93 - %115 = fsub float -0.000000e+00, %94 - %116 = insertelement <4 x float> undef, float %34, i32 0 - %117 = insertelement <4 x float> %116, float %35, i32 1 - %118 = insertelement <4 x float> %117, float %36, i32 2 - %119 = insertelement <4 x float> %118, float 0.000000e+00, i32 3 - %120 = insertelement <4 x float> undef, float %113, i32 0 - %121 = insertelement <4 x float> %120, float %114, i32 1 - %122 = insertelement <4 x float> %121, float %115, i32 2 - %123 = insertelement <4 x float> %122, float 0.000000e+00, i32 3 - %124 = call float @llvm.AMDGPU.dp4(<4 x float> %119, <4 x float> %123) - %125 = fdiv float 1.000000e+00, %124 - %126 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 5) - %127 = extractelement <4 x float> %126, i32 0 - %128 = fmul float %127, %125 - %129 = fmul float %103, %128 - %130 = fmul float %112, %128 - %131 = bitcast float %. to i32 - %132 = sitofp i32 %131 to float - %133 = fdiv float 1.000000e+00, %132 - %134 = bitcast float %. to i32 - %135 = add i32 %134, -1 - %136 = bitcast i32 %135 to float - %137 = bitcast float %136 to i32 + %tmp82 = insertelement <4 x float> undef, float %tmp30, i32 0 + %tmp83 = insertelement <4 x float> %tmp82, float %tmp31, i32 1 + %tmp84 = insertelement <4 x float> %tmp83, float %tmp32, i32 2 + %tmp85 = insertelement <4 x float> %tmp84, float 0.000000e+00, i32 3 + %tmp86 = insertelement <4 x float> undef, float %tmp30, i32 0 + %tmp87 = insertelement <4 x float> %tmp86, float %tmp31, i32 1 + %tmp88 = insertelement <4 x float> %tmp87, float %tmp32, i32 2 + %tmp89 = insertelement <4 x float> %tmp88, float 0.000000e+00, i32 3 + %tmp90 = call float @llvm.r600.dot4(<4 x float> %tmp85, <4 x float> %tmp89) + %tmp91 = call float @llvm.AMDGPU.rsq.clamped.f32(float %tmp90) + %tmp92 = fmul float %tmp30, %tmp91 + %tmp93 = fmul float %tmp31, %tmp91 + %tmp94 = fmul float %tmp32, %tmp91 + %tmp95 = insertelement <4 x float> undef, float %tmp92, i32 0 + %tmp96 = insertelement <4 x float> %tmp95, float %tmp93, i32 1 + %tmp97 = insertelement <4 x float> %tmp96, float %tmp94, i32 2 + %tmp98 = insertelement <4 x float> %tmp97, float 0.000000e+00, i32 3 + %tmp99 = insertelement <4 x float> undef, float %tmp37, i32 0 + %tmp100 = insertelement <4 x float> %tmp99, float %tmp38, i32 1 + %tmp101 = insertelement <4 x float> %tmp100, float %tmp39, i32 2 + %tmp102 = insertelement <4 x float> %tmp101, float 0.000000e+00, i32 3 + %tmp103 = call float @llvm.r600.dot4(<4 x float> %tmp98, <4 x float> %tmp102) + %tmp104 = insertelement <4 x float> undef, float %tmp92, i32 0 + %tmp105 = insertelement <4 x float> %tmp104, float %tmp93, i32 1 + %tmp106 = insertelement <4 x float> %tmp105, float %tmp94, i32 2 + %tmp107 = insertelement <4 x float> %tmp106, float 0.000000e+00, i32 3 + %tmp108 = insertelement <4 x float> undef, float %tmp40, i32 0 + %tmp109 = insertelement <4 x float> %tmp108, float %tmp41, i32 1 + %tmp110 = insertelement <4 x float> %tmp109, float %tmp42, i32 2 + %tmp111 = insertelement <4 x float> %tmp110, float 0.000000e+00, i32 3 + %tmp112 = call float @llvm.r600.dot4(<4 x float> %tmp107, <4 x float> %tmp111) + %tmp113 = fsub float -0.000000e+00, %tmp92 + %tmp114 = fsub float -0.000000e+00, %tmp93 + %tmp115 = fsub float -0.000000e+00, %tmp94 + %tmp116 = insertelement <4 x float> undef, float %tmp34, i32 0 + %tmp117 = insertelement <4 x float> %tmp116, float %tmp35, i32 1 + %tmp118 = insertelement <4 x float> %tmp117, float %tmp36, i32 2 + %tmp119 = insertelement <4 x float> %tmp118, float 0.000000e+00, i32 3 + %tmp120 = insertelement <4 x float> undef, float %tmp113, i32 0 + %tmp121 = insertelement <4 x float> %tmp120, float %tmp114, i32 1 + %tmp122 = insertelement <4 x float> %tmp121, float %tmp115, i32 2 + %tmp123 = insertelement <4 x float> %tmp122, float 0.000000e+00, i32 3 + %tmp124 = call float @llvm.r600.dot4(<4 x float> %tmp119, <4 x float> %tmp123) + %tmp125 = fdiv float 1.000000e+00, %tmp124 + %tmp126 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 5) + %tmp127 = extractelement <4 x float> %tmp126, i32 0 + %tmp128 = fmul float %tmp127, %tmp125 + %tmp129 = fmul float %tmp103, %tmp128 + %tmp130 = fmul float %tmp112, %tmp128 + %tmp131 = bitcast float %. to i32 + %tmp132 = sitofp i32 %tmp131 to float + %tmp133 = fdiv float 1.000000e+00, %tmp132 + %tmp134 = bitcast float %. to i32 + %tmp135 = add i32 %tmp134, -1 + %tmp136 = bitcast i32 %tmp135 to float + %tmp137 = bitcast float %tmp136 to i32 br label %LOOP ENDIF136: ; preds = %ENDIF154, %main_body - %temp68.1 = phi float [ %591, %ENDIF154 ], [ 0.000000e+00, %main_body ] - %temp69.0 = phi float [ %593, %ENDIF154 ], [ 0.000000e+00, %main_body ] - %temp70.0 = phi float [ %595, %ENDIF154 ], [ 1.000000e+00, %main_body ] - %138 = fmul float %26, 0x3F847AE140000000 - %139 = fmul float %27, 0x3F847AE140000000 - %140 = fmul float %28, 0x3F847AE140000000 - %141 = insertelement <4 x float> undef, float %138, i32 0 - %142 = insertelement <4 x float> %141, float %139, i32 1 - %143 = insertelement <4 x float> %142, float %140, i32 2 - %144 = insertelement <4 x float> %143, float 0.000000e+00, i32 3 - %145 = extractelement <4 x float> %144, i32 0 - %146 = extractelement <4 x float> %144, i32 1 - %147 = extractelement <4 x float> %144, i32 2 - %148 = extractelement <4 x float> %144, i32 3 - %149 = insertelement <4 x float> undef, float %145, i32 0 - %150 = insertelement <4 x float> %149, float %146, i32 1 - %151 = insertelement <4 x float> %150, float %147, i32 2 - %152 = insertelement <4 x float> %151, float %148, i32 3 - %153 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %152, i32 16, i32 0, i32 3) - %154 = extractelement <4 x float> %153, i32 0 - %155 = extractelement <4 x float> %153, i32 1 - %156 = extractelement <4 x float> %153, i32 2 - %157 = extractelement <4 x float> %153, i32 3 - %158 = fmul float %26, 0x3F45A07B40000000 - %159 = fmul float %27, 0x3F45A07B40000000 - %160 = fmul float %28, 0x3F45A07B40000000 - %161 = insertelement <4 x float> undef, float %158, i32 0 - %162 = insertelement <4 x float> %161, float %159, i32 1 - %163 = insertelement <4 x float> %162, float %160, i32 2 - %164 = insertelement <4 x float> %163, float 0.000000e+00, i32 3 - %165 = extractelement <4 x float> %164, i32 0 - %166 = extractelement <4 x float> %164, i32 1 - %167 = extractelement <4 x float> %164, i32 2 - %168 = extractelement <4 x float> %164, i32 3 - %169 = insertelement <4 x float> undef, float %165, i32 0 - %170 = insertelement <4 x float> %169, float %166, i32 1 - %171 = insertelement <4 x float> %170, float %167, i32 2 - %172 = insertelement <4 x float> %171, float %168, i32 3 - %173 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %172, i32 16, i32 0, i32 3) - %174 = extractelement <4 x float> %173, i32 0 - %175 = extractelement <4 x float> %173, i32 1 - %176 = extractelement <4 x float> %173, i32 2 - %177 = extractelement <4 x float> %173, i32 3 - %178 = fmul float %176, 3.000000e+03 - %179 = fadd float %178, %28 - %180 = fdiv float 1.000000e+00, %33 - %181 = fmul float %32, %180 - %182 = call float @fabs(float %181) - %183 = fmul float %174, 0x3FD99999A0000000 - %184 = fadd float %183, 0x3FAEB851E0000000 - %185 = fmul float %175, 0x3FE3333340000000 - %186 = fadd float %185, %184 - %187 = fmul float %176, 2.000000e+00 - %188 = fadd float %187, %186 - %189 = fmul float %177, 4.000000e+00 - %190 = fadd float %189, %188 - %191 = fmul float %154, 0x3FB99999A0000000 - %192 = fadd float %191, %190 - %193 = fmul float %155, 0x3FD99999A0000000 - %194 = fadd float %193, %192 - %195 = fmul float %156, 0x3FE99999A0000000 - %196 = fadd float %195, %194 - %197 = fmul float %157, 0x4000CCCCC0000000 - %198 = fadd float %197, %196 - %199 = fmul float 0xBE5EFB4CC0000000, %182 - %200 = fmul float %199, %182 - %201 = call float @llvm.exp2.f32(float %200) - %one.sub.a.i = fsub float 1.000000e+00, %201 + %temp68.1 = phi float [ %tmp603, %ENDIF154 ], [ 0.000000e+00, %main_body ] + %temp69.0 = phi float [ %tmp605, %ENDIF154 ], [ 0.000000e+00, %main_body ] + %temp70.0 = phi float [ %tmp607, %ENDIF154 ], [ 1.000000e+00, %main_body ] + %tmp138 = fmul float %tmp26, 0x3F847AE140000000 + %tmp139 = fmul float %tmp27, 0x3F847AE140000000 + %tmp140 = fmul float %tmp28, 0x3F847AE140000000 + %tmp141 = insertelement <4 x float> undef, float %tmp138, i32 0 + %tmp142 = insertelement <4 x float> %tmp141, float %tmp139, i32 1 + %tmp143 = insertelement <4 x float> %tmp142, float %tmp140, i32 2 + %tmp144 = insertelement <4 x float> %tmp143, float 0.000000e+00, i32 3 + %tmp145 = extractelement <4 x float> %tmp144, i32 0 + %tmp146 = extractelement <4 x float> %tmp144, i32 1 + %tmp147 = extractelement <4 x float> %tmp144, i32 2 + %tmp148 = extractelement <4 x float> %tmp144, i32 3 + %tmp149 = insertelement <4 x float> undef, float %tmp145, i32 0 + %tmp150 = insertelement <4 x float> %tmp149, float %tmp146, i32 1 + %tmp151 = insertelement <4 x float> %tmp150, float %tmp147, i32 2 + %tmp152 = insertelement <4 x float> %tmp151, float %tmp148, i32 3 + %tmp153 = shufflevector <4 x float> %tmp152, <4 x float> %tmp152, <4 x i32> + %tmp154 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp153, i32 0, i32 0, i32 0, i32 16, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp155 = extractelement <4 x float> %tmp154, i32 0 + %tmp156 = extractelement <4 x float> %tmp154, i32 1 + %tmp157 = extractelement <4 x float> %tmp154, i32 2 + %tmp158 = extractelement <4 x float> %tmp154, i32 3 + %tmp159 = fmul float %tmp26, 0x3F45A07B40000000 + %tmp160 = fmul float %tmp27, 0x3F45A07B40000000 + %tmp161 = fmul float %tmp28, 0x3F45A07B40000000 + %tmp162 = insertelement <4 x float> undef, float %tmp159, i32 0 + %tmp163 = insertelement <4 x float> %tmp162, float %tmp160, i32 1 + %tmp164 = insertelement <4 x float> %tmp163, float %tmp161, i32 2 + %tmp165 = insertelement <4 x float> %tmp164, float 0.000000e+00, i32 3 + %tmp166 = extractelement <4 x float> %tmp165, i32 0 + %tmp167 = extractelement <4 x float> %tmp165, i32 1 + %tmp168 = extractelement <4 x float> %tmp165, i32 2 + %tmp169 = extractelement <4 x float> %tmp165, i32 3 + %tmp170 = insertelement <4 x float> undef, float %tmp166, i32 0 + %tmp171 = insertelement <4 x float> %tmp170, float %tmp167, i32 1 + %tmp172 = insertelement <4 x float> %tmp171, float %tmp168, i32 2 + %tmp173 = insertelement <4 x float> %tmp172, float %tmp169, i32 3 + %tmp174 = shufflevector <4 x float> %tmp173, <4 x float> %tmp173, <4 x i32> + %tmp175 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp174, i32 0, i32 0, i32 0, i32 16, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp176 = extractelement <4 x float> %tmp175, i32 0 + %tmp177 = extractelement <4 x float> %tmp175, i32 1 + %tmp178 = extractelement <4 x float> %tmp175, i32 2 + %tmp179 = extractelement <4 x float> %tmp175, i32 3 + %tmp180 = fmul float %tmp178, 3.000000e+03 + %tmp181 = fadd float %tmp180, %tmp28 + %tmp182 = fdiv float 1.000000e+00, %tmp33 + %tmp183 = fmul float %tmp32, %tmp182 + %tmp184 = call float @fabs(float %tmp183) + %tmp185 = fmul float %tmp176, 0x3FD99999A0000000 + %tmp186 = fadd float %tmp185, 0x3FAEB851E0000000 + %tmp187 = fmul float %tmp177, 0x3FE3333340000000 + %tmp188 = fadd float %tmp187, %tmp186 + %tmp189 = fmul float %tmp178, 2.000000e+00 + %tmp190 = fadd float %tmp189, %tmp188 + %tmp191 = fmul float %tmp179, 4.000000e+00 + %tmp192 = fadd float %tmp191, %tmp190 + %tmp193 = fmul float %tmp155, 0x3FB99999A0000000 + %tmp194 = fadd float %tmp193, %tmp192 + %tmp195 = fmul float %tmp156, 0x3FD99999A0000000 + %tmp196 = fadd float %tmp195, %tmp194 + %tmp197 = fmul float %tmp157, 0x3FE99999A0000000 + %tmp198 = fadd float %tmp197, %tmp196 + %tmp199 = fmul float %tmp158, 0x4000CCCCC0000000 + %tmp200 = fadd float %tmp199, %tmp198 + %tmp201 = fmul float 0xBE5EFB4CC0000000, %tmp184 + %tmp202 = fmul float %tmp201, %tmp184 + %tmp203 = call float @llvm.exp2.f32(float %tmp202) + %one.sub.a.i = fsub float 1.000000e+00, %tmp203 %one.sub.ac.i = fmul float %one.sub.a.i, 0x3FA99999A0000000 - %mul.i = fmul float %198, 0x3FA99999A0000000 + %mul.i = fmul float %tmp200, 0x3FA99999A0000000 %result.i = fadd float %mul.i, %one.sub.ac.i - %202 = fadd float %result.i, 0x3FF4CCCCC0000000 - %203 = fmul float %202, 0x3FE1C71C80000000 - %204 = call float @llvm.AMDGPU.clamp.f32(float %203, float 0.000000e+00, float 1.000000e+00) - %205 = fadd float %result.i, 0x3FF4CCCCC0000000 - %206 = fmul float %205, 0x3FE1C71C80000000 - %207 = call float @llvm.AMDGPU.clamp.f32(float %206, float 0.000000e+00, float 1.000000e+00) - %208 = fadd float %result.i, 2.000000e+00 - %209 = fmul float %208, 0x3FD611A7A0000000 - %210 = call float @llvm.AMDGPU.clamp.f32(float %209, float 0.000000e+00, float 1.000000e+00) - %211 = fmul float 2.000000e+00, %204 - %212 = fsub float -0.000000e+00, %211 - %213 = fadd float 3.000000e+00, %212 - %214 = fmul float %204, %213 - %215 = fmul float %204, %214 - %216 = fmul float 2.000000e+00, %207 - %217 = fsub float -0.000000e+00, %216 - %218 = fadd float 3.000000e+00, %217 - %219 = fmul float %207, %218 - %220 = fmul float %207, %219 - %221 = fmul float 2.000000e+00, %210 - %222 = fsub float -0.000000e+00, %221 - %223 = fadd float 3.000000e+00, %222 - %224 = fmul float %210, %223 - %225 = fmul float %210, %224 - %226 = fmul float %26, 0x3F368B5CC0000000 - %227 = fmul float %27, 0x3F368B5CC0000000 - %228 = insertelement <4 x float> undef, float %226, i32 0 - %229 = insertelement <4 x float> %228, float %227, i32 1 - %230 = insertelement <4 x float> %229, float 0.000000e+00, i32 2 - %231 = insertelement <4 x float> %230, float 0.000000e+00, i32 3 - %232 = extractelement <4 x float> %231, i32 0 - %233 = extractelement <4 x float> %231, i32 1 - %234 = insertelement <4 x float> undef, float %232, i32 0 - %235 = insertelement <4 x float> %234, float %233, i32 1 - %236 = insertelement <4 x float> %235, float undef, i32 2 - %237 = insertelement <4 x float> %236, float undef, i32 3 - %238 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %237, i32 17, i32 1, i32 2) - %239 = extractelement <4 x float> %238, i32 0 - %240 = insertelement <4 x float> undef, float %239, i32 0 - %241 = insertelement <4 x float> %240, float %227, i32 1 - %242 = insertelement <4 x float> %241, float 0.000000e+00, i32 2 - %243 = insertelement <4 x float> %242, float 0.000000e+00, i32 3 - %244 = extractelement <4 x float> %243, i32 0 - %245 = insertelement <4 x float> undef, float %244, i32 0 - %246 = insertelement <4 x float> %245, float undef, i32 1 - %247 = insertelement <4 x float> %246, float undef, i32 2 - %248 = insertelement <4 x float> %247, float undef, i32 3 - %249 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %248, i32 18, i32 2, i32 1) - %250 = extractelement <4 x float> %249, i32 0 - %251 = extractelement <4 x float> %249, i32 1 - %252 = extractelement <4 x float> %249, i32 2 - %253 = extractelement <4 x float> %249, i32 3 - %254 = fmul float %250, %215 - %255 = fmul float %251, %220 - %256 = fmul float %252, %225 - %257 = fmul float %253, 0.000000e+00 - %258 = fadd float %result.i, 0x3FF4CCCCC0000000 - %259 = fmul float %258, 0x3FE1C71C80000000 - %260 = call float @llvm.AMDGPU.clamp.f32(float %259, float 0.000000e+00, float 1.000000e+00) - %261 = fadd float %result.i, 0x3FF4CCCCC0000000 - %262 = fmul float %261, 0x3FE1C71C80000000 - %263 = call float @llvm.AMDGPU.clamp.f32(float %262, float 0.000000e+00, float 1.000000e+00) - %264 = fadd float %result.i, 2.000000e+00 - %265 = fmul float %264, 0x3FD611A7A0000000 - %266 = call float @llvm.AMDGPU.clamp.f32(float %265, float 0.000000e+00, float 1.000000e+00) - %267 = fmul float 2.000000e+00, %260 - %268 = fsub float -0.000000e+00, %267 - %269 = fadd float 3.000000e+00, %268 - %270 = fmul float %260, %269 - %271 = fmul float %260, %270 - %272 = fmul float 2.000000e+00, %263 - %273 = fsub float -0.000000e+00, %272 - %274 = fadd float 3.000000e+00, %273 - %275 = fmul float %263, %274 - %276 = fmul float %263, %275 - %277 = fmul float 2.000000e+00, %266 - %278 = fsub float -0.000000e+00, %277 - %279 = fadd float 3.000000e+00, %278 - %280 = fmul float %266, %279 - %281 = fmul float %266, %280 - %282 = fmul float %26, 0x3F22DFD6A0000000 - %283 = fmul float %27, 0x3F22DFD6A0000000 - %284 = insertelement <4 x float> undef, float %282, i32 0 - %285 = insertelement <4 x float> %284, float %283, i32 1 - %286 = insertelement <4 x float> %285, float 0.000000e+00, i32 2 - %287 = insertelement <4 x float> %286, float 0.000000e+00, i32 3 - %288 = extractelement <4 x float> %287, i32 0 - %289 = extractelement <4 x float> %287, i32 1 - %290 = insertelement <4 x float> undef, float %288, i32 0 - %291 = insertelement <4 x float> %290, float %289, i32 1 - %292 = insertelement <4 x float> %291, float undef, i32 2 - %293 = insertelement <4 x float> %292, float undef, i32 3 - %294 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %293, i32 19, i32 3, i32 2) - %295 = extractelement <4 x float> %294, i32 0 - %296 = extractelement <4 x float> %294, i32 1 - %297 = extractelement <4 x float> %294, i32 2 - %298 = extractelement <4 x float> %294, i32 3 - %299 = fmul float %295, %271 - %300 = fmul float %296, %276 - %301 = fmul float %297, %281 - %302 = fmul float %298, 0.000000e+00 - %303 = fmul float %temp68.1, %37 - %304 = fmul float %temp68.1, %38 - %305 = fmul float %temp68.1, %39 - %306 = fmul float %temp69.0, %40 - %307 = fadd float %306, %303 - %308 = fmul float %temp69.0, %41 - %309 = fadd float %308, %304 - %310 = fmul float %temp69.0, %42 - %311 = fadd float %310, %305 - %312 = fmul float %temp70.0, %34 - %313 = fadd float %312, %307 - %314 = fmul float %temp70.0, %35 - %315 = fadd float %314, %309 - %316 = fmul float %temp70.0, %36 - %317 = fadd float %316, %311 - %318 = insertelement <4 x float> undef, float %313, i32 0 - %319 = insertelement <4 x float> %318, float %315, i32 1 - %320 = insertelement <4 x float> %319, float %317, i32 2 - %321 = insertelement <4 x float> %320, float 0.000000e+00, i32 3 - %322 = insertelement <4 x float> undef, float %313, i32 0 - %323 = insertelement <4 x float> %322, float %315, i32 1 - %324 = insertelement <4 x float> %323, float %317, i32 2 - %325 = insertelement <4 x float> %324, float 0.000000e+00, i32 3 - %326 = call float @llvm.AMDGPU.dp4(<4 x float> %321, <4 x float> %325) - %327 = call float @llvm.AMDGPU.rsq.clamped.f32(float %326) - %328 = fmul float %313, %327 - %329 = fmul float %315, %327 - %330 = fmul float %317, %327 - %331 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 6) - %332 = extractelement <4 x float> %331, i32 0 - %333 = fsub float -0.000000e+00, %332 - %334 = fadd float 1.000000e+00, %333 - %335 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 7) - %336 = extractelement <4 x float> %335, i32 0 - %337 = fsub float -0.000000e+00, %336 - %338 = fadd float 1.000000e+00, %337 - %339 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 8) - %340 = extractelement <4 x float> %339, i32 0 - %341 = fsub float -0.000000e+00, %340 - %342 = fadd float 1.000000e+00, %341 - %343 = fsub float -0.000000e+00, %334 - %344 = fadd float %result.i, %343 - %345 = fsub float -0.000000e+00, %338 - %346 = fadd float %result.i, %345 - %347 = fadd float %346, 0xBFE3333340000000 - %348 = fsub float -0.000000e+00, %result.i - %349 = fsub float -0.000000e+00, %342 - %350 = fadd float %348, %349 - %351 = insertelement <4 x float> undef, float %43, i32 0 - %352 = insertelement <4 x float> %351, float %44, i32 1 - %353 = insertelement <4 x float> %352, float %45, i32 2 - %354 = insertelement <4 x float> %353, float 0.000000e+00, i32 3 - %355 = insertelement <4 x float> undef, float %43, i32 0 - %356 = insertelement <4 x float> %355, float %44, i32 1 - %357 = insertelement <4 x float> %356, float %45, i32 2 - %358 = insertelement <4 x float> %357, float 0.000000e+00, i32 3 - %359 = call float @llvm.AMDGPU.dp4(<4 x float> %354, <4 x float> %358) - %360 = call float @llvm.AMDGPU.rsq.clamped.f32(float %359) - %361 = fmul float %45, %360 - %362 = call float @fabs(float %361) - %363 = fmul float %176, 0x3FECCCCCC0000000 - %364 = fadd float %363, %362 - %365 = fadd float %364, 0xBFEFAE1480000000 - %366 = fmul float %365, 0xC023FFFFC0000000 - %367 = call float @llvm.AMDGPU.clamp.f32(float %366, float 0.000000e+00, float 1.000000e+00) - %368 = fsub float -0.000000e+00, %334 - %369 = fadd float %result.i, %368 - %370 = fadd float %369, 0x3FBEB851E0000000 - %371 = fsub float -0.000000e+00, %338 - %372 = fadd float %result.i, %371 - %373 = fadd float %372, 0xBFE0A3D700000000 - %374 = fsub float -0.000000e+00, %result.i - %375 = fsub float -0.000000e+00, %342 - %376 = fadd float %374, %375 - %377 = insertelement <4 x float> undef, float %43, i32 0 - %378 = insertelement <4 x float> %377, float %44, i32 1 - %379 = insertelement <4 x float> %378, float %45, i32 2 - %380 = insertelement <4 x float> %379, float 0.000000e+00, i32 3 - %381 = insertelement <4 x float> undef, float %43, i32 0 - %382 = insertelement <4 x float> %381, float %44, i32 1 - %383 = insertelement <4 x float> %382, float %45, i32 2 - %384 = insertelement <4 x float> %383, float 0.000000e+00, i32 3 - %385 = call float @llvm.AMDGPU.dp4(<4 x float> %380, <4 x float> %384) - %386 = call float @llvm.AMDGPU.rsq.clamped.f32(float %385) - %387 = fmul float %45, %386 - %388 = call float @fabs(float %387) - %389 = fmul float %176, 0x3FF51EB860000000 - %390 = fadd float %389, %388 - %391 = fadd float %390, 0xBFEFAE1480000000 - %392 = fmul float %391, 0xC0490001A0000000 - %393 = call float @llvm.AMDGPU.clamp.f32(float %392, float 0.000000e+00, float 1.000000e+00) - %394 = fmul float 2.000000e+00, %367 - %395 = fsub float -0.000000e+00, %394 - %396 = fadd float 3.000000e+00, %395 - %397 = fmul float %367, %396 - %398 = fmul float %367, %397 - %one.sub.a.i169 = fsub float 1.000000e+00, %398 - %one.sub.ac.i170 = fmul float %one.sub.a.i169, %344 - %mul.i171 = fmul float %254, %344 + %tmp204 = fadd float %result.i, 0x3FF4CCCCC0000000 + %tmp205 = fmul float %tmp204, 0x3FE1C71C80000000 + %tmp206 = call float @llvm.AMDGPU.clamp.f32(float %tmp205, float 0.000000e+00, float 1.000000e+00) + %tmp207 = fadd float %result.i, 0x3FF4CCCCC0000000 + %tmp208 = fmul float %tmp207, 0x3FE1C71C80000000 + %tmp209 = call float @llvm.AMDGPU.clamp.f32(float %tmp208, float 0.000000e+00, float 1.000000e+00) + %tmp210 = fadd float %result.i, 2.000000e+00 + %tmp211 = fmul float %tmp210, 0x3FD611A7A0000000 + %tmp212 = call float @llvm.AMDGPU.clamp.f32(float %tmp211, float 0.000000e+00, float 1.000000e+00) + %tmp213 = fmul float 2.000000e+00, %tmp206 + %tmp214 = fsub float -0.000000e+00, %tmp213 + %tmp215 = fadd float 3.000000e+00, %tmp214 + %tmp216 = fmul float %tmp206, %tmp215 + %tmp217 = fmul float %tmp206, %tmp216 + %tmp218 = fmul float 2.000000e+00, %tmp209 + %tmp219 = fsub float -0.000000e+00, %tmp218 + %tmp220 = fadd float 3.000000e+00, %tmp219 + %tmp221 = fmul float %tmp209, %tmp220 + %tmp222 = fmul float %tmp209, %tmp221 + %tmp223 = fmul float 2.000000e+00, %tmp212 + %tmp224 = fsub float -0.000000e+00, %tmp223 + %tmp225 = fadd float 3.000000e+00, %tmp224 + %tmp226 = fmul float %tmp212, %tmp225 + %tmp227 = fmul float %tmp212, %tmp226 + %tmp228 = fmul float %tmp26, 0x3F368B5CC0000000 + %tmp229 = fmul float %tmp27, 0x3F368B5CC0000000 + %tmp230 = insertelement <4 x float> undef, float %tmp228, i32 0 + %tmp231 = insertelement <4 x float> %tmp230, float %tmp229, i32 1 + %tmp232 = insertelement <4 x float> %tmp231, float 0.000000e+00, i32 2 + %tmp233 = insertelement <4 x float> %tmp232, float 0.000000e+00, i32 3 + %tmp234 = extractelement <4 x float> %tmp233, i32 0 + %tmp235 = extractelement <4 x float> %tmp233, i32 1 + %tmp236 = insertelement <4 x float> undef, float %tmp234, i32 0 + %tmp237 = insertelement <4 x float> %tmp236, float %tmp235, i32 1 + %tmp238 = insertelement <4 x float> %tmp237, float undef, i32 2 + %tmp239 = insertelement <4 x float> %tmp238, float undef, i32 3 + %tmp240 = shufflevector <4 x float> %tmp239, <4 x float> %tmp239, <4 x i32> + %tmp241 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp240, i32 0, i32 0, i32 0, i32 17, i32 1, i32 1, i32 1, i32 1, i32 1) + %tmp242 = extractelement <4 x float> %tmp241, i32 0 + %tmp243 = insertelement <4 x float> undef, float %tmp242, i32 0 + %tmp244 = insertelement <4 x float> %tmp243, float %tmp229, i32 1 + %tmp245 = insertelement <4 x float> %tmp244, float 0.000000e+00, i32 2 + %tmp246 = insertelement <4 x float> %tmp245, float 0.000000e+00, i32 3 + %tmp247 = extractelement <4 x float> %tmp246, i32 0 + %tmp248 = insertelement <4 x float> undef, float %tmp247, i32 0 + %tmp249 = insertelement <4 x float> %tmp248, float undef, i32 1 + %tmp250 = insertelement <4 x float> %tmp249, float undef, i32 2 + %tmp251 = insertelement <4 x float> %tmp250, float undef, i32 3 + %tmp252 = shufflevector <4 x float> %tmp251, <4 x float> %tmp251, <4 x i32> + %tmp253 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp252, i32 0, i32 0, i32 0, i32 18, i32 2, i32 1, i32 1, i32 1, i32 1) + %tmp254 = extractelement <4 x float> %tmp253, i32 0 + %tmp255 = extractelement <4 x float> %tmp253, i32 1 + %tmp256 = extractelement <4 x float> %tmp253, i32 2 + %tmp257 = extractelement <4 x float> %tmp253, i32 3 + %tmp258 = fmul float %tmp254, %tmp217 + %tmp259 = fmul float %tmp255, %tmp222 + %tmp260 = fmul float %tmp256, %tmp227 + %tmp261 = fmul float %tmp257, 0.000000e+00 + %tmp262 = fadd float %result.i, 0x3FF4CCCCC0000000 + %tmp263 = fmul float %tmp262, 0x3FE1C71C80000000 + %tmp264 = call float @llvm.AMDGPU.clamp.f32(float %tmp263, float 0.000000e+00, float 1.000000e+00) + %tmp265 = fadd float %result.i, 0x3FF4CCCCC0000000 + %tmp266 = fmul float %tmp265, 0x3FE1C71C80000000 + %tmp267 = call float @llvm.AMDGPU.clamp.f32(float %tmp266, float 0.000000e+00, float 1.000000e+00) + %tmp268 = fadd float %result.i, 2.000000e+00 + %tmp269 = fmul float %tmp268, 0x3FD611A7A0000000 + %tmp270 = call float @llvm.AMDGPU.clamp.f32(float %tmp269, float 0.000000e+00, float 1.000000e+00) + %tmp271 = fmul float 2.000000e+00, %tmp264 + %tmp272 = fsub float -0.000000e+00, %tmp271 + %tmp273 = fadd float 3.000000e+00, %tmp272 + %tmp274 = fmul float %tmp264, %tmp273 + %tmp275 = fmul float %tmp264, %tmp274 + %tmp276 = fmul float 2.000000e+00, %tmp267 + %tmp277 = fsub float -0.000000e+00, %tmp276 + %tmp278 = fadd float 3.000000e+00, %tmp277 + %tmp279 = fmul float %tmp267, %tmp278 + %tmp280 = fmul float %tmp267, %tmp279 + %tmp281 = fmul float 2.000000e+00, %tmp270 + %tmp282 = fsub float -0.000000e+00, %tmp281 + %tmp283 = fadd float 3.000000e+00, %tmp282 + %tmp284 = fmul float %tmp270, %tmp283 + %tmp285 = fmul float %tmp270, %tmp284 + %tmp286 = fmul float %tmp26, 0x3F22DFD6A0000000 + %tmp287 = fmul float %tmp27, 0x3F22DFD6A0000000 + %tmp288 = insertelement <4 x float> undef, float %tmp286, i32 0 + %tmp289 = insertelement <4 x float> %tmp288, float %tmp287, i32 1 + %tmp290 = insertelement <4 x float> %tmp289, float 0.000000e+00, i32 2 + %tmp291 = insertelement <4 x float> %tmp290, float 0.000000e+00, i32 3 + %tmp292 = extractelement <4 x float> %tmp291, i32 0 + %tmp293 = extractelement <4 x float> %tmp291, i32 1 + %tmp294 = insertelement <4 x float> undef, float %tmp292, i32 0 + %tmp295 = insertelement <4 x float> %tmp294, float %tmp293, i32 1 + %tmp296 = insertelement <4 x float> %tmp295, float undef, i32 2 + %tmp297 = insertelement <4 x float> %tmp296, float undef, i32 3 + %tmp298 = shufflevector <4 x float> %tmp297, <4 x float> %tmp297, <4 x i32> + %tmp299 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp298, i32 0, i32 0, i32 0, i32 19, i32 3, i32 1, i32 1, i32 1, i32 1) + %tmp300 = extractelement <4 x float> %tmp299, i32 0 + %tmp301 = extractelement <4 x float> %tmp299, i32 1 + %tmp302 = extractelement <4 x float> %tmp299, i32 2 + %tmp303 = extractelement <4 x float> %tmp299, i32 3 + %tmp304 = fmul float %tmp300, %tmp275 + %tmp305 = fmul float %tmp301, %tmp280 + %tmp306 = fmul float %tmp302, %tmp285 + %tmp307 = fmul float %tmp303, 0.000000e+00 + %tmp308 = fmul float %temp68.1, %tmp37 + %tmp309 = fmul float %temp68.1, %tmp38 + %tmp310 = fmul float %temp68.1, %tmp39 + %tmp311 = fmul float %temp69.0, %tmp40 + %tmp312 = fadd float %tmp311, %tmp308 + %tmp313 = fmul float %temp69.0, %tmp41 + %tmp314 = fadd float %tmp313, %tmp309 + %tmp315 = fmul float %temp69.0, %tmp42 + %tmp316 = fadd float %tmp315, %tmp310 + %tmp317 = fmul float %temp70.0, %tmp34 + %tmp318 = fadd float %tmp317, %tmp312 + %tmp319 = fmul float %temp70.0, %tmp35 + %tmp320 = fadd float %tmp319, %tmp314 + %tmp321 = fmul float %temp70.0, %tmp36 + %tmp322 = fadd float %tmp321, %tmp316 + %tmp323 = insertelement <4 x float> undef, float %tmp318, i32 0 + %tmp324 = insertelement <4 x float> %tmp323, float %tmp320, i32 1 + %tmp325 = insertelement <4 x float> %tmp324, float %tmp322, i32 2 + %tmp326 = insertelement <4 x float> %tmp325, float 0.000000e+00, i32 3 + %tmp327 = insertelement <4 x float> undef, float %tmp318, i32 0 + %tmp328 = insertelement <4 x float> %tmp327, float %tmp320, i32 1 + %tmp329 = insertelement <4 x float> %tmp328, float %tmp322, i32 2 + %tmp330 = insertelement <4 x float> %tmp329, float 0.000000e+00, i32 3 + %tmp331 = call float @llvm.r600.dot4(<4 x float> %tmp326, <4 x float> %tmp330) + %tmp332 = call float @llvm.AMDGPU.rsq.clamped.f32(float %tmp331) + %tmp333 = fmul float %tmp318, %tmp332 + %tmp334 = fmul float %tmp320, %tmp332 + %tmp335 = fmul float %tmp322, %tmp332 + %tmp336 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 6) + %tmp337 = extractelement <4 x float> %tmp336, i32 0 + %tmp338 = fsub float -0.000000e+00, %tmp337 + %tmp339 = fadd float 1.000000e+00, %tmp338 + %tmp340 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 7) + %tmp341 = extractelement <4 x float> %tmp340, i32 0 + %tmp342 = fsub float -0.000000e+00, %tmp341 + %tmp343 = fadd float 1.000000e+00, %tmp342 + %tmp344 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 8) + %tmp345 = extractelement <4 x float> %tmp344, i32 0 + %tmp346 = fsub float -0.000000e+00, %tmp345 + %tmp347 = fadd float 1.000000e+00, %tmp346 + %tmp348 = fsub float -0.000000e+00, %tmp339 + %tmp349 = fadd float %result.i, %tmp348 + %tmp350 = fsub float -0.000000e+00, %tmp343 + %tmp351 = fadd float %result.i, %tmp350 + %tmp352 = fadd float %tmp351, 0xBFE3333340000000 + %tmp353 = fsub float -0.000000e+00, %result.i + %tmp354 = fsub float -0.000000e+00, %tmp347 + %tmp355 = fadd float %tmp353, %tmp354 + %tmp356 = insertelement <4 x float> undef, float %tmp43, i32 0 + %tmp357 = insertelement <4 x float> %tmp356, float %tmp44, i32 1 + %tmp358 = insertelement <4 x float> %tmp357, float %tmp45, i32 2 + %tmp359 = insertelement <4 x float> %tmp358, float 0.000000e+00, i32 3 + %tmp360 = insertelement <4 x float> undef, float %tmp43, i32 0 + %tmp361 = insertelement <4 x float> %tmp360, float %tmp44, i32 1 + %tmp362 = insertelement <4 x float> %tmp361, float %tmp45, i32 2 + %tmp363 = insertelement <4 x float> %tmp362, float 0.000000e+00, i32 3 + %tmp364 = call float @llvm.r600.dot4(<4 x float> %tmp359, <4 x float> %tmp363) + %tmp365 = call float @llvm.AMDGPU.rsq.clamped.f32(float %tmp364) + %tmp366 = fmul float %tmp45, %tmp365 + %tmp367 = call float @fabs(float %tmp366) + %tmp368 = fmul float %tmp178, 0x3FECCCCCC0000000 + %tmp369 = fadd float %tmp368, %tmp367 + %tmp370 = fadd float %tmp369, 0xBFEFAE1480000000 + %tmp371 = fmul float %tmp370, 0xC023FFFFC0000000 + %tmp372 = call float @llvm.AMDGPU.clamp.f32(float %tmp371, float 0.000000e+00, float 1.000000e+00) + %tmp373 = fsub float -0.000000e+00, %tmp339 + %tmp374 = fadd float %result.i, %tmp373 + %tmp375 = fadd float %tmp374, 0x3FBEB851E0000000 + %tmp376 = fsub float -0.000000e+00, %tmp343 + %tmp377 = fadd float %result.i, %tmp376 + %tmp378 = fadd float %tmp377, 0xBFE0A3D700000000 + %tmp379 = fsub float -0.000000e+00, %result.i + %tmp380 = fsub float -0.000000e+00, %tmp347 + %tmp381 = fadd float %tmp379, %tmp380 + %tmp382 = insertelement <4 x float> undef, float %tmp43, i32 0 + %tmp383 = insertelement <4 x float> %tmp382, float %tmp44, i32 1 + %tmp384 = insertelement <4 x float> %tmp383, float %tmp45, i32 2 + %tmp385 = insertelement <4 x float> %tmp384, float 0.000000e+00, i32 3 + %tmp386 = insertelement <4 x float> undef, float %tmp43, i32 0 + %tmp387 = insertelement <4 x float> %tmp386, float %tmp44, i32 1 + %tmp388 = insertelement <4 x float> %tmp387, float %tmp45, i32 2 + %tmp389 = insertelement <4 x float> %tmp388, float 0.000000e+00, i32 3 + %tmp390 = call float @llvm.r600.dot4(<4 x float> %tmp385, <4 x float> %tmp389) + %tmp391 = call float @llvm.AMDGPU.rsq.clamped.f32(float %tmp390) + %tmp392 = fmul float %tmp45, %tmp391 + %tmp393 = call float @fabs(float %tmp392) + %tmp394 = fmul float %tmp178, 0x3FF51EB860000000 + %tmp395 = fadd float %tmp394, %tmp393 + %tmp396 = fadd float %tmp395, 0xBFEFAE1480000000 + %tmp397 = fmul float %tmp396, 0xC0490001A0000000 + %tmp398 = call float @llvm.AMDGPU.clamp.f32(float %tmp397, float 0.000000e+00, float 1.000000e+00) + %tmp399 = fmul float 2.000000e+00, %tmp372 + %tmp400 = fsub float -0.000000e+00, %tmp399 + %tmp401 = fadd float 3.000000e+00, %tmp400 + %tmp402 = fmul float %tmp372, %tmp401 + %tmp403 = fmul float %tmp372, %tmp402 + %one.sub.a.i169 = fsub float 1.000000e+00, %tmp403 + %one.sub.ac.i170 = fmul float %one.sub.a.i169, %tmp349 + %mul.i171 = fmul float %tmp258, %tmp349 %result.i172 = fadd float %mul.i171, %one.sub.ac.i170 - %one.sub.a.i165 = fsub float 1.000000e+00, %398 - %one.sub.ac.i166 = fmul float %one.sub.a.i165, %347 - %mul.i167 = fmul float %255, %347 + %one.sub.a.i165 = fsub float 1.000000e+00, %tmp403 + %one.sub.ac.i166 = fmul float %one.sub.a.i165, %tmp352 + %mul.i167 = fmul float %tmp259, %tmp352 %result.i168 = fadd float %mul.i167, %one.sub.ac.i166 - %one.sub.a.i161 = fsub float 1.000000e+00, %398 - %one.sub.ac.i162 = fmul float %one.sub.a.i161, %350 - %mul.i163 = fmul float %256, %350 + %one.sub.a.i161 = fsub float 1.000000e+00, %tmp403 + %one.sub.ac.i162 = fmul float %one.sub.a.i161, %tmp355 + %mul.i163 = fmul float %tmp260, %tmp355 %result.i164 = fadd float %mul.i163, %one.sub.ac.i162 - %one.sub.a.i157 = fsub float 1.000000e+00, %398 + %one.sub.a.i157 = fsub float 1.000000e+00, %tmp403 %one.sub.ac.i158 = fmul float %one.sub.a.i157, 0.000000e+00 - %mul.i159 = fmul float %257, 0.000000e+00 + %mul.i159 = fmul float %tmp261, 0.000000e+00 %result.i160 = fadd float %mul.i159, %one.sub.ac.i158 - %399 = fmul float 2.000000e+00, %393 - %400 = fsub float -0.000000e+00, %399 - %401 = fadd float 3.000000e+00, %400 - %402 = fmul float %393, %401 - %403 = fmul float %393, %402 - %one.sub.a.i153 = fsub float 1.000000e+00, %403 - %one.sub.ac.i154 = fmul float %one.sub.a.i153, %370 - %mul.i155 = fmul float %254, %370 + %tmp404 = fmul float 2.000000e+00, %tmp398 + %tmp405 = fsub float -0.000000e+00, %tmp404 + %tmp406 = fadd float 3.000000e+00, %tmp405 + %tmp407 = fmul float %tmp398, %tmp406 + %tmp408 = fmul float %tmp398, %tmp407 + %one.sub.a.i153 = fsub float 1.000000e+00, %tmp408 + %one.sub.ac.i154 = fmul float %one.sub.a.i153, %tmp375 + %mul.i155 = fmul float %tmp258, %tmp375 %result.i156 = fadd float %mul.i155, %one.sub.ac.i154 - %one.sub.a.i149 = fsub float 1.000000e+00, %403 - %one.sub.ac.i150 = fmul float %one.sub.a.i149, %373 - %mul.i151 = fmul float %255, %373 + %one.sub.a.i149 = fsub float 1.000000e+00, %tmp408 + %one.sub.ac.i150 = fmul float %one.sub.a.i149, %tmp378 + %mul.i151 = fmul float %tmp259, %tmp378 %result.i152 = fadd float %mul.i151, %one.sub.ac.i150 - %one.sub.a.i145 = fsub float 1.000000e+00, %403 - %one.sub.ac.i146 = fmul float %one.sub.a.i145, %376 - %mul.i147 = fmul float %256, %376 + %one.sub.a.i145 = fsub float 1.000000e+00, %tmp408 + %one.sub.ac.i146 = fmul float %one.sub.a.i145, %tmp381 + %mul.i147 = fmul float %tmp260, %tmp381 %result.i148 = fadd float %mul.i147, %one.sub.ac.i146 - %one.sub.a.i141 = fsub float 1.000000e+00, %403 + %one.sub.a.i141 = fsub float 1.000000e+00, %tmp408 %one.sub.ac.i142 = fmul float %one.sub.a.i141, 0x3FD3333340000000 - %mul.i143 = fmul float %257, 0x3FD3333340000000 + %mul.i143 = fmul float %tmp261, 0x3FD3333340000000 %result.i144 = fadd float %mul.i143, %one.sub.ac.i142 - %404 = fcmp oge float 2.200000e+03, %179 - %405 = sext i1 %404 to i32 - %406 = bitcast i32 %405 to float - %407 = bitcast float %406 to i32 - %408 = icmp ne i32 %407, 0 - br i1 %408, label %IF161, label %ENDIF160 + %tmp409 = fcmp oge float 2.200000e+03, %tmp181 + %tmp410 = sext i1 %tmp409 to i32 + %tmp411 = bitcast i32 %tmp410 to float + %tmp412 = bitcast float %tmp411 to i32 + %tmp413 = icmp ne i32 %tmp412, 0 + br i1 %tmp413, label %IF161, label %ENDIF160 LOOP: ; preds = %ENDIF139, %IF137 - %temp88.0 = phi float [ 0.000000e+00, %IF137 ], [ %437, %ENDIF139 ] + %temp88.0 = phi float [ 0.000000e+00, %IF137 ], [ %tmp443, %ENDIF139 ] %temp92.0 = phi float [ 1.000000e+00, %IF137 ], [ %.temp92.0, %ENDIF139 ] - %temp96.0 = phi float [ 0.000000e+00, %IF137 ], [ %468, %ENDIF139 ] - %409 = bitcast float %temp96.0 to i32 - %410 = icmp sge i32 %409, %137 - %411 = sext i1 %410 to i32 - %412 = bitcast i32 %411 to float - %413 = bitcast float %412 to i32 - %414 = icmp ne i32 %413, 0 - br i1 %414, label %IF140, label %ENDIF139 + %temp96.0 = phi float [ 0.000000e+00, %IF137 ], [ %tmp475, %ENDIF139 ] + %tmp414 = bitcast float %temp96.0 to i32 + %tmp415 = icmp sge i32 %tmp414, %tmp137 + %tmp416 = sext i1 %tmp415 to i32 + %tmp417 = bitcast i32 %tmp416 to float + %tmp418 = bitcast float %tmp417 to i32 + %tmp419 = icmp ne i32 %tmp418, 0 + br i1 %tmp419, label %IF140, label %ENDIF139 IF140: ; preds = %LOOP - %415 = fmul float %133, 5.000000e-01 - %416 = fmul float %129, %temp92.0 - %417 = fadd float %416, %22 - %418 = fmul float %130, %temp92.0 - %419 = fadd float %418, %23 - %420 = insertelement <4 x float> undef, float %417, i32 0 - %421 = insertelement <4 x float> %420, float %419, i32 1 - %422 = insertelement <4 x float> %421, float 0.000000e+00, i32 2 - %423 = insertelement <4 x float> %422, float 0.000000e+00, i32 3 - %424 = extractelement <4 x float> %423, i32 0 - %425 = extractelement <4 x float> %423, i32 1 - %426 = insertelement <4 x float> undef, float %424, i32 0 - %427 = insertelement <4 x float> %426, float %425, i32 1 - %428 = insertelement <4 x float> %427, float undef, i32 2 - %429 = insertelement <4 x float> %428, float undef, i32 3 - %430 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %429, i32 20, i32 4, i32 2) - %431 = extractelement <4 x float> %430, i32 3 - %432 = fcmp oge float %temp92.0, %431 - %433 = sext i1 %432 to i32 - %434 = bitcast i32 %433 to float - %435 = bitcast float %434 to i32 - %436 = icmp ne i32 %435, 0 - br i1 %436, label %IF146, label %ENDIF145 + %tmp420 = fmul float %tmp133, 5.000000e-01 + %tmp421 = fmul float %tmp129, %temp92.0 + %tmp422 = fadd float %tmp421, %tmp22 + %tmp423 = fmul float %tmp130, %temp92.0 + %tmp424 = fadd float %tmp423, %tmp23 + %tmp425 = insertelement <4 x float> undef, float %tmp422, i32 0 + %tmp426 = insertelement <4 x float> %tmp425, float %tmp424, i32 1 + %tmp427 = insertelement <4 x float> %tmp426, float 0.000000e+00, i32 2 + %tmp428 = insertelement <4 x float> %tmp427, float 0.000000e+00, i32 3 + %tmp429 = extractelement <4 x float> %tmp428, i32 0 + %tmp430 = extractelement <4 x float> %tmp428, i32 1 + %tmp431 = insertelement <4 x float> undef, float %tmp429, i32 0 + %tmp432 = insertelement <4 x float> %tmp431, float %tmp430, i32 1 + %tmp433 = insertelement <4 x float> %tmp432, float undef, i32 2 + %tmp434 = insertelement <4 x float> %tmp433, float undef, i32 3 + %tmp435 = shufflevector <4 x float> %tmp434, <4 x float> %tmp434, <4 x i32> + %tmp436 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp435, i32 0, i32 0, i32 0, i32 20, i32 4, i32 1, i32 1, i32 1, i32 1) + %tmp437 = extractelement <4 x float> %tmp436, i32 3 + %tmp438 = fcmp oge float %temp92.0, %tmp437 + %tmp439 = sext i1 %tmp438 to i32 + %tmp440 = bitcast i32 %tmp439 to float + %tmp441 = bitcast float %tmp440 to i32 + %tmp442 = icmp ne i32 %tmp441, 0 + br i1 %tmp442, label %IF146, label %ENDIF145 ENDIF139: ; preds = %LOOP - %437 = fadd float %temp88.0, %133 - %438 = fmul float %129, %437 - %439 = fadd float %438, %22 - %440 = fmul float %130, %437 - %441 = fadd float %440, %23 - %442 = insertelement <4 x float> undef, float %439, i32 0 - %443 = insertelement <4 x float> %442, float %441, i32 1 - %444 = insertelement <4 x float> %443, float 0.000000e+00, i32 2 - %445 = insertelement <4 x float> %444, float 0.000000e+00, i32 3 - %446 = extractelement <4 x float> %445, i32 0 - %447 = extractelement <4 x float> %445, i32 1 - %448 = insertelement <4 x float> undef, float %446, i32 0 - %449 = insertelement <4 x float> %448, float %447, i32 1 - %450 = insertelement <4 x float> %449, float undef, i32 2 - %451 = insertelement <4 x float> %450, float undef, i32 3 - %452 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %451, i32 20, i32 4, i32 2) - %453 = extractelement <4 x float> %452, i32 3 - %454 = fcmp olt float 0x3FEFDF3B60000000, %temp92.0 - %455 = sext i1 %454 to i32 - %456 = bitcast i32 %455 to float - %457 = fcmp oge float %437, %453 - %458 = sext i1 %457 to i32 - %459 = bitcast i32 %458 to float - %460 = bitcast float %456 to i32 - %461 = bitcast float %459 to i32 - %462 = and i32 %460, %461 - %463 = bitcast i32 %462 to float - %464 = bitcast float %463 to i32 - %465 = icmp ne i32 %464, 0 - %.temp92.0 = select i1 %465, float %437, float %temp92.0 - %466 = bitcast float %temp96.0 to i32 - %467 = add i32 %466, 1 - %468 = bitcast i32 %467 to float + %tmp443 = fadd float %temp88.0, %tmp133 + %tmp444 = fmul float %tmp129, %tmp443 + %tmp445 = fadd float %tmp444, %tmp22 + %tmp446 = fmul float %tmp130, %tmp443 + %tmp447 = fadd float %tmp446, %tmp23 + %tmp448 = insertelement <4 x float> undef, float %tmp445, i32 0 + %tmp449 = insertelement <4 x float> %tmp448, float %tmp447, i32 1 + %tmp450 = insertelement <4 x float> %tmp449, float 0.000000e+00, i32 2 + %tmp451 = insertelement <4 x float> %tmp450, float 0.000000e+00, i32 3 + %tmp452 = extractelement <4 x float> %tmp451, i32 0 + %tmp453 = extractelement <4 x float> %tmp451, i32 1 + %tmp454 = insertelement <4 x float> undef, float %tmp452, i32 0 + %tmp455 = insertelement <4 x float> %tmp454, float %tmp453, i32 1 + %tmp456 = insertelement <4 x float> %tmp455, float undef, i32 2 + %tmp457 = insertelement <4 x float> %tmp456, float undef, i32 3 + %tmp458 = shufflevector <4 x float> %tmp457, <4 x float> %tmp457, <4 x i32> + %tmp459 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp458, i32 0, i32 0, i32 0, i32 20, i32 4, i32 1, i32 1, i32 1, i32 1) + %tmp460 = extractelement <4 x float> %tmp459, i32 3 + %tmp461 = fcmp olt float 0x3FEFDF3B60000000, %temp92.0 + %tmp462 = sext i1 %tmp461 to i32 + %tmp463 = bitcast i32 %tmp462 to float + %tmp464 = fcmp oge float %tmp443, %tmp460 + %tmp465 = sext i1 %tmp464 to i32 + %tmp466 = bitcast i32 %tmp465 to float + %tmp467 = bitcast float %tmp463 to i32 + %tmp468 = bitcast float %tmp466 to i32 + %tmp469 = and i32 %tmp467, %tmp468 + %tmp470 = bitcast i32 %tmp469 to float + %tmp471 = bitcast float %tmp470 to i32 + %tmp472 = icmp ne i32 %tmp471, 0 + %.temp92.0 = select i1 %tmp472, float %tmp443, float %temp92.0 + %tmp473 = bitcast float %temp96.0 to i32 + %tmp474 = add i32 %tmp473, 1 + %tmp475 = bitcast i32 %tmp474 to float br label %LOOP IF146: ; preds = %IF140 - %469 = fmul float 2.000000e+00, %415 - %470 = fsub float -0.000000e+00, %469 - %471 = fadd float %temp92.0, %470 + %tmp476 = fmul float 2.000000e+00, %tmp420 + %tmp477 = fsub float -0.000000e+00, %tmp476 + %tmp478 = fadd float %temp92.0, %tmp477 br label %ENDIF145 ENDIF145: ; preds = %IF146, %IF140 - %temp88.1 = phi float [ %471, %IF146 ], [ %temp92.0, %IF140 ] - %472 = fadd float %temp88.1, %415 - %473 = fmul float %415, 5.000000e-01 - %474 = fmul float %129, %472 - %475 = fadd float %474, %22 - %476 = fmul float %130, %472 - %477 = fadd float %476, %23 - %478 = insertelement <4 x float> undef, float %475, i32 0 - %479 = insertelement <4 x float> %478, float %477, i32 1 - %480 = insertelement <4 x float> %479, float 0.000000e+00, i32 2 - %481 = insertelement <4 x float> %480, float %431, i32 3 - %482 = extractelement <4 x float> %481, i32 0 - %483 = extractelement <4 x float> %481, i32 1 - %484 = insertelement <4 x float> undef, float %482, i32 0 - %485 = insertelement <4 x float> %484, float %483, i32 1 - %486 = insertelement <4 x float> %485, float undef, i32 2 - %487 = insertelement <4 x float> %486, float undef, i32 3 - %488 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %487, i32 20, i32 4, i32 2) - %489 = extractelement <4 x float> %488, i32 3 - %490 = fcmp oge float %472, %489 - %491 = sext i1 %490 to i32 - %492 = bitcast i32 %491 to float - %493 = bitcast float %492 to i32 - %494 = icmp ne i32 %493, 0 - br i1 %494, label %IF149, label %ENDIF148 + %temp88.1 = phi float [ %tmp478, %IF146 ], [ %temp92.0, %IF140 ] + %tmp479 = fadd float %temp88.1, %tmp420 + %tmp480 = fmul float %tmp420, 5.000000e-01 + %tmp481 = fmul float %tmp129, %tmp479 + %tmp482 = fadd float %tmp481, %tmp22 + %tmp483 = fmul float %tmp130, %tmp479 + %tmp484 = fadd float %tmp483, %tmp23 + %tmp485 = insertelement <4 x float> undef, float %tmp482, i32 0 + %tmp486 = insertelement <4 x float> %tmp485, float %tmp484, i32 1 + %tmp487 = insertelement <4 x float> %tmp486, float 0.000000e+00, i32 2 + %tmp488 = insertelement <4 x float> %tmp487, float %tmp437, i32 3 + %tmp489 = extractelement <4 x float> %tmp488, i32 0 + %tmp490 = extractelement <4 x float> %tmp488, i32 1 + %tmp491 = insertelement <4 x float> undef, float %tmp489, i32 0 + %tmp492 = insertelement <4 x float> %tmp491, float %tmp490, i32 1 + %tmp493 = insertelement <4 x float> %tmp492, float undef, i32 2 + %tmp494 = insertelement <4 x float> %tmp493, float undef, i32 3 + %tmp495 = shufflevector <4 x float> %tmp494, <4 x float> %tmp494, <4 x i32> + %tmp496 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp495, i32 0, i32 0, i32 0, i32 20, i32 4, i32 1, i32 1, i32 1, i32 1) + %tmp497 = extractelement <4 x float> %tmp496, i32 3 + %tmp498 = fcmp oge float %tmp479, %tmp497 + %tmp499 = sext i1 %tmp498 to i32 + %tmp500 = bitcast i32 %tmp499 to float + %tmp501 = bitcast float %tmp500 to i32 + %tmp502 = icmp ne i32 %tmp501, 0 + br i1 %tmp502, label %IF149, label %ENDIF148 IF149: ; preds = %ENDIF145 - %495 = fmul float 2.000000e+00, %473 - %496 = fsub float -0.000000e+00, %495 - %497 = fadd float %472, %496 + %tmp503 = fmul float 2.000000e+00, %tmp480 + %tmp504 = fsub float -0.000000e+00, %tmp503 + %tmp505 = fadd float %tmp479, %tmp504 br label %ENDIF148 ENDIF148: ; preds = %IF149, %ENDIF145 - %temp88.2 = phi float [ %497, %IF149 ], [ %472, %ENDIF145 ] - %temp92.2 = phi float [ %472, %IF149 ], [ %temp92.0, %ENDIF145 ] - %498 = fadd float %temp88.2, %473 - %499 = fmul float %473, 5.000000e-01 - %500 = fmul float %129, %498 - %501 = fadd float %500, %22 - %502 = fmul float %130, %498 - %503 = fadd float %502, %23 - %504 = insertelement <4 x float> undef, float %501, i32 0 - %505 = insertelement <4 x float> %504, float %503, i32 1 - %506 = insertelement <4 x float> %505, float 0.000000e+00, i32 2 - %507 = insertelement <4 x float> %506, float %489, i32 3 - %508 = extractelement <4 x float> %507, i32 0 - %509 = extractelement <4 x float> %507, i32 1 - %510 = insertelement <4 x float> undef, float %508, i32 0 - %511 = insertelement <4 x float> %510, float %509, i32 1 - %512 = insertelement <4 x float> %511, float undef, i32 2 - %513 = insertelement <4 x float> %512, float undef, i32 3 - %514 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %513, i32 20, i32 4, i32 2) - %515 = extractelement <4 x float> %514, i32 3 - %516 = fcmp oge float %498, %515 - %517 = sext i1 %516 to i32 - %518 = bitcast i32 %517 to float - %519 = bitcast float %518 to i32 - %520 = icmp ne i32 %519, 0 - br i1 %520, label %IF152, label %ENDIF151 + %temp88.2 = phi float [ %tmp505, %IF149 ], [ %tmp479, %ENDIF145 ] + %temp92.2 = phi float [ %tmp479, %IF149 ], [ %temp92.0, %ENDIF145 ] + %tmp506 = fadd float %temp88.2, %tmp480 + %tmp507 = fmul float %tmp480, 5.000000e-01 + %tmp508 = fmul float %tmp129, %tmp506 + %tmp509 = fadd float %tmp508, %tmp22 + %tmp510 = fmul float %tmp130, %tmp506 + %tmp511 = fadd float %tmp510, %tmp23 + %tmp512 = insertelement <4 x float> undef, float %tmp509, i32 0 + %tmp513 = insertelement <4 x float> %tmp512, float %tmp511, i32 1 + %tmp514 = insertelement <4 x float> %tmp513, float 0.000000e+00, i32 2 + %tmp515 = insertelement <4 x float> %tmp514, float %tmp497, i32 3 + %tmp516 = extractelement <4 x float> %tmp515, i32 0 + %tmp517 = extractelement <4 x float> %tmp515, i32 1 + %tmp518 = insertelement <4 x float> undef, float %tmp516, i32 0 + %tmp519 = insertelement <4 x float> %tmp518, float %tmp517, i32 1 + %tmp520 = insertelement <4 x float> %tmp519, float undef, i32 2 + %tmp521 = insertelement <4 x float> %tmp520, float undef, i32 3 + %tmp522 = shufflevector <4 x float> %tmp521, <4 x float> %tmp521, <4 x i32> + %tmp523 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp522, i32 0, i32 0, i32 0, i32 20, i32 4, i32 1, i32 1, i32 1, i32 1) + %tmp524 = extractelement <4 x float> %tmp523, i32 3 + %tmp525 = fcmp oge float %tmp506, %tmp524 + %tmp526 = sext i1 %tmp525 to i32 + %tmp527 = bitcast i32 %tmp526 to float + %tmp528 = bitcast float %tmp527 to i32 + %tmp529 = icmp ne i32 %tmp528, 0 + br i1 %tmp529, label %IF152, label %ENDIF151 IF152: ; preds = %ENDIF148 - %521 = fmul float 2.000000e+00, %499 - %522 = fsub float -0.000000e+00, %521 - %523 = fadd float %498, %522 + %tmp530 = fmul float 2.000000e+00, %tmp507 + %tmp531 = fsub float -0.000000e+00, %tmp530 + %tmp532 = fadd float %tmp506, %tmp531 br label %ENDIF151 ENDIF151: ; preds = %IF152, %ENDIF148 - %temp88.3 = phi float [ %523, %IF152 ], [ %498, %ENDIF148 ] - %temp92.3 = phi float [ %498, %IF152 ], [ %temp92.2, %ENDIF148 ] - %524 = fadd float %temp88.3, %499 - %525 = fmul float %499, 5.000000e-01 - %526 = fmul float %129, %524 - %527 = fadd float %526, %22 - %528 = fmul float %130, %524 - %529 = fadd float %528, %23 - %530 = insertelement <4 x float> undef, float %527, i32 0 - %531 = insertelement <4 x float> %530, float %529, i32 1 - %532 = insertelement <4 x float> %531, float 0.000000e+00, i32 2 - %533 = insertelement <4 x float> %532, float %515, i32 3 - %534 = extractelement <4 x float> %533, i32 0 - %535 = extractelement <4 x float> %533, i32 1 - %536 = insertelement <4 x float> undef, float %534, i32 0 - %537 = insertelement <4 x float> %536, float %535, i32 1 - %538 = insertelement <4 x float> %537, float undef, i32 2 - %539 = insertelement <4 x float> %538, float undef, i32 3 - %540 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %539, i32 20, i32 4, i32 2) - %541 = extractelement <4 x float> %540, i32 3 - %542 = fcmp oge float %524, %541 - %543 = sext i1 %542 to i32 - %544 = bitcast i32 %543 to float - %545 = bitcast float %544 to i32 - %546 = icmp ne i32 %545, 0 - br i1 %546, label %IF155, label %ENDIF154 + %temp88.3 = phi float [ %tmp532, %IF152 ], [ %tmp506, %ENDIF148 ] + %temp92.3 = phi float [ %tmp506, %IF152 ], [ %temp92.2, %ENDIF148 ] + %tmp533 = fadd float %temp88.3, %tmp507 + %tmp534 = fmul float %tmp507, 5.000000e-01 + %tmp535 = fmul float %tmp129, %tmp533 + %tmp536 = fadd float %tmp535, %tmp22 + %tmp537 = fmul float %tmp130, %tmp533 + %tmp538 = fadd float %tmp537, %tmp23 + %tmp539 = insertelement <4 x float> undef, float %tmp536, i32 0 + %tmp540 = insertelement <4 x float> %tmp539, float %tmp538, i32 1 + %tmp541 = insertelement <4 x float> %tmp540, float 0.000000e+00, i32 2 + %tmp542 = insertelement <4 x float> %tmp541, float %tmp524, i32 3 + %tmp543 = extractelement <4 x float> %tmp542, i32 0 + %tmp544 = extractelement <4 x float> %tmp542, i32 1 + %tmp545 = insertelement <4 x float> undef, float %tmp543, i32 0 + %tmp546 = insertelement <4 x float> %tmp545, float %tmp544, i32 1 + %tmp547 = insertelement <4 x float> %tmp546, float undef, i32 2 + %tmp548 = insertelement <4 x float> %tmp547, float undef, i32 3 + %tmp549 = shufflevector <4 x float> %tmp548, <4 x float> %tmp548, <4 x i32> + %tmp550 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp549, i32 0, i32 0, i32 0, i32 20, i32 4, i32 1, i32 1, i32 1, i32 1) + %tmp551 = extractelement <4 x float> %tmp550, i32 3 + %tmp552 = fcmp oge float %tmp533, %tmp551 + %tmp553 = sext i1 %tmp552 to i32 + %tmp554 = bitcast i32 %tmp553 to float + %tmp555 = bitcast float %tmp554 to i32 + %tmp556 = icmp ne i32 %tmp555, 0 + br i1 %tmp556, label %IF155, label %ENDIF154 IF155: ; preds = %ENDIF151 - %547 = fmul float 2.000000e+00, %525 - %548 = fsub float -0.000000e+00, %547 - %549 = fadd float %524, %548 + %tmp557 = fmul float 2.000000e+00, %tmp534 + %tmp558 = fsub float -0.000000e+00, %tmp557 + %tmp559 = fadd float %tmp533, %tmp558 br label %ENDIF154 ENDIF154: ; preds = %IF155, %ENDIF151 - %temp88.4 = phi float [ %549, %IF155 ], [ %524, %ENDIF151 ] - %temp92.4 = phi float [ %524, %IF155 ], [ %temp92.3, %ENDIF151 ] - %550 = fadd float %temp88.4, %525 - %551 = fmul float %129, %550 - %552 = fadd float %551, %22 - %553 = fmul float %130, %550 - %554 = fadd float %553, %23 - %555 = insertelement <4 x float> undef, float %552, i32 0 - %556 = insertelement <4 x float> %555, float %554, i32 1 - %557 = insertelement <4 x float> %556, float 0.000000e+00, i32 2 - %558 = insertelement <4 x float> %557, float %541, i32 3 - %559 = extractelement <4 x float> %558, i32 0 - %560 = extractelement <4 x float> %558, i32 1 - %561 = insertelement <4 x float> undef, float %559, i32 0 - %562 = insertelement <4 x float> %561, float %560, i32 1 - %563 = insertelement <4 x float> %562, float undef, i32 2 - %564 = insertelement <4 x float> %563, float undef, i32 3 - %565 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %564, i32 20, i32 4, i32 2) - %566 = extractelement <4 x float> %565, i32 3 - %567 = fcmp oge float %550, %566 - %568 = sext i1 %567 to i32 - %569 = bitcast i32 %568 to float - %570 = bitcast float %569 to i32 - %571 = icmp ne i32 %570, 0 - %.temp92.4 = select i1 %571, float %550, float %temp92.4 - %572 = fmul float %129, %.temp92.4 - %573 = fadd float %572, %22 - %574 = fmul float %130, %.temp92.4 - %575 = fadd float %574, %23 - %576 = insertelement <4 x float> undef, float %573, i32 0 - %577 = insertelement <4 x float> %576, float %575, i32 1 - %578 = insertelement <4 x float> %577, float 0.000000e+00, i32 2 - %579 = insertelement <4 x float> %578, float %566, i32 3 - %580 = extractelement <4 x float> %579, i32 0 - %581 = extractelement <4 x float> %579, i32 1 - %582 = insertelement <4 x float> undef, float %580, i32 0 - %583 = insertelement <4 x float> %582, float %581, i32 1 - %584 = insertelement <4 x float> %583, float undef, i32 2 - %585 = insertelement <4 x float> %584, float undef, i32 3 - %586 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %585, i32 20, i32 4, i32 2) - %587 = extractelement <4 x float> %586, i32 0 - %588 = extractelement <4 x float> %586, i32 1 - %589 = extractelement <4 x float> %586, i32 2 - %590 = fmul float %587, 2.000000e+00 - %591 = fadd float %590, -1.000000e+00 - %592 = fmul float %588, 2.000000e+00 - %593 = fadd float %592, -1.000000e+00 - %594 = fmul float %589, 2.000000e+00 - %595 = fadd float %594, -1.000000e+00 + %temp88.4 = phi float [ %tmp559, %IF155 ], [ %tmp533, %ENDIF151 ] + %temp92.4 = phi float [ %tmp533, %IF155 ], [ %temp92.3, %ENDIF151 ] + %tmp560 = fadd float %temp88.4, %tmp534 + %tmp561 = fmul float %tmp129, %tmp560 + %tmp562 = fadd float %tmp561, %tmp22 + %tmp563 = fmul float %tmp130, %tmp560 + %tmp564 = fadd float %tmp563, %tmp23 + %tmp565 = insertelement <4 x float> undef, float %tmp562, i32 0 + %tmp566 = insertelement <4 x float> %tmp565, float %tmp564, i32 1 + %tmp567 = insertelement <4 x float> %tmp566, float 0.000000e+00, i32 2 + %tmp568 = insertelement <4 x float> %tmp567, float %tmp551, i32 3 + %tmp569 = extractelement <4 x float> %tmp568, i32 0 + %tmp570 = extractelement <4 x float> %tmp568, i32 1 + %tmp571 = insertelement <4 x float> undef, float %tmp569, i32 0 + %tmp572 = insertelement <4 x float> %tmp571, float %tmp570, i32 1 + %tmp573 = insertelement <4 x float> %tmp572, float undef, i32 2 + %tmp574 = insertelement <4 x float> %tmp573, float undef, i32 3 + %tmp575 = shufflevector <4 x float> %tmp574, <4 x float> %tmp574, <4 x i32> + %tmp576 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp575, i32 0, i32 0, i32 0, i32 20, i32 4, i32 1, i32 1, i32 1, i32 1) + %tmp577 = extractelement <4 x float> %tmp576, i32 3 + %tmp578 = fcmp oge float %tmp560, %tmp577 + %tmp579 = sext i1 %tmp578 to i32 + %tmp580 = bitcast i32 %tmp579 to float + %tmp581 = bitcast float %tmp580 to i32 + %tmp582 = icmp ne i32 %tmp581, 0 + %.temp92.4 = select i1 %tmp582, float %tmp560, float %temp92.4 + %tmp583 = fmul float %tmp129, %.temp92.4 + %tmp584 = fadd float %tmp583, %tmp22 + %tmp585 = fmul float %tmp130, %.temp92.4 + %tmp586 = fadd float %tmp585, %tmp23 + %tmp587 = insertelement <4 x float> undef, float %tmp584, i32 0 + %tmp588 = insertelement <4 x float> %tmp587, float %tmp586, i32 1 + %tmp589 = insertelement <4 x float> %tmp588, float 0.000000e+00, i32 2 + %tmp590 = insertelement <4 x float> %tmp589, float %tmp577, i32 3 + %tmp591 = extractelement <4 x float> %tmp590, i32 0 + %tmp592 = extractelement <4 x float> %tmp590, i32 1 + %tmp593 = insertelement <4 x float> undef, float %tmp591, i32 0 + %tmp594 = insertelement <4 x float> %tmp593, float %tmp592, i32 1 + %tmp595 = insertelement <4 x float> %tmp594, float undef, i32 2 + %tmp596 = insertelement <4 x float> %tmp595, float undef, i32 3 + %tmp597 = shufflevector <4 x float> %tmp596, <4 x float> %tmp596, <4 x i32> + %tmp598 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp597, i32 0, i32 0, i32 0, i32 20, i32 4, i32 1, i32 1, i32 1, i32 1) + %tmp599 = extractelement <4 x float> %tmp598, i32 0 + %tmp600 = extractelement <4 x float> %tmp598, i32 1 + %tmp601 = extractelement <4 x float> %tmp598, i32 2 + %tmp602 = fmul float %tmp599, 2.000000e+00 + %tmp603 = fadd float %tmp602, -1.000000e+00 + %tmp604 = fmul float %tmp600, 2.000000e+00 + %tmp605 = fadd float %tmp604, -1.000000e+00 + %tmp606 = fmul float %tmp601, 2.000000e+00 + %tmp607 = fadd float %tmp606, -1.000000e+00 br label %ENDIF136 IF161: ; preds = %ENDIF136 - %596 = fmul float %result.i, 0x3FB99999A0000000 - %597 = fcmp uge float 0x3FE4CCCCC0000000, %596 - %598 = select i1 %597, float 0x3FE4CCCCC0000000, float %596 - %599 = fcmp uge float %598, 5.000000e-01 - %600 = select i1 %599, float 5.000000e-01, float %598 - %one.sub.a.i137 = fsub float 1.000000e+00, %600 - %one.sub.ac.i138 = fmul float %one.sub.a.i137, %299 - %mul.i139 = fmul float %result.i172, %299 + %tmp608 = fmul float %result.i, 0x3FB99999A0000000 + %tmp609 = fcmp uge float 0x3FE4CCCCC0000000, %tmp608 + %tmp610 = select i1 %tmp609, float 0x3FE4CCCCC0000000, float %tmp608 + %tmp611 = fcmp uge float %tmp610, 5.000000e-01 + %tmp612 = select i1 %tmp611, float 5.000000e-01, float %tmp610 + %one.sub.a.i137 = fsub float 1.000000e+00, %tmp612 + %one.sub.ac.i138 = fmul float %one.sub.a.i137, %tmp304 + %mul.i139 = fmul float %result.i172, %tmp304 %result.i140 = fadd float %mul.i139, %one.sub.ac.i138 - %one.sub.a.i133 = fsub float 1.000000e+00, %600 - %one.sub.ac.i134 = fmul float %one.sub.a.i133, %300 - %mul.i135 = fmul float %result.i168, %300 + %one.sub.a.i133 = fsub float 1.000000e+00, %tmp612 + %one.sub.ac.i134 = fmul float %one.sub.a.i133, %tmp305 + %mul.i135 = fmul float %result.i168, %tmp305 %result.i136 = fadd float %mul.i135, %one.sub.ac.i134 - %one.sub.a.i129 = fsub float 1.000000e+00, %600 - %one.sub.ac.i130 = fmul float %one.sub.a.i129, %301 - %mul.i131 = fmul float %result.i164, %301 + %one.sub.a.i129 = fsub float 1.000000e+00, %tmp612 + %one.sub.ac.i130 = fmul float %one.sub.a.i129, %tmp306 + %mul.i131 = fmul float %result.i164, %tmp306 %result.i132 = fadd float %mul.i131, %one.sub.ac.i130 - %one.sub.a.i125 = fsub float 1.000000e+00, %600 - %one.sub.ac.i126 = fmul float %one.sub.a.i125, %302 - %mul.i127 = fmul float %result.i160, %302 + %one.sub.a.i125 = fsub float 1.000000e+00, %tmp612 + %one.sub.ac.i126 = fmul float %one.sub.a.i125, %tmp307 + %mul.i127 = fmul float %result.i160, %tmp307 %result.i128 = fadd float %mul.i127, %one.sub.ac.i126 - %601 = insertelement <4 x float> undef, float %328, i32 0 - %602 = insertelement <4 x float> %601, float %329, i32 1 - %603 = insertelement <4 x float> %602, float %330, i32 2 - %604 = insertelement <4 x float> %603, float 0.000000e+00, i32 3 - %605 = insertelement <4 x float> undef, float %63, i32 0 - %606 = insertelement <4 x float> %605, float %65, i32 1 - %607 = insertelement <4 x float> %606, float %67, i32 2 - %608 = insertelement <4 x float> %607, float 0.000000e+00, i32 3 - %609 = call float @llvm.AMDGPU.dp4(<4 x float> %604, <4 x float> %608) - %610 = fcmp uge float 0x3FE6666660000000, %609 - %611 = select i1 %610, float 0x3FE6666660000000, float %609 - %612 = fmul float %8, %611 - %613 = fmul float %13, %611 - %614 = fmul float %18, %611 - %615 = insertelement <4 x float> undef, float %34, i32 0 - %616 = insertelement <4 x float> %615, float %35, i32 1 - %617 = insertelement <4 x float> %616, float %36, i32 2 - %618 = insertelement <4 x float> %617, float 0.000000e+00, i32 3 - %619 = insertelement <4 x float> undef, float %63, i32 0 - %620 = insertelement <4 x float> %619, float %65, i32 1 - %621 = insertelement <4 x float> %620, float %67, i32 2 - %622 = insertelement <4 x float> %621, float 0.000000e+00, i32 3 - %623 = call float @llvm.AMDGPU.dp4(<4 x float> %618, <4 x float> %622) - %624 = fcmp uge float 0x3FECCCCCC0000000, %623 - %625 = select i1 %624, float 0x3FECCCCCC0000000, float %623 - %626 = fmul float %612, %625 - %627 = fmul float %613, %625 - %628 = fmul float %614, %625 + %tmp613 = insertelement <4 x float> undef, float %tmp333, i32 0 + %tmp614 = insertelement <4 x float> %tmp613, float %tmp334, i32 1 + %tmp615 = insertelement <4 x float> %tmp614, float %tmp335, i32 2 + %tmp616 = insertelement <4 x float> %tmp615, float 0.000000e+00, i32 3 + %tmp617 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp618 = insertelement <4 x float> %tmp617, float %tmp65, i32 1 + %tmp619 = insertelement <4 x float> %tmp618, float %tmp67, i32 2 + %tmp620 = insertelement <4 x float> %tmp619, float 0.000000e+00, i32 3 + %tmp621 = call float @llvm.r600.dot4(<4 x float> %tmp616, <4 x float> %tmp620) + %tmp622 = fcmp uge float 0x3FE6666660000000, %tmp621 + %tmp623 = select i1 %tmp622, float 0x3FE6666660000000, float %tmp621 + %tmp624 = fmul float %tmp8, %tmp623 + %tmp625 = fmul float %tmp13, %tmp623 + %tmp626 = fmul float %tmp18, %tmp623 + %tmp627 = insertelement <4 x float> undef, float %tmp34, i32 0 + %tmp628 = insertelement <4 x float> %tmp627, float %tmp35, i32 1 + %tmp629 = insertelement <4 x float> %tmp628, float %tmp36, i32 2 + %tmp630 = insertelement <4 x float> %tmp629, float 0.000000e+00, i32 3 + %tmp631 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp632 = insertelement <4 x float> %tmp631, float %tmp65, i32 1 + %tmp633 = insertelement <4 x float> %tmp632, float %tmp67, i32 2 + %tmp634 = insertelement <4 x float> %tmp633, float 0.000000e+00, i32 3 + %tmp635 = call float @llvm.r600.dot4(<4 x float> %tmp630, <4 x float> %tmp634) + %tmp636 = fcmp uge float 0x3FECCCCCC0000000, %tmp635 + %tmp637 = select i1 %tmp636, float 0x3FECCCCCC0000000, float %tmp635 + %tmp638 = fmul float %tmp624, %tmp637 + %tmp639 = fmul float %tmp625, %tmp637 + %tmp640 = fmul float %tmp626, %tmp637 br label %ENDIF160 ENDIF160: ; preds = %IF161, %ENDIF136 - %temp84.0 = phi float [ %result.i140, %IF161 ], [ %254, %ENDIF136 ] - %temp85.0 = phi float [ %result.i136, %IF161 ], [ %255, %ENDIF136 ] - %temp86.0 = phi float [ %result.i132, %IF161 ], [ %256, %ENDIF136 ] - %temp87.0 = phi float [ %result.i128, %IF161 ], [ %257, %ENDIF136 ] - %temp92.6 = phi float [ %626, %IF161 ], [ %406, %ENDIF136 ] - %temp93.0 = phi float [ %627, %IF161 ], [ 0.000000e+00, %ENDIF136 ] - %temp94.0 = phi float [ %628, %IF161 ], [ 0.000000e+00, %ENDIF136 ] - %629 = fcmp olt float 2.200000e+03, %179 - %630 = sext i1 %629 to i32 - %631 = bitcast i32 %630 to float - %632 = fcmp olt float %179, 2.300000e+03 - %633 = sext i1 %632 to i32 - %634 = bitcast i32 %633 to float - %635 = bitcast float %631 to i32 - %636 = bitcast float %634 to i32 - %637 = and i32 %635, %636 - %638 = bitcast i32 %637 to float - %639 = bitcast float %638 to i32 - %640 = icmp ne i32 %639, 0 - br i1 %640, label %IF164, label %ENDIF163 + %temp84.0 = phi float [ %result.i140, %IF161 ], [ %tmp258, %ENDIF136 ] + %temp85.0 = phi float [ %result.i136, %IF161 ], [ %tmp259, %ENDIF136 ] + %temp86.0 = phi float [ %result.i132, %IF161 ], [ %tmp260, %ENDIF136 ] + %temp87.0 = phi float [ %result.i128, %IF161 ], [ %tmp261, %ENDIF136 ] + %temp92.6 = phi float [ %tmp638, %IF161 ], [ %tmp411, %ENDIF136 ] + %temp93.0 = phi float [ %tmp639, %IF161 ], [ 0.000000e+00, %ENDIF136 ] + %temp94.0 = phi float [ %tmp640, %IF161 ], [ 0.000000e+00, %ENDIF136 ] + %tmp641 = fcmp olt float 2.200000e+03, %tmp181 + %tmp642 = sext i1 %tmp641 to i32 + %tmp643 = bitcast i32 %tmp642 to float + %tmp644 = fcmp olt float %tmp181, 2.300000e+03 + %tmp645 = sext i1 %tmp644 to i32 + %tmp646 = bitcast i32 %tmp645 to float + %tmp647 = bitcast float %tmp643 to i32 + %tmp648 = bitcast float %tmp646 to i32 + %tmp649 = and i32 %tmp647, %tmp648 + %tmp650 = bitcast i32 %tmp649 to float + %tmp651 = bitcast float %tmp650 to i32 + %tmp652 = icmp ne i32 %tmp651, 0 + br i1 %tmp652, label %IF164, label %ENDIF163 IF164: ; preds = %ENDIF160 - %641 = fmul float %result.i, 5.000000e-01 - %642 = fcmp uge float 0x3FE4CCCCC0000000, %641 - %643 = select i1 %642, float 0x3FE4CCCCC0000000, float %641 - %644 = fcmp uge float %643, 0x3FD6666660000000 - %645 = select i1 %644, float 0x3FD6666660000000, float %643 - %one.sub.a.i121 = fsub float 1.000000e+00, %645 - %one.sub.ac.i122 = fmul float %one.sub.a.i121, %299 - %mul.i123 = fmul float %result.i172, %299 + %tmp653 = fmul float %result.i, 5.000000e-01 + %tmp654 = fcmp uge float 0x3FE4CCCCC0000000, %tmp653 + %tmp655 = select i1 %tmp654, float 0x3FE4CCCCC0000000, float %tmp653 + %tmp656 = fcmp uge float %tmp655, 0x3FD6666660000000 + %tmp657 = select i1 %tmp656, float 0x3FD6666660000000, float %tmp655 + %one.sub.a.i121 = fsub float 1.000000e+00, %tmp657 + %one.sub.ac.i122 = fmul float %one.sub.a.i121, %tmp304 + %mul.i123 = fmul float %result.i172, %tmp304 %result.i124 = fadd float %mul.i123, %one.sub.ac.i122 - %one.sub.a.i117 = fsub float 1.000000e+00, %645 - %one.sub.ac.i118 = fmul float %one.sub.a.i117, %300 - %mul.i119 = fmul float %result.i168, %300 + %one.sub.a.i117 = fsub float 1.000000e+00, %tmp657 + %one.sub.ac.i118 = fmul float %one.sub.a.i117, %tmp305 + %mul.i119 = fmul float %result.i168, %tmp305 %result.i120 = fadd float %mul.i119, %one.sub.ac.i118 - %one.sub.a.i113 = fsub float 1.000000e+00, %645 - %one.sub.ac.i114 = fmul float %one.sub.a.i113, %301 - %mul.i115 = fmul float %result.i164, %301 + %one.sub.a.i113 = fsub float 1.000000e+00, %tmp657 + %one.sub.ac.i114 = fmul float %one.sub.a.i113, %tmp306 + %mul.i115 = fmul float %result.i164, %tmp306 %result.i116 = fadd float %mul.i115, %one.sub.ac.i114 - %one.sub.a.i109 = fsub float 1.000000e+00, %645 - %one.sub.ac.i110 = fmul float %one.sub.a.i109, %302 - %mul.i111 = fmul float %result.i160, %302 + %one.sub.a.i109 = fsub float 1.000000e+00, %tmp657 + %one.sub.ac.i110 = fmul float %one.sub.a.i109, %tmp307 + %mul.i111 = fmul float %result.i160, %tmp307 %result.i112 = fadd float %mul.i111, %one.sub.ac.i110 - %646 = insertelement <4 x float> undef, float %328, i32 0 - %647 = insertelement <4 x float> %646, float %329, i32 1 - %648 = insertelement <4 x float> %647, float %330, i32 2 - %649 = insertelement <4 x float> %648, float 0.000000e+00, i32 3 - %650 = insertelement <4 x float> undef, float %63, i32 0 - %651 = insertelement <4 x float> %650, float %65, i32 1 - %652 = insertelement <4 x float> %651, float %67, i32 2 - %653 = insertelement <4 x float> %652, float 0.000000e+00, i32 3 - %654 = call float @llvm.AMDGPU.dp4(<4 x float> %649, <4 x float> %653) - %655 = fcmp uge float 0x3FE6666660000000, %654 - %656 = select i1 %655, float 0x3FE6666660000000, float %654 - %657 = fmul float %8, %656 - %658 = fmul float %13, %656 - %659 = fmul float %18, %656 - %660 = insertelement <4 x float> undef, float %34, i32 0 - %661 = insertelement <4 x float> %660, float %35, i32 1 - %662 = insertelement <4 x float> %661, float %36, i32 2 - %663 = insertelement <4 x float> %662, float 0.000000e+00, i32 3 - %664 = insertelement <4 x float> undef, float %63, i32 0 - %665 = insertelement <4 x float> %664, float %65, i32 1 - %666 = insertelement <4 x float> %665, float %67, i32 2 - %667 = insertelement <4 x float> %666, float 0.000000e+00, i32 3 - %668 = call float @llvm.AMDGPU.dp4(<4 x float> %663, <4 x float> %667) - %669 = fcmp uge float 0x3FECCCCCC0000000, %668 - %670 = select i1 %669, float 0x3FECCCCCC0000000, float %668 - %671 = fmul float %657, %670 - %672 = fmul float %658, %670 - %673 = fmul float %659, %670 + %tmp658 = insertelement <4 x float> undef, float %tmp333, i32 0 + %tmp659 = insertelement <4 x float> %tmp658, float %tmp334, i32 1 + %tmp660 = insertelement <4 x float> %tmp659, float %tmp335, i32 2 + %tmp661 = insertelement <4 x float> %tmp660, float 0.000000e+00, i32 3 + %tmp662 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp663 = insertelement <4 x float> %tmp662, float %tmp65, i32 1 + %tmp664 = insertelement <4 x float> %tmp663, float %tmp67, i32 2 + %tmp665 = insertelement <4 x float> %tmp664, float 0.000000e+00, i32 3 + %tmp666 = call float @llvm.r600.dot4(<4 x float> %tmp661, <4 x float> %tmp665) + %tmp667 = fcmp uge float 0x3FE6666660000000, %tmp666 + %tmp668 = select i1 %tmp667, float 0x3FE6666660000000, float %tmp666 + %tmp669 = fmul float %tmp8, %tmp668 + %tmp670 = fmul float %tmp13, %tmp668 + %tmp671 = fmul float %tmp18, %tmp668 + %tmp672 = insertelement <4 x float> undef, float %tmp34, i32 0 + %tmp673 = insertelement <4 x float> %tmp672, float %tmp35, i32 1 + %tmp674 = insertelement <4 x float> %tmp673, float %tmp36, i32 2 + %tmp675 = insertelement <4 x float> %tmp674, float 0.000000e+00, i32 3 + %tmp676 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp677 = insertelement <4 x float> %tmp676, float %tmp65, i32 1 + %tmp678 = insertelement <4 x float> %tmp677, float %tmp67, i32 2 + %tmp679 = insertelement <4 x float> %tmp678, float 0.000000e+00, i32 3 + %tmp680 = call float @llvm.r600.dot4(<4 x float> %tmp675, <4 x float> %tmp679) + %tmp681 = fcmp uge float 0x3FECCCCCC0000000, %tmp680 + %tmp682 = select i1 %tmp681, float 0x3FECCCCCC0000000, float %tmp680 + %tmp683 = fmul float %tmp669, %tmp682 + %tmp684 = fmul float %tmp670, %tmp682 + %tmp685 = fmul float %tmp671, %tmp682 br label %ENDIF163 ENDIF163: ; preds = %IF164, %ENDIF160 @@ -825,73 +836,73 @@ %temp85.1 = phi float [ %result.i120, %IF164 ], [ %temp85.0, %ENDIF160 ] %temp86.1 = phi float [ %result.i116, %IF164 ], [ %temp86.0, %ENDIF160 ] %temp87.1 = phi float [ %result.i112, %IF164 ], [ %temp87.0, %ENDIF160 ] - %temp92.7 = phi float [ %671, %IF164 ], [ %temp92.6, %ENDIF160 ] - %temp93.1 = phi float [ %672, %IF164 ], [ %temp93.0, %ENDIF160 ] - %temp94.1 = phi float [ %673, %IF164 ], [ %temp94.0, %ENDIF160 ] - %674 = fcmp oge float %179, 2.300000e+03 - %675 = sext i1 %674 to i32 - %676 = bitcast i32 %675 to float - %677 = fcmp olt float %179, 2.480000e+03 - %678 = sext i1 %677 to i32 - %679 = bitcast i32 %678 to float - %680 = bitcast float %676 to i32 - %681 = bitcast float %679 to i32 - %682 = and i32 %680, %681 - %683 = bitcast i32 %682 to float - %684 = bitcast float %683 to i32 - %685 = icmp ne i32 %684, 0 - br i1 %685, label %IF167, label %ENDIF166 + %temp92.7 = phi float [ %tmp683, %IF164 ], [ %temp92.6, %ENDIF160 ] + %temp93.1 = phi float [ %tmp684, %IF164 ], [ %temp93.0, %ENDIF160 ] + %temp94.1 = phi float [ %tmp685, %IF164 ], [ %temp94.0, %ENDIF160 ] + %tmp686 = fcmp oge float %tmp181, 2.300000e+03 + %tmp687 = sext i1 %tmp686 to i32 + %tmp688 = bitcast i32 %tmp687 to float + %tmp689 = fcmp olt float %tmp181, 2.480000e+03 + %tmp690 = sext i1 %tmp689 to i32 + %tmp691 = bitcast i32 %tmp690 to float + %tmp692 = bitcast float %tmp688 to i32 + %tmp693 = bitcast float %tmp691 to i32 + %tmp694 = and i32 %tmp692, %tmp693 + %tmp695 = bitcast i32 %tmp694 to float + %tmp696 = bitcast float %tmp695 to i32 + %tmp697 = icmp ne i32 %tmp696, 0 + br i1 %tmp697, label %IF167, label %ENDIF166 IF167: ; preds = %ENDIF163 - %686 = fmul float %result.i, 5.000000e-01 - %687 = fcmp uge float 0x3FE4CCCCC0000000, %686 - %688 = select i1 %687, float 0x3FE4CCCCC0000000, float %686 - %689 = fcmp uge float %688, 0x3FD3333340000000 - %690 = select i1 %689, float 0x3FD3333340000000, float %688 - %one.sub.a.i105 = fsub float 1.000000e+00, %690 - %one.sub.ac.i106 = fmul float %one.sub.a.i105, %299 - %mul.i107 = fmul float %result.i156, %299 + %tmp698 = fmul float %result.i, 5.000000e-01 + %tmp699 = fcmp uge float 0x3FE4CCCCC0000000, %tmp698 + %tmp700 = select i1 %tmp699, float 0x3FE4CCCCC0000000, float %tmp698 + %tmp701 = fcmp uge float %tmp700, 0x3FD3333340000000 + %tmp702 = select i1 %tmp701, float 0x3FD3333340000000, float %tmp700 + %one.sub.a.i105 = fsub float 1.000000e+00, %tmp702 + %one.sub.ac.i106 = fmul float %one.sub.a.i105, %tmp304 + %mul.i107 = fmul float %result.i156, %tmp304 %result.i108 = fadd float %mul.i107, %one.sub.ac.i106 - %one.sub.a.i101 = fsub float 1.000000e+00, %690 - %one.sub.ac.i102 = fmul float %one.sub.a.i101, %300 - %mul.i103 = fmul float %result.i152, %300 + %one.sub.a.i101 = fsub float 1.000000e+00, %tmp702 + %one.sub.ac.i102 = fmul float %one.sub.a.i101, %tmp305 + %mul.i103 = fmul float %result.i152, %tmp305 %result.i104 = fadd float %mul.i103, %one.sub.ac.i102 - %one.sub.a.i97 = fsub float 1.000000e+00, %690 - %one.sub.ac.i98 = fmul float %one.sub.a.i97, %301 - %mul.i99 = fmul float %result.i148, %301 + %one.sub.a.i97 = fsub float 1.000000e+00, %tmp702 + %one.sub.ac.i98 = fmul float %one.sub.a.i97, %tmp306 + %mul.i99 = fmul float %result.i148, %tmp306 %result.i100 = fadd float %mul.i99, %one.sub.ac.i98 - %one.sub.a.i93 = fsub float 1.000000e+00, %690 - %one.sub.ac.i94 = fmul float %one.sub.a.i93, %302 - %mul.i95 = fmul float %result.i144, %302 + %one.sub.a.i93 = fsub float 1.000000e+00, %tmp702 + %one.sub.ac.i94 = fmul float %one.sub.a.i93, %tmp307 + %mul.i95 = fmul float %result.i144, %tmp307 %result.i96 = fadd float %mul.i95, %one.sub.ac.i94 - %691 = insertelement <4 x float> undef, float %328, i32 0 - %692 = insertelement <4 x float> %691, float %329, i32 1 - %693 = insertelement <4 x float> %692, float %330, i32 2 - %694 = insertelement <4 x float> %693, float 0.000000e+00, i32 3 - %695 = insertelement <4 x float> undef, float %63, i32 0 - %696 = insertelement <4 x float> %695, float %65, i32 1 - %697 = insertelement <4 x float> %696, float %67, i32 2 - %698 = insertelement <4 x float> %697, float 0.000000e+00, i32 3 - %699 = call float @llvm.AMDGPU.dp4(<4 x float> %694, <4 x float> %698) - %700 = fcmp uge float 0x3FEB333340000000, %699 - %701 = select i1 %700, float 0x3FEB333340000000, float %699 - %702 = fmul float %8, %701 - %703 = fmul float %13, %701 - %704 = fmul float %18, %701 - %705 = insertelement <4 x float> undef, float %34, i32 0 - %706 = insertelement <4 x float> %705, float %35, i32 1 - %707 = insertelement <4 x float> %706, float %36, i32 2 - %708 = insertelement <4 x float> %707, float 0.000000e+00, i32 3 - %709 = insertelement <4 x float> undef, float %63, i32 0 - %710 = insertelement <4 x float> %709, float %65, i32 1 - %711 = insertelement <4 x float> %710, float %67, i32 2 - %712 = insertelement <4 x float> %711, float 0.000000e+00, i32 3 - %713 = call float @llvm.AMDGPU.dp4(<4 x float> %708, <4 x float> %712) - %714 = fcmp uge float 0x3FECCCCCC0000000, %713 - %715 = select i1 %714, float 0x3FECCCCCC0000000, float %713 - %716 = fmul float %702, %715 - %717 = fmul float %703, %715 - %718 = fmul float %704, %715 + %tmp703 = insertelement <4 x float> undef, float %tmp333, i32 0 + %tmp704 = insertelement <4 x float> %tmp703, float %tmp334, i32 1 + %tmp705 = insertelement <4 x float> %tmp704, float %tmp335, i32 2 + %tmp706 = insertelement <4 x float> %tmp705, float 0.000000e+00, i32 3 + %tmp707 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp708 = insertelement <4 x float> %tmp707, float %tmp65, i32 1 + %tmp709 = insertelement <4 x float> %tmp708, float %tmp67, i32 2 + %tmp710 = insertelement <4 x float> %tmp709, float 0.000000e+00, i32 3 + %tmp711 = call float @llvm.r600.dot4(<4 x float> %tmp706, <4 x float> %tmp710) + %tmp712 = fcmp uge float 0x3FEB333340000000, %tmp711 + %tmp713 = select i1 %tmp712, float 0x3FEB333340000000, float %tmp711 + %tmp714 = fmul float %tmp8, %tmp713 + %tmp715 = fmul float %tmp13, %tmp713 + %tmp716 = fmul float %tmp18, %tmp713 + %tmp717 = insertelement <4 x float> undef, float %tmp34, i32 0 + %tmp718 = insertelement <4 x float> %tmp717, float %tmp35, i32 1 + %tmp719 = insertelement <4 x float> %tmp718, float %tmp36, i32 2 + %tmp720 = insertelement <4 x float> %tmp719, float 0.000000e+00, i32 3 + %tmp721 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp722 = insertelement <4 x float> %tmp721, float %tmp65, i32 1 + %tmp723 = insertelement <4 x float> %tmp722, float %tmp67, i32 2 + %tmp724 = insertelement <4 x float> %tmp723, float 0.000000e+00, i32 3 + %tmp725 = call float @llvm.r600.dot4(<4 x float> %tmp720, <4 x float> %tmp724) + %tmp726 = fcmp uge float 0x3FECCCCCC0000000, %tmp725 + %tmp727 = select i1 %tmp726, float 0x3FECCCCCC0000000, float %tmp725 + %tmp728 = fmul float %tmp714, %tmp727 + %tmp729 = fmul float %tmp715, %tmp727 + %tmp730 = fmul float %tmp716, %tmp727 br label %ENDIF166 ENDIF166: ; preds = %IF167, %ENDIF163 @@ -899,73 +910,73 @@ %temp85.2 = phi float [ %result.i104, %IF167 ], [ %temp85.1, %ENDIF163 ] %temp86.2 = phi float [ %result.i100, %IF167 ], [ %temp86.1, %ENDIF163 ] %temp87.2 = phi float [ %result.i96, %IF167 ], [ %temp87.1, %ENDIF163 ] - %temp92.8 = phi float [ %716, %IF167 ], [ %temp92.7, %ENDIF163 ] - %temp93.2 = phi float [ %717, %IF167 ], [ %temp93.1, %ENDIF163 ] - %temp94.2 = phi float [ %718, %IF167 ], [ %temp94.1, %ENDIF163 ] - %719 = fcmp oge float %179, 2.480000e+03 - %720 = sext i1 %719 to i32 - %721 = bitcast i32 %720 to float - %722 = fcmp olt float %179, 2.530000e+03 - %723 = sext i1 %722 to i32 - %724 = bitcast i32 %723 to float - %725 = bitcast float %721 to i32 - %726 = bitcast float %724 to i32 - %727 = and i32 %725, %726 - %728 = bitcast i32 %727 to float - %729 = bitcast float %728 to i32 - %730 = icmp ne i32 %729, 0 - br i1 %730, label %IF170, label %ENDIF169 + %temp92.8 = phi float [ %tmp728, %IF167 ], [ %temp92.7, %ENDIF163 ] + %temp93.2 = phi float [ %tmp729, %IF167 ], [ %temp93.1, %ENDIF163 ] + %temp94.2 = phi float [ %tmp730, %IF167 ], [ %temp94.1, %ENDIF163 ] + %tmp731 = fcmp oge float %tmp181, 2.480000e+03 + %tmp732 = sext i1 %tmp731 to i32 + %tmp733 = bitcast i32 %tmp732 to float + %tmp734 = fcmp olt float %tmp181, 2.530000e+03 + %tmp735 = sext i1 %tmp734 to i32 + %tmp736 = bitcast i32 %tmp735 to float + %tmp737 = bitcast float %tmp733 to i32 + %tmp738 = bitcast float %tmp736 to i32 + %tmp739 = and i32 %tmp737, %tmp738 + %tmp740 = bitcast i32 %tmp739 to float + %tmp741 = bitcast float %tmp740 to i32 + %tmp742 = icmp ne i32 %tmp741, 0 + br i1 %tmp742, label %IF170, label %ENDIF169 IF170: ; preds = %ENDIF166 - %731 = fmul float %result.i, 5.000000e-01 - %732 = fcmp uge float 0x3FE4CCCCC0000000, %731 - %733 = select i1 %732, float 0x3FE4CCCCC0000000, float %731 - %734 = fcmp uge float %733, 0x3FC99999A0000000 - %735 = select i1 %734, float 0x3FC99999A0000000, float %733 - %one.sub.a.i89 = fsub float 1.000000e+00, %735 - %one.sub.ac.i90 = fmul float %one.sub.a.i89, %299 - %mul.i91 = fmul float %result.i156, %299 + %tmp743 = fmul float %result.i, 5.000000e-01 + %tmp744 = fcmp uge float 0x3FE4CCCCC0000000, %tmp743 + %tmp745 = select i1 %tmp744, float 0x3FE4CCCCC0000000, float %tmp743 + %tmp746 = fcmp uge float %tmp745, 0x3FC99999A0000000 + %tmp747 = select i1 %tmp746, float 0x3FC99999A0000000, float %tmp745 + %one.sub.a.i89 = fsub float 1.000000e+00, %tmp747 + %one.sub.ac.i90 = fmul float %one.sub.a.i89, %tmp304 + %mul.i91 = fmul float %result.i156, %tmp304 %result.i92 = fadd float %mul.i91, %one.sub.ac.i90 - %one.sub.a.i85 = fsub float 1.000000e+00, %735 - %one.sub.ac.i86 = fmul float %one.sub.a.i85, %300 - %mul.i87 = fmul float %result.i152, %300 + %one.sub.a.i85 = fsub float 1.000000e+00, %tmp747 + %one.sub.ac.i86 = fmul float %one.sub.a.i85, %tmp305 + %mul.i87 = fmul float %result.i152, %tmp305 %result.i88 = fadd float %mul.i87, %one.sub.ac.i86 - %one.sub.a.i81 = fsub float 1.000000e+00, %735 - %one.sub.ac.i82 = fmul float %one.sub.a.i81, %301 - %mul.i83 = fmul float %result.i148, %301 + %one.sub.a.i81 = fsub float 1.000000e+00, %tmp747 + %one.sub.ac.i82 = fmul float %one.sub.a.i81, %tmp306 + %mul.i83 = fmul float %result.i148, %tmp306 %result.i84 = fadd float %mul.i83, %one.sub.ac.i82 - %one.sub.a.i77 = fsub float 1.000000e+00, %735 - %one.sub.ac.i78 = fmul float %one.sub.a.i77, %302 - %mul.i79 = fmul float %result.i144, %302 + %one.sub.a.i77 = fsub float 1.000000e+00, %tmp747 + %one.sub.ac.i78 = fmul float %one.sub.a.i77, %tmp307 + %mul.i79 = fmul float %result.i144, %tmp307 %result.i80 = fadd float %mul.i79, %one.sub.ac.i78 - %736 = insertelement <4 x float> undef, float %328, i32 0 - %737 = insertelement <4 x float> %736, float %329, i32 1 - %738 = insertelement <4 x float> %737, float %330, i32 2 - %739 = insertelement <4 x float> %738, float 0.000000e+00, i32 3 - %740 = insertelement <4 x float> undef, float %63, i32 0 - %741 = insertelement <4 x float> %740, float %65, i32 1 - %742 = insertelement <4 x float> %741, float %67, i32 2 - %743 = insertelement <4 x float> %742, float 0.000000e+00, i32 3 - %744 = call float @llvm.AMDGPU.dp4(<4 x float> %739, <4 x float> %743) - %745 = fcmp uge float 0x3FEB333340000000, %744 - %746 = select i1 %745, float 0x3FEB333340000000, float %744 - %747 = fmul float %8, %746 - %748 = fmul float %13, %746 - %749 = fmul float %18, %746 - %750 = insertelement <4 x float> undef, float %34, i32 0 - %751 = insertelement <4 x float> %750, float %35, i32 1 - %752 = insertelement <4 x float> %751, float %36, i32 2 - %753 = insertelement <4 x float> %752, float 0.000000e+00, i32 3 - %754 = insertelement <4 x float> undef, float %63, i32 0 - %755 = insertelement <4 x float> %754, float %65, i32 1 - %756 = insertelement <4 x float> %755, float %67, i32 2 - %757 = insertelement <4 x float> %756, float 0.000000e+00, i32 3 - %758 = call float @llvm.AMDGPU.dp4(<4 x float> %753, <4 x float> %757) - %759 = fcmp uge float 0x3FECCCCCC0000000, %758 - %760 = select i1 %759, float 0x3FECCCCCC0000000, float %758 - %761 = fmul float %747, %760 - %762 = fmul float %748, %760 - %763 = fmul float %749, %760 + %tmp748 = insertelement <4 x float> undef, float %tmp333, i32 0 + %tmp749 = insertelement <4 x float> %tmp748, float %tmp334, i32 1 + %tmp750 = insertelement <4 x float> %tmp749, float %tmp335, i32 2 + %tmp751 = insertelement <4 x float> %tmp750, float 0.000000e+00, i32 3 + %tmp752 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp753 = insertelement <4 x float> %tmp752, float %tmp65, i32 1 + %tmp754 = insertelement <4 x float> %tmp753, float %tmp67, i32 2 + %tmp755 = insertelement <4 x float> %tmp754, float 0.000000e+00, i32 3 + %tmp756 = call float @llvm.r600.dot4(<4 x float> %tmp751, <4 x float> %tmp755) + %tmp757 = fcmp uge float 0x3FEB333340000000, %tmp756 + %tmp758 = select i1 %tmp757, float 0x3FEB333340000000, float %tmp756 + %tmp759 = fmul float %tmp8, %tmp758 + %tmp760 = fmul float %tmp13, %tmp758 + %tmp761 = fmul float %tmp18, %tmp758 + %tmp762 = insertelement <4 x float> undef, float %tmp34, i32 0 + %tmp763 = insertelement <4 x float> %tmp762, float %tmp35, i32 1 + %tmp764 = insertelement <4 x float> %tmp763, float %tmp36, i32 2 + %tmp765 = insertelement <4 x float> %tmp764, float 0.000000e+00, i32 3 + %tmp766 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp767 = insertelement <4 x float> %tmp766, float %tmp65, i32 1 + %tmp768 = insertelement <4 x float> %tmp767, float %tmp67, i32 2 + %tmp769 = insertelement <4 x float> %tmp768, float 0.000000e+00, i32 3 + %tmp770 = call float @llvm.r600.dot4(<4 x float> %tmp765, <4 x float> %tmp769) + %tmp771 = fcmp uge float 0x3FECCCCCC0000000, %tmp770 + %tmp772 = select i1 %tmp771, float 0x3FECCCCCC0000000, float %tmp770 + %tmp773 = fmul float %tmp759, %tmp772 + %tmp774 = fmul float %tmp760, %tmp772 + %tmp775 = fmul float %tmp761, %tmp772 br label %ENDIF169 ENDIF169: ; preds = %IF170, %ENDIF166 @@ -973,73 +984,73 @@ %temp85.3 = phi float [ %result.i88, %IF170 ], [ %temp85.2, %ENDIF166 ] %temp86.3 = phi float [ %result.i84, %IF170 ], [ %temp86.2, %ENDIF166 ] %temp87.3 = phi float [ %result.i80, %IF170 ], [ %temp87.2, %ENDIF166 ] - %temp92.9 = phi float [ %761, %IF170 ], [ %temp92.8, %ENDIF166 ] - %temp93.3 = phi float [ %762, %IF170 ], [ %temp93.2, %ENDIF166 ] - %temp94.3 = phi float [ %763, %IF170 ], [ %temp94.2, %ENDIF166 ] - %764 = fcmp oge float %179, 2.530000e+03 - %765 = sext i1 %764 to i32 - %766 = bitcast i32 %765 to float - %767 = fcmp olt float %179, 2.670000e+03 - %768 = sext i1 %767 to i32 - %769 = bitcast i32 %768 to float - %770 = bitcast float %766 to i32 - %771 = bitcast float %769 to i32 - %772 = and i32 %770, %771 - %773 = bitcast i32 %772 to float - %774 = bitcast float %773 to i32 - %775 = icmp ne i32 %774, 0 - br i1 %775, label %IF173, label %ENDIF172 + %temp92.9 = phi float [ %tmp773, %IF170 ], [ %temp92.8, %ENDIF166 ] + %temp93.3 = phi float [ %tmp774, %IF170 ], [ %temp93.2, %ENDIF166 ] + %temp94.3 = phi float [ %tmp775, %IF170 ], [ %temp94.2, %ENDIF166 ] + %tmp776 = fcmp oge float %tmp181, 2.530000e+03 + %tmp777 = sext i1 %tmp776 to i32 + %tmp778 = bitcast i32 %tmp777 to float + %tmp779 = fcmp olt float %tmp181, 2.670000e+03 + %tmp780 = sext i1 %tmp779 to i32 + %tmp781 = bitcast i32 %tmp780 to float + %tmp782 = bitcast float %tmp778 to i32 + %tmp783 = bitcast float %tmp781 to i32 + %tmp784 = and i32 %tmp782, %tmp783 + %tmp785 = bitcast i32 %tmp784 to float + %tmp786 = bitcast float %tmp785 to i32 + %tmp787 = icmp ne i32 %tmp786, 0 + br i1 %tmp787, label %IF173, label %ENDIF172 IF173: ; preds = %ENDIF169 - %776 = fmul float %result.i, 5.000000e-01 - %777 = fcmp uge float 0x3FE4CCCCC0000000, %776 - %778 = select i1 %777, float 0x3FE4CCCCC0000000, float %776 - %779 = fcmp uge float %778, 0x3FB99999A0000000 - %780 = select i1 %779, float 0x3FB99999A0000000, float %778 - %one.sub.a.i73 = fsub float 1.000000e+00, %780 - %one.sub.ac.i74 = fmul float %one.sub.a.i73, %299 - %mul.i75 = fmul float %result.i172, %299 + %tmp788 = fmul float %result.i, 5.000000e-01 + %tmp789 = fcmp uge float 0x3FE4CCCCC0000000, %tmp788 + %tmp790 = select i1 %tmp789, float 0x3FE4CCCCC0000000, float %tmp788 + %tmp791 = fcmp uge float %tmp790, 0x3FB99999A0000000 + %tmp792 = select i1 %tmp791, float 0x3FB99999A0000000, float %tmp790 + %one.sub.a.i73 = fsub float 1.000000e+00, %tmp792 + %one.sub.ac.i74 = fmul float %one.sub.a.i73, %tmp304 + %mul.i75 = fmul float %result.i172, %tmp304 %result.i76 = fadd float %mul.i75, %one.sub.ac.i74 - %one.sub.a.i69 = fsub float 1.000000e+00, %780 - %one.sub.ac.i70 = fmul float %one.sub.a.i69, %300 - %mul.i71 = fmul float %result.i168, %300 + %one.sub.a.i69 = fsub float 1.000000e+00, %tmp792 + %one.sub.ac.i70 = fmul float %one.sub.a.i69, %tmp305 + %mul.i71 = fmul float %result.i168, %tmp305 %result.i72 = fadd float %mul.i71, %one.sub.ac.i70 - %one.sub.a.i65 = fsub float 1.000000e+00, %780 - %one.sub.ac.i66 = fmul float %one.sub.a.i65, %301 - %mul.i67 = fmul float %result.i164, %301 + %one.sub.a.i65 = fsub float 1.000000e+00, %tmp792 + %one.sub.ac.i66 = fmul float %one.sub.a.i65, %tmp306 + %mul.i67 = fmul float %result.i164, %tmp306 %result.i68 = fadd float %mul.i67, %one.sub.ac.i66 - %one.sub.a.i61 = fsub float 1.000000e+00, %780 - %one.sub.ac.i62 = fmul float %one.sub.a.i61, %302 - %mul.i63 = fmul float %result.i160, %302 + %one.sub.a.i61 = fsub float 1.000000e+00, %tmp792 + %one.sub.ac.i62 = fmul float %one.sub.a.i61, %tmp307 + %mul.i63 = fmul float %result.i160, %tmp307 %result.i64 = fadd float %mul.i63, %one.sub.ac.i62 - %781 = insertelement <4 x float> undef, float %328, i32 0 - %782 = insertelement <4 x float> %781, float %329, i32 1 - %783 = insertelement <4 x float> %782, float %330, i32 2 - %784 = insertelement <4 x float> %783, float 0.000000e+00, i32 3 - %785 = insertelement <4 x float> undef, float %63, i32 0 - %786 = insertelement <4 x float> %785, float %65, i32 1 - %787 = insertelement <4 x float> %786, float %67, i32 2 - %788 = insertelement <4 x float> %787, float 0.000000e+00, i32 3 - %789 = call float @llvm.AMDGPU.dp4(<4 x float> %784, <4 x float> %788) - %790 = fcmp uge float 0x3FEB333340000000, %789 - %791 = select i1 %790, float 0x3FEB333340000000, float %789 - %792 = fmul float %8, %791 - %793 = fmul float %13, %791 - %794 = fmul float %18, %791 - %795 = insertelement <4 x float> undef, float %34, i32 0 - %796 = insertelement <4 x float> %795, float %35, i32 1 - %797 = insertelement <4 x float> %796, float %36, i32 2 - %798 = insertelement <4 x float> %797, float 0.000000e+00, i32 3 - %799 = insertelement <4 x float> undef, float %63, i32 0 - %800 = insertelement <4 x float> %799, float %65, i32 1 - %801 = insertelement <4 x float> %800, float %67, i32 2 - %802 = insertelement <4 x float> %801, float 0.000000e+00, i32 3 - %803 = call float @llvm.AMDGPU.dp4(<4 x float> %798, <4 x float> %802) - %804 = fcmp uge float 0x3FECCCCCC0000000, %803 - %805 = select i1 %804, float 0x3FECCCCCC0000000, float %803 - %806 = fmul float %792, %805 - %807 = fmul float %793, %805 - %808 = fmul float %794, %805 + %tmp793 = insertelement <4 x float> undef, float %tmp333, i32 0 + %tmp794 = insertelement <4 x float> %tmp793, float %tmp334, i32 1 + %tmp795 = insertelement <4 x float> %tmp794, float %tmp335, i32 2 + %tmp796 = insertelement <4 x float> %tmp795, float 0.000000e+00, i32 3 + %tmp797 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp798 = insertelement <4 x float> %tmp797, float %tmp65, i32 1 + %tmp799 = insertelement <4 x float> %tmp798, float %tmp67, i32 2 + %tmp800 = insertelement <4 x float> %tmp799, float 0.000000e+00, i32 3 + %tmp801 = call float @llvm.r600.dot4(<4 x float> %tmp796, <4 x float> %tmp800) + %tmp802 = fcmp uge float 0x3FEB333340000000, %tmp801 + %tmp803 = select i1 %tmp802, float 0x3FEB333340000000, float %tmp801 + %tmp804 = fmul float %tmp8, %tmp803 + %tmp805 = fmul float %tmp13, %tmp803 + %tmp806 = fmul float %tmp18, %tmp803 + %tmp807 = insertelement <4 x float> undef, float %tmp34, i32 0 + %tmp808 = insertelement <4 x float> %tmp807, float %tmp35, i32 1 + %tmp809 = insertelement <4 x float> %tmp808, float %tmp36, i32 2 + %tmp810 = insertelement <4 x float> %tmp809, float 0.000000e+00, i32 3 + %tmp811 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp812 = insertelement <4 x float> %tmp811, float %tmp65, i32 1 + %tmp813 = insertelement <4 x float> %tmp812, float %tmp67, i32 2 + %tmp814 = insertelement <4 x float> %tmp813, float 0.000000e+00, i32 3 + %tmp815 = call float @llvm.r600.dot4(<4 x float> %tmp810, <4 x float> %tmp814) + %tmp816 = fcmp uge float 0x3FECCCCCC0000000, %tmp815 + %tmp817 = select i1 %tmp816, float 0x3FECCCCCC0000000, float %tmp815 + %tmp818 = fmul float %tmp804, %tmp817 + %tmp819 = fmul float %tmp805, %tmp817 + %tmp820 = fmul float %tmp806, %tmp817 br label %ENDIF172 ENDIF172: ; preds = %IF173, %ENDIF169 @@ -1047,66 +1058,66 @@ %temp85.4 = phi float [ %result.i72, %IF173 ], [ %temp85.3, %ENDIF169 ] %temp86.4 = phi float [ %result.i68, %IF173 ], [ %temp86.3, %ENDIF169 ] %temp87.4 = phi float [ %result.i64, %IF173 ], [ %temp87.3, %ENDIF169 ] - %temp92.10 = phi float [ %806, %IF173 ], [ %temp92.9, %ENDIF169 ] - %temp93.4 = phi float [ %807, %IF173 ], [ %temp93.3, %ENDIF169 ] - %temp94.4 = phi float [ %808, %IF173 ], [ %temp94.3, %ENDIF169 ] - %809 = fcmp oge float %179, 2.670000e+03 - %810 = sext i1 %809 to i32 - %811 = bitcast i32 %810 to float - %812 = bitcast float %811 to i32 - %813 = icmp ne i32 %812, 0 - br i1 %813, label %IF176, label %ENDIF175 + %temp92.10 = phi float [ %tmp818, %IF173 ], [ %temp92.9, %ENDIF169 ] + %temp93.4 = phi float [ %tmp819, %IF173 ], [ %temp93.3, %ENDIF169 ] + %temp94.4 = phi float [ %tmp820, %IF173 ], [ %temp94.3, %ENDIF169 ] + %tmp821 = fcmp oge float %tmp181, 2.670000e+03 + %tmp822 = sext i1 %tmp821 to i32 + %tmp823 = bitcast i32 %tmp822 to float + %tmp824 = bitcast float %tmp823 to i32 + %tmp825 = icmp ne i32 %tmp824, 0 + br i1 %tmp825, label %IF176, label %ENDIF175 IF176: ; preds = %ENDIF172 - %814 = fmul float %result.i, 0x3FB99999A0000000 - %815 = fcmp uge float 0.000000e+00, %814 - %816 = select i1 %815, float 0.000000e+00, float %814 - %817 = fcmp uge float %816, 0x3FD99999A0000000 - %818 = select i1 %817, float 0x3FD99999A0000000, float %816 - %one.sub.a.i57 = fsub float 1.000000e+00, %818 - %one.sub.ac.i58 = fmul float %one.sub.a.i57, %299 - %mul.i59 = fmul float %result.i172, %299 + %tmp826 = fmul float %result.i, 0x3FB99999A0000000 + %tmp827 = fcmp uge float 0.000000e+00, %tmp826 + %tmp828 = select i1 %tmp827, float 0.000000e+00, float %tmp826 + %tmp829 = fcmp uge float %tmp828, 0x3FD99999A0000000 + %tmp830 = select i1 %tmp829, float 0x3FD99999A0000000, float %tmp828 + %one.sub.a.i57 = fsub float 1.000000e+00, %tmp830 + %one.sub.ac.i58 = fmul float %one.sub.a.i57, %tmp304 + %mul.i59 = fmul float %result.i172, %tmp304 %result.i60 = fadd float %mul.i59, %one.sub.ac.i58 - %one.sub.a.i53 = fsub float 1.000000e+00, %818 - %one.sub.ac.i54 = fmul float %one.sub.a.i53, %300 - %mul.i55 = fmul float %result.i168, %300 + %one.sub.a.i53 = fsub float 1.000000e+00, %tmp830 + %one.sub.ac.i54 = fmul float %one.sub.a.i53, %tmp305 + %mul.i55 = fmul float %result.i168, %tmp305 %result.i56 = fadd float %mul.i55, %one.sub.ac.i54 - %one.sub.a.i49 = fsub float 1.000000e+00, %818 - %one.sub.ac.i50 = fmul float %one.sub.a.i49, %301 - %mul.i51 = fmul float %result.i164, %301 + %one.sub.a.i49 = fsub float 1.000000e+00, %tmp830 + %one.sub.ac.i50 = fmul float %one.sub.a.i49, %tmp306 + %mul.i51 = fmul float %result.i164, %tmp306 %result.i52 = fadd float %mul.i51, %one.sub.ac.i50 - %one.sub.a.i45 = fsub float 1.000000e+00, %818 - %one.sub.ac.i46 = fmul float %one.sub.a.i45, %302 - %mul.i47 = fmul float %result.i160, %302 + %one.sub.a.i45 = fsub float 1.000000e+00, %tmp830 + %one.sub.ac.i46 = fmul float %one.sub.a.i45, %tmp307 + %mul.i47 = fmul float %result.i160, %tmp307 %result.i48 = fadd float %mul.i47, %one.sub.ac.i46 - %819 = insertelement <4 x float> undef, float %328, i32 0 - %820 = insertelement <4 x float> %819, float %329, i32 1 - %821 = insertelement <4 x float> %820, float %330, i32 2 - %822 = insertelement <4 x float> %821, float 0.000000e+00, i32 3 - %823 = insertelement <4 x float> undef, float %63, i32 0 - %824 = insertelement <4 x float> %823, float %65, i32 1 - %825 = insertelement <4 x float> %824, float %67, i32 2 - %826 = insertelement <4 x float> %825, float 0.000000e+00, i32 3 - %827 = call float @llvm.AMDGPU.dp4(<4 x float> %822, <4 x float> %826) - %828 = fcmp uge float 0x3FEB333340000000, %827 - %829 = select i1 %828, float 0x3FEB333340000000, float %827 - %830 = fmul float %8, %829 - %831 = fmul float %13, %829 - %832 = fmul float %18, %829 - %833 = insertelement <4 x float> undef, float %34, i32 0 - %834 = insertelement <4 x float> %833, float %35, i32 1 - %835 = insertelement <4 x float> %834, float %36, i32 2 - %836 = insertelement <4 x float> %835, float 0.000000e+00, i32 3 - %837 = insertelement <4 x float> undef, float %63, i32 0 - %838 = insertelement <4 x float> %837, float %65, i32 1 - %839 = insertelement <4 x float> %838, float %67, i32 2 - %840 = insertelement <4 x float> %839, float 0.000000e+00, i32 3 - %841 = call float @llvm.AMDGPU.dp4(<4 x float> %836, <4 x float> %840) - %842 = fcmp uge float 0x3FECCCCCC0000000, %841 - %843 = select i1 %842, float 0x3FECCCCCC0000000, float %841 - %844 = fmul float %830, %843 - %845 = fmul float %831, %843 - %846 = fmul float %832, %843 + %tmp831 = insertelement <4 x float> undef, float %tmp333, i32 0 + %tmp832 = insertelement <4 x float> %tmp831, float %tmp334, i32 1 + %tmp833 = insertelement <4 x float> %tmp832, float %tmp335, i32 2 + %tmp834 = insertelement <4 x float> %tmp833, float 0.000000e+00, i32 3 + %tmp835 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp836 = insertelement <4 x float> %tmp835, float %tmp65, i32 1 + %tmp837 = insertelement <4 x float> %tmp836, float %tmp67, i32 2 + %tmp838 = insertelement <4 x float> %tmp837, float 0.000000e+00, i32 3 + %tmp839 = call float @llvm.r600.dot4(<4 x float> %tmp834, <4 x float> %tmp838) + %tmp840 = fcmp uge float 0x3FEB333340000000, %tmp839 + %tmp841 = select i1 %tmp840, float 0x3FEB333340000000, float %tmp839 + %tmp842 = fmul float %tmp8, %tmp841 + %tmp843 = fmul float %tmp13, %tmp841 + %tmp844 = fmul float %tmp18, %tmp841 + %tmp845 = insertelement <4 x float> undef, float %tmp34, i32 0 + %tmp846 = insertelement <4 x float> %tmp845, float %tmp35, i32 1 + %tmp847 = insertelement <4 x float> %tmp846, float %tmp36, i32 2 + %tmp848 = insertelement <4 x float> %tmp847, float 0.000000e+00, i32 3 + %tmp849 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp850 = insertelement <4 x float> %tmp849, float %tmp65, i32 1 + %tmp851 = insertelement <4 x float> %tmp850, float %tmp67, i32 2 + %tmp852 = insertelement <4 x float> %tmp851, float 0.000000e+00, i32 3 + %tmp853 = call float @llvm.r600.dot4(<4 x float> %tmp848, <4 x float> %tmp852) + %tmp854 = fcmp uge float 0x3FECCCCCC0000000, %tmp853 + %tmp855 = select i1 %tmp854, float 0x3FECCCCCC0000000, float %tmp853 + %tmp856 = fmul float %tmp842, %tmp855 + %tmp857 = fmul float %tmp843, %tmp855 + %tmp858 = fmul float %tmp844, %tmp855 br label %ENDIF175 ENDIF175: ; preds = %IF176, %ENDIF172 @@ -1114,109 +1125,109 @@ %temp85.5 = phi float [ %result.i56, %IF176 ], [ %temp85.4, %ENDIF172 ] %temp86.5 = phi float [ %result.i52, %IF176 ], [ %temp86.4, %ENDIF172 ] %temp87.5 = phi float [ %result.i48, %IF176 ], [ %temp87.4, %ENDIF172 ] - %temp92.11 = phi float [ %844, %IF176 ], [ %temp92.10, %ENDIF172 ] - %temp93.5 = phi float [ %845, %IF176 ], [ %temp93.4, %ENDIF172 ] - %temp94.5 = phi float [ %846, %IF176 ], [ %temp94.4, %ENDIF172 ] - %847 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 10) - %848 = extractelement <4 x float> %847, i32 0 - %849 = fcmp olt float %848, %179 - %850 = sext i1 %849 to i32 - %851 = bitcast i32 %850 to float - %852 = bitcast float %851 to i32 - %853 = icmp ne i32 %852, 0 - br i1 %853, label %IF179, label %ENDIF178 + %temp92.11 = phi float [ %tmp856, %IF176 ], [ %temp92.10, %ENDIF172 ] + %temp93.5 = phi float [ %tmp857, %IF176 ], [ %temp93.4, %ENDIF172 ] + %temp94.5 = phi float [ %tmp858, %IF176 ], [ %temp94.4, %ENDIF172 ] + %tmp859 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 10) + %tmp860 = extractelement <4 x float> %tmp859, i32 0 + %tmp861 = fcmp olt float %tmp860, %tmp181 + %tmp862 = sext i1 %tmp861 to i32 + %tmp863 = bitcast i32 %tmp862 to float + %tmp864 = bitcast float %tmp863 to i32 + %tmp865 = icmp ne i32 %tmp864, 0 + br i1 %tmp865, label %IF179, label %ENDIF178 IF179: ; preds = %ENDIF175 - %854 = fadd float %result.i, 1.000000e+00 - %855 = fadd float %result.i, 1.000000e+00 - %856 = fadd float %result.i, 1.000000e+00 - %857 = insertelement <4 x float> undef, float %43, i32 0 - %858 = insertelement <4 x float> %857, float %44, i32 1 - %859 = insertelement <4 x float> %858, float %45, i32 2 - %860 = insertelement <4 x float> %859, float 0.000000e+00, i32 3 - %861 = insertelement <4 x float> undef, float %43, i32 0 - %862 = insertelement <4 x float> %861, float %44, i32 1 - %863 = insertelement <4 x float> %862, float %45, i32 2 - %864 = insertelement <4 x float> %863, float 0.000000e+00, i32 3 - %865 = call float @llvm.AMDGPU.dp4(<4 x float> %860, <4 x float> %864) - %866 = call float @llvm.AMDGPU.rsq.clamped.f32(float %865) - %867 = fmul float %45, %866 - %868 = call float @fabs(float %867) - %869 = fmul float %176, 0x3FECCCCCC0000000 - %870 = fadd float %869, %868 - %871 = fadd float %870, 0xBFEFAE1480000000 - %872 = fmul float %871, 0xC043FFFE20000000 - %873 = call float @llvm.AMDGPU.clamp.f32(float %872, float 0.000000e+00, float 1.000000e+00) - %874 = fmul float 2.000000e+00, %873 - %875 = fsub float -0.000000e+00, %874 - %876 = fadd float 3.000000e+00, %875 - %877 = fmul float %873, %876 - %878 = fmul float %873, %877 - %one.sub.a.i41 = fsub float 1.000000e+00, %878 - %one.sub.ac.i42 = fmul float %one.sub.a.i41, %854 - %mul.i43 = fmul float %temp84.5, %854 + %tmp866 = fadd float %result.i, 1.000000e+00 + %tmp867 = fadd float %result.i, 1.000000e+00 + %tmp868 = fadd float %result.i, 1.000000e+00 + %tmp869 = insertelement <4 x float> undef, float %tmp43, i32 0 + %tmp870 = insertelement <4 x float> %tmp869, float %tmp44, i32 1 + %tmp871 = insertelement <4 x float> %tmp870, float %tmp45, i32 2 + %tmp872 = insertelement <4 x float> %tmp871, float 0.000000e+00, i32 3 + %tmp873 = insertelement <4 x float> undef, float %tmp43, i32 0 + %tmp874 = insertelement <4 x float> %tmp873, float %tmp44, i32 1 + %tmp875 = insertelement <4 x float> %tmp874, float %tmp45, i32 2 + %tmp876 = insertelement <4 x float> %tmp875, float 0.000000e+00, i32 3 + %tmp877 = call float @llvm.r600.dot4(<4 x float> %tmp872, <4 x float> %tmp876) + %tmp878 = call float @llvm.AMDGPU.rsq.clamped.f32(float %tmp877) + %tmp879 = fmul float %tmp45, %tmp878 + %tmp880 = call float @fabs(float %tmp879) + %tmp881 = fmul float %tmp178, 0x3FECCCCCC0000000 + %tmp882 = fadd float %tmp881, %tmp880 + %tmp883 = fadd float %tmp882, 0xBFEFAE1480000000 + %tmp884 = fmul float %tmp883, 0xC043FFFE20000000 + %tmp885 = call float @llvm.AMDGPU.clamp.f32(float %tmp884, float 0.000000e+00, float 1.000000e+00) + %tmp886 = fmul float 2.000000e+00, %tmp885 + %tmp887 = fsub float -0.000000e+00, %tmp886 + %tmp888 = fadd float 3.000000e+00, %tmp887 + %tmp889 = fmul float %tmp885, %tmp888 + %tmp890 = fmul float %tmp885, %tmp889 + %one.sub.a.i41 = fsub float 1.000000e+00, %tmp890 + %one.sub.ac.i42 = fmul float %one.sub.a.i41, %tmp866 + %mul.i43 = fmul float %temp84.5, %tmp866 %result.i44 = fadd float %mul.i43, %one.sub.ac.i42 - %one.sub.a.i37 = fsub float 1.000000e+00, %878 - %one.sub.ac.i38 = fmul float %one.sub.a.i37, %855 - %mul.i39 = fmul float %temp85.5, %855 + %one.sub.a.i37 = fsub float 1.000000e+00, %tmp890 + %one.sub.ac.i38 = fmul float %one.sub.a.i37, %tmp867 + %mul.i39 = fmul float %temp85.5, %tmp867 %result.i40 = fadd float %mul.i39, %one.sub.ac.i38 - %one.sub.a.i33 = fsub float 1.000000e+00, %878 - %one.sub.ac.i34 = fmul float %one.sub.a.i33, %856 - %mul.i35 = fmul float %temp86.5, %856 + %one.sub.a.i33 = fsub float 1.000000e+00, %tmp890 + %one.sub.ac.i34 = fmul float %one.sub.a.i33, %tmp868 + %mul.i35 = fmul float %temp86.5, %tmp868 %result.i36 = fadd float %mul.i35, %one.sub.ac.i34 - %one.sub.a.i29 = fsub float 1.000000e+00, %878 + %one.sub.a.i29 = fsub float 1.000000e+00, %tmp890 %one.sub.ac.i30 = fmul float %one.sub.a.i29, 0.000000e+00 %mul.i31 = fmul float %temp87.5, 0.000000e+00 %result.i32 = fadd float %mul.i31, %one.sub.ac.i30 - %879 = fmul float %result.i, 5.000000e-01 - %880 = fcmp uge float 0x3FE4CCCCC0000000, %879 - %881 = select i1 %880, float 0x3FE4CCCCC0000000, float %879 - %882 = fcmp uge float %881, 0x3FE3333340000000 - %883 = select i1 %882, float 0x3FE3333340000000, float %881 - %one.sub.a.i25 = fsub float 1.000000e+00, %883 + %tmp891 = fmul float %result.i, 5.000000e-01 + %tmp892 = fcmp uge float 0x3FE4CCCCC0000000, %tmp891 + %tmp893 = select i1 %tmp892, float 0x3FE4CCCCC0000000, float %tmp891 + %tmp894 = fcmp uge float %tmp893, 0x3FE3333340000000 + %tmp895 = select i1 %tmp894, float 0x3FE3333340000000, float %tmp893 + %one.sub.a.i25 = fsub float 1.000000e+00, %tmp895 %one.sub.ac.i26 = fmul float %one.sub.a.i25, %temp84.5 %mul.i27 = fmul float %result.i44, %temp84.5 %result.i28 = fadd float %mul.i27, %one.sub.ac.i26 - %one.sub.a.i21 = fsub float 1.000000e+00, %883 + %one.sub.a.i21 = fsub float 1.000000e+00, %tmp895 %one.sub.ac.i22 = fmul float %one.sub.a.i21, %temp85.5 %mul.i23 = fmul float %result.i40, %temp85.5 %result.i24 = fadd float %mul.i23, %one.sub.ac.i22 - %one.sub.a.i17 = fsub float 1.000000e+00, %883 + %one.sub.a.i17 = fsub float 1.000000e+00, %tmp895 %one.sub.ac.i18 = fmul float %one.sub.a.i17, %temp86.5 %mul.i19 = fmul float %result.i36, %temp86.5 %result.i20 = fadd float %mul.i19, %one.sub.ac.i18 - %one.sub.a.i13 = fsub float 1.000000e+00, %883 + %one.sub.a.i13 = fsub float 1.000000e+00, %tmp895 %one.sub.ac.i14 = fmul float %one.sub.a.i13, %temp87.5 %mul.i15 = fmul float %result.i32, %temp87.5 %result.i16 = fadd float %mul.i15, %one.sub.ac.i14 - %884 = insertelement <4 x float> undef, float %328, i32 0 - %885 = insertelement <4 x float> %884, float %329, i32 1 - %886 = insertelement <4 x float> %885, float %330, i32 2 - %887 = insertelement <4 x float> %886, float 0.000000e+00, i32 3 - %888 = insertelement <4 x float> undef, float %63, i32 0 - %889 = insertelement <4 x float> %888, float %65, i32 1 - %890 = insertelement <4 x float> %889, float %67, i32 2 - %891 = insertelement <4 x float> %890, float 0.000000e+00, i32 3 - %892 = call float @llvm.AMDGPU.dp4(<4 x float> %887, <4 x float> %891) - %893 = fcmp uge float 0x3FE99999A0000000, %892 - %894 = select i1 %893, float 0x3FE99999A0000000, float %892 - %895 = fmul float %8, %894 - %896 = fmul float %13, %894 - %897 = fmul float %18, %894 - %898 = insertelement <4 x float> undef, float %34, i32 0 - %899 = insertelement <4 x float> %898, float %35, i32 1 - %900 = insertelement <4 x float> %899, float %36, i32 2 - %901 = insertelement <4 x float> %900, float 0.000000e+00, i32 3 - %902 = insertelement <4 x float> undef, float %63, i32 0 - %903 = insertelement <4 x float> %902, float %65, i32 1 - %904 = insertelement <4 x float> %903, float %67, i32 2 - %905 = insertelement <4 x float> %904, float 0.000000e+00, i32 3 - %906 = call float @llvm.AMDGPU.dp4(<4 x float> %901, <4 x float> %905) - %907 = fcmp uge float 0x3FECCCCCC0000000, %906 - %908 = select i1 %907, float 0x3FECCCCCC0000000, float %906 - %909 = fmul float %895, %908 - %910 = fmul float %896, %908 - %911 = fmul float %897, %908 + %tmp896 = insertelement <4 x float> undef, float %tmp333, i32 0 + %tmp897 = insertelement <4 x float> %tmp896, float %tmp334, i32 1 + %tmp898 = insertelement <4 x float> %tmp897, float %tmp335, i32 2 + %tmp899 = insertelement <4 x float> %tmp898, float 0.000000e+00, i32 3 + %tmp900 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp901 = insertelement <4 x float> %tmp900, float %tmp65, i32 1 + %tmp902 = insertelement <4 x float> %tmp901, float %tmp67, i32 2 + %tmp903 = insertelement <4 x float> %tmp902, float 0.000000e+00, i32 3 + %tmp904 = call float @llvm.r600.dot4(<4 x float> %tmp899, <4 x float> %tmp903) + %tmp905 = fcmp uge float 0x3FE99999A0000000, %tmp904 + %tmp906 = select i1 %tmp905, float 0x3FE99999A0000000, float %tmp904 + %tmp907 = fmul float %tmp8, %tmp906 + %tmp908 = fmul float %tmp13, %tmp906 + %tmp909 = fmul float %tmp18, %tmp906 + %tmp910 = insertelement <4 x float> undef, float %tmp34, i32 0 + %tmp911 = insertelement <4 x float> %tmp910, float %tmp35, i32 1 + %tmp912 = insertelement <4 x float> %tmp911, float %tmp36, i32 2 + %tmp913 = insertelement <4 x float> %tmp912, float 0.000000e+00, i32 3 + %tmp914 = insertelement <4 x float> undef, float %tmp63, i32 0 + %tmp915 = insertelement <4 x float> %tmp914, float %tmp65, i32 1 + %tmp916 = insertelement <4 x float> %tmp915, float %tmp67, i32 2 + %tmp917 = insertelement <4 x float> %tmp916, float 0.000000e+00, i32 3 + %tmp918 = call float @llvm.r600.dot4(<4 x float> %tmp913, <4 x float> %tmp917) + %tmp919 = fcmp uge float 0x3FECCCCCC0000000, %tmp918 + %tmp920 = select i1 %tmp919, float 0x3FECCCCCC0000000, float %tmp918 + %tmp921 = fmul float %tmp907, %tmp920 + %tmp922 = fmul float %tmp908, %tmp920 + %tmp923 = fmul float %tmp909, %tmp920 br label %ENDIF178 ENDIF178: ; preds = %IF179, %ENDIF175 @@ -1224,79 +1235,78 @@ %temp85.6 = phi float [ %result.i24, %IF179 ], [ %temp85.5, %ENDIF175 ] %temp86.6 = phi float [ %result.i20, %IF179 ], [ %temp86.5, %ENDIF175 ] %temp87.6 = phi float [ %result.i16, %IF179 ], [ %temp87.5, %ENDIF175 ] - %temp92.12 = phi float [ %909, %IF179 ], [ %temp92.11, %ENDIF175 ] - %temp93.6 = phi float [ %910, %IF179 ], [ %temp93.5, %ENDIF175 ] - %temp94.6 = phi float [ %911, %IF179 ], [ %temp94.5, %ENDIF175 ] - %912 = fmul float %55, %temp92.12 - %913 = fmul float %57, %temp93.6 - %914 = fmul float %59, %temp94.6 - %915 = fmul float %61, 0.000000e+00 - %916 = fmul float %temp84.6, %912 - %917 = fmul float %temp85.6, %913 - %918 = fmul float %temp86.6, %914 - %919 = fmul float %temp87.6, %915 - %920 = fmul float %2, -2.000000e+00 - %921 = fadd float %920, 1.000000e+00 - %922 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 23) - %923 = extractelement <4 x float> %922, i32 2 - %924 = fsub float -0.000000e+00, %923 - %925 = fadd float %921, %924 - %926 = fdiv float 1.000000e+00, %925 - %927 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 24) - %928 = extractelement <4 x float> %927, i32 2 - %929 = fmul float %928, %926 - %930 = fsub float -0.000000e+00, %53 - %931 = fmul float %930, %53 - %932 = fmul float %931, %929 - %933 = fmul float %932, %929 - %934 = fmul float %933, 0x3FF7154760000000 - %935 = call float @llvm.exp2.f32(float %934) - %936 = fcmp oeq float %53, 1.000000e+00 - %937 = sext i1 %936 to i32 - %938 = bitcast i32 %937 to float - %939 = bitcast float %938 to i32 - %940 = icmp ne i32 %939, 0 - %.184 = select i1 %940, float 1.000000e+00, float %935 + %temp92.12 = phi float [ %tmp921, %IF179 ], [ %temp92.11, %ENDIF175 ] + %temp93.6 = phi float [ %tmp922, %IF179 ], [ %temp93.5, %ENDIF175 ] + %temp94.6 = phi float [ %tmp923, %IF179 ], [ %temp94.5, %ENDIF175 ] + %tmp924 = fmul float %tmp55, %temp92.12 + %tmp925 = fmul float %tmp57, %temp93.6 + %tmp926 = fmul float %tmp59, %temp94.6 + %tmp927 = fmul float %tmp61, 0.000000e+00 + %tmp928 = fmul float %temp84.6, %tmp924 + %tmp929 = fmul float %temp85.6, %tmp925 + %tmp930 = fmul float %temp86.6, %tmp926 + %tmp931 = fmul float %temp87.6, %tmp927 + %tmp932 = fmul float %tmp2, -2.000000e+00 + %tmp933 = fadd float %tmp932, 1.000000e+00 + %tmp934 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 23) + %tmp935 = extractelement <4 x float> %tmp934, i32 2 + %tmp936 = fsub float -0.000000e+00, %tmp935 + %tmp937 = fadd float %tmp933, %tmp936 + %tmp938 = fdiv float 1.000000e+00, %tmp937 + %tmp939 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 24) + %tmp940 = extractelement <4 x float> %tmp939, i32 2 + %tmp941 = fmul float %tmp940, %tmp938 + %tmp942 = fsub float -0.000000e+00, %tmp53 + %tmp943 = fmul float %tmp942, %tmp53 + %tmp944 = fmul float %tmp943, %tmp941 + %tmp945 = fmul float %tmp944, %tmp941 + %tmp946 = fmul float %tmp945, 0x3FF7154760000000 + %tmp947 = call float @llvm.exp2.f32(float %tmp946) + %tmp948 = fcmp oeq float %tmp53, 1.000000e+00 + %tmp949 = sext i1 %tmp948 to i32 + %tmp950 = bitcast i32 %tmp949 to float + %tmp951 = bitcast float %tmp950 to i32 + %tmp952 = icmp ne i32 %tmp951, 0 + %.184 = select i1 %tmp952, float 1.000000e+00, float %tmp947 %one.sub.a.i9 = fsub float 1.000000e+00, %.184 - %one.sub.ac.i10 = fmul float %one.sub.a.i9, %47 - %mul.i11 = fmul float %916, %47 + %one.sub.ac.i10 = fmul float %one.sub.a.i9, %tmp47 + %mul.i11 = fmul float %tmp928, %tmp47 %result.i12 = fadd float %mul.i11, %one.sub.ac.i10 %one.sub.a.i5 = fsub float 1.000000e+00, %.184 - %one.sub.ac.i6 = fmul float %one.sub.a.i5, %49 - %mul.i7 = fmul float %917, %49 + %one.sub.ac.i6 = fmul float %one.sub.a.i5, %tmp49 + %mul.i7 = fmul float %tmp929, %tmp49 %result.i8 = fadd float %mul.i7, %one.sub.ac.i6 %one.sub.a.i1 = fsub float 1.000000e+00, %.184 - %one.sub.ac.i2 = fmul float %one.sub.a.i1, %51 - %mul.i3 = fmul float %918, %51 + %one.sub.ac.i2 = fmul float %one.sub.a.i1, %tmp51 + %mul.i3 = fmul float %tmp930, %tmp51 %result.i4 = fadd float %mul.i3, %one.sub.ac.i2 - %941 = insertelement <4 x float> undef, float %result.i12, i32 0 - %942 = insertelement <4 x float> %941, float %result.i8, i32 1 - %943 = insertelement <4 x float> %942, float %result.i4, i32 2 - %944 = insertelement <4 x float> %943, float %919, i32 3 - call void @llvm.R600.store.swizzle(<4 x float> %944, i32 0, i32 0) + %tmp953 = insertelement <4 x float> undef, float %result.i12, i32 0 + %tmp954 = insertelement <4 x float> %tmp953, float %result.i8, i32 1 + %tmp955 = insertelement <4 x float> %tmp954, float %result.i4, i32 2 + %tmp956 = insertelement <4 x float> %tmp955, float %tmp931, i32 3 + call void @llvm.R600.store.swizzle(<4 x float> %tmp956, i32 0, i32 0) ret void } -; Function Attrs: readnone -declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #2 - ; Function Attrs: nounwind readnone -declare float @llvm.AMDGPU.rsq.clamped.f32(float) #3 +declare float @llvm.r600.dot4(<4 x float>, <4 x float>) #0 -; Function Attrs: readnone -declare <4 x float> @llvm.AMDGPU.tex(<4 x float>, i32, i32, i32) #2 +; Function Attrs: nounwind readnone +declare float @llvm.AMDGPU.rsq.clamped.f32(float) #0 -; Function Attrs: readonly -declare float @fabs(float) #4 +; Function Attrs: nounwind readonly +declare float @fabs(float) #1 -declare float @llvm.exp2.f32(float) #3 +; Function Attrs: nounwind readnone +declare float @llvm.exp2.f32(float) #0 -; Function Attrs: readnone -declare float @llvm.AMDGPU.clamp.f32(float, float, float) #2 +; Function Attrs: nounwind readnone +declare float @llvm.AMDGPU.clamp.f32(float, float, float) #0 declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32) -attributes #0 = { alwaysinline nounwind readnone } -attributes #2 = { readnone } -attributes #3 = { nounwind readnone } -attributes #4 = { readonly } +; Function Attrs: nounwind readnone +declare <4 x float> @llvm.r600.tex(<4 x float>, i32, i32, i32, i32, i32, i32, i32, i32, i32) #0 + +attributes #0 = { nounwind readnone } +attributes #1 = { nounwind readonly } Index: test/CodeGen/AMDGPU/dot4-folding.ll =================================================================== --- test/CodeGen/AMDGPU/dot4-folding.ll +++ /dev/null @@ -1,27 +0,0 @@ -;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s - -; Exactly one constant vector can be folded into dot4, which means exactly -; 4 MOV instructions -; CHECK: {{^}}main: -; CHECK: MOV -; CHECK: MOV -; CHECK: MOV -; CHECK: MOV -; CHECK-NOT: MOV -; CHECK-NOT: MOV -; CHECK-NOT: MOV -; CHECK-NOT: MOV - -define void @main(float addrspace(1)* %out) { -main_body: - %0 = load <4 x float>, <4 x float> addrspace(8)* null - %1 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 1) - %2 = call float @llvm.AMDGPU.dp4(<4 x float> %0,<4 x float> %1) - %3 = insertelement <4 x float> undef, float %2, i32 0 - call void @llvm.R600.store.swizzle(<4 x float> %3, i32 0, i32 0) - ret void -} - -declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #1 -declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32) -attributes #1 = { readnone } Index: test/CodeGen/AMDGPU/fetch-limits.r600.ll =================================================================== --- test/CodeGen/AMDGPU/fetch-limits.r600.ll +++ test/CodeGen/AMDGPU/fetch-limits.r600.ll @@ -9,38 +9,48 @@ define amdgpu_ps void @fetch_limits_r600() { entry: - %0 = load <4 x float>, <4 x float> addrspace(8)* null - %1 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 1) - %2 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 2) - %3 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 3) - %4 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 4) - %5 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 5) - %6 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 6) - %7 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 7) - %8 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 8) - %res0 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %0, i32 0, i32 0, i32 1) - %res1 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %1, i32 0, i32 0, i32 1) - %res2 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %2, i32 0, i32 0, i32 1) - %res3 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %3, i32 0, i32 0, i32 1) - %res4 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %4, i32 0, i32 0, i32 1) - %res5 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %5, i32 0, i32 0, i32 1) - %res6 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %6, i32 0, i32 0, i32 1) - %res7 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %7, i32 0, i32 0, i32 1) - %res8 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 0, i32 0, i32 1) - %a = fadd <4 x float> %res0, %res1 - %b = fadd <4 x float> %res2, %res3 - %c = fadd <4 x float> %res4, %res5 - %d = fadd <4 x float> %res6, %res7 - %e = fadd <4 x float> %res8, %a - + %tmp = load <4 x float>, <4 x float> addrspace(8)* null + %tmp1 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 1) + %tmp2 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 2) + %tmp3 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 3) + %tmp4 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 4) + %tmp5 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 5) + %tmp6 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 6) + %tmp7 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 7) + %tmp8 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 8) + %tmp9 = shufflevector <4 x float> %tmp, <4 x float> %tmp, <4 x i32> + %tmp10 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp9, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp11 = shufflevector <4 x float> %tmp1, <4 x float> %tmp1, <4 x i32> + %tmp12 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp11, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp13 = shufflevector <4 x float> %tmp2, <4 x float> %tmp2, <4 x i32> + %tmp14 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp13, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp15 = shufflevector <4 x float> %tmp3, <4 x float> %tmp3, <4 x i32> + %tmp16 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp17 = shufflevector <4 x float> %tmp4, <4 x float> %tmp4, <4 x i32> + %tmp18 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp17, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp19 = shufflevector <4 x float> %tmp5, <4 x float> %tmp5, <4 x i32> + %tmp20 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp19, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp21 = shufflevector <4 x float> %tmp6, <4 x float> %tmp6, <4 x i32> + %tmp22 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp21, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp23 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp24 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp23, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp25 = shufflevector <4 x float> %tmp8, <4 x float> %tmp8, <4 x i32> + %tmp26 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp25, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %a = fadd <4 x float> %tmp10, %tmp12 + %b = fadd <4 x float> %tmp14, %tmp16 + %c = fadd <4 x float> %tmp18, %tmp20 + %d = fadd <4 x float> %tmp22, %tmp24 + %e = fadd <4 x float> %tmp26, %a %bc = fadd <4 x float> %b, %c %de = fadd <4 x float> %d, %e - %bcde = fadd <4 x float> %bc, %de - call void @llvm.R600.store.swizzle(<4 x float> %bcde, i32 0, i32 1) ret void } -declare <4 x float> @llvm.AMDGPU.tex(<4 x float>, i32, i32, i32) readnone declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32) + +; Function Attrs: readnone +declare <4 x float> @llvm.r600.tex(<4 x float>, i32, i32, i32, i32, i32, i32, i32, i32, i32) #0 + +attributes #0 = { nounwind readnone } Index: test/CodeGen/AMDGPU/fetch-limits.r700+.ll =================================================================== --- test/CodeGen/AMDGPU/fetch-limits.r700+.ll +++ test/CodeGen/AMDGPU/fetch-limits.r700+.ll @@ -35,45 +35,63 @@ %14 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 14) %15 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 15) %16 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 16) - %res0 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %0, i32 0, i32 0, i32 1) - %res1 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %1, i32 0, i32 0, i32 1) - %res2 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %2, i32 0, i32 0, i32 1) - %res3 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %3, i32 0, i32 0, i32 1) - %res4 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %4, i32 0, i32 0, i32 1) - %res5 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %5, i32 0, i32 0, i32 1) - %res6 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %6, i32 0, i32 0, i32 1) - %res7 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %7, i32 0, i32 0, i32 1) - %res8 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 0, i32 0, i32 1) - %res9 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %9, i32 0, i32 0, i32 1) - %res10 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %10, i32 0, i32 0, i32 1) - %res11 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %11, i32 0, i32 0, i32 1) - %res12 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %12, i32 0, i32 0, i32 1) - %res13 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %13, i32 0, i32 0, i32 1) - %res14 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %14, i32 0, i32 0, i32 1) - %res15 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %15, i32 0, i32 0, i32 1) - %res16 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %16, i32 0, i32 0, i32 1) - %a = fadd <4 x float> %res0, %res1 - %b = fadd <4 x float> %res2, %res3 - %c = fadd <4 x float> %res4, %res5 - %d = fadd <4 x float> %res6, %res7 - %e = fadd <4 x float> %res8, %res9 - %f = fadd <4 x float> %res10, %res11 - %g = fadd <4 x float> %res12, %res13 - %h = fadd <4 x float> %res14, %res15 - %i = fadd <4 x float> %res16, %a - + %17 = shufflevector <4 x float> %0, <4 x float> %0, <4 x i32> + %18 = call <4 x float> @llvm.r600.tex(<4 x float> %17, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %19 = shufflevector <4 x float> %1, <4 x float> %1, <4 x i32> + %20 = call <4 x float> @llvm.r600.tex(<4 x float> %19, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %21 = shufflevector <4 x float> %2, <4 x float> %2, <4 x i32> + %22 = call <4 x float> @llvm.r600.tex(<4 x float> %21, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %23 = shufflevector <4 x float> %3, <4 x float> %3, <4 x i32> + %24 = call <4 x float> @llvm.r600.tex(<4 x float> %23, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %25 = shufflevector <4 x float> %4, <4 x float> %4, <4 x i32> + %26 = call <4 x float> @llvm.r600.tex(<4 x float> %25, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %27 = shufflevector <4 x float> %5, <4 x float> %5, <4 x i32> + %28 = call <4 x float> @llvm.r600.tex(<4 x float> %27, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %29 = shufflevector <4 x float> %6, <4 x float> %6, <4 x i32> + %30 = call <4 x float> @llvm.r600.tex(<4 x float> %29, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %31 = shufflevector <4 x float> %7, <4 x float> %7, <4 x i32> + %32 = call <4 x float> @llvm.r600.tex(<4 x float> %31, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %33 = shufflevector <4 x float> %8, <4 x float> %8, <4 x i32> + %34 = call <4 x float> @llvm.r600.tex(<4 x float> %33, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %35 = shufflevector <4 x float> %9, <4 x float> %9, <4 x i32> + %36 = call <4 x float> @llvm.r600.tex(<4 x float> %35, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %37 = shufflevector <4 x float> %10, <4 x float> %10, <4 x i32> + %38 = call <4 x float> @llvm.r600.tex(<4 x float> %37, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %39 = shufflevector <4 x float> %11, <4 x float> %11, <4 x i32> + %40 = call <4 x float> @llvm.r600.tex(<4 x float> %39, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %41 = shufflevector <4 x float> %12, <4 x float> %12, <4 x i32> + %42 = call <4 x float> @llvm.r600.tex(<4 x float> %41, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %43 = shufflevector <4 x float> %13, <4 x float> %13, <4 x i32> + %44 = call <4 x float> @llvm.r600.tex(<4 x float> %43, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %45 = shufflevector <4 x float> %14, <4 x float> %14, <4 x i32> + %46 = call <4 x float> @llvm.r600.tex(<4 x float> %45, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %47 = shufflevector <4 x float> %15, <4 x float> %15, <4 x i32> + %48 = call <4 x float> @llvm.r600.tex(<4 x float> %47, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %49 = shufflevector <4 x float> %16, <4 x float> %16, <4 x i32> + %50 = call <4 x float> @llvm.r600.tex(<4 x float> %49, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %a = fadd <4 x float> %18, %20 + %b = fadd <4 x float> %22, %24 + %c = fadd <4 x float> %26, %28 + %d = fadd <4 x float> %30, %32 + %e = fadd <4 x float> %34, %36 + %f = fadd <4 x float> %38, %40 + %g = fadd <4 x float> %42, %44 + %h = fadd <4 x float> %46, %48 + %i = fadd <4 x float> %50, %a %bc = fadd <4 x float> %b, %c %de = fadd <4 x float> %d, %e %fg = fadd <4 x float> %f, %g %hi = fadd <4 x float> %h, %i - %bcde = fadd <4 x float> %bc, %de %fghi = fadd <4 x float> %fg, %hi - %bcdefghi = fadd <4 x float> %bcde, %fghi call void @llvm.R600.store.swizzle(<4 x float> %bcdefghi, i32 0, i32 1) ret void } -declare <4 x float> @llvm.AMDGPU.tex(<4 x float>, i32, i32, i32) readnone declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32) + +; Function Attrs: readnone +declare <4 x float> @llvm.r600.tex(<4 x float>, i32, i32, i32, i32, i32, i32, i32, i32, i32) #0 + +attributes #0 = { readnone } Index: test/CodeGen/AMDGPU/literals.ll =================================================================== --- test/CodeGen/AMDGPU/literals.ll +++ test/CodeGen/AMDGPU/literals.ll @@ -54,11 +54,11 @@ ; CHECK-NEXT: DOT4 * T[[GPR]].W (MASKED), 1.0 define void @inline_literal_dot4(float addrspace(1)* %out) { entry: - %0 = call float @llvm.AMDGPU.dp4(<4 x float> , <4 x float> ) + %0 = call float @llvm.r600.dot4(<4 x float> , <4 x float> ) store float %0, float addrspace(1)* %out ret void } -declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #1 +declare float @llvm.r600.dot4(<4 x float>, <4 x float>) #1 attributes #1 = { readnone } Index: test/CodeGen/AMDGPU/llvm.AMDGPU.cube.ll =================================================================== --- test/CodeGen/AMDGPU/llvm.AMDGPU.cube.ll +++ test/CodeGen/AMDGPU/llvm.AMDGPU.cube.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s +; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck %s ; CHECK-LABEL: {{^}}cube: ; CHECK: CUBE T{{[0-9]}}.X @@ -7,51 +7,51 @@ ; CHECK: CUBE * T{{[0-9]}}.W define amdgpu_ps void @cube() { main_body: - %0 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) - %1 = extractelement <4 x float> %0, i32 3 - %2 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) - %3 = extractelement <4 x float> %2, i32 0 - %4 = fdiv float %3, %1 - %5 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) - %6 = extractelement <4 x float> %5, i32 1 - %7 = fdiv float %6, %1 - %8 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) - %9 = extractelement <4 x float> %8, i32 2 - %10 = fdiv float %9, %1 - %11 = insertelement <4 x float> undef, float %4, i32 0 - %12 = insertelement <4 x float> %11, float %7, i32 1 - %13 = insertelement <4 x float> %12, float %10, i32 2 - %14 = insertelement <4 x float> %13, float 1.000000e+00, i32 3 - %15 = call <4 x float> @llvm.AMDGPU.cube(<4 x float> %14) - %16 = extractelement <4 x float> %15, i32 0 - %17 = extractelement <4 x float> %15, i32 1 - %18 = extractelement <4 x float> %15, i32 2 - %19 = extractelement <4 x float> %15, i32 3 - %20 = call float @fabs(float %18) - %21 = fdiv float 1.000000e+00, %20 - %22 = fmul float %16, %21 - %23 = fadd float %22, 1.500000e+00 - %24 = fmul float %17, %21 - %25 = fadd float %24, 1.500000e+00 - %26 = insertelement <4 x float> undef, float %25, i32 0 - %27 = insertelement <4 x float> %26, float %23, i32 1 - %28 = insertelement <4 x float> %27, float %19, i32 2 - %29 = insertelement <4 x float> %28, float %25, i32 3 - %30 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %29, i32 16, i32 0, i32 4) - call void @llvm.R600.store.swizzle(<4 x float> %30, i32 0, i32 0) + %tmp = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) + %tmp1 = extractelement <4 x float> %tmp, i32 3 + %tmp2 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) + %tmp3 = extractelement <4 x float> %tmp2, i32 0 + %tmp4 = fdiv float %tmp3, %tmp1 + %tmp5 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) + %tmp6 = extractelement <4 x float> %tmp5, i32 1 + %tmp7 = fdiv float %tmp6, %tmp1 + %tmp8 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9) + %tmp9 = extractelement <4 x float> %tmp8, i32 2 + %tmp10 = fdiv float %tmp9, %tmp1 + %tmp11 = insertelement <4 x float> undef, float %tmp4, i32 0 + %tmp12 = insertelement <4 x float> %tmp11, float %tmp7, i32 1 + %tmp13 = insertelement <4 x float> %tmp12, float %tmp10, i32 2 + %tmp14 = insertelement <4 x float> %tmp13, float 1.000000e+00, i32 3 + %tmp15 = call <4 x float> @llvm.AMDGPU.cube(<4 x float> %tmp14) + %tmp16 = extractelement <4 x float> %tmp15, i32 0 + %tmp17 = extractelement <4 x float> %tmp15, i32 1 + %tmp18 = extractelement <4 x float> %tmp15, i32 2 + %tmp19 = extractelement <4 x float> %tmp15, i32 3 + %tmp20 = call float @llvm.fabs.f32(float %tmp18) + %tmp21 = fdiv float 1.000000e+00, %tmp20 + %tmp22 = fmul float %tmp16, %tmp21 + %tmp23 = fadd float %tmp22, 1.500000e+00 + %tmp24 = fmul float %tmp17, %tmp21 + %tmp25 = fadd float %tmp24, 1.500000e+00 + %tmp26 = insertelement <4 x float> undef, float %tmp25, i32 0 + %tmp27 = insertelement <4 x float> %tmp26, float %tmp23, i32 1 + %tmp28 = insertelement <4 x float> %tmp27, float %tmp19, i32 2 + %tmp29 = insertelement <4 x float> %tmp28, float %tmp25, i32 3 + %tmp30 = shufflevector <4 x float> %tmp29, <4 x float> %tmp29, <4 x i32> + %tmp31 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp30, i32 0, i32 0, i32 0, i32 16, i32 0, i32 1, i32 1, i32 1, i32 1) + call void @llvm.R600.store.swizzle(<4 x float> %tmp31, i32 0, i32 0) ret void } ; Function Attrs: readnone declare <4 x float> @llvm.AMDGPU.cube(<4 x float>) #0 -; Function Attrs: readnone -declare float @fabs(float) #0 - -; Function Attrs: readnone -declare <4 x float> @llvm.AMDGPU.tex(<4 x float>, i32, i32, i32) #0 +; Function Attrs: nounwind readnone +declare float @llvm.fabs.f32(float) #0 declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32) -attributes #0 = { readnone } +; Function Attrs: readnone +declare <4 x float> @llvm.r600.tex(<4 x float>, i32, i32, i32, i32, i32, i32, i32, i32, i32) #0 +attributes #0 = { nounwind readnone } Index: test/CodeGen/AMDGPU/llvm.AMDGPU.tex.ll =================================================================== --- test/CodeGen/AMDGPU/llvm.AMDGPU.tex.ll +++ /dev/null @@ -1,42 +0,0 @@ -;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s - -;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN -;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN -;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN -;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN -;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:UUNN -;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYZZ}} RID:0 SID:0 CT:NNNN -;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYZZ}} RID:0 SID:0 CT:NNNN -;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYZZ}} RID:0 SID:0 CT:UUNN -;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYYW}} RID:0 SID:0 CT:NNUN -;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNUN -;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYYZ}} RID:0 SID:0 CT:NNUN -;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNUN -;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN -;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN -;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN -;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNUN - -define void @test(<4 x float> addrspace(1)* %out, <4 x float> addrspace(1)* %in) { - %addr = load <4 x float>, <4 x float> addrspace(1)* %in - %res1 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %addr, i32 0, i32 0, i32 1) - %res2 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res1, i32 0, i32 0, i32 2) - %res3 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res2, i32 0, i32 0, i32 3) - %res4 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res3, i32 0, i32 0, i32 4) - %res5 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res4, i32 0, i32 0, i32 5) - %res6 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res5, i32 0, i32 0, i32 6) - %res7 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res6, i32 0, i32 0, i32 7) - %res8 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res7, i32 0, i32 0, i32 8) - %res9 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res8, i32 0, i32 0, i32 9) - %res10 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res9, i32 0, i32 0, i32 10) - %res11 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res10, i32 0, i32 0, i32 11) - %res12 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res11, i32 0, i32 0, i32 12) - %res13 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res12, i32 0, i32 0, i32 13) - %res14 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res13, i32 0, i32 0, i32 14) - %res15 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res14, i32 0, i32 0, i32 15) - %res16 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res15, i32 0, i32 0, i32 16) - store <4 x float> %res16, <4 x float> addrspace(1)* %out - ret void -} - -declare <4 x float> @llvm.AMDGPU.tex(<4 x float>, i32, i32, i32) readnone Index: test/CodeGen/AMDGPU/llvm.amdgpu.dp4.ll =================================================================== --- test/CodeGen/AMDGPU/llvm.amdgpu.dp4.ll +++ /dev/null @@ -1,11 +0,0 @@ -; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s - -declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) nounwind readnone - -define void @test_dp4(float addrspace(1)* %out, <4 x float> addrspace(1)* %a, <4 x float> addrspace(1)* %b) nounwind { - %src0 = load <4 x float>, <4 x float> addrspace(1)* %a, align 16 - %src1 = load <4 x float>, <4 x float> addrspace(1)* %b, align 16 - %dp4 = call float @llvm.AMDGPU.dp4(<4 x float> %src0, <4 x float> %src1) nounwind readnone - store float %dp4, float addrspace(1)* %out, align 4 - ret void -} Index: test/CodeGen/AMDGPU/llvm.r600.dot4.ll =================================================================== --- /dev/null +++ test/CodeGen/AMDGPU/llvm.r600.dot4.ll @@ -0,0 +1,11 @@ +; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s + +declare float @llvm.r600.dot4(<4 x float>, <4 x float>) nounwind readnone + +define void @test_dp4(float addrspace(1)* %out, <4 x float> addrspace(1)* %a, <4 x float> addrspace(1)* %b) nounwind { + %src0 = load <4 x float>, <4 x float> addrspace(1)* %a, align 16 + %src1 = load <4 x float>, <4 x float> addrspace(1)* %b, align 16 + %dp4 = call float @llvm.r600.dot4(<4 x float> %src0, <4 x float> %src1) nounwind readnone + store float %dp4, float addrspace(1)* %out, align 4 + ret void +} Index: test/CodeGen/AMDGPU/llvm.r600.tex.ll =================================================================== --- /dev/null +++ test/CodeGen/AMDGPU/llvm.r600.tex.ll @@ -0,0 +1,65 @@ +;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s + +;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN +;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN +;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN +;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN +;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:UUNN +;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYZZ}} RID:0 SID:0 CT:NNNN +;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYZZ}} RID:0 SID:0 CT:NNNN +;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYZZ}} RID:0 SID:0 CT:UUNN +;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYYW}} RID:0 SID:0 CT:NNUN +;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNUN +;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYYZ}} RID:0 SID:0 CT:NNUN +;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNUN +;CHECK: TEX_SAMPLE_C T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN +;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN +;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNNN +;CHECK: TEX_SAMPLE T{{[0-9]+\.XYZW, T[0-9]+\.XYZW}} RID:0 SID:0 CT:NNUN + +define void @test(<4 x float> addrspace(1)* %out, <4 x float> addrspace(1)* %in) { +bb: + %addr = load <4 x float>, <4 x float> addrspace(1)* %in + %tmp = shufflevector <4 x float> %addr, <4 x float> %addr, <4 x i32> + %tmp1 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp2 = shufflevector <4 x float> %tmp1, <4 x float> %tmp1, <4 x i32> + %tmp3 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp4 = shufflevector <4 x float> %tmp3, <4 x float> %tmp3, <4 x i32> + %tmp5 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp6 = shufflevector <4 x float> %tmp5, <4 x float> %tmp5, <4 x i32> + %tmp7 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp6, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp8 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp9 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp8, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1) + %tmp10 = shufflevector <4 x float> %tmp9, <4 x float> %tmp9, <4 x i32> + %tmp11 = call <4 x float> @llvm.r600.texc(<4 x float> %tmp10, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp12 = shufflevector <4 x float> %tmp11, <4 x float> %tmp11, <4 x i32> + %tmp13 = call <4 x float> @llvm.r600.texc(<4 x float> %tmp12, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp14 = shufflevector <4 x float> %tmp13, <4 x float> %tmp13, <4 x i32> + %tmp15 = call <4 x float> @llvm.r600.texc(<4 x float> %tmp14, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1) + %tmp16 = shufflevector <4 x float> %tmp15, <4 x float> %tmp15, <4 x i32> + %tmp17 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp16, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1) + %tmp18 = shufflevector <4 x float> %tmp17, <4 x float> %tmp17, <4 x i32> + %tmp19 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp18, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1) + %tmp20 = shufflevector <4 x float> %tmp19, <4 x float> %tmp19, <4 x i32> + %tmp21 = call <4 x float> @llvm.r600.texc(<4 x float> %tmp20, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1) + %tmp22 = shufflevector <4 x float> %tmp21, <4 x float> %tmp21, <4 x i32> + %tmp23 = call <4 x float> @llvm.r600.texc(<4 x float> %tmp22, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1) + %tmp24 = shufflevector <4 x float> %tmp23, <4 x float> %tmp23, <4 x i32> + %tmp25 = call <4 x float> @llvm.r600.texc(<4 x float> %tmp24, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp26 = shufflevector <4 x float> %tmp25, <4 x float> %tmp25, <4 x i32> + %tmp27 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp26, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp28 = shufflevector <4 x float> %tmp27, <4 x float> %tmp27, <4 x i32> + %tmp29 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp28, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp30 = shufflevector <4 x float> %tmp29, <4 x float> %tmp29, <4 x i32> + %tmp31 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp30, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1) + store <4 x float> %tmp31, <4 x float> addrspace(1)* %out + ret void +} + +; Function Attrs: readnone +declare <4 x float> @llvm.r600.tex(<4 x float>, i32, i32, i32, i32, i32, i32, i32, i32, i32) #0 + +; Function Attrs: readnone +declare <4 x float> @llvm.r600.texc(<4 x float>, i32, i32, i32, i32, i32, i32, i32, i32, i32) #0 + +attributes #0 = { nounwind readnone } Index: test/CodeGen/AMDGPU/load-input-fold.ll =================================================================== --- test/CodeGen/AMDGPU/load-input-fold.ll +++ test/CodeGen/AMDGPU/load-input-fold.ll @@ -88,14 +88,14 @@ %83 = insertelement <4 x float> %82, float %75, i32 1 %84 = insertelement <4 x float> %83, float %77, i32 2 %85 = insertelement <4 x float> %84, float 0.000000e+00, i32 3 - %86 = call float @llvm.AMDGPU.dp4(<4 x float> %81, <4 x float> %85) + %86 = call float @llvm.r600.dot4(<4 x float> %81, <4 x float> %85) %87 = insertelement <4 x float> undef, float %86, i32 0 call void @llvm.R600.store.swizzle(<4 x float> %87, i32 2, i32 2) ret void } ; Function Attrs: readnone -declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #1 +declare float @llvm.r600.dot4(<4 x float>, <4 x float>) #1 ; Function Attrs: readonly declare float @fabs(float) #2 Index: test/CodeGen/AMDGPU/max-literals.ll =================================================================== --- test/CodeGen/AMDGPU/max-literals.ll +++ test/CodeGen/AMDGPU/max-literals.ll @@ -23,7 +23,7 @@ %15 = insertelement <4 x float> %14, float %8, i32 3 %16 = insertelement <4 x float> %15, float %11, i32 3 - %17 = call float @llvm.AMDGPU.dp4(<4 x float> %15,<4 x float> %16) + %17 = call float @llvm.r600.dot4(<4 x float> %15,<4 x float> %16) %18 = insertelement <4 x float> undef, float %17, i32 0 call void @llvm.R600.store.swizzle(<4 x float> %18, i32 0, i32 2) ret void @@ -52,14 +52,14 @@ %15 = insertelement <4 x float> %14, float %8, i32 3 %16 = insertelement <4 x float> %15, float %11, i32 3 - %17 = call float @llvm.AMDGPU.dp4(<4 x float> %15,<4 x float> %16) + %17 = call float @llvm.r600.dot4(<4 x float> %15,<4 x float> %16) %18 = insertelement <4 x float> undef, float %17, i32 0 call void @llvm.R600.store.swizzle(<4 x float> %18, i32 0, i32 2) ret void } ; Function Attrs: readnone -declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #1 +declare float @llvm.r600.dot4(<4 x float>, <4 x float>) #1 declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32) Index: test/CodeGen/AMDGPU/predicate-dp4.ll =================================================================== --- test/CodeGen/AMDGPU/predicate-dp4.ll +++ test/CodeGen/AMDGPU/predicate-dp4.ll @@ -11,7 +11,7 @@ br i1 %3, label %IF, label %ENDIF IF: ; preds = %main_body - %4 = call float @llvm.AMDGPU.dp4(<4 x float> %0, <4 x float> %0) + %4 = call float @llvm.r600.dot4(<4 x float> %0, <4 x float> %0) br label %ENDIF ENDIF: ; preds = %IF, %main_body @@ -21,6 +21,6 @@ ret void } -declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #1 +declare float @llvm.r600.dot4(<4 x float>, <4 x float>) #1 declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32) attributes #1 = { readnone } Index: test/CodeGen/AMDGPU/pv-packing.ll =================================================================== --- test/CodeGen/AMDGPU/pv-packing.ll +++ test/CodeGen/AMDGPU/pv-packing.ll @@ -16,7 +16,7 @@ %8 = extractelement <4 x float> %reg3, i32 2 %9 = load <4 x float>, <4 x float> addrspace(8)* null %10 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 1) - %11 = call float @llvm.AMDGPU.dp4(<4 x float> %9, <4 x float> %9) + %11 = call float @llvm.r600.dot4(<4 x float> %9, <4 x float> %9) %12 = fmul float %0, %3 %13 = fadd float %12, %6 %14 = fmul float %1, %4 @@ -29,14 +29,14 @@ %21 = insertelement <4 x float> %20, float %15, i32 1 %22 = insertelement <4 x float> %21, float %17, i32 2 %23 = insertelement <4 x float> %22, float %19, i32 3 - %24 = call float @llvm.AMDGPU.dp4(<4 x float> %23, <4 x float> %10) + %24 = call float @llvm.r600.dot4(<4 x float> %23, <4 x float> %10) %25 = insertelement <4 x float> undef, float %24, i32 0 call void @llvm.R600.store.swizzle(<4 x float> %25, i32 0, i32 2) ret void } ; Function Attrs: readnone -declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #1 +declare float @llvm.r600.dot4(<4 x float>, <4 x float>) #1 declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32) Index: test/CodeGen/AMDGPU/pv.ll =================================================================== --- test/CodeGen/AMDGPU/pv.ll +++ test/CodeGen/AMDGPU/pv.ll @@ -101,7 +101,7 @@ %93 = insertelement <4 x float> %92, float %5, i32 1 %94 = insertelement <4 x float> %93, float %6, i32 2 %95 = insertelement <4 x float> %94, float 0.000000e+00, i32 3 - %96 = call float @llvm.AMDGPU.dp4(<4 x float> %91, <4 x float> %95) + %96 = call float @llvm.r600.dot4(<4 x float> %91, <4 x float> %95) %97 = call float @fabs(float %96) %98 = call float @llvm.AMDGPU.rsq.clamped.f32(float %97) %99 = fmul float %4, %98 @@ -137,7 +137,7 @@ %129 = insertelement <4 x float> %128, float %121, i32 1 %130 = insertelement <4 x float> %129, float %123, i32 2 %131 = insertelement <4 x float> %130, float 0.000000e+00, i32 3 - %132 = call float @llvm.AMDGPU.dp4(<4 x float> %127, <4 x float> %131) + %132 = call float @llvm.r600.dot4(<4 x float> %127, <4 x float> %131) %133 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 7) %134 = extractelement <4 x float> %133, i32 0 %135 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 7) @@ -152,7 +152,7 @@ %144 = insertelement <4 x float> %143, float %136, i32 1 %145 = insertelement <4 x float> %144, float %138, i32 2 %146 = insertelement <4 x float> %145, float 0.000000e+00, i32 3 - %147 = call float @llvm.AMDGPU.dp4(<4 x float> %142, <4 x float> %146) + %147 = call float @llvm.r600.dot4(<4 x float> %142, <4 x float> %146) %148 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 8) %149 = extractelement <4 x float> %148, i32 0 %150 = fmul float %149, %8 @@ -219,7 +219,7 @@ } ; Function Attrs: readnone -declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #1 +declare float @llvm.r600.dot4(<4 x float>, <4 x float>) #1 ; Function Attrs: readonly declare float @fabs(float) #2 Index: test/CodeGen/AMDGPU/r600-infinite-loop-bug-while-reorganizing-vector.ll =================================================================== --- test/CodeGen/AMDGPU/r600-infinite-loop-bug-while-reorganizing-vector.ll +++ test/CodeGen/AMDGPU/r600-infinite-loop-bug-while-reorganizing-vector.ll @@ -1,57 +1,58 @@ -;RUN: llc < %s -march=r600 -mcpu=cayman +; RUN: llc -march=r600 -mcpu=cayman < %s -define amdgpu_ps void @main(<4 x float> inreg, <4 x float> inreg) { +define amdgpu_ps void @main(<4 x float> inreg %arg, <4 x float> inreg %arg1) { main_body: - %2 = extractelement <4 x float> %0, i32 0 - %3 = extractelement <4 x float> %0, i32 1 - %4 = extractelement <4 x float> %0, i32 2 - %5 = extractelement <4 x float> %0, i32 3 - %6 = insertelement <4 x float> undef, float %2, i32 0 - %7 = insertelement <4 x float> %6, float %3, i32 1 - %8 = insertelement <4 x float> %7, float %4, i32 2 - %9 = insertelement <4 x float> %8, float %5, i32 3 - %10 = call <4 x float> @llvm.AMDGPU.cube(<4 x float> %9) - %11 = extractelement <4 x float> %10, i32 0 - %12 = extractelement <4 x float> %10, i32 1 - %13 = extractelement <4 x float> %10, i32 2 - %14 = extractelement <4 x float> %10, i32 3 - %15 = call float @fabs(float %13) - %16 = fdiv float 1.000000e+00, %15 - %17 = fmul float %11, %16 - %18 = fadd float %17, 1.500000e+00 - %19 = fmul float %12, %16 - %20 = fadd float %19, 1.500000e+00 - %21 = insertelement <4 x float> undef, float %20, i32 0 - %22 = insertelement <4 x float> %21, float %18, i32 1 - %23 = insertelement <4 x float> %22, float %14, i32 2 - %24 = insertelement <4 x float> %23, float %5, i32 3 - %25 = extractelement <4 x float> %24, i32 0 - %26 = extractelement <4 x float> %24, i32 1 - %27 = extractelement <4 x float> %24, i32 2 - %28 = extractelement <4 x float> %24, i32 3 - %29 = insertelement <4 x float> undef, float %25, i32 0 - %30 = insertelement <4 x float> %29, float %26, i32 1 - %31 = insertelement <4 x float> %30, float %27, i32 2 - %32 = insertelement <4 x float> %31, float %28, i32 3 - %33 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %32, i32 16, i32 0, i32 13) - %34 = extractelement <4 x float> %33, i32 0 - %35 = insertelement <4 x float> undef, float %34, i32 0 - %36 = insertelement <4 x float> %35, float %34, i32 1 - %37 = insertelement <4 x float> %36, float %34, i32 2 - %38 = insertelement <4 x float> %37, float 1.000000e+00, i32 3 - call void @llvm.R600.store.swizzle(<4 x float> %38, i32 0, i32 0) + %tmp = extractelement <4 x float> %arg, i32 0 + %tmp2 = extractelement <4 x float> %arg, i32 1 + %tmp3 = extractelement <4 x float> %arg, i32 2 + %tmp4 = extractelement <4 x float> %arg, i32 3 + %tmp5 = insertelement <4 x float> undef, float %tmp, i32 0 + %tmp6 = insertelement <4 x float> %tmp5, float %tmp2, i32 1 + %tmp7 = insertelement <4 x float> %tmp6, float %tmp3, i32 2 + %tmp8 = insertelement <4 x float> %tmp7, float %tmp4, i32 3 + %tmp9 = call <4 x float> @llvm.AMDGPU.cube(<4 x float> %tmp8) + %tmp10 = extractelement <4 x float> %tmp9, i32 0 + %tmp11 = extractelement <4 x float> %tmp9, i32 1 + %tmp12 = extractelement <4 x float> %tmp9, i32 2 + %tmp13 = extractelement <4 x float> %tmp9, i32 3 + %tmp14 = call float @fabs(float %tmp12) + %tmp15 = fdiv float 1.000000e+00, %tmp14 + %tmp16 = fmul float %tmp10, %tmp15 + %tmp17 = fadd float %tmp16, 1.500000e+00 + %tmp18 = fmul float %tmp11, %tmp15 + %tmp19 = fadd float %tmp18, 1.500000e+00 + %tmp20 = insertelement <4 x float> undef, float %tmp19, i32 0 + %tmp21 = insertelement <4 x float> %tmp20, float %tmp17, i32 1 + %tmp22 = insertelement <4 x float> %tmp21, float %tmp13, i32 2 + %tmp23 = insertelement <4 x float> %tmp22, float %tmp4, i32 3 + %tmp24 = extractelement <4 x float> %tmp23, i32 0 + %tmp25 = extractelement <4 x float> %tmp23, i32 1 + %tmp26 = extractelement <4 x float> %tmp23, i32 2 + %tmp27 = extractelement <4 x float> %tmp23, i32 3 + %tmp28 = insertelement <4 x float> undef, float %tmp24, i32 0 + %tmp29 = insertelement <4 x float> %tmp28, float %tmp25, i32 1 + %tmp30 = insertelement <4 x float> %tmp29, float %tmp26, i32 2 + %tmp31 = insertelement <4 x float> %tmp30, float %tmp27, i32 3 + %tmp32 = shufflevector <4 x float> %tmp31, <4 x float> %tmp31, <4 x i32> + %tmp33 = call <4 x float> @llvm.r600.texc(<4 x float> %tmp32, i32 0, i32 0, i32 0, i32 16, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp34 = extractelement <4 x float> %tmp33, i32 0 + %tmp35 = insertelement <4 x float> undef, float %tmp34, i32 0 + %tmp36 = insertelement <4 x float> %tmp35, float %tmp34, i32 1 + %tmp37 = insertelement <4 x float> %tmp36, float %tmp34, i32 2 + %tmp38 = insertelement <4 x float> %tmp37, float 1.000000e+00, i32 3 + call void @llvm.R600.store.swizzle(<4 x float> %tmp38, i32 0, i32 0) ret void } ; Function Attrs: readnone -declare <4 x float> @llvm.AMDGPU.cube(<4 x float>) #1 +declare <4 x float> @llvm.AMDGPU.cube(<4 x float>) #0 ; Function Attrs: readnone -declare float @fabs(float) #1 - -; Function Attrs: readnone -declare <4 x float> @llvm.AMDGPU.tex(<4 x float>, i32, i32, i32) #1 +declare float @fabs(float) #0 declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32) -attributes #1 = { readnone } +; Function Attrs: readnone +declare <4 x float> @llvm.r600.texc(<4 x float>, i32, i32, i32, i32, i32, i32, i32, i32, i32) #0 + +attributes #0 = { nounwind readnone } Index: test/CodeGen/AMDGPU/rv7x0_count3.ll =================================================================== --- test/CodeGen/AMDGPU/rv7x0_count3.ll +++ test/CodeGen/AMDGPU/rv7x0_count3.ll @@ -1,39 +1,52 @@ ; RUN: llc < %s -march=r600 -show-mc-encoding -mcpu=rv710 | FileCheck %s ; CHECK: TEX 9 @6 ; encoding: [0x06,0x00,0x00,0x00,0x00,0x04,0x88,0x80] - define amdgpu_vs void @test(<4 x float> inreg %reg0, <4 x float> inreg %reg1) { - %1 = extractelement <4 x float> %reg1, i32 0 - %2 = extractelement <4 x float> %reg1, i32 1 - %3 = extractelement <4 x float> %reg1, i32 2 - %4 = extractelement <4 x float> %reg1, i32 3 - %5 = insertelement <4 x float> undef, float %1, i32 0 - %6 = insertelement <4 x float> %5, float %2, i32 1 - %7 = insertelement <4 x float> %6, float %3, i32 2 - %8 = insertelement <4 x float> %7, float %4, i32 3 - %9 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 0, i32 0, i32 1) - %10 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 1, i32 0, i32 1) - %11 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 2, i32 0, i32 1) - %12 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 3, i32 0, i32 1) - %13 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 4, i32 0, i32 1) - %14 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 5, i32 0, i32 1) - %15 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 6, i32 0, i32 1) - %16 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 7, i32 0, i32 1) - %17 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 8, i32 0, i32 1) - %18 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %8, i32 9, i32 0, i32 1) - %19 = fadd <4 x float> %9, %10 - %20 = fadd <4 x float> %19, %11 - %21 = fadd <4 x float> %20, %12 - %22 = fadd <4 x float> %21, %13 - %23 = fadd <4 x float> %22, %14 - %24 = fadd <4 x float> %23, %15 - %25 = fadd <4 x float> %24, %16 - %26 = fadd <4 x float> %25, %17 - %27 = fadd <4 x float> %26, %18 - call void @llvm.R600.store.swizzle(<4 x float> %27, i32 0, i32 2) - ret void +bb: + %tmp = extractelement <4 x float> %reg1, i32 0 + %tmp1 = extractelement <4 x float> %reg1, i32 1 + %tmp2 = extractelement <4 x float> %reg1, i32 2 + %tmp3 = extractelement <4 x float> %reg1, i32 3 + %tmp4 = insertelement <4 x float> undef, float %tmp, i32 0 + %tmp5 = insertelement <4 x float> %tmp4, float %tmp1, i32 1 + %tmp6 = insertelement <4 x float> %tmp5, float %tmp2, i32 2 + %tmp7 = insertelement <4 x float> %tmp6, float %tmp3, i32 3 + %tmp8 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp9 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp8, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp10 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp11 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp10, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp12 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp13 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp12, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp14 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp15 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp14, i32 0, i32 0, i32 0, i32 3, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp16 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp17 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp16, i32 0, i32 0, i32 0, i32 4, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp18 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp19 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp18, i32 0, i32 0, i32 0, i32 5, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp20 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp21 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp20, i32 0, i32 0, i32 0, i32 6, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp22 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp23 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp22, i32 0, i32 0, i32 0, i32 7, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp24 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp25 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp24, i32 0, i32 0, i32 0, i32 8, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp26 = shufflevector <4 x float> %tmp7, <4 x float> %tmp7, <4 x i32> + %tmp27 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp26, i32 0, i32 0, i32 0, i32 9, i32 0, i32 1, i32 1, i32 1, i32 1) + %tmp28 = fadd <4 x float> %tmp9, %tmp11 + %tmp29 = fadd <4 x float> %tmp28, %tmp13 + %tmp30 = fadd <4 x float> %tmp29, %tmp15 + %tmp31 = fadd <4 x float> %tmp30, %tmp17 + %tmp32 = fadd <4 x float> %tmp31, %tmp19 + %tmp33 = fadd <4 x float> %tmp32, %tmp21 + %tmp34 = fadd <4 x float> %tmp33, %tmp23 + %tmp35 = fadd <4 x float> %tmp34, %tmp25 + %tmp36 = fadd <4 x float> %tmp35, %tmp27 + call void @llvm.R600.store.swizzle(<4 x float> %tmp36, i32 0, i32 2) + ret void } -declare <4 x float> @llvm.AMDGPU.tex(<4 x float>, i32, i32, i32) readnone - declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32) + +; Function Attrs: nounwind readnone +declare <4 x float> @llvm.r600.tex(<4 x float>, i32, i32, i32, i32, i32, i32, i32, i32, i32) #0 + +attributes #0 = { nounwind readnone } Index: test/CodeGen/AMDGPU/shared-op-cycle.ll =================================================================== --- test/CodeGen/AMDGPU/shared-op-cycle.ll +++ test/CodeGen/AMDGPU/shared-op-cycle.ll @@ -17,14 +17,14 @@ %v0 = insertelement <4 x float> undef, float %r0, i32 0 %v1 = insertelement <4 x float> %v0, float %r1, i32 1 %v2 = insertelement <4 x float> %v1, float %r2, i32 2 - %res = call float @llvm.AMDGPU.dp4(<4 x float> %v2, <4 x float> %v2) + %res = call float @llvm.r600.dot4(<4 x float> %v2, <4 x float> %v2) %vecres = insertelement <4 x float> undef, float %res, i32 0 call void @llvm.R600.store.swizzle(<4 x float> %vecres, i32 0, i32 2) ret void } ; Function Attrs: readnone -declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #1 +declare float @llvm.r600.dot4(<4 x float>, <4 x float>) #1 declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32)