On 22 August 2013 16:08, Matt Turner <matts...@gmail.com> wrote:

> These instructions will be used with immediate arguments in the upcoming
> frexp and ldexp lowering passes.
> ---
>  src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> index 2780ab6..034ebef 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> @@ -341,9 +341,20 @@ fs_visitor::try_constant_propagate(fs_inst *inst,
> acp_entry *entry)
>           progress = true;
>           break;
>
> +      case BRW_OPCODE_SHL:
> +      case BRW_OPCODE_SHR:
> +         if (i == 1) {
> +            inst->src[i] = entry->src;
> +            progress = true;
> +         }
> +         break;
> +
>        case BRW_OPCODE_MACH:
>        case BRW_OPCODE_MUL:
>        case BRW_OPCODE_ADD:
> +      case BRW_OPCODE_OR:
> +      case BRW_OPCODE_AND:
> +      case BRW_OPCODE_XOR:
>           if (i == 1) {
>              inst->src[i] = entry->src;
>              progress = true;
> --
> 1.8.3.2
>

Shouldn't we make a similar change to brw_vec4_copy_propagation.cpp?
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to