[llvm-dev] Assertion error in APInt.cpp

Alberto Barbaro via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 9 11:27:14 PST 2019

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190109/5a40894f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fourth.c
Type: text/x-csrc
Size: 160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190109/5a40894f/attachment.c>

More information about the llvm-dev mailing list