[PATCH] D62629: [InstCombine] Update fptrunc (fneg x)) -> (fneg (fptrunc x) for unary FNeg

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 14:22:10 PDT 2019


craig.topper added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:1625
+    Value *InnerTrunc = Builder.CreateFPTrunc(X, Ty);
+    return BinaryOperator::CreateFNegFMF(InnerTrunc, cast<Instruction>(Op));
   }
----------------
If you started with a unary fneg, shouldn't we end up with a unary fneg?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62629





More information about the llvm-commits mailing list