diff options
author | Dinar Temirbulatov <dtemirbulatov@gmail.com> | 2017-06-16 12:09:52 +0000 |
---|---|---|
committer | Dinar Temirbulatov <dtemirbulatov@gmail.com> | 2017-06-16 12:09:52 +0000 |
commit | 6adac51dabb51771aade9b29f059f562b7f457c3 (patch) | |
tree | c509e2e33cb88d37bfc453906ee03bd2ca54e3b9 /test/CodeGen | |
parent | ff94b5e7fe537029dd2a96c48198b1bcb27b0958 (diff) |
Expand vector oparation to as IR constants, PR28129.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305551 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/avx-builtins.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/CodeGen/avx-builtins.c b/test/CodeGen/avx-builtins.c index 90f428efb3..31a08440d0 100644 --- a/test/CodeGen/avx-builtins.c +++ b/test/CodeGen/avx-builtins.c @@ -1427,3 +1427,51 @@ float test_mm256_cvtss_f32(__m256 __a) // CHECK: extractelement <8 x float> %{{.*}}, i32 0 return _mm256_cvtss_f32(__a); } + +__m256 test_mm256_cmp_ps_true(__m256 a, __m256 b) { + // CHECK-LABEL: @test_mm256_cmp_ps_true + // CHECK: store <8 x float> <float 0xFFFFFFFFE0000000, + return _mm256_cmp_ps(a, b, _CMP_TRUE_UQ); +} + +__m256 test_mm256_cmp_pd_true(__m256 a, __m256 b) { + // CHECK-LABEL: @test_mm256_cmp_pd_true + // CHECK: store <4 x double> <double 0xFFFFFFFFFFFFFFFF, + return _mm256_cmp_pd(a, b, _CMP_TRUE_UQ); +} + +__m256 test_mm256_cmp_ps_false(__m256 a, __m256 b) { + // CHECK-LABEL: @test_mm256_cmp_ps_false + // CHECK: store <8 x float> zeroinitializer, <8 x float>* %tmp, align 32 + return _mm256_cmp_ps(a, b, _CMP_FALSE_OQ); +} + +__m256 test_mm256_cmp_pd_false(__m256 a, __m256 b) { + // CHECK-LABEL: @test_mm256_cmp_pd_false + // CHECK: store <4 x double> zeroinitializer, <4 x double>* %tmp, align 32 + return _mm256_cmp_pd(a, b, _CMP_FALSE_OQ); +} + +__m256 test_mm256_cmp_ps_strue(__m256 a, __m256 b) { + // CHECK-LABEL: @test_mm256_cmp_ps_strue + // CHECK: store <8 x float> <float 0xFFFFFFFFE0000000, + return _mm256_cmp_ps(a, b, _CMP_TRUE_US); +} + +__m256 test_mm256_cmp_pd_strue(__m256 a, __m256 b) { + // CHECK-LABEL: @test_mm256_cmp_pd_strue + // CHECK: store <4 x double> <double 0xFFFFFFFFFFFFFFFF, + return _mm256_cmp_pd(a, b, _CMP_TRUE_US); +} + +__m256 test_mm256_cmp_ps_sfalse(__m256 a, __m256 b) { + // CHECK-LABEL: @test_mm256_cmp_ps_sfalse + // CHECK: store <8 x float> zeroinitializer, <8 x float>* %tmp, align 32 + return _mm256_cmp_ps(a, b, _CMP_FALSE_OS); +} + +__m256 test_mm256_cmp_pd_sfalse(__m256 a, __m256 b) { + // CHECK-LABEL: @test_mm256_cmp_pd_sfalse + // CHECK: store <4 x double> zeroinitializer, <4 x double>* %tmp, align 32 + return _mm256_cmp_pd(a, b, _CMP_FALSE_OS); +} |