[PATCH] D63589: [X86] Add BLSI to isUseDefConvertible.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 20 10:49:31 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL363957: [X86] Add BLSI to isUseDefConvertible. (authored by ctopper, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D63589?vs=205742&id=205859#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63589/new/
https://reviews.llvm.org/D63589
Files:
llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
llvm/trunk/test/CodeGen/X86/bmi.ll
Index: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
@@ -3369,6 +3369,10 @@
case X86::BSR32rr:
case X86::BSR64rr:
return X86::COND_E;
+ case X86::BLSI32rr:
+ case X86::BLSI64rr:
+ return X86::COND_AE;
+ // TODO: BLSR, BLSMSK, and TBM instructions.
}
}
Index: llvm/trunk/test/CodeGen/X86/bmi.ll
===================================================================
--- llvm/trunk/test/CodeGen/X86/bmi.ll
+++ llvm/trunk/test/CodeGen/X86/bmi.ll
@@ -1240,8 +1240,7 @@
; X64-LABEL: blsi_cflag_32:
; X64: # %bb.0:
; X64-NEXT: blsil %edi, %eax
-; X64-NEXT: testl %edi, %edi
-; X64-NEXT: cmovel %esi, %eax
+; X64-NEXT: cmovael %esi, %eax
; X64-NEXT: retq
%tobool = icmp eq i32 %x, 0
%sub = sub nsw i32 0, %x
@@ -1279,8 +1278,7 @@
; X64-LABEL: blsi_cflag_64:
; X64: # %bb.0:
; X64-NEXT: blsiq %rdi, %rax
-; X64-NEXT: testq %rdi, %rdi
-; X64-NEXT: cmoveq %rsi, %rax
+; X64-NEXT: cmovaeq %rsi, %rax
; X64-NEXT: retq
%tobool = icmp eq i64 %x, 0
%sub = sub nsw i64 0, %x
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63589.205859.patch
Type: text/x-patch
Size: 1200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190620/9115d734/attachment.bin>
More information about the llvm-commits
mailing list