1 ; RUN: opt -instcombine -S < %s | FileCheck %s
3 define i32 @test1(i32 %x) nounwind {
5 %sub = sub i32 63, %and
9 ; CHECK-NEXT: and i32 %x, 31
10 ; CHECK-NEXT: xor i32 %and, 63
14 declare i32 @llvm.ctlz.i32(i32, i1) nounwind readnone
16 define i32 @test2(i32 %x) nounwind {
17 %count = tail call i32 @llvm.ctlz.i32(i32 %x, i1 true) nounwind readnone
18 %sub = sub i32 31, %count
23 ; CHECK-NEXT: xor i32 %count, 31