[PATCH] D61419: Support FNeg constant folding

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 19:34:16 PDT 2019


cameron.mcinally created this revision.
cameron.mcinally added reviewers: spatel, arsenm, kpn, andrew.w.kaylor, craig.topper.
Herald added subscribers: llvm-commits, hiraditya, wdng.
Herald added a project: LLVM.

Also, fix `ConstantExpr::getFNeg(...)` so that it actually returns an `FNeg(X)`, not an `FSub(-0.0, X)`.


Repository:
  rL LLVM

https://reviews.llvm.org/D61419

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/lib/IR/ConstantFold.cpp
  llvm/lib/IR/ConstantFold.h
  llvm/lib/IR/Constants.cpp
  llvm/test/CodeGen/X86/fp-fold.ll
  llvm/test/CodeGen/X86/vec_fneg.ll
  llvm/test/Transforms/InstCombine/fneg.ll
  llvm/test/Transforms/InstCombine/fsub.ll
  llvm/test/Transforms/InstCombine/inselt-binop.ll
  llvm/test/Transforms/Reassociate/crash2.ll
  llvm/unittests/IR/ConstantsTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61419.197693.patch
Type: text/x-patch
Size: 12357 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190502/06a5ac7b/attachment.bin>


More information about the llvm-commits mailing list