forked from OSchip/llvm-project
[AMDGPU] Fold llvm.amdgcn.cos and llvm.amdgcn.sin intrinsics (fix)
Try to fix Windows buildbots.
This commit is contained in:
parent
8577595e03
commit
7c7941fb4b
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue