On Oct 19, 2012, at 4:29 PM, Chad Rosier <[email protected]> wrote:

> 
> On Oct 19, 2012, at 4:25 PM, Eli Friedman <[email protected]> wrote:
> 
>> 2012/10/19 Chad Rosier <[email protected]>:
>>> 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.
> 
> Arggg, I guess you're right.  I'll add some logic to not emit those 
> statements in the IR.
> 

Should be taken care of in r166357.  Test cast in r166358.

 Chad

> Chad
> 
>> -Eli
> 

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to