blob: 81478972d57f795bca566ea37539499ef0ee67ef [file] [log] [blame]
Dan Gohmanfea1dd02009-08-25 15:38:29 +00001; RUN: llvm-as %s -o %t.bc
Tanya Lattnere9789ef2004-11-06 23:32:43 +00002; RUN: lli %t.bc > /dev/null
3
Chris Lattner4a8068f2003-01-13 01:03:16 +00004; We were accidentally inverting the signedness of right shifts. Whoops.
5
Tanya Lattnerceca1942008-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
Chris Lattner4a8068f2003-01-13 01:03:16 +000011}
Tanya Lattnerceca1942008-03-10 07:21:50 +000012