xref: /llvm-project/llvm/test/CodeGen/X86/pr94824.ll (revision d9507a3e10d1750d88dd518c14b9a9a62b9eefcd)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2; RUN: llc < %s -mtriple=x86_64-linux-gnu | FileCheck %s
3
4define i16 @pr94824(i8 %x1) {
5; CHECK-LABEL: pr94824:
6; CHECK:       # %bb.0: # %entry
7; CHECK-NEXT:    orl $256, %edi # imm = 0x100
8; CHECK-NEXT:    rep bsfl %edi, %ecx
9; CHECK-NEXT:    movl $1, %eax
10; CHECK-NEXT:    # kill: def $cl killed $cl killed $ecx
11; CHECK-NEXT:    shll %cl, %eax
12; CHECK-NEXT:    # kill: def $ax killed $ax killed $eax
13; CHECK-NEXT:    retq
14entry:
15  %cttz = call i8 @llvm.cttz.i8(i8 %x1, i1 false)
16  %ext = zext i8 %cttz to i16
17  %shl = shl i16 1, %ext
18  ret i16 %shl
19}
20