diff options
author | Peixin-Qiao <qiaopeixin@huawei.com> | 2022-01-14 09:47:11 +0800 |
---|---|---|
committer | Peixin-Qiao <qiaopeixin@huawei.com> | 2022-01-14 09:47:11 +0800 |
commit | f52805539b294773aec872e9055aa460eca1a933 (patch) | |
tree | 154fb8aba819f0b8c0aa51a4097ffbd4193b6024 /llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp | |
parent | 83338d5032424741accb1e851408021b47b84c08 (diff) | |
download | llvm-f52805539b294773aec872e9055aa460eca1a933.zip llvm-f52805539b294773aec872e9055aa460eca1a933.tar.gz llvm-f52805539b294773aec872e9055aa460eca1a933.tar.bz2 |
[OMPIRBuilder] Fix store inst alignment for ordered depend directive
OpenMP runtime requires depend vec with i64 type and the alignment of
store instruction should be set as 8.
Reviewed By: kiranchandramohan, shraiysh
Differential Revision: https://reviews.llvm.org/D116300
Diffstat (limited to 'llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp')
-rw-r--r-- | llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp index f200ef5..7e3613b 100644 --- a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp +++ b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp @@ -2267,6 +2267,7 @@ TEST_F(OpenMPIRBuilderTest, OrderedDirectiveDependSource) { ASSERT_NE(StoreValue, nullptr); EXPECT_EQ(StoreValue->getValueOperand(), StoreValues[Iter]); EXPECT_EQ(StoreValue->getPointerOperand(), DependAddrGEPIter); + EXPECT_EQ(StoreValue->getAlignment(), 8); IterInst = dyn_cast<Instruction>(StoreValue); } @@ -2351,6 +2352,7 @@ TEST_F(OpenMPIRBuilderTest, OrderedDirectiveDependSink) { ASSERT_NE(StoreValue, nullptr); EXPECT_EQ(StoreValue->getValueOperand(), StoreValues[Iter]); EXPECT_EQ(StoreValue->getPointerOperand(), DependAddrGEPIter); + EXPECT_EQ(StoreValue->getAlignment(), 8); IterInst = dyn_cast<Instruction>(StoreValue); } |