Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / clear_cache.c
blobca157ee7020bf0d92ea03402e46542c6ed287473
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s
4 char buffer[32] = "This is a largely unused buffer";
6 // __builtin___clear_cache always maps to @llvm.clear_cache, but what
7 // each back-end produces is different, and this is tested in LLVM
9 // CHECK-LABEL: define {{[^@]+}}@main(
10 // CHECK-NEXT: entry:
11 // CHECK-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
12 // CHECK-NEXT: store i32 0, ptr [[RETVAL]], align 4
13 // CHECK-NEXT: call void @llvm.clear_cache(ptr @buffer, ptr getelementptr inbounds (i8, ptr @buffer, i64 32))
14 // CHECK-NEXT: ret i32 0
16 int main(void) {
17 __builtin___clear_cache(buffer, buffer+32);
18 return 0;