aboutsummaryrefslogtreecommitdiffstats
path: root/test/ExecutionEngine/2003-01-09-SARTest.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/ExecutionEngine/2003-01-09-SARTest.ll')
-rw-r--r--test/ExecutionEngine/2003-01-09-SARTest.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ExecutionEngine/2003-01-09-SARTest.ll b/test/ExecutionEngine/2003-01-09-SARTest.ll
new file mode 100644
index 0000000..73f2900
--- /dev/null
+++ b/test/ExecutionEngine/2003-01-09-SARTest.ll
@@ -0,0 +1,11 @@
+; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
+; RUN: lli %t.bc > /dev/null
+
+; We were accidentally inverting the signedness of right shifts. Whoops.
+
+int %main() {
+ %X = shr int -1, ubyte 16
+ %Y = shr int %X, ubyte 16
+ %Z = add int %Y, 1
+ ret int %Z
+}