From ea874f3306c26ed425c05b2de202a176e2f32ed2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 24 Sep 2005 00:41:58 +0000 Subject: [PATCH] Teach the dag isel generator how to construct arbitrary immediates. The generated isel now tries li then lis, then lis+ori. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23418 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCInstrInfo.td | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index 705fcea76ae..23920e1bf0a 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -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))),