[llvm-dev] Code which should exit 1 is exiting 0
John Criswell via llvm-dev
llvm-dev at lists.llvm.org
Wed May 4 17:41:26 PDT 2016
On 5/4/16 8:25 PM, Carlos Liam via llvm-dev wrote:
> I have IR at https://ghostbin.com/paste/daxv5 which is meant to exit
> 1, but it is always exiting 0.
1) It would help if you pasted the relevant code into your message.
Paranoid people like me don't following links in emails.
2) Have you ensured that your program doesn't exercise undefined
behavior? If your program has a signed overflow, an out-of-bounds
error, or some other undefined behavior, the compiler may optimize it in
surprising and unexpected way.
> I'm using it as a template for checking if two functions @test1 and
> @test2 are equivalent by checking against the exhaustive possible i16
> values. For this particular example it should be enough to know that
> for certain i16, @test1 and @test2 are *not* equal. When an inequality
> is found, the program should exit 1. However, it seems like it's
> always exiting 0. Is there something I'm doing wrong?
> - CL
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
Department of Computer Science, University of Rochester
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev