mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
Added notes about a x86 isel deficiency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
038c2a1292
commit
e826a018b9
@ -166,3 +166,25 @@ http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02011.html
|
|||||||
|
|
||||||
Combine: a = sin(x), b = cos(x) into a,b = sincos(x).
|
Combine: a = sin(x), b = cos(x) into a,b = sincos(x).
|
||||||
|
|
||||||
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
Solve this DAG isel folding deficiency:
|
||||||
|
|
||||||
|
int X, Y;
|
||||||
|
|
||||||
|
void fn1(void)
|
||||||
|
{
|
||||||
|
X = X | (Y << 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
compiles to
|
||||||
|
|
||||||
|
fn1:
|
||||||
|
movl Y, %eax
|
||||||
|
shll $3, %eax
|
||||||
|
orl X, %eax
|
||||||
|
movl %eax, X
|
||||||
|
ret
|
||||||
|
|
||||||
|
The problem is the store's chain operand is not the load X but rather
|
||||||
|
a TokenFactor of the load X and load Y. This prevents the folding.
|
||||||
|
Loading…
Reference in New Issue
Block a user