mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Two peepholes:
(or (x >> c) | (y << (32 - c))) ==> (shrd x, y, c) (or (x << c) | (y >> (32 - c))) ==> (shld x, y, c) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25438 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4ad33c4ae
commit
68b951a5e5
@ -3066,3 +3066,13 @@ def : Pat<(f64 (undef)), (FpLD0)>, Requires<[FPStack]>;
|
||||
def : Pat<(shl R8 :$src1, (i8 1)), (ADD8rr R8 :$src1, R8 :$src1)>;
|
||||
def : Pat<(shl R16:$src1, (i8 1)), (ADD16rr R16:$src1, R16:$src1)>;
|
||||
def : Pat<(shl R32:$src1, (i8 1)), (ADD32rr R32:$src1, R32:$src1)>;
|
||||
|
||||
// (or (x >> c) | (y << (32 - c))) ==> (shrd x, y, c)
|
||||
def : Pat<(or (srl R32:$src1, CL:$amt),
|
||||
(shl R32:$src2, (sub 32, CL:$amt))),
|
||||
(SHRD32rrCL R32:$src1, R32:$src2)>;
|
||||
|
||||
// (or (x << c) | (y >> (32 - c))) ==> (shld x, y, c)
|
||||
def : Pat<(or (shl R32:$src1, CL:$amt),
|
||||
(srl R32:$src2, (sub 32, CL:$amt))),
|
||||
(SHLD32rrCL R32:$src1, R32:$src2)>;
|
||||
|
Loading…
Reference in New Issue
Block a user