mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
learn to codegen not as NOR instead of xoris/xori
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23490 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d135fa4fd6
commit
91da8623be
@ -766,6 +766,10 @@ def RLDICR : MDForm_1<30, 1,
|
|||||||
def : Pat<(i32 imm:$imm),
|
def : Pat<(i32 imm:$imm),
|
||||||
(ORI (LIS (HI16 imm:$imm)), (LO16 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)>;
|
||||||
|
|
||||||
// or by an arbitrary immediate.
|
// or by an arbitrary immediate.
|
||||||
def : Pat<(or GPRC:$in, imm:$imm),
|
def : Pat<(or GPRC:$in, imm:$imm),
|
||||||
(ORIS (ORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
|
(ORIS (ORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
|
||||||
|
Loading…
Reference in New Issue
Block a user