[PATCH] D61447: [FPEnv] WIP on threading fneg through llvm
Cameron McInally via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 13:27:01 PDT 2019
cameron.mcinally added a comment.
Thanks for working on this, Kevin. It looks like the general direction is good. A couple small comments inline. I also noticed some of the tests still need updating to replace fsub's, but I assume you know that.
@spatel I'm not a PatternMatch expert, but I think that change is what we wanted. That is, to continue to match `FSub(-0.0, X)` as an `FNeg(X)`.
I'm currently working on ConstantExpr folding for FNeg in D61419 <https://reviews.llvm.org/D61419>. And soon to be looking at FNeg folding in InstructionSimplify. Just FYI...
================
Comment at: lib/Transforms/InstCombine/InstCombineAddSub.cpp:1938
+ }
+
+ return nullptr;
----------------
We should also do:
`-undef -> undef`
================
Comment at: lib/Transforms/Scalar/Reassociate.cpp:887
// Insert a 'neg' instruction that subtracts the value from zero to get the
// negation.
+ Instruction *NewNeg = CreateNeg(V, V->getName() + ".neg", BI, BI);
----------------
Comment needs to be updated.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61447/new/
https://reviews.llvm.org/D61447
More information about the llvm-commits
mailing list