Pete Cooper via llvm-dev
2016-Jul-21 21:41 UTC
[llvm-dev] FreeBSD user willing to try fix a unit test?
Hi all In unittests/ADT/APIntTest.cpp I came across this test: // XFAIL this test on FreeBSD where the system gcc-4.2.1 seems to miscompile it. #if defined(__llvm__) || !defined(__FreeBSD__) TEST(APIntTest, i33_Count) { APInt i33minus2(33, static_cast<uint64_t>(-2), true); EXPECT_EQ(0u, i33minus2.countLeadingZeros()); EXPECT_EQ(32u, i33minus2.countLeadingOnes()); EXPECT_EQ(33u, i33minus2.getActiveBits()); EXPECT_EQ(1u, i33minus2.countTrailingZeros()); EXPECT_EQ(32u, i33minus2.countPopulation()); EXPECT_EQ(-2, i33minus2.getSExtValue()); EXPECT_EQ(((uint64_t)-2)&((1ull<<33) -1), i33minus2.getZExtValue()); } #endif Given that we are long past gcc 4.2, any chance someone with FreeBSD could check this now works and remove the XFAIL? Thanks very much Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160721/0647d8af/attachment.html>
Dimitry Andric via llvm-dev
2016-Jul-23 18:08 UTC
[llvm-dev] FreeBSD user willing to try fix a unit test?
Hi Pete, I tested this on recent FreeBSD 11.0, and indeed the test is now succeeding just fine, as the system compiler is now clang 3.8.0. Let's just drop the || !defined(__FreeBSD__) part. Btw, any idea what the defined(__llvm__) part is supposed to accomplish? -Dimitry> On 21 Jul 2016, at 23:41, Pete Cooper via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi all > > In unittests/ADT/APIntTest.cpp I came across this test: > > // XFAIL this test on FreeBSD where the system gcc-4.2.1 seems to miscompile it. > #if defined(__llvm__) || !defined(__FreeBSD__) > > TEST(APIntTest, i33_Count) { > APInt i33minus2(33, static_cast<uint64_t>(-2), true); > EXPECT_EQ(0u, i33minus2.countLeadingZeros()); > EXPECT_EQ(32u, i33minus2.countLeadingOnes()); > EXPECT_EQ(33u, i33minus2.getActiveBits()); > EXPECT_EQ(1u, i33minus2.countTrailingZeros()); > EXPECT_EQ(32u, i33minus2.countPopulation()); > EXPECT_EQ(-2, i33minus2.getSExtValue()); > EXPECT_EQ(((uint64_t)-2)&((1ull<<33) -1), i33minus2.getZExtValue()); > } > > #endif > > Given that we are long past gcc 4.2, any chance someone with FreeBSD could check this now works and remove the XFAIL? > > Thanks very much > Pete > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160723/c645990a/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: Message signed with OpenPGP using GPGMail URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160723/c645990a/attachment.sig>
Tim Northover via llvm-dev
2016-Jul-23 23:01 UTC
[llvm-dev] FreeBSD user willing to try fix a unit test?
On 23 July 2016 at 11:08, Dimitry Andric via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Let's just drop the || !defined(__FreeBSD__) part. Btw, any idea what the > defined(__llvm__) part is supposed to accomplish?It was added in the same commit, and given the comment above I think it's probably so the test still runs on FreeBSD if Clang is self-hosting. Tim.
Reasonably Related Threads
- FreeBSD user willing to try fix a unit test?
- [LLVMdev] ARM/AArch64 FreeBSD patches for 3.5.1 (was Re: Proposed patches for Clang 3.5.1)
- [Release-testers] [7.0.0 Release] rc1 has been tagged
- [Openmp-dev] [cfe-dev] [Release-testers] [6.0.0 Release] Release Candidate 2 tagged
- [LLVMdev] Clang/llvm performance tests on FreeBSD 10.0-CURRENT