summaryrefslogtreecommitdiff
path: root/include/llvm/IR/Constant.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/Constant.h')
-rw-r--r--include/llvm/IR/Constant.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/IR/Constant.h b/include/llvm/IR/Constant.h
index 931576651224..2b6a6e4141b9 100644
--- a/include/llvm/IR/Constant.h
+++ b/include/llvm/IR/Constant.h
@@ -86,6 +86,12 @@ public:
/// floating-point constant with all NaN elements.
bool isNaN() const;
+ /// Return true if this constant and a constant 'Y' are element-wise equal.
+ /// This is identical to just comparing the pointers, with the exception that
+ /// for vectors, if only one of the constants has an `undef` element in some
+ /// lane, the constants still match.
+ bool isElementWiseEqual(Value *Y) const;
+
/// Return true if this is a vector constant that includes any undefined
/// elements.
bool containsUndefElement() const;