[PATCH] D53877: [IR] Strawman for dedicated FNeg IR instruction
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 30 11:17:50 PDT 2018
lebedev.ri added a comment.
> with the intention of adding more Unary operations in the future. E.g. integer Neg (and maybe Abs, Copysign, etc.).
While there are very clear reasons for `FNeg` to exist, this isn't so true for any of the others listed here..
================
Comment at: include/llvm-c/Core.h:64
LLVMInvoke = 5,
/* removed 6 due to API changes */
LLVMUnreachable = 7,
----------------
This strongly suggests that you can not reorder/renumber the existing enumerators.
================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:521
+ default: llvm_unreachable("Unknown binary instruction!");
+ // TODO: Handle integer Neg?
+ case Instruction::FNeg: return bitc::UNOP_NEG;
----------------
There is no integer neg opcode to handle.
Repository:
rL LLVM
https://reviews.llvm.org/D53877
More information about the llvm-commits
mailing list