libclc: Fix abs_diff builtin integer function

Patch by: Aaron Watry

llvm-svn: 184993
This commit is contained in:
Tom Stellard 2013-06-26 18:20:50 +00:00
parent ec87fb0b0c
commit cd88a4ebb6
2 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ geometric/dot.cl
geometric/length.cl
geometric/normalize.cl
integer/abs.cl
integer/abs_diff.cl
integer/add_sat.cl
integer/add_sat.ll
integer/add_sat_impl.ll

View File

@ -1,3 +1,3 @@
_CLC_OVERLOAD _CLC_DEF UGENTYPE abs_diff(GENTYPE x) {
_CLC_OVERLOAD _CLC_DEF UGENTYPE abs_diff(GENTYPE x, GENTYPE y) {
return __builtin_astype((GENTYPE)(x > y ? x-y : y-x), UGENTYPE);
}