mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
3fe6c1d389
Allow it to be clever when possible and fall back to the gross code when needed. This allows us to compile: long long foo1(long long X, int C) { return X << (C|32); } long long foo2(long long X, int C) { return X << (C&~32); } to: _foo1: rlwinm r2, r5, 0, 27, 31 slw r3, r4, r2 li r4, 0 blr .globl _foo2 .align 4 _foo2: rlwinm r2, r5, 0, 27, 25 subfic r5, r2, 32 slw r3, r3, r2 srw r5, r4, r5 or r3, r3, r5 slw r4, r4, r2 blr instead of: _foo1: ori r2, r5, 32 subfic r5, r2, 32 addi r6, r2, -32 srw r5, r4, r5 slw r3, r3, r2 slw r6, r4, r6 or r3, r3, r5 slw r4, r4, r2 or r3, r3, r6 blr .globl _foo2 .align 4 _foo2: rlwinm r2, r5, 0, 27, 25 subfic r5, r2, 32 addi r6, r2, -32 srw r5, r4, r5 slw r3, r3, r2 slw r6, r4, r6 or r3, r3, r5 slw r4, r4, r2 or r3, r3, r6 blr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30507 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
Analysis | ||
Archive | ||
AsmParser | ||
Bytecode | ||
CodeGen | ||
Debugger | ||
ExecutionEngine | ||
Linker | ||
Support | ||
System | ||
Target | ||
Transforms | ||
VMCore | ||
Makefile |