forked from OSchip/llvm-project
Two peepholes:
(or (x >> c) | (y << (32 - c))) ==> (shrd x, y, c) (or (x << c) | (y >> (32 - c))) ==> (shld x, y, c) llvm-svn: 25438
This commit is contained in:
parent
acec02ebf5
commit
a7bfbe996e
|
@ -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