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

Jian Cai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 1 14:07:17 PST 2021


jcai19 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
----------------
DavidSpickett wrote:
> 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.
Thanks for looking into it. I've removed this line for better clarity. Also unless someone thinks this change is more preferable, I'm closing it in favor of https://reviews.llvm.org/D97568, which is similar to this patch but is limited to b.w instruction. Will update tests there as well.


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