[PATCH] D37894: [Lint] Avoid failed assertion by fetching the proper pointer type

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 12:10:20 PDT 2017


arsenm added a comment.

In https://reviews.llvm.org/D37894#873521, @uabelho wrote:

> Pass DataLayout to isNoopCast when called from lint.
>
> Question:
>  In FastISel::hasTrivialKill there is:
>
>   // No-op casts are trivially coalesced by fast-isel.
>   if (const auto *Cast = dyn_cast<CastInst>(I))
>     if (Cast->isNoopCast(DL.getIntPtrType(Cast->getContext())) &&
>   
>
> Do you know if it is ok to change this isNoopCast call to Cast->isNoopCast(DL)?
>
> If so, then I can clean up the patch further by removing the IntPtrTy versions completely.


Yes, that should be fine. That can be a separate patch


https://reviews.llvm.org/D37894





More information about the llvm-commits mailing list