[PowerPC] fix a miscompile for Solaris build

This commit is contained in:
Chen Zheng 2021-10-29 12:04:54 +00:00
parent af0a8b8317
commit 7591d21032
1 changed files with 1 additions and 1 deletions

View File

@ -494,7 +494,7 @@ bool PPCLoopInstrFormPrep::prepareBasesForCommoningChains(Bucket &CBucket) {
// All elements are increased by FirstOffset.
// The number of chains should be sqrt(EleNum).
if (!SawChainSeparater)
ChainNum = (unsigned)sqrt(EleNum);
ChainNum = (unsigned)sqrt((double)EleNum);
CBucket.ChainSize = (unsigned)(EleNum / ChainNum);