[Beignet] [PATCH] Backend: Fix llvm40 assert about literal structs

Yang, Rong R rong.r.yang at intel.com
Thu May 18 07:00:57 UTC 2017


Pushed, thanks.

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Guo, Yejun
> Sent: Wednesday, May 17, 2017 20:57
> To: Pan, Xiuli <xiuli.pan at intel.com>; beignet at lists.freedesktop.org
> Subject: Re: [Beignet] [PATCH] Backend: Fix llvm40 assert about literal structs
> 
> Looks fine to me, thanks.
> 
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Pan, Xiuli
> Sent: Wednesday, May 17, 2017 3:15 PM
> To: beignet at lists.freedesktop.org
> Subject: Re: [Beignet] [PATCH] Backend: Fix llvm40 assert about literal structs
> 
> Ping for review.
> If llvm is debug version will cause assert for device enqueue cases.
> 
> -----Original Message-----
> From: Pan, Xiuli
> Sent: Tuesday, April 25, 2017 13:27
> To: beignet at lists.freedesktop.org
> Cc: Pan, Xiuli <xiuli.pan at intel.com>
> Subject: [PATCH] Backend: Fix llvm40 assert about literal structs
> 
> From: Pan Xiuli <xiuli.pan at intel.com>
> 
> In llvm literal structs have no name, so check it first.
> 
> Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
> ---
>  backend/src/llvm/llvm_gen_backend.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/backend/src/llvm/llvm_gen_backend.cpp
> b/backend/src/llvm/llvm_gen_backend.cpp
> index 9954021..831666e 100644
> --- a/backend/src/llvm/llvm_gen_backend.cpp
> +++ b/backend/src/llvm/llvm_gen_backend.cpp
> @@ -362,7 +362,8 @@ namespace gbe
>          Type *eltTy = dyn_cast<PointerType>(type)->getElementType();
>          if (eltTy->isStructTy()) {
>            StructType *strTy = dyn_cast<StructType>(eltTy);
> -          if (strTy->getName().data() && strstr(strTy->getName().data(),
> "sampler"))
> +          if (!strTy->isLiteral() && strTy->getName().data() &&
> +              strstr(strTy->getName().data(), "sampler"))
>              type = Type::getInt32Ty(value->getContext());
>          }
>        }
> --
> 2.7.4
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list