[cfe-commits] r166353 - /cfe/trunk/test/CodeGen/ms-inline-asm.c
Eli Friedman
eli.friedman at gmail.com
Fri Oct 19 16:25:09 PDT 2012
2012/10/19 Chad Rosier <mcrosier at apple.com>:
> Author: mcrosier
> Date: Fri Oct 19 18:16:17 2012
> New Revision: 166353
>
> URL: http://llvm.org/viewvc/llvm-project?rev=166353&view=rev
> Log:
> [ms-inline asm] Test case for r166349 and r166352.
>
> Modified:
> cfe/trunk/test/CodeGen/ms-inline-asm.c
>
> Modified: cfe/trunk/test/CodeGen/ms-inline-asm.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.c?rev=166353&r1=166352&r2=166353&view=diff
> ==============================================================================
> --- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
> +++ cfe/trunk/test/CodeGen/ms-inline-asm.c Fri Oct 19 18:16:17 2012
> @@ -124,3 +124,16 @@
> // 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
> +}
This looks wrong; we shouldn't be parsing code which is explicitly
disabled by a .if statement.
-Eli
More information about the cfe-commits
mailing list