Changeset 4005 for trunk/lib_ir


Ignore:
Timestamp:
Aug 15, 2014, 7:09:02 PM (5 years ago)
Author:
linmengl
Message:

add tests for v128i1, ready now

Location:
trunk/lib_ir/gen
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib_ir/gen/gen.py

    r4004 r4005  
    1212FuncOutput      = "ParabixGeneratedFuncs.h"
    1313
     14FunctionListI1 = ["add", "sub", "mult", "eq", "lt", "gt", "ult", "ugt"]
    1415FunctionListI2 = ["add", "sub", "mult", "eq", "lt", "gt", "ult", "ugt", "vsll", "vsrl", "vsra"]
    1516FunctionListI4 = ["add", "sub", "mult", "eq", "lt", "gt", "ult", "ugt", "vsll", "vsrl", "vsra"]
     
    5455FunctionNamesI8 = [{"c": C(name), "cxx": CXX(name), "op": OP(name),
    5556                    "flag": FLAG(name), "fw": FW} for name in FunctionListI8]
     57FW = 1
     58FunctionNamesI1 = [{"c": C(name), "cxx": CXX(name), "op": OP(name),
     59                    "flag": FLAG(name), "fw": FW} for name in FunctionListI1]
    5660
    5761#configuring Jinja2
     
    6872    fillTemplate(template=TestTemplate, output=TestOutput,
    6973                 params=dict(HeaderComment = "AUTO GENERATED FILE",
     74                             FunctionNamesI1 = FunctionNamesI1,
    7075                             FunctionNamesI2 = FunctionNamesI2,
    7176                             FunctionNamesI4 = FunctionNamesI4,
     
    7883                             FunctionNamesI4 = FunctionNamesI4,
    7984                             FunctionNamesI8 = FunctionNamesI8,
     85                             FunctionNamesI1 = FunctionNamesI1,
    8086                             ))
    8187
  • trunk/lib_ir/gen/llc_func.pytemplate.ll

    r4001 r4005  
     1; v128i1 starts here
     2{% for name in FunctionNamesI1 %}
     3define <128 x i1> @{{ name.c }}(<128 x i1> %a, <128 x i1> %b) {
     4entry:
     5  %c = {{ name.op }} <128 x i1> %a, %b
     6  ret <128 x i1> %c
     7}
     8{% endfor %}
     9
     10; v64i2 starts here
    111{% for name in FunctionNamesI2 %}
    212define <64 x i2> @{{ name.c }}(<64 x i2> %a, <64 x i2> %b) {
  • trunk/lib_ir/gen/test_llc.pytemplate.cpp

    r4001 r4005  
    99#include <cstdlib>
    1010using namespace std;
    11 {% set Names = FunctionNamesI2 + FunctionNamesI4 + FunctionNamesI8 %}
     11{% set Names = FunctionNamesI1 + FunctionNamesI2 + FunctionNamesI4 + FunctionNamesI8 %}
    1212{% set INS_EXT_VEC_ELT_FWs = [2, 4] %}
    1313
Note: See TracChangeset for help on using the changeset viewer.