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

Duncan Sands baldrick at free.fr
Wed Mar 25 13:40:18 PDT 2009


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.

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