1 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm < %s| FileCheck %s
2 
3 // Test that we have the structure definition, the gep offsets, the name of the
4 // global, the bit grab, and the icmp correct.
5 extern void a(const char *);
6 
7 int main() {
8   __builtin_cpu_init();
9 
10   // CHECK: call void @__cpu_indicator_init
11 
12   if (__builtin_cpu_supports("sse4.2"))
13     a("sse4.2");
14 
15   // CHECK: [[LOAD:%[^ ]+]] = load i32, i32* getelementptr inbounds ({ i32, i32, i32, [1 x i32] }, { i32, i32, i32, [1 x i32] }* @__cpu_model, i32 0, i32 3, i32 0)
16   // CHECK: [[AND:%[^ ]+]] = and i32 [[LOAD]], 256
17   // CHECK: = icmp ne i32 [[AND]], 0
18 
19   return 0;
20 }
21