[clang] 2c176f2 - [X86][AVX] Add i386 test coverage to avx intrinsic tests
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 20 07:12:24 PDT 2022
Author: Simon Pilgrim
Date: 2022-04-20T15:12:11+01:00
New Revision: 2c176f2f1ed7b4dcad3d229b9a61e77e17370baf
URL: https://github.com/llvm/llvm-project/commit/2c176f2f1ed7b4dcad3d229b9a61e77e17370baf
DIFF: https://github.com/llvm/llvm-project/commit/2c176f2f1ed7b4dcad3d229b9a61e77e17370baf.diff
LOG: [X86][AVX] Add i386 test coverage to avx intrinsic tests
Added:
Modified:
clang/test/CodeGen/X86/avx-builtins-constrained-cmp.c
clang/test/CodeGen/X86/avx-builtins.c
clang/test/CodeGen/X86/avx-cmp-builtins.c
clang/test/CodeGen/X86/avx-shuffle-builtins.c
Removed:
################################################################################
diff --git a/clang/test/CodeGen/X86/avx-builtins-constrained-cmp.c b/clang/test/CodeGen/X86/avx-builtins-constrained-cmp.c
index a23f5586816f9..570c9c942cca6 100644
--- a/clang/test/CodeGen/X86/avx-builtins-constrained-cmp.c
+++ b/clang/test/CodeGen/X86/avx-builtins-constrained-cmp.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -ffp-exception-behavior=maytrap -o - -Wall -Werror | FileCheck %s
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=i386-apple-darwin -target-feature +avx -emit-llvm -ffp-exception-behavior=maytrap -o - -Wall -Werror | FileCheck %s
// Test that the constrained intrinsics are picking up the exception
// metadata from the AST instead of the global default from the command line.
diff --git a/clang/test/CodeGen/X86/avx-builtins.c b/clang/test/CodeGen/X86/avx-builtins.c
index 65b783911bd98..03ba2028deb43 100644
--- a/clang/test/CodeGen/X86/avx-builtins.c
+++ b/clang/test/CodeGen/X86/avx-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -flax-vector-conversions=none -fms-extensions -fms-compatibility -ffreestanding %s -triple=x86_64-windows-msvc -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s
+// RUN: %clang_cc1 -no-opaque-pointers -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK,X64
+// RUN: %clang_cc1 -no-opaque-pointers -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK,X64
+// RUN: %clang_cc1 -no-opaque-pointers -flax-vector-conversions=none -ffreestanding %s -triple=i386-apple-darwin -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK,X86
+// RUN: %clang_cc1 -no-opaque-pointers -flax-vector-conversions=none -ffreestanding %s -triple=i386-apple-darwin -target-feature +avx -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK,X86
+// RUN: %clang_cc1 -no-opaque-pointers -flax-vector-conversions=none -fms-extensions -fms-compatibility -ffreestanding %s -triple=x86_64-windows-msvc -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK,X64
#include <immintrin.h>
@@ -1081,8 +1083,8 @@ int test_mm256_extract_epi32(__m256i A) {
#if __x86_64__
long long test_mm256_extract_epi64(__m256i A) {
- // CHECK-LABEL: test_mm256_extract_epi64
- // CHECK: extractelement <4 x i64> %{{.*}}, {{i32|i64}} 3
+ // X64-LABEL: test_mm256_extract_epi64
+ // X64: extractelement <4 x i64> %{{.*}}, {{i32|i64}} 3
return _mm256_extract_epi64(A, 3);
}
#endif
@@ -1161,8 +1163,8 @@ __m256i test_mm256_insert_epi32(__m256i x, int b) {
#if __x86_64__
__m256i test_mm256_insert_epi64(__m256i x, long long b) {
- // CHECK-LABEL: test_mm256_insert_epi64
- // CHECK: insertelement <4 x i64> %{{.*}}, i64 %{{.*}}, {{i32|i64}} 2
+ // X64-LABEL: test_mm256_insert_epi64
+ // X64: insertelement <4 x i64> %{{.*}}, i64 %{{.*}}, {{i32|i64}} 2
return _mm256_insert_epi64(x, b, 2);
}
#endif
@@ -2056,20 +2058,29 @@ int test_mm256_testz_si256(__m256i A, __m256i B) {
}
__m256 test_mm256_undefined_ps(void) {
- // CHECK-LABEL: test_mm256_undefined_ps
- // CHECK: ret <8 x float> zeroinitializer
+ // X64-LABEL: test_mm256_undefined_ps
+ // X64: ret <8 x float> zeroinitializer
+ //
+ // X86-LABEL: test_mm256_undefined_ps
+ // X86: store <8 x float> zeroinitializer
return _mm256_undefined_ps();
}
__m256d test_mm256_undefined_pd(void) {
- // CHECK-LABEL: test_mm256_undefined_pd
- // CHECK: ret <4 x double> zeroinitializer
+ // X64-LABEL: test_mm256_undefined_pd
+ // X64: ret <4 x double> zeroinitializer
+ //
+ // X86-LABEL: test_mm256_undefined_pd
+ // X86: store <4 x double> zeroinitializer
return _mm256_undefined_pd();
}
__m256i test_mm256_undefined_si256(void) {
- // CHECK-LABEL: test_mm256_undefined_si256
- // CHECK: ret <4 x i64> zeroinitializer
+ // X64-LABEL: test_mm256_undefined_si256
+ // X64: ret <4 x i64> zeroinitializer
+ //
+ // X86-LABEL: test_mm256_undefined_si256
+ // X86: store <4 x i64> zeroinitializer
return _mm256_undefined_si256();
}
diff --git a/clang/test/CodeGen/X86/avx-cmp-builtins.c b/clang/test/CodeGen/X86/avx-cmp-builtins.c
index adb8a86112cc2..c4e3c7ccd5498 100644
--- a/clang/test/CodeGen/X86/avx-cmp-builtins.c
+++ b/clang/test/CodeGen/X86/avx-cmp-builtins.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -O3 -triple=i386-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s
// FIXME: The shufflevector instructions in test_cmpgt_sd are relying on O3 here.
diff --git a/clang/test/CodeGen/X86/avx-shuffle-builtins.c b/clang/test/CodeGen/X86/avx-shuffle-builtins.c
index 73898c95fe486..9917598f6eb15 100644
--- a/clang/test/CodeGen/X86/avx-shuffle-builtins.c
+++ b/clang/test/CodeGen/X86/avx-shuffle-builtins.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -ffreestanding %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding %s -O3 -triple=i386-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s
// FIXME: This is testing optimized generation of shuffle instructions and should be fixed.
More information about the cfe-commits
mailing list