<div dir="ltr"><div><div>That would be checking for the absence of badness rather than presence of goodness.<br></div><br>I prefer the latter for the same reason we've done this in the x86 backend: it's too easy for bugs to slip through the cracks with lax checking. <br><br></div>I've definitely been a victim of weak regression tests. Quentin, Ahmed, and Tim have cited loose checks as the cause of problems too:<br><a href="https://llvm.org/bugs/show_bug.cgi?id=22897" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=22897</a><br><div><a href="https://llvm.org/bugs/show_bug.cgi?id=26815#c12">https://llvm.org/bugs/show_bug.cgi?id=26815#c12</a><br><a href="https://llvm.org/bugs/show_bug.cgi?id=26815#c13">https://llvm.org/bugs/show_bug.cgi?id=26815#c13</a><br><br></div><div>But if the consensus is that IR checking with this detail is going too far, I can revert and/or hand-edit to reduce the checking. I'm not sure how we'd make a script filter out checks based on functional importance.<br></div><div><br></div><div>BTW - Tim, thanks for posting your script in <a href="http://reviews.llvm.org/D17999">http://reviews.llvm.org/D17999</a> ! I'm using part of that here.<br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 5:59 PM, Alex Rosenberg <span dir="ltr"><<a href="mailto:alexr@ohmantics.com" target="_blank">alexr@ohmantics.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It looks like this test can be a single line CHECK-NOT. The same is true of a few other similar commits today.<br>
<span><font color="#888888"><br>
Alex<br>
</font></span><div><div><br>
On Mar 16, 2016, at 3:29 PM, Sanjay Patel via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
<br>
> Author: spatel<br>
> Date: Wed Mar 16 17:29:07 2016<br>
> New Revision: 263667<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=263667&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=263667&view=rev</a><br>
> Log:<br>
> use FileCheck for tighter checking<br>
><br>
> I'm testing out a script that auto-generates the check lines.<br>
> It's 98% copied from utils/update_llc_test_checks.py.<br>
> If others think this is useful, please let me know.<br>
><br>
> Modified:<br>
> llvm/trunk/test/Transforms/SimplifyCFG/two-entry-phi-return.ll<br>
><br>
> Modified: llvm/trunk/test/Transforms/SimplifyCFG/two-entry-phi-return.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/two-entry-phi-return.ll?rev=263667&r1=263666&r2=263667&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/two-entry-phi-return.ll?rev=263667&r1=263666&r2=263667&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/Transforms/SimplifyCFG/two-entry-phi-return.ll (original)<br>
> +++ llvm/trunk/test/Transforms/SimplifyCFG/two-entry-phi-return.ll Wed Mar 16 17:29:07 2016<br>
> @@ -1,15 +1,23 @@<br>
> -; RUN: opt < %s -simplifycfg -S | not grep br<br>
> +; RUN: opt < %s -simplifycfg -S | FileCheck %s<br>
><br>
> define i1 @qux(i8* %m, i8* %n, i8* %o, i8* %p) nounwind {<br>
> entry:<br>
> - %tmp7 = icmp eq i8* %m, %n<br>
> - br i1 %tmp7, label %bb, label %UnifiedReturnBlock<br>
> + %tmp7 = icmp eq i8* %m, %n<br>
> + br i1 %tmp7, label %bb, label %UnifiedReturnBlock<br>
><br>
> bb:<br>
> - %tmp15 = icmp eq i8* %o, %p<br>
> - br label %UnifiedReturnBlock<br>
> + %tmp15 = icmp eq i8* %o, %p<br>
> + br label %UnifiedReturnBlock<br>
><br>
> UnifiedReturnBlock:<br>
> - %result = phi i1 [ 0, %entry ], [ %tmp15, %bb ]<br>
> - ret i1 %result<br>
> + %result = phi i1 [ 0, %entry ], [ %tmp15, %bb ]<br>
> + ret i1 %result<br>
> +<br>
> +; CHECK-LABEL: @qux(<br>
> +; CHECK-NEXT: entry:<br>
> +; CHECK-NEXT: [[TMP7:%.*]] = icmp eq i8* %m, %n<br>
> +; CHECK-NEXT: [[TMP15:%.*]] = icmp eq i8* %o, %p<br>
> +; CHECK-NEXT: [[TMP15_:%.*]] = select i1 [[TMP7]], i1 [[TMP15]], i1 false<br>
> +; CHECK-NEXT: ret i1 [[TMP15_]]<br>
> }<br>
> +<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br>
</div></div></blockquote></div><br></div></div></div>