This is an archive of the discontinued LLVM Phabricator instance.

[Support] Workaround compiler bug in MSVC
AcceptedPublic

Authored by tstellar on Jul 14 2022, 5:38 PM.

Details

Summary

https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317

This was causing unittest failures on Windows for the GitHub actions
based CI we use in the release branches.

Failed Tests (2):

LLVM-Unit :: Support/./SupportTests.exe/FormatVariadicTest.BigTest
LLVM-Unit :: Support/./SupportTests.exe/NativeFormatTest.BoundaryTests

Diff Detail

Event Timeline

tstellar created this revision.Jul 14 2022, 5:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2022, 5:38 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
tstellar requested review of this revision.Jul 14 2022, 5:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2022, 5:38 PM
RKSimon accepted this revision.Jul 15 2022, 1:39 AM
RKSimon edited the summary of this revision. (Show Details)

LGTM

llvm/lib/Support/NativeFormatting.cpp
265

specifiy that its a VS2022 bug?

This revision is now accepted and ready to land.Jul 15 2022, 1:41 AM
This revision was landed with ongoing or failed builds.Jul 26 2022, 12:55 PM
This revision was automatically updated to reflect the committed changes.

This broke the Windows mlir bot: https://lab.llvm.org/buildbot/#/builders/13/builds/23841

Incidentally, if this bug is only in VS2022, why not test for that instead of testing for any MSVC version?

This broke the Windows mlir bot: https://lab.llvm.org/buildbot/#/builders/13/builds/23841

Incidentally, if this bug is only in VS2022, why not test for that instead of testing for any MSVC version?

Which macro can I use for that?

Incidentally, if this bug is only in VS2022, why not test for that instead of testing for any MSVC version?

Which macro can I use for that?

The value of _MSC_VER corresponds to the Visual Studio version: https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170

tstellar reopened this revision.Jul 26 2022, 5:03 PM
This revision is now accepted and ready to land.Jul 26 2022, 5:03 PM
tstellar updated this revision to Diff 447885.Jul 26 2022, 5:03 PM
  • Add a specific check for the MSVC version and fix a warning.
tstellar updated this revision to Diff 447887.Jul 26 2022, 5:04 PM

Fix typo.