[llvm-dev] Assertion error in APInt.cpp
Alberto Barbaro via llvm-dev
llvm-dev at lists.llvm.org
Wed Jan 9 12:39:10 PST 2019
Thanks for your email. I understand the error but I cannot understand why
the sizes are different considering I'm just calling visitBinaryOperator
with the original instruction as parameter.
On Wed, Jan 9, 2019, 19:33 Roman Lebedev <lebedev.ri at gmail.com wrote:
> On Wed, Jan 9, 2019 at 10:27 PM Alberto Barbaro via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > Hi all,
> > I'm experimenting with the Interpreter and all look good so far :)
> Unfortunately when I play with the visitBinartOperator() method I have the
> following assertion error:
> > Support/APInt.cpp:233: llvm::APInt llvm::APInt::operator*(const
> llvm::APInt &) const: Assertion `BitWidth == RHS.BitWidth && "Bit widths
> must be the same"' failed.
> > I have recompiled llvm and printer the 2 widths. BitWidth is 1 and
> RHS.BitWidth is 32.
> > I would clarify that in the visitBinaryOperator() I just call
> Interpreter::visitBinaryOperator(I) and I do not perform any other
> > Can you imagine any reason why this error happens? I have attached the
> file I used for having the error.
> I would guess because
> > BitWidth is 1 and RHS.BitWidth is 32.
> which is what it said in the assertion message.
> It is up to the API user to uphold that requirement.
> > Thanks
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev