summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-03 19:58:17 +0000
committerChris Lattner <sabre@nondot.org>2002-05-03 19:58:17 +0000
commit40acfe3554d77bbb6873bdf4d9f09af56798600c (patch)
tree897dc2874a27bb822ec8cc3971e61452a56feebe
parent8a1313ba26838400e2e98536da39d5692fa50611 (diff)
downloadbcm5719-llvm-40acfe3554d77bbb6873bdf4d9f09af56798600c.tar.gz
bcm5719-llvm-40acfe3554d77bbb6873bdf4d9f09af56798600c.zip
Add new testcase for general constant prop.
llvm-svn: 2457
-rw-r--r--llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll b/llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll
new file mode 100644
index 00000000000..fbb67e64687
--- /dev/null
+++ b/llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll
@@ -0,0 +1,18 @@
+; This bug has to do with the fact that constant propogation was implemented in
+; terms of _logical_ not (! in C) instead of _bitwise_ not (~ in C). This was
+; due to a spec change.
+
+; RUN: if as < %s | opt -constprop | dis | grep 'int 0'
+; RUN: then exit 1
+; RUN: else exit 0
+; RUN: fi
+
+int "test1"() {
+ %R = not int 123
+ ret int %R
+}
+
+int "test2"() {
+ %R = not int -123
+ ret int %R
+}
OpenPOWER on IntegriCloud