1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s 3 4; Make sure dagcombine doesn't eliminate the comparison due 5; to an off-by-one bug with computeKnownBits information. 6 7declare void @qux() 8 9define void @foo(i32 %a) { 10; CHECK-LABEL: foo: 11; CHECK: # %bb.0: 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 22; CHECK-NEXT: retq 23 %t0 = lshr i32 %a, 23 24 br label %next 25next: 26 %t1 = and i32 %t0, 256 27 %t2 = icmp eq i32 %t1, 0 28 br i1 %t2, label %true, label %false 29true: 30 call void @qux() 31 ret void 32false: 33 ret void 34} 35 36