[PATCH] D62357: [IRBuilder] Add CreateUnOp(...) and CreateFNegFMF(...)

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 17:27:32 PDT 2019


craig.topper added inline comments.


================
Comment at: llvm/include/llvm/IR/IRBuilder.h:1379
+   if (Value *VC = foldConstant(Instruction::FNeg, V, Name)) return VC;
+   return Insert(setFPAttrs(UnaryOperator::CreateFNeg(V), nullptr,
+                            FMFSource->getFastMathFlags()),
----------------
It feels weird that this creates unaryoperator::fneg but CreateFNeg uses the binaryoperator. Shouldn't these be consistent until we switch over?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62357





More information about the llvm-commits mailing list