This is an archive of the discontinued LLVM Phabricator instance.

[NFC]][PowerPC] Use -check-prefixes to simplify the check in code-align.ll
ClosedPublic

Authored by ZhangKang on Apr 27 2019, 9:15 AM.

Details

Summary

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

Diff Detail

Repository
rL LLVM

Event Timeline

ZhangKang created this revision.Apr 27 2019, 9:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2019, 9:15 AM
hfinkel accepted this revision.Apr 29 2019, 5:51 AM

LGTM

This revision is now accepted and ready to land.Apr 29 2019, 5:51 AM
This revision was automatically updated to reflect the committed changes.