summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/avx-builtins.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-10-14 05:40:21 +0000
committerEric Christopher <echristo@gmail.com>2015-10-14 05:40:21 +0000
commitcd875efa7860864d19a7efc848394a16fbd9d73a (patch)
treefd1891611cc659ad63f7ddef449d83ca9d62f6a2 /clang/test/CodeGen/avx-builtins.c
parent442c9b6b419bea74e9b1dfc7b50ca10645dc9750 (diff)
downloadbcm5719-llvm-cd875efa7860864d19a7efc848394a16fbd9d73a.tar.gz
bcm5719-llvm-cd875efa7860864d19a7efc848394a16fbd9d73a.zip
Canonicalize some of the x86 builtin tests and either remove or comment
about optimization options. llvm-svn: 250271
Diffstat (limited to 'clang/test/CodeGen/avx-builtins.c')
-rw-r--r--clang/test/CodeGen/avx-builtins.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/test/CodeGen/avx-builtins.c b/clang/test/CodeGen/avx-builtins.c
index 077c36ef789..ee0f58fc716 100644
--- a/clang/test/CodeGen/avx-builtins.c
+++ b/clang/test/CodeGen/avx-builtins.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s
// Don't include mm_malloc.h, it's system specific.
#define __MM_MALLOC_H
@@ -96,19 +96,22 @@ int test_mm_cmpistrz(__m128i A, __m128i B) {
int test_extract_epi32(__m256i __a) {
// CHECK-LABEL: @test_extract_epi32
- // CHECK: extractelement <8 x i32> %{{.*}}, i32 0
+ // CHECK: [[SHIFT1:%[^ ]+]] = and i32 %{{.*}}, 7
+ // CHECK: extractelement <8 x i32> %{{.*}}, i32 [[SHIFT1]]
return _mm256_extract_epi32(__a, 8);
}
int test_extract_epi16(__m256i __a) {
// CHECK-LABEL: @test_extract_epi16
- // CHECK: extractelement <16 x i16> %{{.*}}, i32 0
+ // CHECK: [[SHIFT2:%[^ ]+]] = and i32 %{{.*}}, 15
+ // CHECK: extractelement <16 x i16> %{{.*}}, i32 [[SHIFT2]]
return _mm256_extract_epi16(__a, 16);
}
int test_extract_epi8(__m256i __a) {
// CHECK-LABEL: @test_extract_epi8
- // CHECK: extractelement <32 x i8> %{{.*}}, i32 0
+ // CHECK: [[SHIFT3:%[^ ]+]] = and i32 %{{.*}}, 31
+ // CHECK: extractelement <32 x i8> %{{.*}}, i32 [[SHIFT3]]
return _mm256_extract_epi8(__a, 32);
}
OpenPOWER on IntegriCloud