aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/builtins.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/builtins.cpp')
-rw-r--r--test/CodeGenCXX/builtins.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/CodeGenCXX/builtins.cpp b/test/CodeGenCXX/builtins.cpp
index 98e2d1a8271c..a49deea2524c 100644
--- a/test/CodeGenCXX/builtins.cpp
+++ b/test/CodeGenCXX/builtins.cpp
@@ -26,3 +26,7 @@ int x = __builtin_abs(-2);
long y = __builtin_abs(-2l);
// CHECK: [[Y:%.+]] = call i64 @_Z13__builtin_absl(i64 -2)
// CHECK: store i64 [[Y]], i64* @y, align 8
+
+extern const char char_memchr_arg[32];
+char *memchr_result = __builtin_char_memchr(char_memchr_arg, 123, 32);
+// CHECK: call i8* @memchr(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @char_memchr_arg, i32 0, i32 0), i32 123, i64 32)