[AMDGPU] Fold llvm.amdgcn.cos and llvm.amdgcn.sin intrinsics (fix)

Try to fix Windows buildbots.
This commit is contained in:
Jay Foad 2020-06-03 09:44:00 +01:00
parent 8577595e03
commit 7c7941fb4b
1 changed files with 4 additions and 1 deletions

View File

@ -1977,7 +1977,10 @@ static Constant *ConstantFoldScalarCall1(StringRef Name,
const double SinVals[4] = { 0.0, 1.0, 0.0, -1.0 };
V = SinVals[((int)V4 + (IsCos ? 1 : 0)) & 3];
} else {
V = (IsCos ? cos : sin)(V * 2.0 * numbers::pi);
if (IsCos)
V = cos(V * 2.0 * numbers::pi);
else
V = sin(V * 2.0 * numbers::pi);
}
return GetConstantFoldFPValue(V, Ty);
}