[LLVMdev] where can I find out the documents of how to write a llvm regression test case?

Changcheng Wang changcheng at multicorewareinc.com
Sun Aug 26 23:58:34 PDT 2012


Hi,
thanks for your letter,but i have read it several times,and now i am
confused still.because i do not know how the test work.
for a simple sample:

; RUN: llvm-as < %s | llvm-dis | FileCheck %s

@addr = external global i64

define i64 @add_unsigned(i64 %x, i64 %y) {
; CHECK: %z = add nuw i64 %x, %y
	%z = add nuw i64 %x, %y
	ret i64 %z
}

1.FileCheck verify the file that llvm-dis output and %s? if i just
want to verify if the file that llvm-dis output contain a string(such
as "abc“),what should i do?
2."; CHECK: %z = add nuw i64 %x, %y" and "%z = add nuw i64 %x, %y" has
the same sentence, why?

so i really want to know more details about how to write a test,but i
can not find more documents out.

thanks

best wishes!

changcheng


On Mon, Aug 27, 2012 at 2:39 PM, Nadav Rotem <nrotem at apple.com> wrote:
> The docs are here:  http://llvm.org/docs/TestingGuide.html#rtstructure . It is a good idea to look at the existing regression tests in '/test'.
>
> On Aug 27, 2012, at 9:35 AM, Changcheng Wang <changcheng at multicorewareinc.com> wrote:
>
>> hi,all:
>> I have try to write some regression tests of llvm,but it is hard for
>> me.because i have no knowledge about it and few documents about it.
>> if anyone can give me more documents about it.
>>
>> thanks
>>
>> best wishes
>>
>> changcheng
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list