[llvm-commits] [llvm] r67702 - /llvm/trunk/test/CodeGen/X86/sext-ret-val.ll

Evan Cheng echeng at apple.com
Wed Mar 25 13:47:37 PDT 2009


On Mar 25, 2009, at 1:40 PM, Duncan Sands wrote:

> Hi Evan,
>
>> Add a test case for PR3779: when to promote the function return  
>> value.
>
> as I explained in PR3779 I don't think the return value should be
> extended here.  That's because i8 is legal on x86.  I think this
> should be fixed in the front-end.

This is purely a codegen test. This demonstrates (for now) if the  
function is marked signext, the the value should be extended. Once we  
have made the changes this (and potentially) other tests will go  
away / change.

Evan

>
> Ciao,
>
> Duncan.
>
>>
>> Added:
>>    llvm/trunk/test/CodeGen/X86/sext-ret-val.ll
>>
>> Added: llvm/trunk/test/CodeGen/X86/sext-ret-val.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sext-ret-val.ll?rev=67702&view=auto
>>
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- llvm/trunk/test/CodeGen/X86/sext-ret-val.ll (added)
>> +++ llvm/trunk/test/CodeGen/X86/sext-ret-val.ll Wed Mar 25 15:30:19  
>> 2009
>> @@ -0,0 +1,16 @@
>> +; RUN: llvm-as < %s | llc -march=x86 | grep movzbl | count 1
>> +; rdar://6699246
>> +
>> +define signext i8 @t1(i8* %A) nounwind readnone ssp {
>> +entry:
>> +        %0 = icmp ne i8* %A, null
>> +        %1 = zext i1 %0 to i8
>> +        ret i8 %1
>> +}
>> +
>> +define i8 @t2(i8* %A) nounwind readnone ssp {
>> +entry:
>> +        %0 = icmp ne i8* %A, null
>> +        %1 = zext i1 %0 to i8
>> +        ret i8 %1
>> +}
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>




More information about the llvm-commits mailing list