mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
new example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25903 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
93c740bbbb
commit
275b8846d5
@ -448,3 +448,22 @@ LBB1_2:
|
|||||||
blr
|
blr
|
||||||
|
|
||||||
noticed in 2005-05-11-Popcount-ffs-fls.c.
|
noticed in 2005-05-11-Popcount-ffs-fls.c.
|
||||||
|
|
||||||
|
|
||||||
|
===-------------------------------------------------------------------------===
|
||||||
|
|
||||||
|
We should custom expand setcc instead of pretending that we have it. That
|
||||||
|
would allow us to expose the access of the crbit after the mfcr, allowing
|
||||||
|
that access to be trivially folded into other ops. A simple example:
|
||||||
|
|
||||||
|
int foo(int a, int b) { return (a < b) << 4; }
|
||||||
|
|
||||||
|
compiles into:
|
||||||
|
|
||||||
|
_foo:
|
||||||
|
cmpw cr7, r3, r4
|
||||||
|
mfcr r2, 1
|
||||||
|
rlwinm r2, r2, 29, 31, 31
|
||||||
|
slwi r3, r2, 4
|
||||||
|
blr
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user