[PATCH] D86862: [NFC] [DAGCombiner] Refactor bitcast folding within fabs/fneg

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 09:49:33 PDT 2020


qiucf added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13996
 
   // (fneg (fmul c, x)) -> (fmul -c, x)
   if (N0.getOpcode() == ISD::FMUL &&
----------------
spatel wrote:
> qiucf wrote:
> > By the way, this can be removed since `getNegatedExpression` above already handles it?
> Yes, that seems likely. This code also doesn't handle vectors, so if you can confirm/add tests for those patterns, this should go away.
Yes. https://reviews.llvm.org/rGeb2a405c181c9833eb8676d147619b8c893dc6fa


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86862



More information about the llvm-commits mailing list