xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2003-11-08-PointerSubNotGetelementptr.c (revision eda6f5931d42c77e1480347b1fc3eef2f8d33806)
1 // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
2 
3 char *test(char* C) {
4   // CHECK: getelementptr
5   return C-1;   // Should turn into a GEP
6 }
7 
8 int *test2(int* I) {
9   return I-1;
10 }
11