mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130499 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e02a1501e7
commit
ce3a022b8c
@ -1727,26 +1727,6 @@ are functionally identical.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Take the following C code:
|
||||
int x(int y) { return (y & 63) << 14; }
|
||||
|
||||
Code produced by gcc:
|
||||
andl $63, %edi
|
||||
sall $14, %edi
|
||||
movl %edi, %eax
|
||||
ret
|
||||
|
||||
Code produced by clang:
|
||||
shll $14, %edi
|
||||
movl %edi, %eax
|
||||
andl $1032192, %eax
|
||||
ret
|
||||
|
||||
The code produced by gcc is 3 bytes shorter. This sort of construct often
|
||||
shows up with bitfields.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Take the following C code:
|
||||
int f(int a, int b) { return (unsigned char)a == (unsigned char)b; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user