blob: 81478972d57f795bca566ea37539499ef0ee67ef [file] [log] [blame]
Dan Gohman2d65d352009-08-25 15:38:29 +00001; RUN: llvm-as %s -o %t.bc
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002; RUN: lli %t.bc > /dev/null
3
4; We were accidentally inverting the signedness of right shifts. Whoops.
5
Tanya Lattner003eae52008-03-10 07:21:50 +00006define i32 @main() {
7 %X = ashr i32 -1, 16 ; <i32> [#uses=1]
8 %Y = ashr i32 %X, 16 ; <i32> [#uses=1]
9 %Z = add i32 %Y, 1 ; <i32> [#uses=1]
10 ret i32 %Z
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011}
Tanya Lattner003eae52008-03-10 07:21:50 +000012