We normally commit the tests in the same patch that changed the code...
On 4 November 2013 08:13, Justin Bogner <[email protected]> wrote: > Author: bogner > Date: Mon Nov 4 10:13:23 2013 > New Revision: 193995 > > URL: http://llvm.org/viewvc/llvm-project?rev=193995&view=rev > Log: > CodeGen: Test that simple expressions are simplified at -O0 > > Added: > cfe/trunk/test/CodeGen/branch-on-bool.c > > Added: cfe/trunk/test/CodeGen/branch-on-bool.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/branch-on-bool.c?rev=193995&view=auto > ============================================================================== > --- cfe/trunk/test/CodeGen/branch-on-bool.c (added) > +++ cfe/trunk/test/CodeGen/branch-on-bool.c Mon Nov 4 10:13:23 2013 > @@ -0,0 +1,22 @@ > +// RUN: %clang %s -O0 -emit-llvm -S -o - | FileCheck %s > + > +void foo(); > +void bar(); > + > +void fold_if(int a, int b) { > + // CHECK: define {{.*}} @fold_if( > + // CHECK-NOT: = phi > + // CHECK: } > + if (a && b) > + foo(); > + else > + bar(); > +} > + > +void fold_for(int a, int b) { > + // CHECK: define {{.*}} @fold_for( > + // CHECK-NOT: = phi > + // CHECK: } > + for (int i = 0; a && i < b; ++i) foo(); > + for (int i = 0; a || i < b; ++i) bar(); > +} > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
