[llvm-commits] [llvm] r67702 - /llvm/trunk/test/CodeGen/X86/sext-ret-val.ll
Duncan Sands
baldrick at free.fr
Wed Mar 25 13:51:43 PDT 2009
Hi Evan,
> > 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.
I don't get it - why is the value being sign extended?
It shouldn't be: i8 is a legal type, so the return
attribute doesn't matter. And you're not testing for
sign extension: the test checks for zero extension.
Confused.
Ciao,
Duncan.
> 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