xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/clear_cache.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc char buffer[32] = "This is a largely unused buffer";
4*0a6a1f1dSLionel Sambuc 
5*0a6a1f1dSLionel Sambuc // __builtin___clear_cache always maps to @llvm.clear_cache, but what
6*0a6a1f1dSLionel Sambuc // each back-end produces is different, and this is tested in LLVM
7*0a6a1f1dSLionel Sambuc 
main()8*0a6a1f1dSLionel Sambuc int main() {
9*0a6a1f1dSLionel Sambuc   __builtin___clear_cache(buffer, buffer+32);
10*0a6a1f1dSLionel Sambuc // CHECK: @llvm.clear_cache(i8* getelementptr {{.*}}, i8* getelementptr {{.*}} (i8* getelementptr {{.*}} 32))
11*0a6a1f1dSLionel Sambuc   return 0;
12*0a6a1f1dSLionel Sambuc }
13