[llvm-dev] [FPEnv] FNEG instruction

Cameron McInally via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 21 09:17:48 PDT 2018

Hey llvm-dev,

Continuing a discussion from D50913...

A group working on the FP rounding mode and trap-safety project have run
into a situation where it would make sense to add a new FNEG instruction
and decouple the existing FNEG<->FSUB transformations.

The IEEE-754 Standard (Section 5.5.1) makes it clear that neg(x) and
sub(-0.0,x) are two different operations. The former is a bitwise
operation, while the latter is an arithmetic operation.

That said, LLVM currently conflates the two operations in several places.
It would be nice to separate the two operations to give the user explicit
control over which type of operation is generated.

D50913 covers a lot of ground, so I'll leave the discussion here for now
until any interested parties are up to speed.

Thanks for looking,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180821/9c1fd563/attachment.html>

More information about the llvm-dev mailing list