summaryrefslogtreecommitdiff
path: root/kernels
Commit message (Collapse)AuthorAgeFilesLines
* GBE: support getelementptr with ConstantExpr operandGuo Yejun2014-02-281-0/+18
| | | | | | | | | | Add support during LLVM IR -> Gen IR period when the first operand of getelementptr is ConstantExpr. utest is also added. Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Add utest compiler_private_data_overflowYongjia Zhang2014-01-201-0/+10
| | | | | | | | | utests: compiler_private_data_overflow is aimed to hit a larger than 1KB stack. It will fail with the old beignet which allocate 1KB stack size no matter the actual usage of stack in the kernel. Signed-off-by: Yongjia Zhang<zhang_yong_jia@126.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Change compiler_function_argument3 to cover llvm.memcpy.Yang Rong2014-01-161-0/+2
| | | | | | | | We found clang wound emit llvm.memcpy when assign a stuct to another, if sizeof(struct) > 64. Add a assignment to produce llvm.memcpy. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* GBE: fix the constant data allocation.Zhigang Gong2013-11-131-1/+1
| | | | | | | | | | | | | | | | | | Need to keep consistency between the constant data allocation and the constant register allocation. So we need to skip the unused constant data at the constant data allocation stage. To avoid possible mismatching, add a new assert in the constant register(address) allocation stage to make sure the address register match the eaxct constant data. Also modify the constant utest slightly to hit this code path. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com>
* GBE: fix a 64bit scalar register issue.Ruiling Song2013-11-071-3/+4
| | | | | | | | | | | For scalar register, should use stride 0. also change the unit test to hit the point. v2: fix h2() Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* utests: add test case for structure argumentLu Guanqun2013-11-061-0/+69
| | | | | Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* utests: use mad which will get better precision.Ruiling Song2013-11-061-1/+1
| | | | | | | | | Normal mul/add could not met the precision requirement of this case. Previously it passed because we will do mad optimization in backend. Use mad directly, so the test case does not depend on backend optimization. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* utest: add test case for builtin function exp/exp2/exp10/expm1.Yi Sun2013-10-291-0/+10
| | | | | | Signed-off-by: Yi Sun <yi.sun@intel.com> Signed-off-by: Yangwei Shui <yangweix.shui@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* utest: Add test case for built-in function pow.Yi Sun2013-10-291-0/+7
| | | | | Signed-off-by: Yi Sun <yi.sun@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Add a test for vector argument deallocate assert.Yang Rong2013-10-221-0/+12
| | | | | | | V2: Add result compare. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com>
* Add more type for async copy test case.Yang Rong2013-10-211-15/+23
| | | | | Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* GBE: Handle all-zero constant.Ruiling Song2013-10-211-2/+13
| | | | | | | Also refine Undef value support. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* support saturated converting from 64-bit intHomer Hsing2013-10-181-0/+16
| | | | | | | | | | | | This patch supports saturated converting from 64-bit int to shorter int, and from 32-bit float to 64-bit int. This patch also contains test case. version 2: ulong had been declared in some platform Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* Add test case for newValueProxy of InsertElementInst.Yang Rong2013-10-181-0/+11
| | | | | Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* utests: add test cases for function call.Ruiling Song2013-10-172-0/+233
| | | | | Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* GBE: Support local variable inside kernel function.Ruiling Song2013-10-141-7/+21
| | | | | | | | | | | | | | | As Clang treat local variable in similar way like global constant, (they are treated as Global variable in each own address space) we refine the previous constant implementation in order to share same code between local variable and global constant. We will allocate an address register for each GlobalVariable (constant or local) through calling newRegister(). In later step, through getRegister() we will get a proper register derived from the allocated address register. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* saturated conversion of native GPU data type, larger to narrowerHomer Hsing2013-10-101-0/+32
| | | | | | | | | | | | | | This patch supports saturated conversion of native GPU data type (char/short/int/float), from a larger-range data type to a narrower-range data type. For instance, convert_uchar_sat(int) Several test cases are in this patch. v2: add uint->int, int->uint Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* GBE: Refine the curbe entry allocation for sampler/image information.Zhigang Gong2013-09-261-1/+1
| | | | | | | | | | | | | After the previous patch, we can move the image infomation curbe entry allocation to prior to the instruction selection. Then we can concentrate all curbe allocation before we do the normal register allocation. This way can bring two advantages: 1. Avoid the image information curbe entry is allocated among the normal registers. 2. The register interval analyzing could handle the image/sampler information correctly. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* fix scalarizing of llvm phi nodeHomer Hsing2013-09-251-0/+13
| | | | | | | | llvm phi node can have odd number of args. this patch also contains a test case. Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Utests: refine the previous fake 3D test cases.Zhigang Gong2013-09-183-7/+24
| | | | | | | | All the previous 3D test cases are only using depth 1, and not really touch the 3D read/write code path. Now fix them. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: He Junyan <junyan.he@inbox.com>
* utests: add more constant test cases for composite type.Ruiling Song2013-09-181-2/+57
| | | | | Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* change constant test case to cover short/long type.Ruiling Song2013-09-171-1/+12
| | | | | Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* support converting 64-bit integer to 32-bit floatHomer Hsing2013-09-171-0/+5
| | | | | | | | | | | version 2: improve algorithm to convert signed integer fix source operand type in llvm_gen_backend enable predicate in addWithCarry change test case to test signed integer Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* support converting 64-bit integer to shorter integerHomer Hsing2013-09-111-0/+7
| | | | | Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* add built-in function "atan2"Homer Hsing2013-09-111-0/+4
| | | | | | | | also improve the accuracy of built-in function "atan" also add a test case Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* Change constant unit test to cover 4 byte data type.Ruiling Song2013-09-041-1/+1
| | | | | Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Fix utest compiler_group_size4 error.Ruiling Song2013-08-301-3/+3
| | | | | | | Per opencl spec, bitfield is not supported. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* add built-in function "lgamma", "lgamma_r"Homer Hsing2013-08-302-0/+8
| | | | | | | also include test cases Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* add built-in function "tgamma"Homer Hsing2013-08-301-0/+4
| | | | | | | also include a test case Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* improve built-in function "sinpi"Homer Hsing2013-08-301-0/+4
| | | | | | | | | | | "sinpi" was calculated as "sin(pi * x)". But that was not a quite-good way. This patch improved the function, also included a test case. v2: fix compiling warning Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Add a test case that trigger a known bug.Chuanbo Weng2013-08-291-0/+21
| | | | | | | | | This unit test case trigger a known bug: ASSERTION FAILED: TODO Boolean values cannot escape their definition basic block. Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* utests: Add a unit test for non-aligned group size.Ruiling Song2013-08-291-0/+17
| | | | | | | To hit prediction logic. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Utests: enable long/ulong for abs_diff test case.Zhigang Gong2013-08-191-0/+2
| | | | Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* fix a typoHomer Hsing2013-08-191-1/+1
| | | | | Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Add async copy and async stride copy test case.Yang Rong2013-08-162-0/+32
| | | | | | | | Just hard code the int2 and char4 type. Other types have tested using comformance test. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* test 64bit version of "upsample"Homer Hsing2013-08-161-0/+4
| | | | | Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* test 64bit-integer comparingHomer Hsing2013-08-141-0/+29
| | | | | | | | | | | | | only work when OCL_POST_ALLOC_INSN_SCHEDULE=0 because the post alloc scheduler puts CMP after SEL, but in IR, CMP is before SEL, like this GT.int64 %34 %31 %33 LOADI.int64 %38 3 LOADI.int64 %39 4 SEL.int64 %35 %34 %38 %39 Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviwed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* support 64bit-integer multiplicationHomer Hsing2013-08-131-0/+7
| | | | | | | also add test case Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Add a load bool imm test case.Yang Rong2013-08-131-0/+12
| | | | | Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* test 64bit-integer shiftingHomer Hsing2013-08-133-0/+21
| | | | | | | v2: put shifting in branch Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* support converting shorter int to 64bit intHomer Hsing2013-08-121-0/+7
| | | | | | | | | converting byte/word/dword to int64 also add test case v2: define temporary reg as dest reg of instruction Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Add event unit test.Yang Rong2013-08-121-0/+6
| | | | | Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* utest: Add test case for function acos/acosh/asin/asinh.Yi Sun2013-08-121-0/+10
| | | | | | | Case contains illegal, boundary and legal values. Signed-off-by: Yi Sun <yi.sun@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Utests: enable long/ulong in vector load/store test case.Zhigang Gong2013-08-091-3/+3
| | | | | Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
* GBE: enable double vector load/store support.Zhigang Gong2013-08-071-3/+3
| | | | | | | | | | We have some accurate problem for double calculation on GPU side. I have to change the test case for double type to add a tolerate error when check the double data result. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: "Xing, Homer" <homer.xing@intel.com>
* test 64bit-integer selection operatorHomer Hsing2013-08-071-0/+3
| | | | | Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* test 64bit-integer immediate value, and "and", "or", "xor" arithmeticHomer Hsing2013-08-071-0/+17
| | | | | Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* support 64bit-integer addition, subtractionHomer Hsing2013-08-061-0/+7
| | | | | | | | | | | also enable GPU command "subb" (subtract with borrow) also add test cases v2: renamed GEN_TYPE_UQ/GEN_TYPE_Q to GEN_TYPE_UL/GEN_TYPE_L Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* test if register allocation and 64-bit reading are fixedHomer Hsing2013-08-051-0/+5
| | | | | Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Song, Ruiling <ruiling.song@intel.com>
* test built-in function "shuffle2"Homer Hsing2013-08-051-0/+13
| | | | | | | v3: tested two implement of "shuffle2" Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Yang, Rong R <rong.r.yang@intel.com>