[Mesa-dev] [PATCH] R600/SI: Add pattern for zero-extending i1 to i32
Tom Stellard
tom at stellard.net
Tue Feb 4 16:16:32 CET 2014
On Tue, Feb 04, 2014 at 12:56:39PM +0900, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Fixes opencl-example if_* tests with radeonsi.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74469
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
> ---
> lib/Target/R600/SIInstructions.td | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
> index 7e37821..59fe2ae 100644
> --- a/lib/Target/R600/SIInstructions.td
> +++ b/lib/Target/R600/SIInstructions.td
> @@ -1827,6 +1827,11 @@ def : Pat <
> (V_CNDMASK_B32_e64 (i32 0), (i32 -1), $src0)
> >;
>
> +def : Pat <
> + (i32 (zext i1:$src0)),
> + (V_CNDMASK_B32_e64 (i32 0), (i32 1), $src0)
> +>;
> +
> // 1. Offset as 8bit DWORD immediate
> def : Pat <
> (SIload_constant i128:$sbase, IMM8bitDWORD:$offset),
> --
> 1.9.rc1
>
> _______________________________________________
> 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