source: trunk/lib_ir/test_ir_compile.cpp @ 4277

Last change on this file since 4277 was 4277, checked in by linmengl, 5 years ago

add a file to check IR compiled from the IDISA function

File size: 662 bytes
Line 
1/* This file is used to make sure the build system working properly.
2 * We simply use an IR function to fill v4i32 as <i32 x, i32 x, i32 x, i32 x>
3 */
4#include "utility.h"
5#include <iostream>
6using namespace std;
7
8extern "C" {
9  void test_link(SIMD_type *a, int x);
10}
11
12SIMD_type f(SIMD_type a, SIMD_type b)
13{
14  return simd<4>::add(a,b);
15}
16
17int main(int argc, char **argv)
18{
19  SIMD_type a, b, c;
20
21  c = f(a, b);
22  test_link(&c, 10);
23  //if (argc != 2) {
24    //cout << "Wrong number of arguments!" << endl << "RUN: [exec] <number> \n";
25    //return 0;
26  //}
27
28  //int x = atoi(argv[1]);
29  //test_link(&a, x);
30  //cout << Store2String(a, 1) << endl;
31
32  return 0;
33}
34
Note: See TracBrowser for help on using the repository browser.