diff options
| author | Cameron McInally <cameron.mcinally@nyu.edu> | 2018-11-13 18:15:47 +0000 |
|---|---|---|
| committer | Cameron McInally <cameron.mcinally@nyu.edu> | 2018-11-13 18:15:47 +0000 |
| commit | cbde0d9c7be1991751dc3eb5928294d2e00ef26a (patch) | |
| tree | ad839084df9863182687fadb95471920cb15381b /llvm/lib/IR/Instruction.cpp | |
| parent | 9d87256d3de67f7a2e8f778ee775e0b6bb309aeb (diff) | |
| download | bcm5719-llvm-cbde0d9c7be1991751dc3eb5928294d2e00ef26a.tar.gz bcm5719-llvm-cbde0d9c7be1991751dc3eb5928294d2e00ef26a.zip | |
[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
Diffstat (limited to 'llvm/lib/IR/Instruction.cpp')
| -rw-r--r-- | llvm/lib/IR/Instruction.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp index 1e326370318..f077957969f 100644 --- a/llvm/lib/IR/Instruction.cpp +++ b/llvm/lib/IR/Instruction.cpp @@ -303,6 +303,9 @@ const char *Instruction::getOpcodeName(unsigned OpCode) { 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"; |

