[llvm-dev] Immediate operand for vector instructions
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Mon Dec 5 18:27:29 PST 2016
Hi Alex,
On 5 December 2016 at 18:00, Alex Susu <alex.e.susu at gmail.com> wrote:
> We can compile it. Note that this is the only compilable code w.r.t.
> using i64 or i64imm (in the 2 lines above: "dag InOperandList", "list<dag>
> Pattern").
Yeah, you actually want to use "imm":
list<dag> Pattern = [(int_repeat_x_times imm:$imm)];
When the table generator sees "i64" it doesn't go looking in the
InOperandList to determine that the operand should be an immediate. It
just matches anything and shoves it into a register. It *does* know
about "imm" though because that's defined to match up to an
ISD::Constant SDNode.
Cheers.
Tim.
More information about the llvm-dev
mailing list