<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 16, 2016, at 5:58 PM, Sanjay Patel <<a href="mailto:spatel@rotateright.com" class="">spatel@rotateright.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">That would be checking for the absence of badness rather than presence of goodness.<br class=""></div><br class="">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 class=""></div></div></div></blockquote><div><br class=""></div><div>+1</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></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 class=""><a href="https://llvm.org/bugs/show_bug.cgi?id=22897" target="_blank" class="">https://llvm.org/bugs/show_bug.cgi?id=22897</a><br class=""><div class=""><a href="https://llvm.org/bugs/show_bug.cgi?id=26815#c12" class="">https://llvm.org/bugs/show_bug.cgi?id=26815#c12</a><br class=""><a href="https://llvm.org/bugs/show_bug.cgi?id=26815#c13" class="">https://llvm.org/bugs/show_bug.cgi?id=26815#c13</a><br class=""><br class=""></div><div class="">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 class=""></div><div class=""><br class=""></div><div class="">BTW - Tim, thanks for posting your script in <a href="http://reviews.llvm.org/D17999" class="">http://reviews.llvm.org/D17999</a> ! I'm using part of that here.<br class=""></div><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Mar 16, 2016 at 5:59 PM, Alex Rosenberg <span dir="ltr" class=""><<a href="mailto:alexr@ohmantics.com" target="_blank" class="">alexr@ohmantics.com</a>></span> wrote:<br class=""><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 class="">
<span class=""><font color="#888888" class=""><br class="">
Alex<br class="">
</font></span><div class=""><div class=""><br class="">
On Mar 16, 2016, at 3:29 PM, Sanjay Patel via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class="">
<br class="">
> Author: spatel<br class="">
> Date: Wed Mar 16 17:29:07 2016<br class="">
> New Revision: 263667<br class="">
><br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=263667&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=263667&view=rev</a><br class="">
> Log:<br class="">
> use FileCheck for tighter checking<br class="">
><br class="">
> I'm testing out a script that auto-generates the check lines.<br class="">
> It's 98% copied from utils/update_llc_test_checks.py.<br class="">
> If others think this is useful, please let me know.<br class="">
><br class="">
> Modified:<br class="">
>    llvm/trunk/test/Transforms/SimplifyCFG/two-entry-phi-return.ll<br class="">
><br class="">
> Modified: llvm/trunk/test/Transforms/SimplifyCFG/two-entry-phi-return.ll<br class="">
> 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" class="">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 class="">
> ==============================================================================<br class="">
> --- llvm/trunk/test/Transforms/SimplifyCFG/two-entry-phi-return.ll (original)<br class="">
> +++ llvm/trunk/test/Transforms/SimplifyCFG/two-entry-phi-return.ll Wed Mar 16 17:29:07 2016<br class="">
> @@ -1,15 +1,23 @@<br class="">
> -; RUN: opt < %s -simplifycfg -S | not grep br<br class="">
> +; RUN: opt < %s -simplifycfg -S | FileCheck %s<br class="">
><br class="">
> define i1 @qux(i8* %m, i8* %n, i8* %o, i8* %p) nounwind  {<br class="">
> entry:<br class="">
> -        %tmp7 = icmp eq i8* %m, %n<br class="">
> -        br i1 %tmp7, label %bb, label %UnifiedReturnBlock<br class="">
> +  %tmp7 = icmp eq i8* %m, %n<br class="">
> +  br i1 %tmp7, label %bb, label %UnifiedReturnBlock<br class="">
><br class="">
> bb:<br class="">
> -        %tmp15 = icmp eq i8* %o, %p<br class="">
> -        br label %UnifiedReturnBlock<br class="">
> +  %tmp15 = icmp eq i8* %o, %p<br class="">
> +  br label %UnifiedReturnBlock<br class="">
><br class="">
> UnifiedReturnBlock:<br class="">
> -        %result = phi i1 [ 0, %entry ], [ %tmp15, %bb ]<br class="">
> -        ret i1 %result<br class="">
> +  %result = phi i1 [ 0, %entry ], [ %tmp15, %bb ]<br class="">
> +  ret i1 %result<br class="">
> +<br class="">
> +; CHECK-LABEL: @qux(<br class="">
> +; CHECK-NEXT:  entry:<br class="">
> +; CHECK-NEXT:    [[TMP7:%.*]] = icmp eq i8* %m, %n<br class="">
> +; CHECK-NEXT:    [[TMP15:%.*]] = icmp eq i8* %o, %p<br class="">
> +; CHECK-NEXT:    [[TMP15_:%.*]] = select i1 [[TMP7]], i1 [[TMP15]], i1 false<br class="">
> +; CHECK-NEXT:    ret i1 [[TMP15_]]<br class="">
> }<br class="">
> +<br class="">
><br class="">
><br class="">
> _______________________________________________<br class="">
> llvm-commits mailing list<br class="">
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class="">
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="">
<br class="">
</div></div></blockquote></div><br class=""></div></div></div>
</div></blockquote></div><br class=""></body></html>