blob: eeb432679244d8297bf29af50adb2457d6030f05 [file] [log] [blame]
Tanya Lattnerceca1942008-03-10 07:21:50 +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