[Beignet] [PATCH] enable 64bit-integer versions of "max, min, clamp"

Zhigang Gong zhigang.gong at linux.intel.com
Mon Aug 19 00:35:18 PDT 2013


LGTM, pushed, thanks.

On Mon, Aug 19, 2013 at 09:43:32AM +0800, Homer Hsing wrote:
> CPU instruction "sel_cmp" don't support 64bit int.
> not emit SelectModifierInstructionPattern in that case.
> tested by piglit. piglit test cases "long(ulong)-max(min,clamp)" all passed.
> 
> Signed-off-by: Homer Hsing <homer.xing at intel.com>
> ---
>  backend/src/backend/gen_insn_selection.cpp | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp
> index 8e4cd8f..90ffd7c 100644
> --- a/backend/src/backend/gen_insn_selection.cpp
> +++ b/backend/src/backend/gen_insn_selection.cpp
> @@ -1737,6 +1737,9 @@ namespace gbe
>        SelectionDAG *cmp = dag.child[0];
>        const SelectInstruction &insn = cast<SelectInstruction>(dag.insn);
>  
> +      if (insn.getType() == TYPE_S64 || insn.getType() == TYPE_U64) // not support
> +        return false;
> +
>        // Not in this block
>        if (cmp == NULL) return false;
>  
> -- 
> 1.8.1.2
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list