blob: 96813923f279e75fa3aa3633f3282a0efca74ef8 [file] [log] [blame]
Eric Christopherd9832702015-06-29 21:00:05 +00001// 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.
5extern void a(const char *);
6
7int main() {
8 if (__builtin_cpu_supports("sse4.2"))
9 a("sse4.2");
10
11 // 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)
12 // CHECK: [[AND:%[^ ]+]] = and i32 [[LOAD]], 256
Hans Wennborg2151d122015-08-31 21:48:52 +000013 // CHECK: = icmp ne i32 [[AND]], 0
Eric Christopherd9832702015-06-29 21:00:05 +000014
15 return 0;
16}