brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · d2d8655 Raw
42 lines · c
1// REQUIRES: aarch64-registered-target2// RUN: %clang_cc1 -triple arm64-apple-ios -S -o /dev/null %s -O2 -Rpass-missed=regalloc 2>&1 | FileCheck -check-prefix=REMARK %s3// RUN: %clang_cc1 -triple arm64-apple-ios -S -o /dev/null %s -O2 2>&1 | FileCheck -allow-empty -check-prefix=NO_REMARK %s4// RUN: %clang_cc1 -triple arm64-apple-ios -S -o /dev/null %s -O2 -opt-record-file %t.yaml5// RUN: cat %t.yaml | FileCheck -check-prefix=YAML %s6// RUN: %clang_cc1 -triple arm64-apple-ios -S -o /dev/null %s -O2 -opt-record-file %t.yaml -opt-record-passes asm-printer7// RUN: cat %t.yaml | FileCheck -check-prefix=PASSES %s8// RUN: %clang_cc1 -triple arm64-apple-ios -S -o /dev/null %s -O2 -opt-record-file %t.yaml -opt-record-format yaml9// RUN: cat %t.yaml | FileCheck -check-prefix=YAML %s10 11void bar(float);12 13void foo(float *p, int i) {14  while (i--)  {15    float f = *p;16    asm("" ::17        : "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15", "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31", "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28", "fp", "lr", "sp", "memory");18    bar(f);19  }20}21 22// REMARK: opt-record-MIR.c:{{[1-9][0-9]*}}:{{[1-9][0-9]*}}: remark: {{[0-9]*}} spills {{[0-9\.e+-]*}} total spills cost {{[0-9]*}} reloads {{[0-9\.e+-]*}} total reloads cost generated in loop23// NO_REMARK-NOT: remark:24 25// YAML: --- !Missed26// YAML: Pass:            regalloc27// YAML: Name:            LoopSpillReload28// YAML: DebugLoc:        { File: {{[^,]+}},29// YAML:                    Line: {{[1-9][0-9]*}}30// YAML:                    Column: {{[1-9][0-9]*}} }31// YAML: Function:        foo32// YAML: Args:33// YAML:   - NumSpills:       '{{.}}'34// YAML:   - String:          ' spills '35// YAML:   - NumReloads:      '{{.}}'36// YAML:   - String:          ' reloads '37// YAML:   - String:          generated38// YAML: ...39 40// PASSES: Pass:            asm-printer41// PASSES-NOT: regalloc42