dblaikie added a comment.

In D101805#2740150 <https://reviews.llvm.org/D101805#2740150>, @tlively wrote:

> @dblaikie, what's the best practice for making tests robust to this 
> difference?

If you need a label or register (eg: if you want to check a branch branches to 
some particular spot) - the first mention of the label or register should use a 
pattern match (which I think this test already do generally for 
instructions/values - but not for labels)

I'm not sure there's a canonical way to skip over the unused "entry" label in 
an asserts build while not tripping up the non-asserts build (perhaps you could 
look around at similar tests) - I guess probably not & people accept a bit of 
looseness in the tests by not using CHECK-NEXT for that first instruction/line 
in the test. You could add a CHECK-NOT (or --implicit-check-not) maybe for " = 
" which would catch some instructions (not all of them - those that don't 
return a value, for instance) if they snuck in between the start of the 
function and the first instruction the test was checking for.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101805/new/

https://reviews.llvm.org/D101805

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to