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

Chris Diamand via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 07:29:34 PST 2016


chrisdiamand_arm 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
----------------
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?


http://reviews.llvm.org/D17203





More information about the llvm-commits mailing list