diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2015-04-10 22:08:18 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-10 22:08:18 +0000 |
commit | 13a7db5b9c4f5e543d037be68ec3428216bfd550 (patch) | |
tree | 1b2c9792582e12f5af0b1512e3094425f0dc0df9 /test/CodeGen/X86/fast-isel-select-sse.ll | |
parent | 0eb46f5d1e06a4284663d636a74b06adc3a161d7 (diff) | |
parent | 31195f0bdca6ee2a5e72d07edf13e1d81206d949 (diff) | |
download | external_llvm-13a7db5b9c4f5e543d037be68ec3428216bfd550.zip external_llvm-13a7db5b9c4f5e543d037be68ec3428216bfd550.tar.gz external_llvm-13a7db5b9c4f5e543d037be68ec3428216bfd550.tar.bz2 |
am 31195f0b: Merge "Update aosp/master llvm for rebase to r233350"
* commit '31195f0bdca6ee2a5e72d07edf13e1d81206d949':
Update aosp/master llvm for rebase to r233350
Diffstat (limited to 'test/CodeGen/X86/fast-isel-select-sse.ll')
-rw-r--r-- | test/CodeGen/X86/fast-isel-select-sse.ll | 100 |
1 files changed, 26 insertions, 74 deletions
diff --git a/test/CodeGen/X86/fast-isel-select-sse.ll b/test/CodeGen/X86/fast-isel-select-sse.ll index 3c03a03..6761be6 100644 --- a/test/CodeGen/X86/fast-isel-select-sse.ll +++ b/test/CodeGen/X86/fast-isel-select-sse.ll @@ -1,7 +1,7 @@ ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s -; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -fast-isel -fast-isel-abort | FileCheck %s +; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -fast-isel -fast-isel-abort=1 | FileCheck %s ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -mcpu=corei7-avx | FileCheck %s --check-prefix=AVX -; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -fast-isel -fast-isel-abort -mcpu=corei7-avx | FileCheck %s --check-prefix=AVX +; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -fast-isel -fast-isel-abort=1 -mcpu=corei7-avx | FileCheck %s --check-prefix=AVX ; Test all cmp predicates that can be used with SSE. @@ -13,9 +13,7 @@ define float @select_fcmp_oeq_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_oeq_f32 ; AVX: vcmpeqss %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp oeq float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -29,9 +27,7 @@ define double @select_fcmp_oeq_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_oeq_f64 ; AVX: vcmpeqsd %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp oeq double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 @@ -45,9 +41,7 @@ define float @select_fcmp_ogt_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm1 ; AVX-LABEL: select_fcmp_ogt_f32 ; AVX: vcmpltss %xmm0, %xmm1, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ogt float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -61,9 +55,7 @@ define double @select_fcmp_ogt_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm1 ; AVX-LABEL: select_fcmp_ogt_f64 ; AVX: vcmpltsd %xmm0, %xmm1, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ogt double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 @@ -77,9 +69,7 @@ define float @select_fcmp_oge_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm1 ; AVX-LABEL: select_fcmp_oge_f32 ; AVX: vcmpless %xmm0, %xmm1, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp oge float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -93,9 +83,7 @@ define double @select_fcmp_oge_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm1 ; AVX-LABEL: select_fcmp_oge_f64 ; AVX: vcmplesd %xmm0, %xmm1, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp oge double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 @@ -109,9 +97,7 @@ define float @select_fcmp_olt_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_olt_f32 ; AVX: vcmpltss %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp olt float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -125,9 +111,7 @@ define double @select_fcmp_olt_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_olt_f64 ; AVX: vcmpltsd %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp olt double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 @@ -141,9 +125,7 @@ define float @select_fcmp_ole_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_ole_f32 ; AVX: vcmpless %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ole float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -157,9 +139,7 @@ define double @select_fcmp_ole_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_ole_f64 ; AVX: vcmplesd %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ole double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 @@ -173,9 +153,7 @@ define float @select_fcmp_ord_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_ord_f32 ; AVX: vcmpordss %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ord float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -189,9 +167,7 @@ define double @select_fcmp_ord_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_ord_f64 ; AVX: vcmpordsd %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ord double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 @@ -205,9 +181,7 @@ define float @select_fcmp_uno_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_uno_f32 ; AVX: vcmpunordss %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp uno float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -221,9 +195,7 @@ define double @select_fcmp_uno_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_uno_f64 ; AVX: vcmpunordsd %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp uno double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 @@ -237,9 +209,7 @@ define float @select_fcmp_ugt_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_ugt_f32 ; AVX: vcmpnless %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ugt float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -253,9 +223,7 @@ define double @select_fcmp_ugt_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_ugt_f64 ; AVX: vcmpnlesd %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ugt double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 @@ -269,9 +237,7 @@ define float @select_fcmp_uge_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_uge_f32 ; AVX: vcmpnltss %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp uge float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -285,9 +251,7 @@ define double @select_fcmp_uge_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_uge_f64 ; AVX: vcmpnltsd %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp uge double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 @@ -301,9 +265,7 @@ define float @select_fcmp_ult_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm1 ; AVX-LABEL: select_fcmp_ult_f32 ; AVX: vcmpnless %xmm0, %xmm1, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ult float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -317,9 +279,7 @@ define double @select_fcmp_ult_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm1 ; AVX-LABEL: select_fcmp_ult_f64 ; AVX: vcmpnlesd %xmm0, %xmm1, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ult double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 @@ -333,9 +293,7 @@ define float @select_fcmp_ule_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm1 ; AVX-LABEL: select_fcmp_ule_f32 ; AVX: vcmpnltss %xmm0, %xmm1, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ule float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -349,9 +307,7 @@ define double @select_fcmp_ule_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm1 ; AVX-LABEL: select_fcmp_ule_f64 ; AVX: vcmpnltsd %xmm0, %xmm1, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp ule double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 @@ -365,9 +321,7 @@ define float @select_fcmp_une_f32(float %a, float %b, float %c, float %d) { ; CHECK-NEXT: orps %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_une_f32 ; AVX: vcmpneqss %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandps %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnps %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorps %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvps %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp une float %a, %b %2 = select i1 %1, float %c, float %d ret float %2 @@ -381,9 +335,7 @@ define double @select_fcmp_une_f64(double %a, double %b, double %c, double %d) { ; CHECK-NEXT: orpd %xmm2, %xmm0 ; AVX-LABEL: select_fcmp_une_f64 ; AVX: vcmpneqsd %xmm1, %xmm0, %xmm0 -; AVX-NEXT: vandpd %xmm2, %xmm0, %xmm1 -; AVX-NEXT: vandnpd %xmm3, %xmm0, %xmm0 -; AVX-NEXT: vorpd %xmm1, %xmm0, %xmm0 +; AVX-NEXT: vblendvpd %xmm0, %xmm2, %xmm3, %xmm0 %1 = fcmp une double %a, %b %2 = select i1 %1, double %c, double %d ret double %2 |