[llvm] ffd3e16 - [IR] add unit test for Constant::isElementWiseEqual() for undef corner case; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 17 05:26:08 PST 2020
Author: Sanjay Patel
Date: 2020-01-17T08:26:00-05:00
New Revision: ffd3e1607db232c362fa5ad40e5cf2afa400b304
URL: https://github.com/llvm/llvm-project/commit/ffd3e1607db232c362fa5ad40e5cf2afa400b304
DIFF: https://github.com/llvm/llvm-project/commit/ffd3e1607db232c362fa5ad40e5cf2afa400b304.diff
LOG: [IR] add unit test for Constant::isElementWiseEqual() for undef corner case; NFC
Added:
Modified:
llvm/unittests/IR/ConstantsTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/IR/ConstantsTest.cpp b/llvm/unittests/IR/ConstantsTest.cpp
index 305555fb741f..7154f35ccbd4 100644
--- a/llvm/unittests/IR/ConstantsTest.cpp
+++ b/llvm/unittests/IR/ConstantsTest.cpp
@@ -616,9 +616,11 @@ TEST(ConstantsTest, isElementWiseEqual) {
Constant *CF1211 = ConstantVector::get({CF1, CF2, CF1, CF1});
Constant *CF12U1 = ConstantVector::get({CF1, CF2, CFU, CF1});
Constant *CF12U2 = ConstantVector::get({CF1, CF2, CFU, CF2});
+ Constant *CFUU1U = ConstantVector::get({CFU, CFU, CF1, CFU});
EXPECT_TRUE(CF1211->isElementWiseEqual(CF12U1));
EXPECT_TRUE(CF12U1->isElementWiseEqual(CF1211));
+ EXPECT_FALSE(CFUU1U->isElementWiseEqual(CF12U1)); // FIXME - all lanes compare as undef
EXPECT_FALSE(CF12U2->isElementWiseEqual(CF12U1));
EXPECT_FALSE(CF12U1->isElementWiseEqual(CF12U2));
More information about the llvm-commits
mailing list