File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1754,6 +1754,9 @@ class ConstantFPSDNode : public SDNode {
1754
1754
// / Returns true if \p V is a constant integer zero.
1755
1755
bool isNullConstant (SDValue V);
1756
1756
1757
+ // / Returns true if \p V is a constant integer zero or an UNDEF node.
1758
+ bool isNullConstantOrUndef (SDValue V);
1759
+
1757
1760
// / Returns true if \p V is an FP constant with a value of positive zero.
1758
1761
bool isNullFPConstant (SDValue V);
1759
1762
Original file line number Diff line number Diff line change @@ -11753,6 +11753,10 @@ bool llvm::isNullConstant(SDValue V) {
11753
11753
return Const != nullptr && Const->isZero ();
11754
11754
}
11755
11755
11756
+ bool llvm::isNullConstantOrUndef (SDValue V) {
11757
+ return V.isUndef () || isNullConstant (V);
11758
+ }
11759
+
11756
11760
bool llvm::isNullFPConstant (SDValue V) {
11757
11761
ConstantFPSDNode *Const = dyn_cast<ConstantFPSDNode>(V);
11758
11762
return Const != nullptr && Const->isZero () && !Const->isNegative ();
Original file line number Diff line number Diff line change @@ -24,10 +24,6 @@ using namespace llvm;
24
24
25
25
namespace {
26
26
27
- static inline bool isNullConstantOrUndef (SDValue V) {
28
- return V.isUndef () || isNullConstant (V);
29
- }
30
-
31
27
static inline bool getConstantValue (SDValue N, uint32_t &Out) {
32
28
// This is only used for packed vectors, where using 0 for undef should
33
29
// always be good.
You can’t perform that action at this time.
0 commit comments