[PATCH] D17203: [LICM] Hoist and sink entire inner loops.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 07:45:50 PST 2016


mcrosier added inline comments.

================
Comment at: test/Transforms/LICM/inner-loop-dont-sink.ll:6
@@ +5,3 @@
+; CHECK: entry:
+; CHECK-NEXT: br label %outer.header
+  br label %outer.header
----------------
chrisdiamand_arm wrote:
> mcrosier wrote:
> > I tend to agree with Philip here.  It also avoids issues if/when someone adds an additional test case to this file.
> Ok, I've just looked this up [[http://llvm.org/docs/CommandGuide/FileCheck.html|here]]:
> > It is treated identically to a normal CHECK directive except that FileCheck makes an additional assumption that a line matched by the directive cannot also be matched by any other check present in match-filename
> 
> So James is correct in that it shouldn't be used on every label, but that's because a label (e.g. `entry`) may not be unique if another test case is added. I think I need to do something like:
> ```
> ; CHECK-LABEL: main
> ; CHECK: entry:
> ...
> ```
> ...because `main` is a unique function name within the file, even if another test is added.
> Does that sound reasonable?
Correct.  You should have a CHECK-LABEL directive on main and only main.  Generally, each function name within a file (which must be unique) should have an associated CHECK-LABEL.


http://reviews.llvm.org/D17203





More information about the llvm-commits mailing list