[llvm-commits] CVS: llvm/test/Programs/SingleSource/UnitTests/2002-05-03-NotTest.c
Vikram Adve
vadve at cs.uiuc.edu
Tue Jul 8 19:00:01 PDT 2003
Changes in directory llvm/test/Programs/SingleSource/UnitTests:
2002-05-03-NotTest.c updated: 1.1 -> 1.2
---
Log message:
Adding boolean not tests, which are more complicated on a
machine with condition codes!
---
Diffs of the changes:
Index: llvm/test/Programs/SingleSource/UnitTests/2002-05-03-NotTest.c
diff -u llvm/test/Programs/SingleSource/UnitTests/2002-05-03-NotTest.c:1.1 llvm/test/Programs/SingleSource/UnitTests/2002-05-03-NotTest.c:1.2
--- llvm/test/Programs/SingleSource/UnitTests/2002-05-03-NotTest.c:1.1 Fri May 3 14:44:08 2002
+++ llvm/test/Programs/SingleSource/UnitTests/2002-05-03-NotTest.c Tue Jul 8 18:59:31 2003
@@ -1,10 +1,23 @@
#include <stdio.h>
-void test(int A, int B, int C, int D) {
- printf("%d %d %d %d\n", ~A, ~B, ~C, ~D);
+void testBitWiseNot(int A, int B, int C, int D) {
+ printf("Bitwise Not: %d %d %d %d\n", ~A, ~B, ~C, ~D);
}
-void main() {
- test(1, 2, -3, 5);
+void testBooleanNot(int A, int B, int C, int D) {
+ printf("Boolean Not: %d %d %d %d %d %d\n",
+ !(A > 0 && B > 0),
+ !(A > 0 && C > 0),
+ !(A > 0 && D > 0),
+ !(B > 0 && C > 0),
+ !(B > 0 && D > 0),
+ !(C > 0 && D > 0));
+
+}
+
+int main() {
+ testBitWiseNot(1, 2, -3, 5);
+ testBooleanNot(1, 2, -3, 5);
+ return 0;
}
More information about the llvm-commits
mailing list