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

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 23:06:36 PDT 2017


uabelho added a comment.

In https://reviews.llvm.org/D37894#886215, @arsenm wrote:

> 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


Alright I'll do that.
Thanks!


Repository:
  rL LLVM

https://reviews.llvm.org/D37894





More information about the llvm-commits mailing list