diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-07-30 16:18:38 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-07-30 16:18:38 +0000 |
commit | 186b62c9e4e361a3ae8b72108ea1d36b778d7788 (patch) | |
tree | 5214c2fb69a2a132a83616b72a82c26e520756dc | |
parent | 2d5118432b8fdee3b50ee95c353842b51bc2c565 (diff) | |
download | llvm-186b62c9e4e361a3ae8b72108ea1d36b778d7788.zip llvm-186b62c9e4e361a3ae8b72108ea1d36b778d7788.tar.gz llvm-186b62c9e4e361a3ae8b72108ea1d36b778d7788.tar.bz2 |
[X86] Regenerate NOBMI/BMI combine-select tests.
Test cleanup for D38128
llvm-svn: 338265
-rw-r--r-- | llvm/test/CodeGen/X86/dagcombine-select.ll | 72 |
1 files changed, 38 insertions, 34 deletions
diff --git a/llvm/test/CodeGen/X86/dagcombine-select.ll b/llvm/test/CodeGen/X86/dagcombine-select.ll index 2b05154..1ef6cfd 100644 --- a/llvm/test/CodeGen/X86/dagcombine-select.ll +++ b/llvm/test/CodeGen/X86/dagcombine-select.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc -mtriple=x86_64-unknown-unknown -verify-machineinstrs < %s | FileCheck -enable-var-scope %s -; RUN: llc -mtriple=x86_64-unknown-unknown -verify-machineinstrs -mattr=+bmi < %s | FileCheck -check-prefix=BMI -enable-var-scope %s +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,NOBMI -enable-var-scope +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -verify-machineinstrs -mattr=+bmi | FileCheck %s -check-prefixes=CHECK,BMI -enable-var-scope define i32 @select_and1(i32 %x, i32 %y) { ; CHECK-LABEL: select_and1: @@ -283,14 +283,14 @@ define double @frem_constant_sel_constants(i1 %cond) { declare i64 @llvm.cttz.i64(i64, i1) define i64 @cttz_64_eq_select(i64 %v) nounwind { -; CHECK-LABEL: cttz_64_eq_select: -; CHECK: # %bb.0: -; CHECK-NEXT: bsfq %rdi, %rcx -; CHECK-NEXT: movq $-1, %rax -; CHECK-NEXT: cmovneq %rcx, %rax -; CHECK-NEXT: addq $6, %rax -; CHECK-NEXT: retq - +; NOBMI-LABEL: cttz_64_eq_select: +; NOBMI: # %bb.0: +; NOBMI-NEXT: bsfq %rdi, %rcx +; NOBMI-NEXT: movq $-1, %rax +; NOBMI-NEXT: cmovneq %rcx, %rax +; NOBMI-NEXT: addq $6, %rax +; NOBMI-NEXT: retq +; ; BMI-LABEL: cttz_64_eq_select: ; BMI: # %bb.0: ; BMI-NEXT: tzcntq %rdi, %rcx @@ -298,6 +298,7 @@ define i64 @cttz_64_eq_select(i64 %v) nounwind { ; BMI-NEXT: cmovaeq %rcx, %rax ; BMI-NEXT: addq $6, %rax ; BMI-NEXT: retq + %cnt = tail call i64 @llvm.cttz.i64(i64 %v, i1 true) %tobool = icmp eq i64 %v, 0 %.op = add nuw nsw i64 %cnt, 6 @@ -306,14 +307,14 @@ define i64 @cttz_64_eq_select(i64 %v) nounwind { } define i64 @cttz_64_ne_select(i64 %v) nounwind { -; CHECK-LABEL: cttz_64_ne_select: -; CHECK: # %bb.0: -; CHECK-NEXT: bsfq %rdi, %rcx -; CHECK-NEXT: movq $-1, %rax -; CHECK-NEXT: cmovneq %rcx, %rax -; CHECK-NEXT: addq $6, %rax -; CHECK-NEXT: retq - +; NOBMI-LABEL: cttz_64_ne_select: +; NOBMI: # %bb.0: +; NOBMI-NEXT: bsfq %rdi, %rcx +; NOBMI-NEXT: movq $-1, %rax +; NOBMI-NEXT: cmovneq %rcx, %rax +; NOBMI-NEXT: addq $6, %rax +; NOBMI-NEXT: retq +; ; BMI-LABEL: cttz_64_ne_select: ; BMI: # %bb.0: ; BMI-NEXT: tzcntq %rdi, %rcx @@ -321,6 +322,7 @@ define i64 @cttz_64_ne_select(i64 %v) nounwind { ; BMI-NEXT: cmovaeq %rcx, %rax ; BMI-NEXT: addq $6, %rax ; BMI-NEXT: retq + %cnt = tail call i64 @llvm.cttz.i64(i64 %v, i1 true) %tobool = icmp ne i64 %v, 0 %.op = add nuw nsw i64 %cnt, 6 @@ -330,14 +332,14 @@ define i64 @cttz_64_ne_select(i64 %v) nounwind { declare i32 @llvm.cttz.i32(i32, i1) define i32 @cttz_32_eq_select(i32 %v) nounwind { -; CHECK-LABEL: cttz_32_eq_select: -; CHECK: # %bb.0: -; CHECK-NEXT: bsfl %edi, %ecx -; CHECK-NEXT: movl $-1, %eax -; CHECK-NEXT: cmovnel %ecx, %eax -; CHECK-NEXT: addl $6, %eax -; CHECK-NEXT: retq - +; NOBMI-LABEL: cttz_32_eq_select: +; NOBMI: # %bb.0: +; NOBMI-NEXT: bsfl %edi, %ecx +; NOBMI-NEXT: movl $-1, %eax +; NOBMI-NEXT: cmovnel %ecx, %eax +; NOBMI-NEXT: addl $6, %eax +; NOBMI-NEXT: retq +; ; BMI-LABEL: cttz_32_eq_select: ; BMI: # %bb.0: ; BMI-NEXT: tzcntl %edi, %ecx @@ -345,6 +347,7 @@ define i32 @cttz_32_eq_select(i32 %v) nounwind { ; BMI-NEXT: cmovael %ecx, %eax ; BMI-NEXT: addl $6, %eax ; BMI-NEXT: retq + %cnt = tail call i32 @llvm.cttz.i32(i32 %v, i1 true) %tobool = icmp eq i32 %v, 0 %.op = add nuw nsw i32 %cnt, 6 @@ -353,14 +356,14 @@ define i32 @cttz_32_eq_select(i32 %v) nounwind { } define i32 @cttz_32_ne_select(i32 %v) nounwind { -; CHECK-LABEL: cttz_32_ne_select: -; CHECK: # %bb.0: -; CHECK-NEXT: bsfl %edi, %ecx -; CHECK-NEXT: movl $-1, %eax -; CHECK-NEXT: cmovnel %ecx, %eax -; CHECK-NEXT: addl $6, %eax -; CHECK-NEXT: retq - +; NOBMI-LABEL: cttz_32_ne_select: +; NOBMI: # %bb.0: +; NOBMI-NEXT: bsfl %edi, %ecx +; NOBMI-NEXT: movl $-1, %eax +; NOBMI-NEXT: cmovnel %ecx, %eax +; NOBMI-NEXT: addl $6, %eax +; NOBMI-NEXT: retq +; ; BMI-LABEL: cttz_32_ne_select: ; BMI: # %bb.0: ; BMI-NEXT: tzcntl %edi, %ecx @@ -368,6 +371,7 @@ define i32 @cttz_32_ne_select(i32 %v) nounwind { ; BMI-NEXT: cmovael %ecx, %eax ; BMI-NEXT: addl $6, %eax ; BMI-NEXT: retq + %cnt = tail call i32 @llvm.cttz.i32(i32 %v, i1 true) %tobool = icmp ne i32 %v, 0 %.op = add nuw nsw i32 %cnt, 6 |