From 8a876198f4ad8dc0da53636d1ede4d5ecb3e458b Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 30 Jul 2018 16:13:40 +0000 Subject: [PATCH] [X86] Regenerate fast-isel tests. Test cleanup for D38128 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338262 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/fast-isel-fold-mem.ll | 9 +++++--- test/CodeGen/X86/fast-isel-select.ll | 19 +++++++++++----- test/CodeGen/X86/fast-isel-sext-zext.ll | 40 --------------------------------- 3 files changed, 20 insertions(+), 48 deletions(-) diff --git a/test/CodeGen/X86/fast-isel-fold-mem.ll b/test/CodeGen/X86/fast-isel-fold-mem.ll index 5686484ef93..1c5171926c4 100644 --- a/test/CodeGen/X86/fast-isel-fold-mem.ll +++ b/test/CodeGen/X86/fast-isel-fold-mem.ll @@ -1,10 +1,13 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s ; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin | FileCheck %s define i64 @fold_load(i64* %a, i64 %b) { -; CHECK-LABEL: fold_load -; CHECK: addq (%rdi), %rsi -; CHECK-NEXT: movq %rsi, %rax +; CHECK-LABEL: fold_load: +; CHECK: ## %bb.0: +; CHECK-NEXT: addq (%rdi), %rsi +; CHECK-NEXT: movq %rsi, %rax +; CHECK-NEXT: retq %1 = load i64, i64* %a, align 8 %2 = add i64 %1, %b ret i64 %2 diff --git a/test/CodeGen/X86/fast-isel-select.ll b/test/CodeGen/X86/fast-isel-select.ll index 7b3c99f13cc..cf459f85b33 100644 --- a/test/CodeGen/X86/fast-isel-select.ll +++ b/test/CodeGen/X86/fast-isel-select.ll @@ -1,14 +1,23 @@ -; RUN: llc -mtriple x86_64-apple-darwin -O0 -o - < %s | FileCheck %s +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-apple-darwin -O0 | FileCheck %s + ; Make sure we only use the less significant bit of the value that feeds the ; select. Otherwise, we may account for a non-zero value whereas the ; lsb is zero. ; -; CHECK-LABEL: fastisel_select: -; CHECK: subb {{%[a-z0-9]+}}, [[RES:%[a-z0-9]+]] -; CHECK: testb $1, [[RES]] -; CHECK: cmovnel %edi, %esi define i32 @fastisel_select(i1 %exchSub2211_, i1 %trunc_8766) { +; CHECK-LABEL: fastisel_select: +; CHECK: ## %bb.0: +; CHECK-NEXT: movb %sil, %al +; CHECK-NEXT: movb %dil, %cl +; CHECK-NEXT: xorl %esi, %esi +; CHECK-NEXT: subb %al, %cl +; CHECK-NEXT: testb $1, %cl +; CHECK-NEXT: movl $1204476887, %edi ## imm = 0x47CADBD7 +; CHECK-NEXT: cmovnel %edi, %esi +; CHECK-NEXT: movl %esi, %eax +; CHECK-NEXT: retq %shuffleInternal15257_8932 = sub i1 %exchSub2211_, %trunc_8766 %counter_diff1345 = select i1 %shuffleInternal15257_8932, i32 1204476887, i32 0 ret i32 %counter_diff1345 diff --git a/test/CodeGen/X86/fast-isel-sext-zext.ll b/test/CodeGen/X86/fast-isel-sext-zext.ll index 5e54c98b0d1..82ed6c72ebc 100644 --- a/test/CodeGen/X86/fast-isel-sext-zext.ll +++ b/test/CodeGen/X86/fast-isel-sext-zext.ll @@ -9,7 +9,6 @@ define i8 @test1(i8 %x) nounwind { ; X32-NEXT: andb $1, %al ; X32-NEXT: negb %al ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test1: ; X64: ## %bb.0: @@ -17,7 +16,6 @@ define i8 @test1(i8 %x) nounwind { ; X64-NEXT: negb %dil ; X64-NEXT: movl %edi, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %z = trunc i8 %x to i1 %u = sext i1 %z to i8 ret i8 %u @@ -32,7 +30,6 @@ define i16 @test2(i16 %x) nounwind { ; X32-NEXT: movsbl %al, %eax ; X32-NEXT: ## kill: def $ax killed $ax killed $eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test2: ; X64: ## %bb.0: @@ -41,7 +38,6 @@ define i16 @test2(i16 %x) nounwind { ; X64-NEXT: movsbl %dil, %eax ; X64-NEXT: ## kill: def $ax killed $ax killed $eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %z = trunc i16 %x to i1 %u = sext i1 %z to i16 ret i16 %u @@ -55,7 +51,6 @@ define i32 @test3(i32 %x) nounwind { ; X32-NEXT: negb %al ; X32-NEXT: movsbl %al, %eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test3: ; X64: ## %bb.0: @@ -63,7 +58,6 @@ define i32 @test3(i32 %x) nounwind { ; X64-NEXT: negb %dil ; X64-NEXT: movsbl %dil, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %z = trunc i32 %x to i1 %u = sext i1 %z to i32 ret i32 %u @@ -77,7 +71,6 @@ define i32 @test4(i32 %x) nounwind { ; X32-NEXT: negb %al ; X32-NEXT: movsbl %al, %eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test4: ; X64: ## %bb.0: @@ -85,7 +78,6 @@ define i32 @test4(i32 %x) nounwind { ; X64-NEXT: negb %dil ; X64-NEXT: movsbl %dil, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %z = trunc i32 %x to i1 %u = sext i1 %z to i32 ret i32 %u @@ -97,14 +89,12 @@ define i8 @test5(i8 %x) nounwind { ; X32-NEXT: movb {{[0-9]+}}(%esp), %al ; X32-NEXT: andb $1, %al ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test5: ; X64: ## %bb.0: ; X64-NEXT: andb $1, %dil ; X64-NEXT: movl %edi, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %z = trunc i8 %x to i1 %u = zext i1 %z to i8 ret i8 %u @@ -118,7 +108,6 @@ define i16 @test6(i16 %x) nounwind { ; X32-NEXT: movzbl %al, %eax ; X32-NEXT: ## kill: def $ax killed $ax killed $eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test6: ; X64: ## %bb.0: @@ -126,7 +115,6 @@ define i16 @test6(i16 %x) nounwind { ; X64-NEXT: movzbl %dil, %eax ; X64-NEXT: ## kill: def $ax killed $ax killed $eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %z = trunc i16 %x to i1 %u = zext i1 %z to i16 ret i16 %u @@ -139,14 +127,12 @@ define i32 @test7(i32 %x) nounwind { ; X32-NEXT: andb $1, %al ; X32-NEXT: movzbl %al, %eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test7: ; X64: ## %bb.0: ; X64-NEXT: andb $1, %dil ; X64-NEXT: movzbl %dil, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %z = trunc i32 %x to i1 %u = zext i1 %z to i32 ret i32 %u @@ -159,14 +145,12 @@ define i32 @test8(i32 %x) nounwind { ; X32-NEXT: andb $1, %al ; X32-NEXT: movzbl %al, %eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test8: ; X64: ## %bb.0: ; X64-NEXT: andb $1, %dil ; X64-NEXT: movzbl %dil, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %z = trunc i32 %x to i1 %u = zext i1 %z to i32 ret i32 %u @@ -178,14 +162,12 @@ define i16 @test9(i8 %x) nounwind { ; X32-NEXT: movsbl {{[0-9]+}}(%esp), %eax ; X32-NEXT: ## kill: def $ax killed $ax killed $eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test9: ; X64: ## %bb.0: ; X64-NEXT: movsbl %dil, %eax ; X64-NEXT: ## kill: def $ax killed $ax killed $eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = sext i8 %x to i16 ret i16 %u } @@ -195,13 +177,11 @@ define i32 @test10(i8 %x) nounwind { ; X32: ## %bb.0: ; X32-NEXT: movsbl {{[0-9]+}}(%esp), %eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test10: ; X64: ## %bb.0: ; X64-NEXT: movsbl %dil, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = sext i8 %x to i32 ret i32 %u } @@ -213,13 +193,11 @@ define i64 @test11(i8 %x) nounwind { ; X32-NEXT: movl %eax, %edx ; X32-NEXT: sarl $31, %edx ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test11: ; X64: ## %bb.0: ; X64-NEXT: movsbq %dil, %rax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = sext i8 %x to i64 ret i64 %u } @@ -230,14 +208,12 @@ define i16 @test12(i8 %x) nounwind { ; X32-NEXT: movzbl {{[0-9]+}}(%esp), %eax ; X32-NEXT: ## kill: def $ax killed $ax killed $eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test12: ; X64: ## %bb.0: ; X64-NEXT: movzbl %dil, %eax ; X64-NEXT: ## kill: def $ax killed $ax killed $eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = zext i8 %x to i16 ret i16 %u } @@ -247,13 +223,11 @@ define i32 @test13(i8 %x) nounwind { ; X32: ## %bb.0: ; X32-NEXT: movzbl {{[0-9]+}}(%esp), %eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test13: ; X64: ## %bb.0: ; X64-NEXT: movzbl %dil, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = zext i8 %x to i32 ret i32 %u } @@ -264,13 +238,11 @@ define i64 @test14(i8 %x) nounwind { ; X32-NEXT: movzbl {{[0-9]+}}(%esp), %eax ; X32-NEXT: xorl %edx, %edx ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test14: ; X64: ## %bb.0: ; X64-NEXT: movzbl %dil, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = zext i8 %x to i64 ret i64 %u } @@ -280,13 +252,11 @@ define i32 @test15(i16 %x) nounwind { ; X32: ## %bb.0: ; X32-NEXT: movswl {{[0-9]+}}(%esp), %eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test15: ; X64: ## %bb.0: ; X64-NEXT: movswl %di, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = sext i16 %x to i32 ret i32 %u } @@ -298,13 +268,11 @@ define i64 @test16(i16 %x) nounwind { ; X32-NEXT: movl %eax, %edx ; X32-NEXT: sarl $31, %edx ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test16: ; X64: ## %bb.0: ; X64-NEXT: movswq %di, %rax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = sext i16 %x to i64 ret i64 %u } @@ -314,13 +282,11 @@ define i32 @test17(i16 %x) nounwind { ; X32: ## %bb.0: ; X32-NEXT: movzwl {{[0-9]+}}(%esp), %eax ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test17: ; X64: ## %bb.0: ; X64-NEXT: movzwl %di, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = zext i16 %x to i32 ret i32 %u } @@ -331,13 +297,11 @@ define i64 @test18(i16 %x) nounwind { ; X32-NEXT: movzwl {{[0-9]+}}(%esp), %eax ; X32-NEXT: xorl %edx, %edx ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test18: ; X64: ## %bb.0: ; X64-NEXT: movzwl %di, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = zext i16 %x to i64 ret i64 %u } @@ -349,13 +313,11 @@ define i64 @test19(i32 %x) nounwind { ; X32-NEXT: movl %eax, %edx ; X32-NEXT: sarl $31, %edx ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test19: ; X64: ## %bb.0: ; X64-NEXT: movslq %edi, %rax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = sext i32 %x to i64 ret i64 %u } @@ -366,13 +328,11 @@ define i64 @test20(i32 %x) nounwind { ; X32-NEXT: movl {{[0-9]+}}(%esp), %eax ; X32-NEXT: xorl %edx, %edx ; X32-NEXT: retl -; X32-NEXT: ## -- End function ; ; X64-LABEL: test20: ; X64: ## %bb.0: ; X64-NEXT: movl %edi, %eax ; X64-NEXT: retq -; X64-NEXT: ## -- End function %u = zext i32 %x to i64 ret i64 %u } -- 2.11.0