[llvm-commits] [test-suite] r116872 - /test-suite/trunk/SingleSource/Benchmarks/Misc/salsa20.c

Daniel Dunbar daniel at zuster.org
Tue Oct 19 15:30:36 PDT 2010


Author: ddunbar
Date: Tue Oct 19 17:30:36 2010
New Revision: 116872

URL: http://llvm.org/viewvc/llvm-project?rev=116872&view=rev
Log:
Fix test to honor SMALL_PROBLEM_SIZE, this test is stupid.

Modified:
    test-suite/trunk/SingleSource/Benchmarks/Misc/salsa20.c

Modified: test-suite/trunk/SingleSource/Benchmarks/Misc/salsa20.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Misc/salsa20.c?rev=116872&r1=116871&r2=116872&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Misc/salsa20.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Misc/salsa20.c Tue Oct 19 17:30:36 2010
@@ -51,14 +51,24 @@
 
 int main(void) {
   uint32_t val, i;
+#ifdef SMALL_PROBLEM_SIZE
+  uint32_t count = 5379194;
+  uint32_t offset = 0xf655703d - 0xb67e7950;
+#else
+  uint32_t count = 537919488;
+  uint32_t offset = 0;
+#endif
 
   for(i=0; i<16; i++)
     STATE[i] = (0xedababe5+(i+13))^(0xdeadbeef-i);
   
-  for(i=0; i<537919488; i++)
+  for(i=0; i<count; i++)
     salsa();
 
-  printf("got:       %x\n", val = salsa());
+  val = salsa();
+  val += offset;
+
+  printf("got:       %x\n", val);
   printf("should be: %x\n", 0xf655703d);
   return(val != 0xf655703d);
 }





More information about the llvm-commits mailing list