[PATCH] D40455: Teach InlineCost about address spaces

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 00:51:16 PST 2018


bjope added a comment.

In https://reviews.llvm.org/D40455#971926, @skatkov wrote:

> Dear Bjorn, your added test in byvall.ll expose the problem in inliner causing an assert.
>
> Specifically if I excerpt you test in separate file and run:
>  $ opt -S -inline -instcombine test.ll
>  I've got a 
>  opt: ../../lib/Analysis/ValueTracking.cpp:1551: void computeKnownBits(const llvm::Value*, llvm::KnownBits&, unsigned int, const {anonymous}::Query&): Assertion `Q.DL.getTypeSizeInBits(V->getType()->getScalarType()) == BitWidth && "V and Known should have same BitWidth"' failed.
>
> The reason of this is that %p is substituted with
>
>   %d = alloca %struct.S1, align 8
>
> which is from addrspace(0) and has a different pointer size than %p.
>
> I'm far from thinking that your patch is causing this issue but probably it is long standing issue in inliner. But it causes the crash in our custom pipeline. 
>  I do not want to revert your patch if you can quickly update the test or simply revert the test itself.
>
> A separate bug against inliner can be filed...
>
> Does it make sense to you?


Ok. I'll take a look at it.


Repository:
  rL LLVM

https://reviews.llvm.org/D40455





More information about the llvm-commits mailing list