ugly codegen

llvm-svn: 30769
This commit is contained in:
Chris Lattner 2006-10-06 17:39:34 +00:00
parent f5839a0816
commit 2421a179e4
1 changed files with 22 additions and 0 deletions

View File

@ -711,4 +711,26 @@ bool %test(ulong %x) {
into x.h == 0
//===---------------------------------------------------------------------===//
We currently compile sign_extend_inreg into two shifts:
long foo(long X) {
return (long)(signed char)X;
}
becomes:
_foo:
movl 4(%esp), %eax
shll $24, %eax
sarl $24, %eax
ret
This could be:
_foo:
movsbl 4(%esp),%eax
ret
//===---------------------------------------------------------------------===//