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
Loading
Please register or sign in to comment