[PATCH] D61227: [NFC]][PowerPC] Use -check-prefixes to simplify the check in code-align.ll
Zhang Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 27 09:16:48 PDT 2019
ZhangKang created this revision.
ZhangKang added reviewers: nemanjai, echristo, steven.zhang, hfinkel, hiraditya, jsji, efriedma.
Herald added a project: LLVM.
When checking the same output, we can use the `-check-prefixes` to simplify the check.
For example, if we want to check below output.
; GENERIC-LABEL: .globl foo
; BASIC-LABEL: .globl foo
; PWR-LABEL: .globl foo
; GENERIC: .p2align 2
; BASIC: .p2align 4
; PWR: .p2align 4
; GENERIC: @foo
; BASIC: @foo
; PWR: @foo
If we use `-check-prefixes`
... -check-prefixes=CHECK,GENERAL
... -check-prefixes=CHECK,BASIC
... -check-prefixes=CHECK,PWR
Above check can be simplify to:
; CHECK-LABEL: .globl foo
; GENERIC: .p2align 2
; BASIC: .p2align 4
; PWR: .p2align 4
; CHECK: @foo
https://reviews.llvm.org/D61227
Files:
llvm/test/CodeGen/PowerPC/code-align.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61227.196973.patch
Type: text/x-patch
Size: 4373 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190427/03ea1fc5/attachment.bin>
More information about the llvm-commits
mailing list