diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-02-26 03:18:56 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-02-26 03:18:56 +0000 |
| commit | 1db979bae832563efde2523bb36ddabad43293d8 (patch) | |
| tree | 938a2b9cde209e02b41be117df9b4dfe91123b3c /llvm/lib/Transforms/Scalar/ConstantProp.cpp | |
| parent | 900b4f62be1b0968ba23227d0100a9fe7da1408e (diff) | |
| download | bcm5719-llvm-1db979bae832563efde2523bb36ddabad43293d8.tar.gz bcm5719-llvm-1db979bae832563efde2523bb36ddabad43293d8.zip | |
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
llvm-svn: 34623
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ConstantProp.cpp')
0 files changed, 0 insertions, 0 deletions

