• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=x86_64-unknown -mattr=lzcnt | FileCheck %s
3
4; Make sure we emit opoosite setcc instructions.
5define i64 @pr35399(i64, i8*, i8*) {
6; CHECK-LABEL: pr35399:
7; CHECK:       # %bb.0:
8; CHECK-NEXT:    lzcntq %rdi, %rax
9; CHECK-NEXT:    setae (%rsi)
10; CHECK-NEXT:    setb (%rdx)
11; CHECK-NEXT:    retq
12  %4 = tail call i64 @llvm.ctlz.i64(i64 %0, i1 false)
13  %5 = icmp ne i64 %0, 0
14  %6 = zext i1 %5 to i8
15  store i8 %6, i8* %1, align 1
16  %7 = xor i1 %5, true
17  %8 = zext i1 %7 to i8
18  store i8 %8, i8* %2, align 1
19  ret i64 %4
20}
21
22declare i64 @llvm.ctlz.i64(i64, i1)
23