aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-19 23:16:17 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-19 23:16:17 +0000
commitb0850b3f417feb9ab5c7bcfd4e531fd6eaa2928c (patch)
treeda842c0b810b286346039c0426328b061b0c4be7
parent91e06dab9335ed6b4474a74353549c708cf3d936 (diff)
[ms-inline asm] Test case for r166349 and r166352.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166353 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/ms-inline-asm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c
index 2947106200..99e56d1700 100644
--- a/test/CodeGen/ms-inline-asm.c
+++ b/test/CodeGen/ms-inline-asm.c
@@ -124,3 +124,16 @@ void t13() {
// CHECK: call void asm sideeffect inteldialect "movzx eax, byte ptr $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i8* %{{.*}}) nounwind
// CHECK: call void asm sideeffect inteldialect "movzx eax, word ptr $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i16* %{{.*}}) nounwind
}
+
+void t14() {
+ unsigned i = 1, j = 2;
+ __asm {
+ .if 1
+ mov eax, i
+ .else
+ mov ebx, j
+ .endif
+ }
+// CHECK: t14
+// CHECK: call void asm sideeffect inteldialect ".if 1\0A\09mov eax, dword ptr $0\0A\09.else\0A\09mov ebx, dword ptr $1\0A\09.endif", "*m,*m,~{eax},~{ebx},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}, i32* %{{.*}}) nounwind
+}