Hi Chouhan,
From a brief inspection of the bug report and the attached IR (lifetime-end.ll),
you have a couple of options:
1- You can run `opt lifetime-end.ll -basicaa -gvn -S`. If your change did what
it’s supposed to, you should see that `ret i8 %0` was replaced with `ret i8
undef`.
2- The IR attached in the case is in the form of a LIT. You can read more about
it here:
https://www.llvm.org/docs/TestingGuide.html#writing-new-regression-tests
You would probably commit it as a test with your patch. This test should fail
without your change and pass with your change. To run it, you can call `lit
lifetime-end.ll` and examine the output of the command.
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Shreyansh
Chouhan via llvm-dev
Sent: Saturday, August 10, 2019 7:34 AM
To: llvm-dev at lists.llvm.org
Subject: [llvm-dev] Bug 20811
Hi!
This is my first time contributing to the llvm project, I took up bug #20811
[https://bugs.llvm.org/show_bug.cgi?id=20811]. From my understanding, what I had
to do was to assign an undef to a variable if it is loading from a pointer after
its lifetime has ended (please correct me if I am wrong.) I would like to ask
for help on how could I check if a variable has been assigned undef to verify my
changes.
Thanks in advance :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20190810/9d36ccdf/attachment.html>