[PATCH] D61419: Support FNeg constant folding

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 03:53:19 PDT 2019


arsenm added inline comments.


================
Comment at: llvm/lib/IR/ConstantFold.cpp:948-949
+    case Instruction::FNeg:
+      (void)C1V.changeSign();
+      return ConstantFP::get(C->getContext(), C1V);
+    }
----------------
You can use neg(CV) and remove C1V


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61419





More information about the llvm-commits mailing list