1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
4 ; Make sure dagcombine doesn't eliminate the comparison due
5 ; to an off-by-one bug with computeKnownBits information.
9 define void @foo(i32 %a) {
12 ; CHECK-NEXT: pushq %rax
13 ; CHECK-NEXT: .cfi_def_cfa_offset 16
14 ; CHECK-NEXT: shrl $23, %edi
15 ; CHECK-NEXT: testl $256, %edi # imm = 0x100
16 ; CHECK-NEXT: jne .LBB0_2
17 ; CHECK-NEXT: # %bb.1: # %true
18 ; CHECK-NEXT: callq qux
19 ; CHECK-NEXT: .LBB0_2: # %false
20 ; CHECK-NEXT: popq %rax
21 ; CHECK-NEXT: .cfi_def_cfa_offset 8
26 %t1 = and i32 %t0, 256
27 %t2 = icmp eq i32 %t1, 0
28 br i1 %t2, label %true, label %false