[clang] [llvm] [mlir] [openmp] [OMPIRBuilder] Fix atomic compare `==` on `x86-64` long double (PR #226567)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 19 12:51:51 PST 2026
================
@@ -4380,7 +4380,7 @@ TEST_F(OpenMPIRBuilderTest, OMPAtomicCompareCapture) {
SelectInst *Sel1 = dyn_cast<SelectInst>(ExtVal2->getNextNode());
EXPECT_NE(Sel1, nullptr);
EXPECT_EQ(Sel1->getCondition(), ExtVal2);
- EXPECT_EQ(Sel1->getTrueValue(), Expr);
+ EXPECT_EQ(Sel1->getTrueValue(), D);
----------------
MattPD wrote:
In `OMPAtomicCompareCapture`, lines 4311 and 4312 initialize both `Expr` and `D` to `ConstantInt::get(Type::getInt32Ty(Ctx), 1U)`, uniqued by LLVM to one `ConstantInt`, so `EXPECT_EQ(Sel1->getTrueValue(), D)` also accepts `Expr`.
Could `D` use a distinct constant such as `2U` so this unit test distinguishes `D` from `Expr`?
https://github.com/llvm/llvm-project/pull/226567
More information about the cfe-commits
mailing list