This is an archive of the discontinued LLVM Phabricator instance.

Fix exegesis build on aarch64-windows-msvc host
ClosedPublic

Authored by maxim-kuvyrkov on Feb 11 2021, 6:14 AM.

Details

Summary

Include x86 intrinsics only when compiling for x86_64
or i386. _MSC_VER no longer implies x86.

Diff Detail

Event Timeline

maxim-kuvyrkov created this revision.Feb 11 2021, 6:14 AM
maxim-kuvyrkov requested review of this revision.Feb 11 2021, 6:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2021, 6:14 AM

@tstellar

Hi Tom,

OK to backport to release/12.x branch once this is merged to master? This will unblock RC builds for aarch64-windows-msvc (Windows on Arm).

@tstellar

Hi Tom,

OK to backport to release/12.x branch once this is merged to master? This will unblock RC builds for aarch64-windows-msvc (Windows on Arm).

Can you file a bug for this?

dmajor added a subscriber: dmajor.Feb 11 2021, 7:02 AM
dmajor added inline comments.
llvm/tools/llvm-exegesis/lib/X86/Target.cpp
29

Is it supported to compile this with real MSVC? I don't think this would evaluate to true there. I believe the MSVC-ism for this is defined(_M_IX86) || defined(_M_X64)

gchatelet added inline comments.
llvm/tools/llvm-exegesis/lib/X86/Target.cpp
29

I believe the MSVC-ism for this is defined(_M_IX86) || defined(_M_X64)

Yes indeed
https://sourceforge.net/p/predef/wiki/Architectures/

gchatelet edited reviewers, added: gchatelet; removed: courbet.Feb 11 2021, 7:43 AM

Updated patch to use canonical MSVC syntax

maxim-kuvyrkov marked 2 inline comments as done.Feb 11 2021, 10:09 AM

Thanks for the reviews

gchatelet accepted this revision.Feb 11 2021, 12:22 PM
This revision is now accepted and ready to land.Feb 11 2021, 12:22 PM
This revision was landed with ongoing or failed builds.Feb 12 2021, 1:51 AM
This revision was automatically updated to reflect the committed changes.

@tstellar
OK to cherry-pick to release/12.x after a couple of days?