diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-06 17:39:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-06 17:39:34 +0000 |
commit | 6e1f1fdd359666f3f8cf8996c12f9efbf6d0f2dd (patch) | |
tree | 18ae83c2b953894a5015926444d033ab8047ed05 /lib | |
parent | 4bdd2753db4a9d92b64c68b042c8b38f7223238d (diff) |
ugly codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/README.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 9f22bab55d..3ee32cce05 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -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 + +//===---------------------------------------------------------------------===// |