<div dir="auto">Hi Roman,<div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">Thanks</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 9, 2019, 19:33 Roman Lebedev <<a href="mailto:lebedev.ri@gmail.com">lebedev.ri@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Jan 9, 2019 at 10:27 PM Alberto Barbaro via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hi all,<br>
> 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:<br>
><br>
> Support/APInt.cpp:233: llvm::APInt llvm::APInt::operator*(const llvm::APInt &) const: Assertion `BitWidth == RHS.BitWidth && "Bit widths must be the same"' failed.<br>
><br>
> I have recompiled llvm and printer the 2 widths. BitWidth is 1 and RHS.BitWidth is 32.<br>
><br>
> I would clarify that in the visitBinaryOperator() I just call Interpreter::visitBinaryOperator(I) and I do not perform any other operation.<br>
><br>
> Can you imagine any reason why this error happens? I have attached the file I used for having the error.<br>
<br>
I would guess because<br>
> BitWidth is 1 and RHS.BitWidth is 32.<br>
which is what it said in the assertion message.<br>
It is up to the API user to uphold that requirement.<br>
<br>
> Thanks<br>
Roman.<br>
<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>