[llvm] r344060 - [X86] Autogenerate complete checks. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 9 10:52:07 PDT 2018
Author: ctopper
Date: Tue Oct 9 10:52:07 2018
New Revision: 344060
URL: http://llvm.org/viewvc/llvm-project?rev=344060&view=rev
Log:
[X86] Autogenerate complete checks. NFC
Modified:
llvm/trunk/test/CodeGen/X86/vec_compare.ll
Modified: llvm/trunk/test/CodeGen/X86/vec_compare.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_compare.ll?rev=344060&r1=344059&r2=344060&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vec_compare.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vec_compare.ll Tue Oct 9 10:52:07 2018
@@ -1,10 +1,12 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mcpu=yonah -mtriple=i386-apple-darwin | FileCheck %s
define <4 x i32> @test1(<4 x i32> %A, <4 x i32> %B) nounwind {
; CHECK-LABEL: test1:
-; CHECK: pcmpgtd
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: pcmpgtd %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp sgt <4 x i32> %A, %B
%D = sext <4 x i1> %C to <4 x i32>
@@ -13,10 +15,11 @@ define <4 x i32> @test1(<4 x i32> %A, <4
define <4 x i32> @test2(<4 x i32> %A, <4 x i32> %B) nounwind {
; CHECK-LABEL: test2:
-; CHECK: pcmp
-; CHECK: pcmp
-; CHECK: pxor
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: pcmpgtd %xmm0, %xmm1
+; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
+; CHECK-NEXT: pxor %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp sge <4 x i32> %A, %B
%D = sext <4 x i1> %C to <4 x i32>
ret <4 x i32> %D
@@ -24,9 +27,10 @@ define <4 x i32> @test2(<4 x i32> %A, <4
define <4 x i32> @test3(<4 x i32> %A, <4 x i32> %B) nounwind {
; CHECK-LABEL: test3:
-; CHECK: pcmpgtd
-; CHECK: movdqa
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: pcmpgtd %xmm0, %xmm1
+; CHECK-NEXT: movdqa %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp slt <4 x i32> %A, %B
%D = sext <4 x i1> %C to <4 x i32>
ret <4 x i32> %D
@@ -34,9 +38,12 @@ define <4 x i32> @test3(<4 x i32> %A, <4
define <4 x i32> @test4(<4 x i32> %A, <4 x i32> %B) nounwind {
; CHECK-LABEL: test4:
-; CHECK: movdqa
-; CHECK: pcmpgtd
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648,2147483648,2147483648]
+; CHECK-NEXT: pxor %xmm2, %xmm1
+; CHECK-NEXT: pxor %xmm2, %xmm0
+; CHECK-NEXT: pcmpgtd %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp ugt <4 x i32> %A, %B
%D = sext <4 x i1> %C to <4 x i32>
ret <4 x i32> %D
@@ -44,10 +51,11 @@ define <4 x i32> @test4(<4 x i32> %A, <4
define <2 x i64> @test5(<2 x i64> %A, <2 x i64> %B) nounwind {
; CHECK-LABEL: test5:
-; CHECK: pcmpeqd
-; CHECK: pshufd $177
-; CHECK: pand
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
+; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,0,3,2]
+; CHECK-NEXT: pand %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp eq <2 x i64> %A, %B
%D = sext <2 x i1> %C to <2 x i64>
ret <2 x i64> %D
@@ -55,35 +63,33 @@ define <2 x i64> @test5(<2 x i64> %A, <2
define <2 x i64> @test6(<2 x i64> %A, <2 x i64> %B) nounwind {
; CHECK-LABEL: test6:
-; CHECK: pcmpeqd
-; CHECK: pshufd $177
-; CHECK: pand
-; CHECK: pcmpeqd
-; CHECK: pxor
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
+; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,0,3,2]
+; CHECK-NEXT: pand %xmm1, %xmm0
+; CHECK-NEXT: pcmpeqd %xmm1, %xmm1
+; CHECK-NEXT: pxor %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp ne <2 x i64> %A, %B
%D = sext <2 x i1> %C to <2 x i64>
ret <2 x i64> %D
}
define <2 x i64> @test7(<2 x i64> %A, <2 x i64> %B) nounwind {
-; CHECK: [[CONSTSEG:[A-Z0-9_]*]]:
-; CHECK: .long 2147483648
-; CHECK-NEXT: .long 0
-; CHECK-NEXT: .long 2147483648
-; CHECK-NEXT: .long 0
; CHECK-LABEL: test7:
-; CHECK: movdqa [[CONSTSEG]], [[CONSTREG:%xmm[0-9]*]]
-; CHECK: pxor [[CONSTREG]]
-; CHECK: pxor [[CONSTREG]]
-; CHECK: pcmpgtd %xmm1
-; CHECK: pshufd $160
-; CHECK: pcmpeqd
-; CHECK: pshufd $245
-; CHECK: pand
-; CHECK: pshufd $245
-; CHECK: por
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,0,2147483648,0]
+; CHECK-NEXT: pxor %xmm2, %xmm1
+; CHECK-NEXT: pxor %xmm2, %xmm0
+; CHECK-NEXT: movdqa %xmm0, %xmm2
+; CHECK-NEXT: pcmpgtd %xmm1, %xmm2
+; CHECK-NEXT: pshufd {{.*#+}} xmm3 = xmm2[0,0,2,2]
+; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
+; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,3,3]
+; CHECK-NEXT: pand %xmm3, %xmm1
+; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm2[1,1,3,3]
+; CHECK-NEXT: por %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp sgt <2 x i64> %A, %B
%D = sext <2 x i1> %C to <2 x i64>
ret <2 x i64> %D
@@ -91,16 +97,19 @@ define <2 x i64> @test7(<2 x i64> %A, <2
define <2 x i64> @test8(<2 x i64> %A, <2 x i64> %B) nounwind {
; CHECK-LABEL: test8:
-; CHECK: pxor
-; CHECK: pxor
-; CHECK: pcmpgtd %xmm0
-; CHECK: pshufd $160
-; CHECK: pcmpeqd
-; CHECK: pshufd $245
-; CHECK: pand
-; CHECK: pshufd $245
-; CHECK: por
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,0,2147483648,0]
+; CHECK-NEXT: pxor %xmm2, %xmm0
+; CHECK-NEXT: pxor %xmm2, %xmm1
+; CHECK-NEXT: movdqa %xmm1, %xmm2
+; CHECK-NEXT: pcmpgtd %xmm0, %xmm2
+; CHECK-NEXT: pshufd {{.*#+}} xmm3 = xmm2[0,0,2,2]
+; CHECK-NEXT: pcmpeqd %xmm0, %xmm1
+; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; CHECK-NEXT: pand %xmm3, %xmm1
+; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm2[1,1,3,3]
+; CHECK-NEXT: por %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp slt <2 x i64> %A, %B
%D = sext <2 x i1> %C to <2 x i64>
ret <2 x i64> %D
@@ -108,18 +117,21 @@ define <2 x i64> @test8(<2 x i64> %A, <2
define <2 x i64> @test9(<2 x i64> %A, <2 x i64> %B) nounwind {
; CHECK-LABEL: test9:
-; CHECK: pxor
-; CHECK: pxor
-; CHECK: pcmpgtd %xmm0
-; CHECK: pshufd $160
-; CHECK: pcmpeqd
-; CHECK: pshufd $245
-; CHECK: pand
-; CHECK: pshufd $245
-; CHECK: por
-; CHECK: pcmpeqd
-; CHECK: pxor
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,0,2147483648,0]
+; CHECK-NEXT: pxor %xmm2, %xmm0
+; CHECK-NEXT: pxor %xmm2, %xmm1
+; CHECK-NEXT: movdqa %xmm1, %xmm2
+; CHECK-NEXT: pcmpgtd %xmm0, %xmm2
+; CHECK-NEXT: pshufd {{.*#+}} xmm3 = xmm2[0,0,2,2]
+; CHECK-NEXT: pcmpeqd %xmm0, %xmm1
+; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
+; CHECK-NEXT: pand %xmm3, %xmm0
+; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm2[1,1,3,3]
+; CHECK-NEXT: por %xmm0, %xmm1
+; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
+; CHECK-NEXT: pxor %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp sge <2 x i64> %A, %B
%D = sext <2 x i1> %C to <2 x i64>
ret <2 x i64> %D
@@ -127,41 +139,41 @@ define <2 x i64> @test9(<2 x i64> %A, <2
define <2 x i64> @test10(<2 x i64> %A, <2 x i64> %B) nounwind {
; CHECK-LABEL: test10:
-; CHECK: pxor
-; CHECK: pxor
-; CHECK: pcmpgtd %xmm1
-; CHECK: pshufd $160
-; CHECK: pcmpeqd
-; CHECK: pshufd $245
-; CHECK: pand
-; CHECK: pshufd $245
-; CHECK: por
-; CHECK: pcmpeqd
-; CHECK: pxor
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,0,2147483648,0]
+; CHECK-NEXT: pxor %xmm2, %xmm1
+; CHECK-NEXT: pxor %xmm2, %xmm0
+; CHECK-NEXT: movdqa %xmm0, %xmm2
+; CHECK-NEXT: pcmpgtd %xmm1, %xmm2
+; CHECK-NEXT: pshufd {{.*#+}} xmm3 = xmm2[0,0,2,2]
+; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
+; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
+; CHECK-NEXT: pand %xmm3, %xmm0
+; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm2[1,1,3,3]
+; CHECK-NEXT: por %xmm0, %xmm1
+; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
+; CHECK-NEXT: pxor %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp sle <2 x i64> %A, %B
%D = sext <2 x i1> %C to <2 x i64>
ret <2 x i64> %D
}
define <2 x i64> @test11(<2 x i64> %A, <2 x i64> %B) nounwind {
-; CHECK: [[CONSTSEG:[A-Z0-9_]*]]:
-; CHECK: .long 2147483648
-; CHECK-NEXT: .long 2147483648
-; CHECK-NEXT: .long 2147483648
-; CHECK-NEXT: .long 2147483648
; CHECK-LABEL: test11:
-; CHECK: movdqa [[CONSTSEG]], [[CONSTREG:%xmm[0-9]*]]
-; CHECK: pxor [[CONSTREG]]
-; CHECK: pxor [[CONSTREG]]
-; CHECK: pcmpgtd %xmm1
-; CHECK: pshufd $160
-; CHECK: pcmpeqd
-; CHECK: pshufd $245
-; CHECK: pand
-; CHECK: pshufd $245
-; CHECK: por
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648,2147483648,2147483648]
+; CHECK-NEXT: pxor %xmm2, %xmm1
+; CHECK-NEXT: pxor %xmm2, %xmm0
+; CHECK-NEXT: movdqa %xmm0, %xmm2
+; CHECK-NEXT: pcmpgtd %xmm1, %xmm2
+; CHECK-NEXT: pshufd {{.*#+}} xmm3 = xmm2[0,0,2,2]
+; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
+; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,3,3]
+; CHECK-NEXT: pand %xmm3, %xmm1
+; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm2[1,1,3,3]
+; CHECK-NEXT: por %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp ugt <2 x i64> %A, %B
%D = sext <2 x i1> %C to <2 x i64>
ret <2 x i64> %D
@@ -169,16 +181,19 @@ define <2 x i64> @test11(<2 x i64> %A, <
define <2 x i64> @test12(<2 x i64> %A, <2 x i64> %B) nounwind {
; CHECK-LABEL: test12:
-; CHECK: pxor
-; CHECK: pxor
-; CHECK: pcmpgtd %xmm0
-; CHECK: pshufd $160
-; CHECK: pcmpeqd
-; CHECK: pshufd $245
-; CHECK: pand
-; CHECK: pshufd $245
-; CHECK: por
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648,2147483648,2147483648]
+; CHECK-NEXT: pxor %xmm2, %xmm0
+; CHECK-NEXT: pxor %xmm2, %xmm1
+; CHECK-NEXT: movdqa %xmm1, %xmm2
+; CHECK-NEXT: pcmpgtd %xmm0, %xmm2
+; CHECK-NEXT: pshufd {{.*#+}} xmm3 = xmm2[0,0,2,2]
+; CHECK-NEXT: pcmpeqd %xmm0, %xmm1
+; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; CHECK-NEXT: pand %xmm3, %xmm1
+; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm2[1,1,3,3]
+; CHECK-NEXT: por %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp ult <2 x i64> %A, %B
%D = sext <2 x i1> %C to <2 x i64>
ret <2 x i64> %D
@@ -186,18 +201,21 @@ define <2 x i64> @test12(<2 x i64> %A, <
define <2 x i64> @test13(<2 x i64> %A, <2 x i64> %B) nounwind {
; CHECK-LABEL: test13:
-; CHECK: pxor
-; CHECK: pxor
-; CHECK: pcmpgtd %xmm0
-; CHECK: pshufd $160
-; CHECK: pcmpeqd
-; CHECK: pshufd $245
-; CHECK: pand
-; CHECK: pshufd $245
-; CHECK: por
-; CHECK: pcmpeqd
-; CHECK: pxor
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648,2147483648,2147483648]
+; CHECK-NEXT: pxor %xmm2, %xmm0
+; CHECK-NEXT: pxor %xmm2, %xmm1
+; CHECK-NEXT: movdqa %xmm1, %xmm2
+; CHECK-NEXT: pcmpgtd %xmm0, %xmm2
+; CHECK-NEXT: pshufd {{.*#+}} xmm3 = xmm2[0,0,2,2]
+; CHECK-NEXT: pcmpeqd %xmm0, %xmm1
+; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
+; CHECK-NEXT: pand %xmm3, %xmm0
+; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm2[1,1,3,3]
+; CHECK-NEXT: por %xmm0, %xmm1
+; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
+; CHECK-NEXT: pxor %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp uge <2 x i64> %A, %B
%D = sext <2 x i1> %C to <2 x i64>
ret <2 x i64> %D
@@ -205,18 +223,21 @@ define <2 x i64> @test13(<2 x i64> %A, <
define <2 x i64> @test14(<2 x i64> %A, <2 x i64> %B) nounwind {
; CHECK-LABEL: test14:
-; CHECK: pxor
-; CHECK: pxor
-; CHECK: pcmpgtd %xmm1
-; CHECK: pshufd $160
-; CHECK: pcmpeqd
-; CHECK: pshufd $245
-; CHECK: pand
-; CHECK: pshufd $245
-; CHECK: por
-; CHECK: pcmpeqd
-; CHECK: pxor
-; CHECK: ret
+; CHECK: ## %bb.0:
+; CHECK-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648,2147483648,2147483648]
+; CHECK-NEXT: pxor %xmm2, %xmm1
+; CHECK-NEXT: pxor %xmm2, %xmm0
+; CHECK-NEXT: movdqa %xmm0, %xmm2
+; CHECK-NEXT: pcmpgtd %xmm1, %xmm2
+; CHECK-NEXT: pshufd {{.*#+}} xmm3 = xmm2[0,0,2,2]
+; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
+; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
+; CHECK-NEXT: pand %xmm3, %xmm0
+; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm2[1,1,3,3]
+; CHECK-NEXT: por %xmm0, %xmm1
+; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
+; CHECK-NEXT: pxor %xmm1, %xmm0
+; CHECK-NEXT: retl
%C = icmp ule <2 x i64> %A, %B
%D = sext <2 x i1> %C to <2 x i64>
ret <2 x i64> %D
More information about the llvm-commits
mailing list