Make this test a little simpler/faster.
[oota-llvm.git] / test / Transforms / InstCombine / 2007-03-19-BadTruncChangePR1261.ll
1 ; For PR1261. Before bit accurate type support in InstCombine, this would
2 ; turn the sext into a zext.
3 ; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | grep sext
4 ; XFAIL: *
5
6 define i16 @test(i31 %zzz) {
7 entry:
8   %A = sext i31 %zzz to i32
9   %B = add i32 %A, 16384
10   %C = lshr i32 %B, 15
11   %D = trunc i32 %C to i16
12   ret i16 %D
13 }