This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] [Clang] Port SSE intrinsics to PowerPC
ClosedPublic

Authored by wuzish on May 19 2019, 11:03 PM.

Details

Summary

Port xmmintrin.h which include Intel SSE intrinsics implementation to PowerPC platform (using Altivec).

The new headers containing those implemenations are located into a directory named ppc_wrappers which has higher priority when the platform is PowerPC on Linux. They are mainly developed by Steven Munroe, with contributions from Paul Clarke, Bill Schmidt, Jinsong Ji and Zixuan Wu.

Diff Detail

Repository
rL LLVM

Event Timeline

qiucf created this revision.May 19 2019, 11:03 PM

Add more subscribers, reviews and comments are welcome and appreciated. Thanks.

jsji accepted this revision.May 28 2019, 7:33 PM

LGTM. Thanks for porting.

This revision is now accepted and ready to land.May 28 2019, 7:33 PM

Thanks. I will commit for @qiucf

This revision was automatically updated to reflect the committed changes.
jsji reopened this revision.May 29 2019, 6:43 AM

This has been reverted in https://reviews.llvm.org/rL361930 .

This revision is now accepted and ready to land.May 29 2019, 6:43 AM
jsji requested changes to this revision.May 29 2019, 6:44 AM
******************** TEST 'Clang :: CodeGen/ppc-mm-malloc.c' FAILED ********************
Script:
--
: 'RUN: at line 9';   /home/buildslave/buildslave1a/clang-with-lto-ubuntu/build/stage1/bin/clang -S -emit-llvm /home/buildslave/buildslave1a/clang-with-lto-ubuntu/llvm.src/tools/clang/test/CodeGen/ppc-mm-malloc.c -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt | /home/buildslave/buildslave1a/clang-with-lto-ubuntu/build/stage1/bin/FileCheck /home/buildslave/buildslave1a/clang-with-lto-ubuntu/llvm.src/tools/clang/test/CodeGen/ppc-mm-malloc.c
--
Exit Code: 1

Command Output (stderr):
--
/home/buildslave/buildslave1a/clang-with-lto-ubuntu/llvm.src/tools/clang/test/CodeGen/ppc-mm-malloc.c:21:11: error: CHECK: expected string not found in input
// CHECK: define internal i8* @_mm_malloc(i64 [[REG1:[0-9a-zA-Z_%.]+]], i64 [[REG2:[0-9a-zA-Z_%.]+]])
          ^
<stdin>:7:38: note: scanning from here
define dso_local void @test_mm_malloc() #0 {
                                     ^
<stdin>:18:1: note: possible intended match here
define internal noalias i8* @_mm_malloc(i64 %__size, i64 %__align) #1 {
^

--

********************
Testing: 0 .. 10..
FAIL: Clang :: Headers/ppc-sse-intrinsics.c (9324 of 48401)
******************** TEST 'Clang :: Headers/ppc-sse-intrinsics.c' FAILED ********************
Script:
--
: 'RUN: at line 10';   /home/buildslave/buildslave1a/clang-with-lto-ubuntu/build/stage1/bin/clang -S -emit-llvm -DNO_WARN_X86_INTRINSICS /home/buildslave/buildslave1a/clang-with-lto-ubuntu/llvm.src/tools/clang/test/Headers/ppc-sse-intrinsics.c -mcpu=pwr7 -Xclang -verify
: 'RUN: at line 11';   /home/buildslave/buildslave1a/clang-with-lto-ubuntu/build/stage1/bin/clang -S -emit-llvm -DNO_WARN_X86_INTRINSICS /home/buildslave/buildslave1a/clang-with-lto-ubuntu/llvm.src/tools/clang/test/Headers/ppc-sse-intrinsics.c -mcpu=pwr7 -Xclang -verify -x c++
: 'RUN: at line 14';   not /home/buildslave/buildslave1a/clang-with-lto-ubuntu/build/stage1/bin/clang -S -emit-llvm /home/buildslave/buildslave1a/clang-with-lto-ubuntu/llvm.src/tools/clang/test/Headers/ppc-sse-intrinsics.c -mcpu=pwr7 -o /dev/null 2>&1 | /home/buildslave/buildslave1a/clang-with-lto-ubuntu/build/stage1/bin/FileCheck /home/buildslave/buildslave1a/clang-with-lto-ubuntu/llvm.src/tools/clang/test/Headers/ppc-sse-intrinsics.c -check-prefix=SSE-ERROR
--
Exit Code: 1

Command Output (stderr):
--
clang-9: warning: argument unused during compilation: '-mcpu=pwr7' [-Wunused-command-line-argument]
clang-9: warning: argument unused during compilation: '-mcpu=pwr7' [-Wunused-command-line-argument]
/home/buildslave/buildslave1a/clang-with-lto-ubuntu/llvm.src/tools/clang/test/Headers/ppc-sse-intrinsics.c:20:15: error: SSE-ERROR: expected string not found in input
// SSE-ERROR: xmmintrin.h:{{[0-9]+}}:{{[0-9]+}}: error: "Please read comment above. Use -DNO_WARN_X86_INTRINSICS to disable this error."
              ^
<stdin>:1:1: note: scanning from here
clang-9: warning: argument unused during compilation: '-mcpu=pwr7' [-Wunused-command-line-argument]
^
This revision now requires changes to proceed.May 29 2019, 6:44 AM
wuzish commandeered this revision.May 30 2019, 12:26 AM
wuzish updated this revision to Diff 202125.
wuzish added a reviewer: qiucf.

add test/CodeGen/ppc-mm-malloc-le.c, and use UNSUPPORTED: test flag to disable unsupport test of mm-malloc.

jsji accepted this revision.May 30 2019, 8:42 PM

LGTM. Thanks for fixing.

This revision is now accepted and ready to land.May 30 2019, 8:42 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 30 2019, 9:40 PM
cfe/trunk/test/CodeGen/ppc-xmmintrin.c