2 ; RUN: opt < %s -basicaa -gvn -instcombine -S | \
3 ; RUN: grep {ret i32 0}
6 declare i16 @llvm.cttz.i16(i16)
8 define i32 @test(i32* %P, i16* %Q) {
9 %A = load i16* %Q ; <i16> [#uses=1]
10 %x = load i32* %P ; <i32> [#uses=1]
11 %B = call i16 @llvm.cttz.i16( i16 %A ) ; <i16> [#uses=1]
12 %y = load i32* %P ; <i32> [#uses=1]
14 %z = sub i32 %x, %y ; <i32> [#uses=1]