[PATCH] D112509: [Instcombine] Add patterns to generate fneg(fabs(x)) instead of fcmp/selects
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 26 09:02:06 PDT 2021
spatel added a comment.
Please commit the tests as a preliminary NFC patch, so it's easier to see the diffs.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2932
// (X <= +/-0.0) ? (0.0 - X) : X --> fabs(X)
- Instruction *FSub;
if (match(CondVal, m_FCmp(Pred, m_Specific(FalseVal), m_AnyZeroFP())) &&
----------------
Can we remove this match as a preliminary cleanup?
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2951
// (X <= +/-0.0) ? -X : X --> fabs(X)
- Instruction *FNeg;
if (match(CondVal, m_FCmp(Pred, m_Specific(FalseVal), m_AnyZeroFP())) &&
----------------
Can we remove this match as a preliminary cleanup?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112509/new/
https://reviews.llvm.org/D112509
More information about the llvm-commits
mailing list