[llvm-exegesis] Fix ifdefs in X86/Target.cpp
authorPavel Kosov <kpdev42@gmail.com>
Mon, 24 Apr 2023 19:31:40 +0000 (22:31 +0300)
committerPavel Kosov <kpdev42@gmail.com>
Mon, 24 Apr 2023 19:31:40 +0000 (22:31 +0300)
commit7ead39aca61eb9df92d8920c771912c0bad3e469
treed02c6861cd45c87c7d6fe12ddb4de0c4ea8aea61
parente38cdc5933b026cd25cf70c06f690a431c608d63
[llvm-exegesis] Fix ifdefs in X86/Target.cpp

As discussed in https://reviews.llvm.org/D96498, the correct macro
to check together with _MSC_VER is _M_X64. Testing for _MSC_VER with
__x86_64__ made tests fail on Windows in https://reviews.llvm.org/D146301.

Additionally, this commit replaces a few calls to llvm_unreachable() with
report_fatal_error() because it is actually reached even on Linux/i686,
causing obscure segfaults when expanded to __builtin_unreachable().

~~

Huawei RRI, OS Lab

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D147926
llvm/test/tools/llvm-exegesis/X86/latency/dummy-counters.test
llvm/tools/llvm-exegesis/lib/X86/Target.cpp