Author: Qiu Chaofan Date: 2021-10-11T10:44:08+08:00 New Revision: 2fc0d439a4b6dd231f5b40e67e5c4c5863f5ae45
URL: https://github.com/llvm/llvm-project/commit/2fc0d439a4b6dd231f5b40e67e5c4c5863f5ae45 DIFF: https://github.com/llvm/llvm-project/commit/2fc0d439a4b6dd231f5b40e67e5c4c5863f5ae45.diff LOG: [Clang] [PowerPC] Fix header include typo in smmintrin.h The SSE4 header (smmintrin.h) should include SSSE3 (tmmintrin.h) instead of SSE2 (emmintrin.h). Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D111482 Added: Modified: clang/lib/Headers/ppc_wrappers/smmintrin.h clang/test/CodeGen/ppc-smmintrin.c Removed: ################################################################################ diff --git a/clang/lib/Headers/ppc_wrappers/smmintrin.h b/clang/lib/Headers/ppc_wrappers/smmintrin.h index 64f0c761994d5..f41264b27584d 100644 --- a/clang/lib/Headers/ppc_wrappers/smmintrin.h +++ b/clang/lib/Headers/ppc_wrappers/smmintrin.h @@ -32,7 +32,7 @@ #if defined(__linux__) && defined(__ppc64__) #include <altivec.h> -#include <emmintrin.h> +#include <tmmintrin.h> extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) diff --git a/clang/test/CodeGen/ppc-smmintrin.c b/clang/test/CodeGen/ppc-smmintrin.c index 644037f03afb9..6b88b7ac09310 100644 --- a/clang/test/CodeGen/ppc-smmintrin.c +++ b/clang/test/CodeGen/ppc-smmintrin.c @@ -145,3 +145,14 @@ test_insert() { // CHECK: %[[R0:[0-9a-zA-Z_.]+]] = and i32 %{{[0-9a-zA-Z_.]+}}, 1 // CHECK: %{{[0-9a-zA-Z_.]+}} = insertelement <2 x i64> %{{[0-9a-zA-Z_.]+}}, i64 %{{[0-9a-zA-Z_.]+}}, i32 %[[R0:[0-9a-zA-Z_.]+]] // CHECK: ret <2 x i64> %{{[0-9a-zA-Z_.]+}} + +// To test smmintrin.h includes tmmintrin.h + +void __attribute__((noinline)) +test_abs_ssse3() { + _mm_abs_epi16(m1); +} + +// CHECK-LABEL: @test_abs_ssse3 + +// CHECK: define available_externally <2 x i64> @_mm_abs_epi16(<2 x i64> {{[0-9a-zA-Z_%.]+}}) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits