r202468 - Add a testcase for r202437.

Bob Wilson bob.wilson at apple.com
Thu Feb 27 21:57:15 PST 2014


Author: bwilson
Date: Thu Feb 27 23:57:14 2014
New Revision: 202468

URL: http://llvm.org/viewvc/llvm-project?rev=202468&view=rev
Log:
Add a testcase for r202437.

Modified:
    cfe/trunk/test/CodeGen/Inputs/instr-profile.pgodata
    cfe/trunk/test/CodeGen/instr-profile.c

Modified: cfe/trunk/test/CodeGen/Inputs/instr-profile.pgodata
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/Inputs/instr-profile.pgodata?rev=202468&r1=202467&r2=202468&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/Inputs/instr-profile.pgodata (original)
+++ cfe/trunk/test/CodeGen/Inputs/instr-profile.pgodata Thu Feb 27 23:57:14 2014
@@ -116,6 +116,12 @@ boolop_loops 9
 50
 26
 
+do_fallthrough 4
+1
+10
+2
+8
+
 no_usable_data 5
 1
 1

Modified: cfe/trunk/test/CodeGen/instr-profile.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/instr-profile.c?rev=202468&r1=202467&r2=202468&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/instr-profile.c (original)
+++ cfe/trunk/test/CodeGen/instr-profile.c Thu Feb 27 23:57:14 2014
@@ -417,6 +417,19 @@ void boolop_loops() {
   // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
 }
 
+void do_fallthrough() {
+  for (int i = 0; i < 10; ++i) {
+    int j = 0;
+    do {
+      // The number of exits out of this do-loop via the break statement
+      // exceeds the counter value for the loop (which does not include the
+      // fallthrough count). Make sure that does not violate any assertions.
+      if (i < 8) break;
+      j++;
+    } while (j < 2);
+  }
+}
+
 // PGOGEN-LABEL: @no_usable_data()
 // PGOUSE-LABEL: @no_usable_data()
 // PGOGEN: store {{.*}} @[[NOC]], i64 0, i64 0
@@ -510,6 +523,7 @@ int main(int argc, const char *argv[]) {
   big_switch();
   boolean_operators();
   boolop_loops();
+  do_fallthrough();
   no_usable_data();
   return 0;
 }





More information about the cfe-commits mailing list