aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/align-loops.c
blob: 25f8cded59f3235e09aa07bc557067411c7d2612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// REQUIRES: x86-registered-target
/// Check asm because we use llvm::TargetOptions.

// RUN: %clang_cc1 -triple=x86_64 -S %s -falign-loops=8 -O -o - | FileCheck %s --check-prefixes=CHECK,CHECK_8
// RUN: %clang_cc1 -triple=x86_64 -S %s -falign-loops=32 -O -o - | FileCheck %s --check-prefixes=CHECK,CHECK_32

// CHECK-LABEL: foo:
// CHECK_8:       .p2align 3
// CHECK_32:      .p2align 5

void bar(void);
void foo(void) {
  for (int i = 0; i < 64; ++i)
    bar();
}