<div dir="ltr">FileCheck (which you can see in the RUN lines) is what consumes the CHECK lines (or other suffixes, if specified in the FileCheck invocation in the RUN line) - the thing that runs the RUN line is lit: <a href="https://llvm.org/docs/CommandGuide/lit.html">https://llvm.org/docs/CommandGuide/lit.html</a></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 25, 2021 at 3:03 AM Diogo Sampaio via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div>Hi,<br></div><div>see if this helps you tu understand the test it self: <a href="https://llvm.org/docs/CommandGuide/FileCheck.html" rel="nofollow noopener noreferrer" target="_blank">https://llvm.org/docs/CommandGuide/FileCheck.html</a><br></div><div>And once you have a C/C++ input test file with a RUN: command on it, the test commands to check the result usually can be generated with the llvm-project/llvm/utils/update_cc_test_checks.py script.<br></div><div>cheers<br></div><br><div><br> <div style="font-size:9pt;font-family:arial,helvetica,sans-serif"> <span style="color:rgb(20,68,68);font-size:9pt"><strong>Diogo Sampaio</strong></span><br> <span style="color:rgb(20,68,68);font-size:9pt"><strong>Senior Compiler Engineer • Kalray</strong></span><br><span style="color:rgb(17,88,143);font-size:8pt"><u><a href="mailto:dsampaio@kalrayinc.com" target="_blank">dsampaio@kalrayinc.com</a></u> • <a href="https://www.kalrayinc.com" style="color:rgb(17,88,143)" rel="nofollow noopener noreferrer nofollow noopener noreferrer" target="_blank"><u>www.kalrayinc.com</u></a></span> </div> <br> <table cellpadding="0px" border="0px"><tbody><tr><td> <div> <a href="https://www.kalrayinc.com" rel="nofollow noopener noreferrer nofollow noopener noreferrer" target="_blank"> <img alt="Kalray logo" src="http://data.kalrayinc.com/Kalray_72.png"></a> </div> </td></tr></tbody></table> <br>   <span style="color:rgb(125,182,33);font-size:8pt;font-family:arial,helvetica,sans-serif"><strong> Please consider the environment before printing this e-mail.</strong></span> <div> <span style="color:rgb(20,68,68);font-size:8pt;font-family:arial,helvetica,sans-serif;display:block;line-height:100%">This message contains information that may be privileged or confidential and is the property of Kalray S.A. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.</span></div> <br></div><br><hr id="gmail-m_32933601061213720zwchr"><div><b>From: </b>"cfe-dev" <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>><br><b>To: </b>"cfe-dev" <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>><br><b>Sent: </b>Thursday, November 25, 2021 11:54:27 AM<br><b>Subject: </b>[cfe-dev] Question about Clang codegen tests<br></div><br><div><div style="font-family:verdana,arial,helvetica,sans-serif;font-size:10pt"><div>Hello, everyone!<br></div><br><div>I'm a newcomer, and want to make some contributions to the LLVM community. Is here the right place to reach out for help? Please forgive me if I did things wrong, as I'm unfamiliar with the LLVM workflow :-) <br></div><br><div>So a few days ago I noticed an issue in the bugzilla: <a href="https://bugs.llvm.org/show_bug.cgi?id=52444" rel="nofollow noopener noreferrer nofollow noopener noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=52444</a>, I thought it would be suitable for me to work on. But now I run into some problems:<br></div><br><div>* What is meaning of the capitalized words in tests comments?<br></div><div>For example,  in `llvm-project/clang/test/CodeGen/builtins-elementwise-math.c`:<br></div><div>```<br></div><div>// RUN: %clang_cc1 -triple x86_64-apple-darwin %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s<br></div><div>// CHECK-LABEL: define void @test_builtin_elementwise_abs(
  <br></div><div>// CHECK:      [[F1:%.+]] = load float, float* %f1.addr, align 4
  <br></div><div>// CHECK-NEXT:  call float @llvm.fabs.f32(float [[F1]])<br></div><div>```<br></div><div>What do `RUN`, `CHECK` mean? I can guess they are some test instructions, so I briefly look through the docs, but I can't find anything useful :-( I'm sorry but the docs are so much, it's hard to find something I actually don't know what is.<br></div><br><div>* How can I write my own test for codegen?<br></div><div>The actual code part is not that hard, problems came in when I want to write some tests. The fact is that I'm unfamiliar with LLVM IR, so I don't know how to write the expected output...<br></div><br><div>Thanks so much for people who offer me help!<br></div><br><div>Best regards,<br></div><div>Jun Zhang<br></div></div><br><p id="gmail-m_32933601061213720fb_identificator"></p><p></p><br>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a></div></div><br></div></div><div id="gmail-m_32933601061213720content_out_dsampaio_kalray.eu"></div></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>