; CHECK: # %bb.0:
; CHECK-NEXT: bsfq %rdi, %rcx
; CHECK-NEXT: movq $-1, %rax
-; CHECK-NEXT: cmoveq %rcx, %rax
+; CHECK-NEXT: cmovneq %rcx, %rax
; CHECK-NEXT: addq $6, %rax
; CHECK-NEXT: retq
; BMI: # %bb.0:
; BMI-NEXT: tzcntq %rdi, %rcx
; BMI-NEXT: movq $-1, %rax
-; BMI-NEXT: cmovbq %rcx, %rax
+; BMI-NEXT: cmovaeq %rcx, %rax
; BMI-NEXT: addq $6, %rax
; BMI-NEXT: retq
%cnt = tail call i64 @llvm.cttz.i64(i64 %v, i1 true)
; CHECK: # %bb.0:
; CHECK-NEXT: bsfq %rdi, %rcx
; CHECK-NEXT: movq $-1, %rax
-; CHECK-NEXT: cmoveq %rcx, %rax
+; CHECK-NEXT: cmovneq %rcx, %rax
; CHECK-NEXT: addq $6, %rax
; CHECK-NEXT: retq
; BMI: # %bb.0:
; BMI-NEXT: tzcntq %rdi, %rcx
; BMI-NEXT: movq $-1, %rax
-; BMI-NEXT: cmovbq %rcx, %rax
+; BMI-NEXT: cmovaeq %rcx, %rax
; BMI-NEXT: addq $6, %rax
; BMI-NEXT: retq
%cnt = tail call i64 @llvm.cttz.i64(i64 %v, i1 true)
; CHECK: # %bb.0:
; CHECK-NEXT: bsfl %edi, %ecx
; CHECK-NEXT: movl $-1, %eax
-; CHECK-NEXT: cmovel %ecx, %eax
+; CHECK-NEXT: cmovnel %ecx, %eax
; CHECK-NEXT: addl $6, %eax
; CHECK-NEXT: retq
; BMI: # %bb.0:
; BMI-NEXT: tzcntl %edi, %ecx
; BMI-NEXT: movl $-1, %eax
-; BMI-NEXT: cmovbl %ecx, %eax
+; BMI-NEXT: cmovael %ecx, %eax
; BMI-NEXT: addl $6, %eax
; BMI-NEXT: retq
%cnt = tail call i32 @llvm.cttz.i32(i32 %v, i1 true)
; CHECK: # %bb.0:
; CHECK-NEXT: bsfl %edi, %ecx
; CHECK-NEXT: movl $-1, %eax
-; CHECK-NEXT: cmovel %ecx, %eax
+; CHECK-NEXT: cmovnel %ecx, %eax
; CHECK-NEXT: addl $6, %eax
; CHECK-NEXT: retq
; BMI: # %bb.0:
; BMI-NEXT: tzcntl %edi, %ecx
; BMI-NEXT: movl $-1, %eax
-; BMI-NEXT: cmovbl %ecx, %eax
+; BMI-NEXT: cmovael %ecx, %eax
; BMI-NEXT: addl $6, %eax
; BMI-NEXT: retq
%cnt = tail call i32 @llvm.cttz.i32(i32 %v, i1 true)