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: shrl $23, %edi
13 ; CHECK-NEXT: testl $256, %edi # imm = 0x100
14 ; CHECK-NEXT: jne .LBB0_2
15 ; CHECK-NEXT: # %bb.1: # %true
16 ; CHECK-NEXT: pushq %rax
17 ; CHECK-NEXT: .cfi_def_cfa_offset 16
18 ; CHECK-NEXT: callq qux@PLT
19 ; CHECK-NEXT: popq %rax
20 ; CHECK-NEXT: .cfi_def_cfa_offset 8
21 ; CHECK-NEXT: .LBB0_2: # %false
26 %t1 = and i32 %t0, 256
27 %t2 = icmp eq i32 %t1, 0
28 br i1 %t2, label %true, label %false