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