[PATCH] D132880: [SVE] Fix SVEDup0 matching -0.0f
Paul Walker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 03:11:00 PDT 2022
paulwalker-arm added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:190
if (auto CN = dyn_cast<ConstantFPSDNode>(Opnd0))
if (CN->isZero())
return true;
----------------
steplong wrote:
> Does it make sense to check for isNegative here also?
Yes please.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:209-210
return true;
if (auto CN = dyn_cast<ConstantFPSDNode>(Opnd0))
- if (CN->isZero())
+ if (CN->isZero() && !CN->isNegative())
return true;
----------------
It looks like we can wrap these into a single `isNullFPConstant()` call?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132880/new/
https://reviews.llvm.org/D132880
More information about the llvm-commits
mailing list