[PATCH] D53877: [IR] Strawman for dedicated FNeg IR instruction

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 08:34:55 PDT 2019


lebedev.ri added inline comments.


================
Comment at: llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h:373
+enum UnaryOpcodes {
+  UNOP_NEG = 0
+};
----------------
cameron.mcinally wrote:
> lebedev.ri wrote:
> > @cameron.mcinally also, shouldn't this be `UNOP_FNEG`?
> I'm not sure. The BINOPs are overloaded for INT/FP types. E.g. BINOP_ADD is also FP. I suppose there are no plans for an INT UNOP_NEG though. Do you feel strongly about this change?
I don't expect we'll ever have integer neg, so the current `UNOP_NEG` looks at least inconsistent (you use `fneg`) elsewhere.
So yes please, let's change this :)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53877/new/

https://reviews.llvm.org/D53877





More information about the llvm-commits mailing list