Eric Christopher | d983270 | 2015-06-29 21:00:05 +0000 | [diff] [blame] | 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 | 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 Wennborg | 2151d12 | 2015-08-31 21:48:52 +0000 | [diff] [blame] | 13 | // CHECK: = icmp ne i32 [[AND]], 0 |
Eric Christopher | d983270 | 2015-06-29 21:00:05 +0000 | [diff] [blame] | 14 | |
| 15 | return 0; |
| 16 | } |