File tree Expand file tree Collapse file tree 3 files changed +32
-17
lines changed Expand file tree Collapse file tree 3 files changed +32
-17
lines changed Original file line number Diff line number Diff line change 1+ // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4.1 -emit-llvm -o - -Wall -Werror | FileCheck %s
2+ // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4.1 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s
3+ // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=i386-apple-darwin -target-feature +sse4.1 -emit-llvm -o - -Wall -Werror | FileCheck %s
4+ // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=i386-apple-darwin -target-feature +sse4.1 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s
5+
6+
7+ #include <immintrin.h>
8+
9+ // Make sure brackets work after macro intrinsics.
10+ float pr51324 (__m128 a ) {
11+ // CHECK-LABEL: pr51324
12+ // CHECK: call <4 x float> @llvm.x86.sse41.round.ps(<4 x float> %{{.*}}, i32 0)
13+ // CHECK: extractelement <4 x float> %{{.*}}, i32 0
14+ return _mm_round_ps (a , 0 )[0 ];
15+ }
Original file line number Diff line number Diff line change 1+ // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4.1 -emit-llvm -o - -Wall -Werror | FileCheck %s
2+ // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4.1 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s
3+ // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=i386-apple-darwin -target-feature +sse4.1 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK
4+ // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=i386-apple-darwin -target-feature +sse4.1 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s
5+
6+
7+ #include <immintrin.h>
8+
9+ // Ensure _mm_test_all_ones macro doesn't reuse argument
10+ __m128i expensive_call ();
11+ int pr60006 () {
12+ // CHECK-LABEL: pr60006
13+ // CHECK: call {{.*}} @expensive_call
14+ // CHECK-NOT: call {{.*}} @expensive_call
15+ // CHECK: call i32 @llvm.x86.sse41.ptestc(<2 x i64> %{{.*}}, <2 x i64> %{{.*}})
16+ return _mm_test_all_ones (expensive_call ());
17+ }
Original file line number Diff line number Diff line change @@ -400,20 +400,3 @@ int test_mm_testz_si128(__m128i x, __m128i y) {
400400 return _mm_testz_si128 (x , y );
401401}
402402
403- // Make sure brackets work after macro intrinsics.
404- float pr51324 (__m128 a ) {
405- // CHECK-LABEL: pr51324
406- // CHECK: call <4 x float> @llvm.x86.sse41.round.ps(<4 x float> %{{.*}}, i32 0)
407- // CHECK: extractelement <4 x float> %{{.*}}, i32 0
408- return _mm_round_ps (a , 0 )[0 ];
409- }
410-
411- // Ensure _mm_test_all_ones macro doesn't reuse argument
412- __m128i expensive_call ();
413- int pr60006 () {
414- // CHECK-LABEL: pr60006
415- // CHECK: call {{.*}} @expensive_call
416- // CHECK-NOT: call {{.*}} @expensive_call
417- // CHECK: call i32 @llvm.x86.sse41.ptestc(<2 x i64> %{{.*}}, <2 x i64> %{{.*}})
418- return _mm_test_all_ones (expensive_call ());
419- }
You can’t perform that action at this time.
0 commit comments