Page MenuHomePhabricator

[PowerPC] [Clang] Enable Intel intrinsics support on FreeBSD
ClosedPublic

Authored by adalava on Nov 8 2021, 6:46 PM.

Details

Summary

This enables Intel intrinsics support on FreeBSD.

Thanks to @pkubaj who noticed this feature was missing

Diff Detail

Event Timeline

adalava created this revision.Nov 8 2021, 6:46 PM
adalava requested review of this revision.Nov 8 2021, 6:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2021, 6:46 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
adalava updated this revision to Diff 385849.Nov 9 2021, 9:30 AM
adalava retitled this revision from [PowerPC] [Clang] Add MMX intrinsics support to FreeBSD to [PowerPC] [Clang] Enable Intel intrinsics support on FreeBSD.
adalava edited the summary of this revision. (Show Details)

add more ppc_wrappers

adalava updated this revision to Diff 385985.Nov 9 2021, 2:47 PM

fix style

jsji accepted this revision as: jsji.Nov 11 2021, 6:42 AM

LGTM. Thanks for enabling this for FreeBSD.

This revision is now accepted and ready to land.Nov 11 2021, 6:42 AM

LGTM. Thanks for enabling this for FreeBSD.

Thanks for reviewing it.

If you and others with merge permissions think it's ready, please merge it (I don't have the permissions)

Thanks!!

jsji added inline comments.Nov 22 2021, 12:40 PM
clang/test/CodeGen/ppc-mm-malloc-le.c
10 ↗(On Diff #385985)

This will cause problem when building on Linux.

In file included from /home/jji/llvm-git/llvm-project/clang/test/CodeGen/ppc-mm-malloc-le.c:12:
In file included from /home/jji/llvm-git/build/lib/clang/14.0.0/include/ppc_wrappers/mm_malloc.h:15:
/usr/include/stdlib.h:25:10: fatal error: 'bits/libc-header-start.h' file not found
#include <bits/libc-header-start.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/jji/llvm-git/build/bin/FileCheck /home/jji/llvm-git/llvm-project/clang/test/CodeGen/ppc-mm-malloc-le.c
This revision was automatically updated to reflect the committed changes.
kamaub added a subscriber: kamaub.Nov 23 2021, 7:04 AM

Test case clang/test/CodeGen/ppc-mm-malloc.c fails on powerpc BE buildbots with this changeset
https://lab.llvm.org/buildbot/#/builders/93/builds/6031
https://lab.llvm.org/buildbot/#/builders/100/builds/10836
https://lab.llvm.org/buildbot/#/builders/52/builds/12719

******************* TEST 'Clang :: CodeGen/ppc-mm-malloc.c' FAILED ********************
Script:
--
: 'RUN: at line 9';   /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/bin/clang -target powerpc64-unknown-linux-gnu -S -emit-llvm /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt | /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/bin/FileCheck /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c
: 'RUN: at line 10';   /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/bin/clang -target powerpc64-unknown-freebsd13.0 -S -emit-llvm /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt | /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/bin/FileCheck /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c
--
Exit Code: 2
Command Output (stderr):
--
In file included from /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c:12:
In file included from /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/lib/clang/14.0.0/include/ppc_wrappers/mm_malloc.h:15:
In file included from /usr/include/stdlib.h:25:
In file included from /usr/include/bits/libc-header-start.h:33:
In file included from /usr/include/features.h:434:
/usr/include/gnu/stubs.h:14:11: fatal error: 'gnu/stubs-64-v2.h' file not found
# include <gnu/stubs-64-v2.h>
          ^~~~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/bin/FileCheck /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c
--
********************
jsji added a comment.Nov 23 2021, 7:10 AM

Test case clang/test/CodeGen/ppc-mm-malloc.c fails on powerpc BE buildbots with this changeset
https://lab.llvm.org/buildbot/#/builders/93/builds/6031
https://lab.llvm.org/buildbot/#/builders/100/builds/10836
https://lab.llvm.org/buildbot/#/builders/52/builds/12719

******************* TEST 'Clang :: CodeGen/ppc-mm-malloc.c' FAILED ********************
Script:
--
: 'RUN: at line 9';   /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/bin/clang -target powerpc64-unknown-linux-gnu -S -emit-llvm /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt | /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/bin/FileCheck /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c
: 'RUN: at line 10';   /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/bin/clang -target powerpc64-unknown-freebsd13.0 -S -emit-llvm /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt | /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/bin/FileCheck /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c
--
Exit Code: 2
Command Output (stderr):
--
In file included from /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c:12:
In file included from /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/lib/clang/14.0.0/include/ppc_wrappers/mm_malloc.h:15:
In file included from /usr/include/stdlib.h:25:
In file included from /usr/include/bits/libc-header-start.h:33:
In file included from /usr/include/features.h:434:
/usr/include/gnu/stubs.h:14:11: fatal error: 'gnu/stubs-64-v2.h' file not found
# include <gnu/stubs-64-v2.h>
          ^~~~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/stage1/bin/FileCheck /home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/test/CodeGen/ppc-mm-malloc.c
--
********************

Thanks @kamaub ! Removed the offending line in b0784d1d14246e5d662172e9af6e85776b81fdf0.