================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits