diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-02-18 21:15:30 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-02-18 21:15:30 +0000 |
commit | 117892098ad0c54d95d37785c61db8f0d9d05dc9 (patch) | |
tree | f585276801daed91705afee96e4b83e857f2ae0a /clang/test/CodeGen/xop-builtins.c | |
parent | dc8a24ea4c2060f08897762524ebb85895e3de42 (diff) | |
download | bcm5719-llvm-117892098ad0c54d95d37785c61db8f0d9d05dc9.tar.gz bcm5719-llvm-117892098ad0c54d95d37785c61db8f0d9d05dc9.zip |
[X86] Replace XOP vpcmov builtins with native vector logical operations.
llvm-svn: 295570
Diffstat (limited to 'clang/test/CodeGen/xop-builtins.c')
-rw-r--r-- | clang/test/CodeGen/xop-builtins.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/test/CodeGen/xop-builtins.c b/clang/test/CodeGen/xop-builtins.c index da9a3b925de..5302b9ab8f2 100644 --- a/clang/test/CodeGen/xop-builtins.c +++ b/clang/test/CodeGen/xop-builtins.c @@ -170,13 +170,19 @@ __m128i test_mm_hsubq_epi32(__m128i a) { __m128i test_mm_cmov_si128(__m128i a, __m128i b, __m128i c) { // CHECK-LABEL: test_mm_cmov_si128 - // CHECK: call <2 x i64> @llvm.x86.xop.vpcmov(<2 x i64> %{{.*}}, <2 x i64> %{{.*}}, <2 x i64> %{{.*}}) + // CHECK: [[AND:%.*]] = and <2 x i64> %{{.*}}, %{{.*}} + // CHECK: [[NEG:%.*]] = xor <2 x i64> %{{.*}}, <i64 -1, i64 -1> + // CHECK-NEXT: [[ANDN:%.*]] = and <2 x i64> %{{.*}}, [[NEG]] + // CHECK-NEXT: %{{.*}} = or <2 x i64> [[AND]], [[ANDN]] return _mm_cmov_si128(a, b, c); } __m256i test_mm256_cmov_si256(__m256i a, __m256i b, __m256i c) { // CHECK-LABEL: test_mm256_cmov_si256 - // CHECK: call <4 x i64> @llvm.x86.xop.vpcmov.256(<4 x i64> %{{.*}}, <4 x i64> %{{.*}}, <4 x i64> %{{.*}}) + // CHECK: [[AND:%.*]] = and <4 x i64> %{{.*}}, %{{.*}} + // CHECK: [[NEG:%.*]] = xor <4 x i64> %{{.*}}, <i64 -1, i64 -1, i64 -1, i64 -1> + // CHECK-NEXT: [[ANDN:%.*]] = and <4 x i64> %{{.*}}, [[NEG]] + // CHECK-NEXT: %{{.*}} = or <4 x i64> [[AND]], [[ANDN]] return _mm256_cmov_si256(a, b, c); } |