clang/test/CodeGen/ms-inline-asm-static-variable.c
raw| 1 | // REQUIRES: x86-registered-target |
| 2 | // Check the constraint "*m" of operand arr and the definition of arr is not removed by FE |
| 3 | // RUN: %clang_cc1 %s -fasm-blocks -triple i386-apple-darwin10 -emit-llvm -o - | FileCheck %s |
| 4 | |
| 5 | static int arr[10]; |
| 6 | void t1(void) { |
| 7 | // CHECK: @arr = internal global [10 x i32] |
| 8 | // CHECK: call void asm sideeffect inteldialect "mov dword ptr $0[edx * $$4],edx", "=*m,{{.*}}(ptr elementtype([10 x i32]) @arr) |
| 9 | __asm mov dword ptr arr[edx*4],edx |
| 10 | } |