From c25f1f8f17a814459e3c727920fb486683096ef4 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 31 Dec 2018 19:09:32 +0000 Subject: [PATCH] [X86] Add additional RUN lines to prepare for D56156. NFC llvm-svn: 350180 --- llvm/test/CodeGen/X86/setcc-combine.ll | 189 ++++++++++++++++++++++----------- 1 file changed, 126 insertions(+), 63 deletions(-) diff --git a/llvm/test/CodeGen/X86/setcc-combine.ll b/llvm/test/CodeGen/X86/setcc-combine.ll index 56cff4a..e8ebce9 100644 --- a/llvm/test/CodeGen/X86/setcc-combine.ll +++ b/llvm/test/CodeGen/X86/setcc-combine.ll @@ -1,15 +1,24 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc -mtriple=x86_64-unknown-unknown -mcpu=generic < %s | FileCheck %s +; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+sse2 < %s | FileCheck %s --check-prefixes=CHECK,SSE2 +; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 < %s | FileCheck %s --check-prefixes=CHECK,SSE41 define i32 @test_eq_1(<4 x i32> %A, <4 x i32> %B) { -; CHECK-LABEL: test_eq_1: -; CHECK: # %bb.0: -; CHECK-NEXT: pcmpgtd %xmm0, %xmm1 -; CHECK-NEXT: pcmpeqd %xmm0, %xmm0 -; CHECK-NEXT: pxor %xmm1, %xmm0 -; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3] -; CHECK-NEXT: movd %xmm0, %eax -; CHECK-NEXT: retq +; SSE2-LABEL: test_eq_1: +; SSE2: # %bb.0: +; SSE2-NEXT: pcmpgtd %xmm0, %xmm1 +; SSE2-NEXT: pcmpeqd %xmm0, %xmm0 +; SSE2-NEXT: pxor %xmm1, %xmm0 +; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3] +; SSE2-NEXT: movd %xmm0, %eax +; SSE2-NEXT: retq +; +; SSE41-LABEL: test_eq_1: +; SSE41: # %bb.0: +; SSE41-NEXT: pcmpgtd %xmm0, %xmm1 +; SSE41-NEXT: pcmpeqd %xmm0, %xmm0 +; SSE41-NEXT: pxor %xmm1, %xmm0 +; SSE41-NEXT: pextrd $1, %xmm0, %eax +; SSE41-NEXT: retq %cmp = icmp slt <4 x i32> %A, %B %sext = sext <4 x i1> %cmp to <4 x i32> %cmp1 = icmp eq <4 x i32> %sext, zeroinitializer @@ -19,12 +28,18 @@ define i32 @test_eq_1(<4 x i32> %A, <4 x i32> %B) { } define i32 @test_ne_1(<4 x i32> %A, <4 x i32> %B) { -; CHECK-LABEL: test_ne_1: -; CHECK: # %bb.0: -; CHECK-NEXT: pcmpgtd %xmm0, %xmm1 -; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,2,3] -; CHECK-NEXT: movd %xmm0, %eax -; CHECK-NEXT: retq +; SSE2-LABEL: test_ne_1: +; SSE2: # %bb.0: +; SSE2-NEXT: pcmpgtd %xmm0, %xmm1 +; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,2,3] +; SSE2-NEXT: movd %xmm0, %eax +; SSE2-NEXT: retq +; +; SSE41-LABEL: test_ne_1: +; SSE41: # %bb.0: +; SSE41-NEXT: pcmpgtd %xmm0, %xmm1 +; SSE41-NEXT: pextrd $1, %xmm1, %eax +; SSE41-NEXT: retq %cmp = icmp slt <4 x i32> %A, %B %sext = sext <4 x i1> %cmp to <4 x i32> %cmp1 = icmp ne <4 x i32> %sext, zeroinitializer @@ -47,14 +62,22 @@ define i32 @test_le_1(<4 x i32> %A, <4 x i32> %B) { } define i32 @test_ge_1(<4 x i32> %A, <4 x i32> %B) { -; CHECK-LABEL: test_ge_1: -; CHECK: # %bb.0: -; CHECK-NEXT: pcmpgtd %xmm0, %xmm1 -; CHECK-NEXT: pcmpeqd %xmm0, %xmm0 -; CHECK-NEXT: pxor %xmm1, %xmm0 -; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3] -; CHECK-NEXT: movd %xmm0, %eax -; CHECK-NEXT: retq +; SSE2-LABEL: test_ge_1: +; SSE2: # %bb.0: +; SSE2-NEXT: pcmpgtd %xmm0, %xmm1 +; SSE2-NEXT: pcmpeqd %xmm0, %xmm0 +; SSE2-NEXT: pxor %xmm1, %xmm0 +; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3] +; SSE2-NEXT: movd %xmm0, %eax +; SSE2-NEXT: retq +; +; SSE41-LABEL: test_ge_1: +; SSE41: # %bb.0: +; SSE41-NEXT: pcmpgtd %xmm0, %xmm1 +; SSE41-NEXT: pcmpeqd %xmm0, %xmm0 +; SSE41-NEXT: pxor %xmm1, %xmm0 +; SSE41-NEXT: pextrd $1, %xmm0, %eax +; SSE41-NEXT: retq %cmp = icmp slt <4 x i32> %A, %B %sext = sext <4 x i1> %cmp to <4 x i32> %cmp1 = icmp sge <4 x i32> %sext, zeroinitializer @@ -64,12 +87,18 @@ define i32 @test_ge_1(<4 x i32> %A, <4 x i32> %B) { } define i32 @test_lt_1(<4 x i32> %A, <4 x i32> %B) { -; CHECK-LABEL: test_lt_1: -; CHECK: # %bb.0: -; CHECK-NEXT: pcmpgtd %xmm0, %xmm1 -; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,2,3] -; CHECK-NEXT: movd %xmm0, %eax -; CHECK-NEXT: retq +; SSE2-LABEL: test_lt_1: +; SSE2: # %bb.0: +; SSE2-NEXT: pcmpgtd %xmm0, %xmm1 +; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,2,3] +; SSE2-NEXT: movd %xmm0, %eax +; SSE2-NEXT: retq +; +; SSE41-LABEL: test_lt_1: +; SSE41: # %bb.0: +; SSE41-NEXT: pcmpgtd %xmm0, %xmm1 +; SSE41-NEXT: pextrd $1, %xmm1, %eax +; SSE41-NEXT: retq %cmp = icmp slt <4 x i32> %A, %B %sext = sext <4 x i1> %cmp to <4 x i32> %cmp1 = icmp slt <4 x i32> %sext, zeroinitializer @@ -92,14 +121,22 @@ define i32 @test_gt_1(<4 x i32> %A, <4 x i32> %B) { } define i32 @test_eq_2(<4 x i32> %A, <4 x i32> %B) { -; CHECK-LABEL: test_eq_2: -; CHECK: # %bb.0: -; CHECK-NEXT: pcmpgtd %xmm1, %xmm0 -; CHECK-NEXT: pcmpeqd %xmm1, %xmm1 -; CHECK-NEXT: pxor %xmm0, %xmm1 -; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,2,3] -; CHECK-NEXT: movd %xmm0, %eax -; CHECK-NEXT: retq +; SSE2-LABEL: test_eq_2: +; SSE2: # %bb.0: +; SSE2-NEXT: pcmpgtd %xmm1, %xmm0 +; SSE2-NEXT: pcmpeqd %xmm1, %xmm1 +; SSE2-NEXT: pxor %xmm0, %xmm1 +; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,2,3] +; SSE2-NEXT: movd %xmm0, %eax +; SSE2-NEXT: retq +; +; SSE41-LABEL: test_eq_2: +; SSE41: # %bb.0: +; SSE41-NEXT: pcmpgtd %xmm1, %xmm0 +; SSE41-NEXT: pcmpeqd %xmm1, %xmm1 +; SSE41-NEXT: pxor %xmm0, %xmm1 +; SSE41-NEXT: pextrd $1, %xmm1, %eax +; SSE41-NEXT: retq %cmp = icmp slt <4 x i32> %B, %A %sext = sext <4 x i1> %cmp to <4 x i32> %cmp1 = icmp eq <4 x i32> %sext, zeroinitializer @@ -109,12 +146,18 @@ define i32 @test_eq_2(<4 x i32> %A, <4 x i32> %B) { } define i32 @test_ne_2(<4 x i32> %A, <4 x i32> %B) { -; CHECK-LABEL: test_ne_2: -; CHECK: # %bb.0: -; CHECK-NEXT: pcmpgtd %xmm1, %xmm0 -; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3] -; CHECK-NEXT: movd %xmm0, %eax -; CHECK-NEXT: retq +; SSE2-LABEL: test_ne_2: +; SSE2: # %bb.0: +; SSE2-NEXT: pcmpgtd %xmm1, %xmm0 +; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3] +; SSE2-NEXT: movd %xmm0, %eax +; SSE2-NEXT: retq +; +; SSE41-LABEL: test_ne_2: +; SSE41: # %bb.0: +; SSE41-NEXT: pcmpgtd %xmm1, %xmm0 +; SSE41-NEXT: pextrd $1, %xmm0, %eax +; SSE41-NEXT: retq %cmp = icmp slt <4 x i32> %B, %A %sext = sext <4 x i1> %cmp to <4 x i32> %cmp1 = icmp ne <4 x i32> %sext, zeroinitializer @@ -124,14 +167,22 @@ define i32 @test_ne_2(<4 x i32> %A, <4 x i32> %B) { } define i32 @test_le_2(<4 x i32> %A, <4 x i32> %B) { -; CHECK-LABEL: test_le_2: -; CHECK: # %bb.0: -; CHECK-NEXT: pcmpgtd %xmm1, %xmm0 -; CHECK-NEXT: pcmpeqd %xmm1, %xmm1 -; CHECK-NEXT: pxor %xmm0, %xmm1 -; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,2,3] -; CHECK-NEXT: movd %xmm0, %eax -; CHECK-NEXT: retq +; SSE2-LABEL: test_le_2: +; SSE2: # %bb.0: +; SSE2-NEXT: pcmpgtd %xmm1, %xmm0 +; SSE2-NEXT: pcmpeqd %xmm1, %xmm1 +; SSE2-NEXT: pxor %xmm0, %xmm1 +; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,2,3] +; SSE2-NEXT: movd %xmm0, %eax +; SSE2-NEXT: retq +; +; SSE41-LABEL: test_le_2: +; SSE41: # %bb.0: +; SSE41-NEXT: pcmpgtd %xmm1, %xmm0 +; SSE41-NEXT: pcmpeqd %xmm1, %xmm1 +; SSE41-NEXT: pxor %xmm0, %xmm1 +; SSE41-NEXT: pextrd $1, %xmm1, %eax +; SSE41-NEXT: retq %cmp = icmp slt <4 x i32> %B, %A %sext = sext <4 x i1> %cmp to <4 x i32> %cmp1 = icmp sle <4 x i32> zeroinitializer, %sext @@ -154,12 +205,18 @@ define i32 @test_ge_2(<4 x i32> %A, <4 x i32> %B) { } define i32 @test_lt_2(<4 x i32> %A, <4 x i32> %B) { -; CHECK-LABEL: test_lt_2: -; CHECK: # %bb.0: -; CHECK-NEXT: pcmpgtd %xmm1, %xmm0 -; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3] -; CHECK-NEXT: movd %xmm0, %eax -; CHECK-NEXT: retq +; SSE2-LABEL: test_lt_2: +; SSE2: # %bb.0: +; SSE2-NEXT: pcmpgtd %xmm1, %xmm0 +; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3] +; SSE2-NEXT: movd %xmm0, %eax +; SSE2-NEXT: retq +; +; SSE41-LABEL: test_lt_2: +; SSE41: # %bb.0: +; SSE41-NEXT: pcmpgtd %xmm1, %xmm0 +; SSE41-NEXT: pextrd $1, %xmm0, %eax +; SSE41-NEXT: retq %cmp = icmp slt <4 x i32> %B, %A %sext = sext <4 x i1> %cmp to <4 x i32> %cmp1 = icmp slt <4 x i32> zeroinitializer, %sext @@ -169,12 +226,18 @@ define i32 @test_lt_2(<4 x i32> %A, <4 x i32> %B) { } define i32 @test_gt_2(<4 x i32> %A, <4 x i32> %B) { -; CHECK-LABEL: test_gt_2: -; CHECK: # %bb.0: -; CHECK-NEXT: pcmpgtd %xmm1, %xmm0 -; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3] -; CHECK-NEXT: movd %xmm0, %eax -; CHECK-NEXT: retq +; SSE2-LABEL: test_gt_2: +; SSE2: # %bb.0: +; SSE2-NEXT: pcmpgtd %xmm1, %xmm0 +; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3] +; SSE2-NEXT: movd %xmm0, %eax +; SSE2-NEXT: retq +; +; SSE41-LABEL: test_gt_2: +; SSE41: # %bb.0: +; SSE41-NEXT: pcmpgtd %xmm1, %xmm0 +; SSE41-NEXT: pextrd $1, %xmm0, %eax +; SSE41-NEXT: retq %cmp = icmp slt <4 x i32> %B, %A %sext = sext <4 x i1> %cmp to <4 x i32> %cmp1 = icmp sgt <4 x i32> zeroinitializer, %sext -- 2.7.4