Commit 077209b1 authored by Mochocki, Piotr's avatar Mochocki, Piotr Committed by gbsbuild

Revert of commit 952d4d1f

Change-Id: I7ad203ab8dd3a8336f051b80b172aed20bfda849
parent 253f6aec
......@@ -422,12 +422,6 @@ public:
}
const SCompilerHwCaps& GetCaps(){return m_caps;}
bool WaClampLowerCosineValue() const
{
return m_WaTable.WaPreventCosineOverShoot != 0;
}
};
}//namespace IGC
......@@ -258,6 +258,7 @@ void WorkaroundAnalysis::visitCallInst(llvm::CallInst &I)
}
}
if (const GenIntrinsicInst* intr = dyn_cast<GenIntrinsicInst>(&I))
{
switch (intr->getIntrinsicID())
......@@ -358,21 +359,6 @@ void WorkaroundAnalysis::visitCallInst(llvm::CallInst &I)
break;
}
}
if (pCodeGenCtx->platform.WaClampLowerCosineValue())
{
IntrinsicInst *IIns = dyn_cast<IntrinsicInst>(&I);
if (IIns && IIns->getIntrinsicID() == Intrinsic::cos)
{
m_builder->SetInsertPoint(IIns->getNextNode());
llvm::Value* operand = IIns;
llvm::ConstantFP* float_N1 = cast<ConstantFP>(ConstantFP::get(m_builder->getFloatTy(), -1.0));
Value* cmpInst = m_builder->CreateFCmpOLE(operand, float_N1);
Value* sel = m_builder->CreateSelect(cmpInst, float_N1, operand);
(&I)->replaceAllUsesWith(sel);
I.eraseFromParent();
}
}
}
void WorkaroundAnalysis::ldmsOffsetWorkaournd(LdMSIntrinsic* ldms)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment