[llvm-commits] [test-suite] r83298 - /test-suite/trunk/SingleSource/Benchmarks/Misc/oourafft.c

Chris Lattner sabre at nondot.org
Sun Oct 4 23:16:42 PDT 2009


Author: lattner
Date: Mon Oct  5 01:16:42 2009
New Revision: 83298

URL: http://llvm.org/viewvc/llvm-project?rev=83298&view=rev
Log:
improve portability of this test to work with FreeBSD (PR5133),
patch by Pawel Worach!

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

Modified: test-suite/trunk/SingleSource/Benchmarks/Misc/oourafft.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Misc/oourafft.c?rev=83298&r1=83297&r2=83298&view=diff

==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Misc/oourafft.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Misc/oourafft.c Mon Oct  5 01:16:42 2009
@@ -2,7 +2,7 @@
 #include <memory.h>
 #include <stdio.h>
 #include <stdlib.h>
-#ifndef __APPLE__ // memalign
+#if !defined(__APPLE__) && !defined(__FreeBSD__) // memalign
 #include <malloc.h>
 #endif
 
@@ -37,7 +37,7 @@
   t_overhead = t_end - t_start;
 
   /* Prepare aux data */
-#ifndef __APPLE__  /* Darwin always 16-byte aligns malloc data */
+#if !defined(__APPLE__) && !defined(__FreeBSD__) /* Darwin always 16-byte aligns malloc data */
   ip = memalign(16, sqrt(N)*sizeof(int));
   w  = memalign(16, 2*N*5/4*sizeof(double));
 #else
@@ -47,7 +47,7 @@
   makewt(N >> 1, ip, w);
   
   /* Allocate buffers */
-#ifndef __APPLE__  /* Darwin always 16-byte aligns malloc data */
+#if !defined(__APPLE__) && !defined(__FreeBSD__) /* Darwin always 16-byte aligns malloc data */
   ref = memalign(16, 2*N*sizeof(double));
   cmp = memalign(16, 2*N*sizeof(double));
   src = memalign(16, 2*N*sizeof(double));





More information about the llvm-commits mailing list