[LLVMdev] LTO regression test Bug 17623

David Blaikie dblaikie at gmail.com
Tue Feb 3 18:20:09 PST 2015


On Feb 3, 2015 5:57 PM, "David Callahan" <dcallahan at fb.com> wrote:
>
> Hello,
>
> I have a fix for Bug17623 (http://llvm.org/bugs/show_bug.cgi?id=17623)
but I am not sure how best to install a regression test. The commands I use
to run the test are (approximately)
>
> $LLVM/clang -flto -O2 -o BUG.o -c  BUG.c
> $LLVM/llvm-lto -exported-symbol=main -o lto.o BUG.o
> $LLVM/clang -o bug lto.o
> ./bug
>
> Where the failing behavior is to seg fault and corrected behavior is to
run to completion.
> The use of llvm-lto avoids a dependence on the native loader having
appropriate plugin support.
>
> The reliance on running clang and code suggests a test belongs in the
llvm-test-suite.

Not necessarily. It depends where the bug is. If clang is producing wrong
IR and needs to be changed, we just test clang and verify that the desired
IR doesn't have the erroneous feature that wr removed.

Alternatively, if clang is doing the right thing and the llvm IR linker is
mangling the result, or the llvm optimizations misunderstand - we should
just be able to construct the minimal IR that demonstrates the poor
behavior and verify llvm gets the right answer.

So where is the bug?

> Could someone give me a pointer on how to configure a test using commands
like the above? Are there any other tests with a similar structure?
>
> Thanks
> david
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150203/43efd9fa/attachment.html>


More information about the llvm-dev mailing list