[PATCH] D77971: [MC][X86][NFC] Disable branch align in non-text section
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 10:24:16 PDT 2020
MaskRay added inline comments.
================
Comment at: llvm/test/MC/X86/align-branch-section-size.s:6
# CHECK: Name: text1
# CHECK: AddressAlignment: 32
----------------
skan wrote:
> MaskRay wrote:
> > Such test is fragile.
> >
> > ```
> > # CHECK: Name: text1
> > # CHECK: AddressAlignment:
> > # CHECK: 32{$}
> > ```
> >
> > may be slightly better.
> It's strange to write like this. It may check something like
> ```
> AddressAlignment: 1
> 32
> ```
> Lots of tests use the format `CHECK: AddressAlignment: 1`, such as test/tools/llvm-readobj/ELF/sections.test. So I prefer to not change.
Sorry, I meant:
```
# CHECK: Name: text1
# CHECK: AddressAlignment:
# CHECK-NEXT: 32{$}
```
Now I think this is better:
```
# CHECK-LABEL: Name: text1
# CHECK: AddressAlignment: 32
```
`LABEL` is checked before other directives, so we can have good diagnostics when things go off.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77971/new/
https://reviews.llvm.org/D77971
More information about the llvm-commits
mailing list