[PATCH] D29062: [InstCombine] Merge DebugLoc when speculatively hoisting store instruction
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 27 21:05:04 PST 2017
aprantl added inline comments.
================
Comment at: test/Transforms/SimplifyCFG/remove-debug-2.ll:3
+
+; CHECK: line: 1
+; CHECK: line: 2
----------------
aprantl wrote:
> These CHECKs could be improved by adding a little more context so it is more obvious what is being checked. This also makes it easier to update the test in the future.
Sorry for the delay!
This is an improvement, but not what I had in mind. Typically, we check for a specific instruction and then match it up with the DILocation, so we can be sure that the location is attached to what we think it is.
e.g.
```
CHECK: define @bar
CHECK-NOT: ret
CHECK: void call @foo, !dbg ![[LOC1:[0-9]+]]
CHECK: ![[LOC1]] = DILocation(line: 2
```
https://reviews.llvm.org/D29062
More information about the llvm-commits
mailing list