[Beignet] [PATCH] Fix a indirect argument load bug.

Zhigang Gong zhigang.gong at linux.intel.com
Thu May 28 17:00:53 PDT 2015


LGTM, pushed, thanks.

On Thu, May 21, 2015 at 11:31:21AM +0800, Yang Rong wrote:
> If use arg as non add instruction's source directly, for example phi and selection, there is no add, just skip it.
> 
> Signed-off-by: Yang Rong <rong.r.yang at intel.com>
> ---
>  backend/src/ir/lowering.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/backend/src/ir/lowering.cpp b/backend/src/ir/lowering.cpp
> index e17248a..9fcdf74 100644
> --- a/backend/src/ir/lowering.cpp
> +++ b/backend/src/ir/lowering.cpp
> @@ -330,6 +330,7 @@ namespace ir {
>  
>            indirectSeq.push_back(indirectLoad);
>          } else {
> +          if(it == addPtrInsns.end()) continue;  //use arg as phi or selection, no add, skip it.
>            auto dstIt = addPtrInsns.find(dst);
>            if(dstIt == addPtrInsns.end())
>              addPtrInsns.insert(std::make_pair(dst, it->second));
> -- 
> 1.8.3.2
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list