mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
remove a bunch of dead named arguments in input patterns,
though some look dubious afaict, these are all ok. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96899 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
967d54ae04
commit
6d9f86b773
@ -92,7 +92,7 @@ def immSExt16int : PatLeaf<(imm), [{ //(int)imm fits in a 16 bit sign extended
|
||||
((int64_t)N->getZExtValue() << 32) >> 32;
|
||||
}], SExt16>;
|
||||
|
||||
def zappat : PatFrag<(ops node:$LHS), (and node:$LHS, imm:$L), [{
|
||||
def zappat : PatFrag<(ops node:$LHS), (and node:$LHS, imm), [{
|
||||
ConstantSDNode *RHS = dyn_cast<ConstantSDNode>(N->getOperand(1));
|
||||
if (!RHS) return 0;
|
||||
uint64_t build = get_zapImm(N->getOperand(0), (uint64_t)RHS->getZExtValue());
|
||||
@ -602,9 +602,9 @@ def RPCC : MfcForm<0x18, 0xC000, "rpcc $RA", s_rpcc>; //Read process cycle count
|
||||
def MB : MfcPForm<0x18, 0x4000, "mb", s_imisc>; //memory barrier
|
||||
def WMB : MfcPForm<0x18, 0x4400, "wmb", s_imisc>; //write memory barrier
|
||||
|
||||
def : Pat<(membarrier (i64 imm:$ll), (i64 imm:$ls), (i64 imm:$sl), (i64 1), (i64 imm:$dev)),
|
||||
def : Pat<(membarrier (i64 imm), (i64 imm), (i64 imm), (i64 1), (i64 imm)),
|
||||
(WMB)>;
|
||||
def : Pat<(membarrier (i64 imm:$ll), (i64 imm:$ls), (i64 imm:$sl), (i64 imm:$ss), (i64 imm:$dev)),
|
||||
def : Pat<(membarrier (i64 imm), (i64 imm), (i64 imm), (i64 imm), (i64 imm)),
|
||||
(MB)>;
|
||||
|
||||
//Basic Floating point ops
|
||||
|
@ -1480,11 +1480,11 @@ def : Pat<(extloadf32 xaddr:$src),
|
||||
(FMRSD (LFSX xaddr:$src))>;
|
||||
|
||||
// Memory barriers
|
||||
def : Pat<(membarrier (i32 imm:$ll),
|
||||
(i32 imm:$ls),
|
||||
(i32 imm:$sl),
|
||||
(i32 imm:$ss),
|
||||
(i32 imm:$device)),
|
||||
def : Pat<(membarrier (i32 imm /*ll*/),
|
||||
(i32 imm /*ls*/),
|
||||
(i32 imm /*sl*/),
|
||||
(i32 imm /*ss*/),
|
||||
(i32 imm /*device*/)),
|
||||
(SYNC)>;
|
||||
|
||||
include "PPCInstrAltivec.td"
|
||||
|
@ -2111,34 +2111,34 @@ def : Pat<(store (i8 (trunc_su (srl_su GR16:$src, (i8 8)))), addr:$dst),
|
||||
def : Pat<(shl GR64:$src1, (i8 1)), (ADD64rr GR64:$src1, GR64:$src1)>;
|
||||
|
||||
// (shl x (and y, 63)) ==> (shl x, y)
|
||||
def : Pat<(shl GR64:$src1, (and CL:$amt, 63)),
|
||||
def : Pat<(shl GR64:$src1, (and CL, 63)),
|
||||
(SHL64rCL GR64:$src1)>;
|
||||
def : Pat<(store (shl (loadi64 addr:$dst), (and CL:$amt, 63)), addr:$dst),
|
||||
def : Pat<(store (shl (loadi64 addr:$dst), (and CL, 63)), addr:$dst),
|
||||
(SHL64mCL addr:$dst)>;
|
||||
|
||||
def : Pat<(srl GR64:$src1, (and CL:$amt, 63)),
|
||||
def : Pat<(srl GR64:$src1, (and CL, 63)),
|
||||
(SHR64rCL GR64:$src1)>;
|
||||
def : Pat<(store (srl (loadi64 addr:$dst), (and CL:$amt, 63)), addr:$dst),
|
||||
def : Pat<(store (srl (loadi64 addr:$dst), (and CL, 63)), addr:$dst),
|
||||
(SHR64mCL addr:$dst)>;
|
||||
|
||||
def : Pat<(sra GR64:$src1, (and CL:$amt, 63)),
|
||||
def : Pat<(sra GR64:$src1, (and CL, 63)),
|
||||
(SAR64rCL GR64:$src1)>;
|
||||
def : Pat<(store (sra (loadi64 addr:$dst), (and CL:$amt, 63)), addr:$dst),
|
||||
def : Pat<(store (sra (loadi64 addr:$dst), (and CL, 63)), addr:$dst),
|
||||
(SAR64mCL addr:$dst)>;
|
||||
|
||||
// Double shift patterns
|
||||
def : Pat<(shrd GR64:$src1, (i8 imm:$amt1), GR64:$src2, (i8 imm:$amt2)),
|
||||
def : Pat<(shrd GR64:$src1, (i8 imm:$amt1), GR64:$src2, (i8 imm)),
|
||||
(SHRD64rri8 GR64:$src1, GR64:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
def : Pat<(store (shrd (loadi64 addr:$dst), (i8 imm:$amt1),
|
||||
GR64:$src2, (i8 imm:$amt2)), addr:$dst),
|
||||
GR64:$src2, (i8 imm)), addr:$dst),
|
||||
(SHRD64mri8 addr:$dst, GR64:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
def : Pat<(shld GR64:$src1, (i8 imm:$amt1), GR64:$src2, (i8 imm:$amt2)),
|
||||
def : Pat<(shld GR64:$src1, (i8 imm:$amt1), GR64:$src2, (i8 imm)),
|
||||
(SHLD64rri8 GR64:$src1, GR64:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
def : Pat<(store (shld (loadi64 addr:$dst), (i8 imm:$amt1),
|
||||
GR64:$src2, (i8 imm:$amt2)), addr:$dst),
|
||||
GR64:$src2, (i8 imm)), addr:$dst),
|
||||
(SHLD64mri8 addr:$dst, GR64:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
// (or x1, x2) -> (add x1, x2) if two operands are known not to share bits.
|
||||
|
@ -4543,43 +4543,43 @@ def : Pat<(shl GR16:$src1, (i8 1)), (ADD16rr GR16:$src1, GR16:$src1)>;
|
||||
def : Pat<(shl GR32:$src1, (i8 1)), (ADD32rr GR32:$src1, GR32:$src1)>;
|
||||
|
||||
// (shl x (and y, 31)) ==> (shl x, y)
|
||||
def : Pat<(shl GR8:$src1, (and CL:$amt, 31)),
|
||||
def : Pat<(shl GR8:$src1, (and CL, 31)),
|
||||
(SHL8rCL GR8:$src1)>;
|
||||
def : Pat<(shl GR16:$src1, (and CL:$amt, 31)),
|
||||
def : Pat<(shl GR16:$src1, (and CL, 31)),
|
||||
(SHL16rCL GR16:$src1)>;
|
||||
def : Pat<(shl GR32:$src1, (and CL:$amt, 31)),
|
||||
def : Pat<(shl GR32:$src1, (and CL, 31)),
|
||||
(SHL32rCL GR32:$src1)>;
|
||||
def : Pat<(store (shl (loadi8 addr:$dst), (and CL:$amt, 31)), addr:$dst),
|
||||
def : Pat<(store (shl (loadi8 addr:$dst), (and CL, 31)), addr:$dst),
|
||||
(SHL8mCL addr:$dst)>;
|
||||
def : Pat<(store (shl (loadi16 addr:$dst), (and CL:$amt, 31)), addr:$dst),
|
||||
def : Pat<(store (shl (loadi16 addr:$dst), (and CL, 31)), addr:$dst),
|
||||
(SHL16mCL addr:$dst)>;
|
||||
def : Pat<(store (shl (loadi32 addr:$dst), (and CL:$amt, 31)), addr:$dst),
|
||||
def : Pat<(store (shl (loadi32 addr:$dst), (and CL, 31)), addr:$dst),
|
||||
(SHL32mCL addr:$dst)>;
|
||||
|
||||
def : Pat<(srl GR8:$src1, (and CL:$amt, 31)),
|
||||
def : Pat<(srl GR8:$src1, (and CL, 31)),
|
||||
(SHR8rCL GR8:$src1)>;
|
||||
def : Pat<(srl GR16:$src1, (and CL:$amt, 31)),
|
||||
def : Pat<(srl GR16:$src1, (and CL, 31)),
|
||||
(SHR16rCL GR16:$src1)>;
|
||||
def : Pat<(srl GR32:$src1, (and CL:$amt, 31)),
|
||||
def : Pat<(srl GR32:$src1, (and CL, 31)),
|
||||
(SHR32rCL GR32:$src1)>;
|
||||
def : Pat<(store (srl (loadi8 addr:$dst), (and CL:$amt, 31)), addr:$dst),
|
||||
def : Pat<(store (srl (loadi8 addr:$dst), (and CL, 31)), addr:$dst),
|
||||
(SHR8mCL addr:$dst)>;
|
||||
def : Pat<(store (srl (loadi16 addr:$dst), (and CL:$amt, 31)), addr:$dst),
|
||||
def : Pat<(store (srl (loadi16 addr:$dst), (and CL, 31)), addr:$dst),
|
||||
(SHR16mCL addr:$dst)>;
|
||||
def : Pat<(store (srl (loadi32 addr:$dst), (and CL:$amt, 31)), addr:$dst),
|
||||
def : Pat<(store (srl (loadi32 addr:$dst), (and CL, 31)), addr:$dst),
|
||||
(SHR32mCL addr:$dst)>;
|
||||
|
||||
def : Pat<(sra GR8:$src1, (and CL:$amt, 31)),
|
||||
def : Pat<(sra GR8:$src1, (and CL, 31)),
|
||||
(SAR8rCL GR8:$src1)>;
|
||||
def : Pat<(sra GR16:$src1, (and CL:$amt, 31)),
|
||||
def : Pat<(sra GR16:$src1, (and CL, 31)),
|
||||
(SAR16rCL GR16:$src1)>;
|
||||
def : Pat<(sra GR32:$src1, (and CL:$amt, 31)),
|
||||
def : Pat<(sra GR32:$src1, (and CL, 31)),
|
||||
(SAR32rCL GR32:$src1)>;
|
||||
def : Pat<(store (sra (loadi8 addr:$dst), (and CL:$amt, 31)), addr:$dst),
|
||||
def : Pat<(store (sra (loadi8 addr:$dst), (and CL, 31)), addr:$dst),
|
||||
(SAR8mCL addr:$dst)>;
|
||||
def : Pat<(store (sra (loadi16 addr:$dst), (and CL:$amt, 31)), addr:$dst),
|
||||
def : Pat<(store (sra (loadi16 addr:$dst), (and CL, 31)), addr:$dst),
|
||||
(SAR16mCL addr:$dst)>;
|
||||
def : Pat<(store (sra (loadi32 addr:$dst), (and CL:$amt, 31)), addr:$dst),
|
||||
def : Pat<(store (sra (loadi32 addr:$dst), (and CL, 31)), addr:$dst),
|
||||
(SAR32mCL addr:$dst)>;
|
||||
|
||||
// (or (x >> c) | (y << (32 - c))) ==> (shrd32 x, y, c)
|
||||
@ -4600,11 +4600,11 @@ def : Pat<(store (or (srl (loadi32 addr:$dst), (i8 (trunc ECX:$amt))),
|
||||
addr:$dst),
|
||||
(SHRD32mrCL addr:$dst, GR32:$src2)>;
|
||||
|
||||
def : Pat<(shrd GR32:$src1, (i8 imm:$amt1), GR32:$src2, (i8 imm:$amt2)),
|
||||
def : Pat<(shrd GR32:$src1, (i8 imm:$amt1), GR32:$src2, (i8 imm/*:$amt2*/)),
|
||||
(SHRD32rri8 GR32:$src1, GR32:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
def : Pat<(store (shrd (loadi32 addr:$dst), (i8 imm:$amt1),
|
||||
GR32:$src2, (i8 imm:$amt2)), addr:$dst),
|
||||
GR32:$src2, (i8 imm/*:$amt2*/)), addr:$dst),
|
||||
(SHRD32mri8 addr:$dst, GR32:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
// (or (x << c) | (y >> (32 - c))) ==> (shld32 x, y, c)
|
||||
@ -4625,11 +4625,11 @@ def : Pat<(store (or (shl (loadi32 addr:$dst), (i8 (trunc ECX:$amt))),
|
||||
addr:$dst),
|
||||
(SHLD32mrCL addr:$dst, GR32:$src2)>;
|
||||
|
||||
def : Pat<(shld GR32:$src1, (i8 imm:$amt1), GR32:$src2, (i8 imm:$amt2)),
|
||||
def : Pat<(shld GR32:$src1, (i8 imm:$amt1), GR32:$src2, (i8 imm/*:$amt2*/)),
|
||||
(SHLD32rri8 GR32:$src1, GR32:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
def : Pat<(store (shld (loadi32 addr:$dst), (i8 imm:$amt1),
|
||||
GR32:$src2, (i8 imm:$amt2)), addr:$dst),
|
||||
GR32:$src2, (i8 imm/*:$amt2*/)), addr:$dst),
|
||||
(SHLD32mri8 addr:$dst, GR32:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
// (or (x >> c) | (y << (16 - c))) ==> (shrd16 x, y, c)
|
||||
@ -4650,11 +4650,11 @@ def : Pat<(store (or (srl (loadi16 addr:$dst), (i8 (trunc CX:$amt))),
|
||||
addr:$dst),
|
||||
(SHRD16mrCL addr:$dst, GR16:$src2)>;
|
||||
|
||||
def : Pat<(shrd GR16:$src1, (i8 imm:$amt1), GR16:$src2, (i8 imm:$amt2)),
|
||||
def : Pat<(shrd GR16:$src1, (i8 imm:$amt1), GR16:$src2, (i8 imm/*:$amt2*/)),
|
||||
(SHRD16rri8 GR16:$src1, GR16:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
def : Pat<(store (shrd (loadi16 addr:$dst), (i8 imm:$amt1),
|
||||
GR16:$src2, (i8 imm:$amt2)), addr:$dst),
|
||||
GR16:$src2, (i8 imm/*:$amt2*/)), addr:$dst),
|
||||
(SHRD16mri8 addr:$dst, GR16:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
// (or (x << c) | (y >> (16 - c))) ==> (shld16 x, y, c)
|
||||
@ -4675,11 +4675,11 @@ def : Pat<(store (or (shl (loadi16 addr:$dst), (i8 (trunc CX:$amt))),
|
||||
addr:$dst),
|
||||
(SHLD16mrCL addr:$dst, GR16:$src2)>;
|
||||
|
||||
def : Pat<(shld GR16:$src1, (i8 imm:$amt1), GR16:$src2, (i8 imm:$amt2)),
|
||||
def : Pat<(shld GR16:$src1, (i8 imm:$amt1), GR16:$src2, (i8 imm/*:$amt2*/)),
|
||||
(SHLD16rri8 GR16:$src1, GR16:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
def : Pat<(store (shld (loadi16 addr:$dst), (i8 imm:$amt1),
|
||||
GR16:$src2, (i8 imm:$amt2)), addr:$dst),
|
||||
GR16:$src2, (i8 imm/*:$amt2*/)), addr:$dst),
|
||||
(SHLD16mri8 addr:$dst, GR16:$src2, (i8 imm:$amt1))>;
|
||||
|
||||
// (anyext (setcc_carry)) -> (setcc_carry)
|
||||
|
@ -2383,11 +2383,11 @@ def MFENCE : I<0xAE, MRM_F0, (outs), (ins),
|
||||
"mfence", [(int_x86_sse2_mfence)]>, TB, Requires<[HasSSE2]>;
|
||||
|
||||
//TODO: custom lower this so as to never even generate the noop
|
||||
def : Pat<(membarrier (i8 imm:$ll), (i8 imm:$ls), (i8 imm:$sl), (i8 imm:$ss),
|
||||
def : Pat<(membarrier (i8 imm), (i8 imm), (i8 imm), (i8 imm),
|
||||
(i8 0)), (NOOP)>;
|
||||
def : Pat<(membarrier (i8 0), (i8 0), (i8 0), (i8 1), (i8 1)), (SFENCE)>;
|
||||
def : Pat<(membarrier (i8 1), (i8 0), (i8 0), (i8 0), (i8 1)), (LFENCE)>;
|
||||
def : Pat<(membarrier (i8 imm:$ll), (i8 imm:$ls), (i8 imm:$sl), (i8 imm:$ss),
|
||||
def : Pat<(membarrier (i8 imm), (i8 imm), (i8 imm), (i8 imm),
|
||||
(i8 1)), (MFENCE)>;
|
||||
|
||||
// Alias instructions that map zero vector to pxor / xorp* for sse.
|
||||
|
Loading…
Reference in New Issue
Block a user