This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Support x86 compatible intrinsics on AIX
ClosedPublic

Authored by qiucf on Jul 10 2022, 10:17 PM.

Details

Summary

These headers used to be guarded only on PowerPC64 Linux or FreeBSD.

Diff Detail

Event Timeline

qiucf created this revision.Jul 10 2022, 10:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2022, 10:17 PM
qiucf requested review of this revision.Jul 10 2022, 10:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2022, 10:17 PM
shchenz added inline comments.Jul 12 2022, 7:49 AM
clang/lib/Driver/ToolChains/AIX.cpp
226

clang::driver::options::OPT_nostdinc is not same with options::OPT_nostdinc in line 219?

clang/test/CodeGen/PowerPC/ppc-emmintrin.c
631

Maybe worth investigating here why loading a double on AIX64 is not aligned to 8. This should be separated from this patch

qiucf updated this revision to Diff 444175.Jul 13 2022, 12:40 AM
qiucf marked an inline comment as done.
qiucf updated this revision to Diff 444182.Jul 13 2022, 1:17 AM

Merge conditions.

qiucf added inline comments.Jul 13 2022, 1:23 AM
clang/test/CodeGen/PowerPC/ppc-emmintrin.c
631

It's from D79719

shchenz added inline comments.Jul 13 2022, 2:14 AM
clang/lib/Driver/ToolChains/AIX.cpp
232

Can we use path::parent_path(P) directly in addSystemInclude()? remove_filename() sounds like ppc_wrappers is a file.

qiucf added inline comments.Jul 13 2022, 7:50 PM
clang/lib/Driver/ToolChains/AIX.cpp
232

It just wraps parent_path, and parent_path only accepts (and returns) StringRef.

shchenz added inline comments.Jul 15 2022, 12:04 AM
clang/lib/Driver/ToolChains/AIX.cpp
232
addSystemInclude(DriverArgs, CC1Args, path::parent_path(P.str()));

Above change works for me? I think it should be functionality right?

qiucf updated this revision to Diff 446335.Jul 20 2022, 7:26 PM
qiucf marked an inline comment as done.
shchenz accepted this revision as: shchenz.Jul 20 2022, 7:49 PM

LGTM. Thanks for the enablement.

This revision is now accepted and ready to land.Jul 20 2022, 7:49 PM
This revision was landed with ongoing or failed builds.Jul 21 2022, 1:35 AM
This revision was automatically updated to reflect the committed changes.