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