• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; PR1600
2; RUN: opt < %s -basicaa -gvn -instcombine -S | \
3; RUN:   grep {ret i32 0}
4; END.
5
6declare i16 @llvm.cttz.i16(i16)
7
8define 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]
13        store i16 %B, i16* %Q
14        %z = sub i32 %x, %y             ; <i32> [#uses=1]
15        ret i32 %z
16}
17
18