blob: a9df7f2036b634e669a7c6c111a184df5af10312 [file] [log] [blame]
Gabor Greif5edf2102008-05-20 22:07:21 +00001; RUN: llvm-as %s -f -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