[IR] Add a dedicated FNeg IR Instruction
The IEEE-754 Standard makes it clear that fneg(x) and
fsub(-0.0, x) are two different operations. The former is a bitwise
operation, while the latter is an arithmetic operation. This patch
creates a dedicated FNeg IR Instruction to model that behavior.
Differential Revision: https://reviews.llvm.org/D53877
llvm-svn: 346774
diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp
index 1e32637..f077957 100644
--- a/llvm/lib/IR/Instruction.cpp
+++ b/llvm/lib/IR/Instruction.cpp
@@ -303,6 +303,9 @@
case CatchPad: return "catchpad";
case CatchSwitch: return "catchswitch";
+ // Standard unary operators...
+ case FNeg: return "fneg";
+
// Standard binary operators...
case Add: return "add";
case FAdd: return "fadd";