1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

add support for missed eqv tests

llvm-svn: 23496
This commit is contained in:
Chris Lattner 2005-09-28 18:10:51 +00:00
parent eb8d9090c3
commit 90179cf384

View File

@ -766,10 +766,18 @@ def RLDICR : MDForm_1<30, 1,
def : Pat<(i32 imm:$imm),
(ORI (LIS (HI16 imm:$imm)), (LO16 imm:$imm))>;
// Implement the 'not' operation with the NOR instruction.
def NOT : Pat<(not GPRC:$in),
(NOR GPRC:$in, GPRC:$in)>;
// EQV patterns
def EQV1 : Pat<(xor (not GPRC:$in1), GPRC:$in2),
(EQV GPRC:$in1, GPRC:$in2)>;
// FIXME: This should be autogenerated from the above due to xor commutativity.
def EQV2 : Pat<(xor GPRC:$in1, (not GPRC:$in2)),
(EQV GPRC:$in1, GPRC:$in2)>;
// or by an arbitrary immediate.
def : Pat<(or GPRC:$in, imm:$imm),
(ORIS (ORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
@ -778,6 +786,7 @@ def : Pat<(xor GPRC:$in, imm:$imm),
(XORIS (XORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
// Same as above, but using a temporary. FIXME: implement temporaries :)
/*
def : Pattern<(xor GPRC:$in, imm:$imm),