[PATCH] D133866: [SelectionDAG] Add helper function to check whether a SDValue is neutral element. NFC.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 26 02:45:24 PDT 2022
RKSimon added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1696
+bool isNeutralConstant(unsigned Opc, SDNodeFlags Flags, SDValue V,
+ unsigned OpereandNo);
+
----------------
OperandNo
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:10771
+ case ISD::FSUB:
+ return ConstFP->isZero() &&
+ (Flags.hasNoSignedZeros() || !ConstFP->isNegative());
----------------
Missing OperandNo == 1 check
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133866/new/
https://reviews.llvm.org/D133866
More information about the llvm-commits
mailing list