Skip to content

Commit

Permalink
Merge pull request dotnet#14649 from mikedn/float-absneg
Browse files Browse the repository at this point in the history
Always use XORPS/ANDPS for FP NEG/ABS
  • Loading branch information
CarolEidt authored Oct 23, 2017
2 parents 2ba7431 + e3a104c commit 458c90a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jit/codegenxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7285,7 +7285,7 @@ void CodeGen::genSSE2BitwiseOp(GenTreePtr treeNode)
// Neg(x) = flip the sign bit.
// Neg(f) = f ^ 0x80000000
// Neg(d) = d ^ 0x8000000000000000
ins = genGetInsForOper(GT_XOR, targetType);
ins = INS_xorps;
if (targetType == TYP_FLOAT)
{
bitMask = &negBitmaskFlt;
Expand All @@ -7311,7 +7311,7 @@ void CodeGen::genSSE2BitwiseOp(GenTreePtr treeNode)
// Abs(x) = set sign-bit to zero
// Abs(f) = f & 0x7fffffff
// Abs(d) = d & 0x7fffffffffffffff
ins = genGetInsForOper(GT_AND, targetType);
ins = INS_andps;
if (targetType == TYP_FLOAT)
{
bitMask = &absBitmaskFlt;
Expand Down

0 comments on commit 458c90a

Please sign in to comment.