Teach the dag isel generator how to construct arbitrary immediates. The

generated isel now tries li then lis, then lis+ori.

llvm-svn: 23418
This commit is contained in:
Chris Lattner 2005-09-24 00:41:58 +00:00
parent 0afb14cade
commit 6736a6cdd2
1 changed files with 6 additions and 1 deletions

View File

@ -774,7 +774,12 @@ def : Pat<(or GPRC:$in, imm:$imm),
def : Pat<(xor GPRC:$in, imm:$imm),
(XORIS (XORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
// Same as above, but using a temporary.
// Arbitrary immediate support.
def : Pat<(i32 imm:$imm),
(ORI (LIS (HI16 imm:$imm)), (LO16 imm:$imm))>;
// Same as above, but using a temporary. FIXME: implement temporaries :)
/*
def : Pattern<(xor GPRC:$in, imm:$imm),
[(set GPRC:$tmp, (XORI GPRC:$in, (LO16 imm:$imm))),