[cfe-dev] question regarding the C++ test case under LLVM test

Lin, Jin via cfe-dev cfe-dev at lists.llvm.org
Tue Sep 20 11:22:23 PDT 2016


Hi,

I would like to have the following test case only running under Linux instead of Windows. Can someone shed me the light on how to make it work?

The second question is on how to modify the RUN command to run it under windows.  If clangxx is used, the dirver-mode is set to g++. I have to specify the driver mode to be msvc. Please note that the test caseI has header file so that I cannot simply use clang_cc1.

Thanks,

Jin

FILE
// RUN: %clangxx  -target  x86_64-unknown-linux-gnu  -Xclang -fintel-compatibility -O3 %s  -Xclang -disable-llvm-optzns   -emit-llvm -S -o - | FileCheck %s

// Check that llvm.intel.std.container.ptr intrinsic is generated.
//
#include <vector>
#define CONST_VECSIZE 2050

float TIME,RESULT;
std::vector< std::vector<float> > a(CONST_VECSIZE);
std::vector< std::vector<float> > b(CONST_VECSIZE),c(CONST_VECSIZE);
extern void foo(std::vector< std::vector<float> > *);
void test_vector()
{
  int i, j, k;


  for(i=0;i<CONST_VECSIZE;i++)
    for(k=0;k<CONST_VECSIZE;k++)
      for(j=0;j<CONST_VECSIZE;j++)
            c[i][j] = c[i][j] + a[i][k]* b[k][j];

}
// CHECK:  %{{.*}} = call %"class.std::vector.0"** @"llvm.std.container.ptr.p0p0class.std::vector.0"(%"class.std::vector.0"** %{{.*}})
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160920/9ab1eae8/attachment.html>


More information about the cfe-dev mailing list