[Mesa-dev] [PATCH] libclc: Rename [add|sub]_sat.ll to [add|sub]_sat_if.ll

Tom Stellard tom at stellard.net
Tue Apr 16 09:22:58 PDT 2013


On Mon, Apr 15, 2013 at 07:14:28PM -0500, Aaron Watry wrote:
> configure.py allows overloading *.cl with *.ll, but will only ever build
> the first file listed in SOURCES of ${file}.cl and ${file}.ll
> 
> add_sat, sub_sat, (and the soon to be submitted clz) all define interfaces in
> ${function_name}.ll which are implemented in ${function_name}_impl.ll.
> 
> Renaming the interface files is enough to get them to build again, fixing
> CL usage of these functions.
> 
> Tested on clover/r600g.

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>

> ---
>  generic/lib/SOURCES               |    4 +--
>  generic/lib/integer/add_sat.ll    |   55 -------------------------------------
>  generic/lib/integer/add_sat_if.ll |   55 +++++++++++++++++++++++++++++++++++++
>  generic/lib/integer/sub_sat.ll    |   55 -------------------------------------
>  generic/lib/integer/sub_sat_if.ll |   55 +++++++++++++++++++++++++++++++++++++
>  5 files changed, 112 insertions(+), 112 deletions(-)
>  delete mode 100644 generic/lib/integer/add_sat.ll
>  create mode 100644 generic/lib/integer/add_sat_if.ll
>  delete mode 100644 generic/lib/integer/sub_sat.ll
>  create mode 100644 generic/lib/integer/sub_sat_if.ll
> 
> diff --git a/generic/lib/SOURCES b/generic/lib/SOURCES
> index 18c8afb..eac6c60 100644
> --- a/generic/lib/SOURCES
> +++ b/generic/lib/SOURCES
> @@ -6,11 +6,11 @@ geometric/normalize.cl
>  integer/abs.cl
>  integer/abs_diff.cl
>  integer/add_sat.cl
> -integer/add_sat.ll
> +integer/add_sat_if.ll
>  integer/add_sat_impl.ll
>  integer/rotate.cl
>  integer/sub_sat.cl
> -integer/sub_sat.ll
> +integer/sub_sat_if.ll
>  integer/sub_sat_impl.ll
>  math/fmax.cl
>  math/fmin.cl
> diff --git a/generic/lib/integer/add_sat.ll b/generic/lib/integer/add_sat.ll
> deleted file mode 100644
> index bcbe4c0..0000000
> --- a/generic/lib/integer/add_sat.ll
> +++ /dev/null
> @@ -1,55 +0,0 @@
> -declare i8 @__clc_add_sat_impl_s8(i8 %x, i8 %y)
> -
> -define i8 @__clc_add_sat_s8(i8 %x, i8 %y) nounwind readnone alwaysinline {
> -  %call = call i8 @__clc_add_sat_impl_s8(i8 %x, i8 %y)
> -  ret i8 %call
> -}
> -
> -declare i8 @__clc_add_sat_impl_u8(i8 %x, i8 %y)
> -
> -define i8 @__clc_add_sat_u8(i8 %x, i8 %y) nounwind readnone alwaysinline {
> -  %call = call i8 @__clc_add_sat_impl_u8(i8 %x, i8 %y)
> -  ret i8 %call
> -}
> -
> -declare i16 @__clc_add_sat_impl_s16(i16 %x, i16 %y)
> -
> -define i16 @__clc_add_sat_s16(i16 %x, i16 %y) nounwind readnone alwaysinline {
> -  %call = call i16 @__clc_add_sat_impl_s16(i16 %x, i16 %y)
> -  ret i16 %call
> -}
> -
> -declare i16 @__clc_add_sat_impl_u16(i16 %x, i16 %y)
> -
> -define i16 @__clc_add_sat_u16(i16 %x, i16 %y) nounwind readnone alwaysinline {
> -  %call = call i16 @__clc_add_sat_impl_u16(i16 %x, i16 %y)
> -  ret i16 %call
> -}
> -
> -declare i32 @__clc_add_sat_impl_s32(i32 %x, i32 %y)
> -
> -define i32 @__clc_add_sat_s32(i32 %x, i32 %y) nounwind readnone alwaysinline {
> -  %call = call i32 @__clc_add_sat_impl_s32(i32 %x, i32 %y)
> -  ret i32 %call
> -}
> -
> -declare i32 @__clc_add_sat_impl_u32(i32 %x, i32 %y)
> -
> -define i32 @__clc_add_sat_u32(i32 %x, i32 %y) nounwind readnone alwaysinline {
> -  %call = call i32 @__clc_add_sat_impl_u32(i32 %x, i32 %y)
> -  ret i32 %call
> -}
> -
> -declare i64 @__clc_add_sat_impl_s64(i64 %x, i64 %y)
> -
> -define i64 @__clc_add_sat_s64(i64 %x, i64 %y) nounwind readnone alwaysinline {
> -  %call = call i64 @__clc_add_sat_impl_s64(i64 %x, i64 %y)
> -  ret i64 %call
> -}
> -
> -declare i64 @__clc_add_sat_impl_u64(i64 %x, i64 %y)
> -
> -define i64 @__clc_add_sat_u64(i64 %x, i64 %y) nounwind readnone alwaysinline {
> -  %call = call i64 @__clc_add_sat_impl_u64(i64 %x, i64 %y)
> -  ret i64 %call
> -}
> diff --git a/generic/lib/integer/add_sat_if.ll b/generic/lib/integer/add_sat_if.ll
> new file mode 100644
> index 0000000..bcbe4c0
> --- /dev/null
> +++ b/generic/lib/integer/add_sat_if.ll
> @@ -0,0 +1,55 @@
> +declare i8 @__clc_add_sat_impl_s8(i8 %x, i8 %y)
> +
> +define i8 @__clc_add_sat_s8(i8 %x, i8 %y) nounwind readnone alwaysinline {
> +  %call = call i8 @__clc_add_sat_impl_s8(i8 %x, i8 %y)
> +  ret i8 %call
> +}
> +
> +declare i8 @__clc_add_sat_impl_u8(i8 %x, i8 %y)
> +
> +define i8 @__clc_add_sat_u8(i8 %x, i8 %y) nounwind readnone alwaysinline {
> +  %call = call i8 @__clc_add_sat_impl_u8(i8 %x, i8 %y)
> +  ret i8 %call
> +}
> +
> +declare i16 @__clc_add_sat_impl_s16(i16 %x, i16 %y)
> +
> +define i16 @__clc_add_sat_s16(i16 %x, i16 %y) nounwind readnone alwaysinline {
> +  %call = call i16 @__clc_add_sat_impl_s16(i16 %x, i16 %y)
> +  ret i16 %call
> +}
> +
> +declare i16 @__clc_add_sat_impl_u16(i16 %x, i16 %y)
> +
> +define i16 @__clc_add_sat_u16(i16 %x, i16 %y) nounwind readnone alwaysinline {
> +  %call = call i16 @__clc_add_sat_impl_u16(i16 %x, i16 %y)
> +  ret i16 %call
> +}
> +
> +declare i32 @__clc_add_sat_impl_s32(i32 %x, i32 %y)
> +
> +define i32 @__clc_add_sat_s32(i32 %x, i32 %y) nounwind readnone alwaysinline {
> +  %call = call i32 @__clc_add_sat_impl_s32(i32 %x, i32 %y)
> +  ret i32 %call
> +}
> +
> +declare i32 @__clc_add_sat_impl_u32(i32 %x, i32 %y)
> +
> +define i32 @__clc_add_sat_u32(i32 %x, i32 %y) nounwind readnone alwaysinline {
> +  %call = call i32 @__clc_add_sat_impl_u32(i32 %x, i32 %y)
> +  ret i32 %call
> +}
> +
> +declare i64 @__clc_add_sat_impl_s64(i64 %x, i64 %y)
> +
> +define i64 @__clc_add_sat_s64(i64 %x, i64 %y) nounwind readnone alwaysinline {
> +  %call = call i64 @__clc_add_sat_impl_s64(i64 %x, i64 %y)
> +  ret i64 %call
> +}
> +
> +declare i64 @__clc_add_sat_impl_u64(i64 %x, i64 %y)
> +
> +define i64 @__clc_add_sat_u64(i64 %x, i64 %y) nounwind readnone alwaysinline {
> +  %call = call i64 @__clc_add_sat_impl_u64(i64 %x, i64 %y)
> +  ret i64 %call
> +}
> diff --git a/generic/lib/integer/sub_sat.ll b/generic/lib/integer/sub_sat.ll
> deleted file mode 100644
> index 7252574..0000000
> --- a/generic/lib/integer/sub_sat.ll
> +++ /dev/null
> @@ -1,55 +0,0 @@
> -declare i8 @__clc_sub_sat_impl_s8(i8 %x, i8 %y)
> -
> -define i8 @__clc_sub_sat_s8(i8 %x, i8 %y) nounwind readnone alwaysinline {
> -  %call = call i8 @__clc_sub_sat_impl_s8(i8 %x, i8 %y)
> -  ret i8 %call
> -}
> -
> -declare i8 @__clc_sub_sat_impl_u8(i8 %x, i8 %y)
> -
> -define i8 @__clc_sub_sat_u8(i8 %x, i8 %y) nounwind readnone alwaysinline {
> -  %call = call i8 @__clc_sub_sat_impl_u8(i8 %x, i8 %y)
> -  ret i8 %call
> -}
> -
> -declare i16 @__clc_sub_sat_impl_s16(i16 %x, i16 %y)
> -
> -define i16 @__clc_sub_sat_s16(i16 %x, i16 %y) nounwind readnone alwaysinline {
> -  %call = call i16 @__clc_sub_sat_impl_s16(i16 %x, i16 %y)
> -  ret i16 %call
> -}
> -
> -declare i16 @__clc_sub_sat_impl_u16(i16 %x, i16 %y)
> -
> -define i16 @__clc_sub_sat_u16(i16 %x, i16 %y) nounwind readnone alwaysinline {
> -  %call = call i16 @__clc_sub_sat_impl_u16(i16 %x, i16 %y)
> -  ret i16 %call
> -}
> -
> -declare i32 @__clc_sub_sat_impl_s32(i32 %x, i32 %y)
> -
> -define i32 @__clc_sub_sat_s32(i32 %x, i32 %y) nounwind readnone alwaysinline {
> -  %call = call i32 @__clc_sub_sat_impl_s32(i32 %x, i32 %y)
> -  ret i32 %call
> -}
> -
> -declare i32 @__clc_sub_sat_impl_u32(i32 %x, i32 %y)
> -
> -define i32 @__clc_sub_sat_u32(i32 %x, i32 %y) nounwind readnone alwaysinline {
> -  %call = call i32 @__clc_sub_sat_impl_u32(i32 %x, i32 %y)
> -  ret i32 %call
> -}
> -
> -declare i64 @__clc_sub_sat_impl_s64(i64 %x, i64 %y)
> -
> -define i64 @__clc_sub_sat_s64(i64 %x, i64 %y) nounwind readnone alwaysinline {
> -  %call = call i64 @__clc_sub_sat_impl_s64(i64 %x, i64 %y)
> -  ret i64 %call
> -}
> -
> -declare i64 @__clc_sub_sat_impl_u64(i64 %x, i64 %y)
> -
> -define i64 @__clc_sub_sat_u64(i64 %x, i64 %y) nounwind readnone alwaysinline {
> -  %call = call i64 @__clc_sub_sat_impl_u64(i64 %x, i64 %y)
> -  ret i64 %call
> -}
> diff --git a/generic/lib/integer/sub_sat_if.ll b/generic/lib/integer/sub_sat_if.ll
> new file mode 100644
> index 0000000..7252574
> --- /dev/null
> +++ b/generic/lib/integer/sub_sat_if.ll
> @@ -0,0 +1,55 @@
> +declare i8 @__clc_sub_sat_impl_s8(i8 %x, i8 %y)
> +
> +define i8 @__clc_sub_sat_s8(i8 %x, i8 %y) nounwind readnone alwaysinline {
> +  %call = call i8 @__clc_sub_sat_impl_s8(i8 %x, i8 %y)
> +  ret i8 %call
> +}
> +
> +declare i8 @__clc_sub_sat_impl_u8(i8 %x, i8 %y)
> +
> +define i8 @__clc_sub_sat_u8(i8 %x, i8 %y) nounwind readnone alwaysinline {
> +  %call = call i8 @__clc_sub_sat_impl_u8(i8 %x, i8 %y)
> +  ret i8 %call
> +}
> +
> +declare i16 @__clc_sub_sat_impl_s16(i16 %x, i16 %y)
> +
> +define i16 @__clc_sub_sat_s16(i16 %x, i16 %y) nounwind readnone alwaysinline {
> +  %call = call i16 @__clc_sub_sat_impl_s16(i16 %x, i16 %y)
> +  ret i16 %call
> +}
> +
> +declare i16 @__clc_sub_sat_impl_u16(i16 %x, i16 %y)
> +
> +define i16 @__clc_sub_sat_u16(i16 %x, i16 %y) nounwind readnone alwaysinline {
> +  %call = call i16 @__clc_sub_sat_impl_u16(i16 %x, i16 %y)
> +  ret i16 %call
> +}
> +
> +declare i32 @__clc_sub_sat_impl_s32(i32 %x, i32 %y)
> +
> +define i32 @__clc_sub_sat_s32(i32 %x, i32 %y) nounwind readnone alwaysinline {
> +  %call = call i32 @__clc_sub_sat_impl_s32(i32 %x, i32 %y)
> +  ret i32 %call
> +}
> +
> +declare i32 @__clc_sub_sat_impl_u32(i32 %x, i32 %y)
> +
> +define i32 @__clc_sub_sat_u32(i32 %x, i32 %y) nounwind readnone alwaysinline {
> +  %call = call i32 @__clc_sub_sat_impl_u32(i32 %x, i32 %y)
> +  ret i32 %call
> +}
> +
> +declare i64 @__clc_sub_sat_impl_s64(i64 %x, i64 %y)
> +
> +define i64 @__clc_sub_sat_s64(i64 %x, i64 %y) nounwind readnone alwaysinline {
> +  %call = call i64 @__clc_sub_sat_impl_s64(i64 %x, i64 %y)
> +  ret i64 %call
> +}
> +
> +declare i64 @__clc_sub_sat_impl_u64(i64 %x, i64 %y)
> +
> +define i64 @__clc_sub_sat_u64(i64 %x, i64 %y) nounwind readnone alwaysinline {
> +  %call = call i64 @__clc_sub_sat_impl_u64(i64 %x, i64 %y)
> +  ret i64 %call
> +}
> -- 
> 1.7.10.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list