HomePhabricator

in X86-64 CCC, i8/i16 arguments are already properly zext/sext'd on input.
rL34623Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

in X86-64 CCC, i8/i16 arguments are already properly zext/sext'd on input.
Capture this so that downstream zext/sext's are optimized out. This
compiles:

int test(short X) { return (int)X; }

to:

_test:

movl %edi, %eax
ret

instead of:

_test:

movswl %di, %eax
ret

GCC produces this bizarre code:

_test:

movw    %di, -12(%rsp)
movswl  -12(%rsp),%eax
ret

Details

Committed
lattnerFeb 25 2007, 7:18 PM
Parents
rL34622: new testcase
Branches
Unknown
Tags
Unknown

Event Timeline