summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/clear_cache.c
blob: 7bbcc03e21cae21d6e06d8d0a180110b8c7aeaee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s

char buffer[32] = "This is a largely unused buffer";

// __builtin___clear_cache always maps to @llvm.clear_cache, but what
// each back-end produces is different, and this is tested in LLVM

int main() {
  __builtin___clear_cache(buffer, buffer+32);
// CHECK: @llvm.clear_cache(i8* getelementptr inbounds ({{.*}}, i8* getelementptr inbounds (i8, i8* getelementptr inbounds ({{.*}} 32))
  return 0;
}