[PATCH] D97501: [ARM] support symbolic expressions as branch target

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 1 08:57:06 PST 2021


DavidSpickett added inline comments.


================
Comment at: llvm/test/MC/ARM/thumb2-branch-ranges.s:100-101
+// branch to thumb function resolved at assembly time
+// CHECK-NOT: error
+// CHECK: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range
+        b.w start8 - start7 + 0x1000000
----------------
jcai19 wrote:
> nickdesaulniers wrote:
> > This checks that `error` is not printed in the output, but then checks that `error: ...` is? Or am I misunderstanding that? (I guess I don't understand the point of the `CHECK-NOT`).
> Yes I have the same question. I copied this line from previous tests, but maybe I could remove this line?
My best guess is that the CHECK-NOT checks that none of the supporting assembly generates an error before we get the expected error from the relocations. https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-not-directive

I thought maybe this prevents mutliple CHECKs matching on the same error message. However we're checking line numbers, for exactly that reason. (even if Filecheck behaves that way, which I'm not sure it does)

Probably a case of belt and braces when it was first written but in hindsight not needed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97501



More information about the llvm-commits mailing list