xref: /llvm-project/clang/test/CodeGen/align-loops.c (revision e6bf48d11047e970cb24554a01b65b566d6b5d22)
1 // REQUIRES: x86-registered-target
2 /// Check asm because we use llvm::TargetOptions.
3 
4 // RUN: %clang_cc1 -triple=x86_64 -S %s -falign-loops=8 -O -o - | FileCheck %s --check-prefixes=CHECK,CHECK_8
5 // RUN: %clang_cc1 -triple=x86_64 -S %s -falign-loops=32 -O -o - | FileCheck %s --check-prefixes=CHECK,CHECK_32
6 
7 // CHECK-LABEL: foo:
8 // CHECK_8:       .p2align 3
9 // CHECK_32:      .p2align 5
10 
11 void bar(void);
12 void foo(void) {
13   for (int i = 0; i < 64; ++i)
14     bar();
15 }
16