[llvm-dev] Instruction selection bug for vector store with FixedStack
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Mon Aug 1 10:20:25 PDT 2016
Hi Alex,
On 29 July 2016 at 19:14, Alex Susu via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I actually have difficulties in understanding in the Selection DAG what
> the FixedStack operand means. Also, it is not really clear for me how to
> handle it in my back end.
FixedStack refers to objects at a known location, created by
MachineFrameInfo::CreateFixedObject rather than allocated an arbitrary
stack slot. They're usually used for things like function parameters:
you know exactly where they are on the stack.
What you're seeing is the MachineMemOperand being printed. They
typically don't take part in instruction selection, the FrameIndex is
the most likely problem, though that's a bigger than average vector so
maybe it should have been split?
> Initial Opcode index to 157
> Skipped scope entry (due to false predicate) at index 162, continuing at 236
> Match failed at index 241
> Continuing at 263
Assuming you've written a pattern that you think should be able to
store a v8i64 (which ought to be enough, really), what I'd do now is
look at build/lib/Target/XYZ/XYZGenDAGISel.inc. You should be able to
correlate the debug info as above with your pattern and see just which
bit of it is failing. Hopefully that'll tell you how to fix it.
If I saw this on one of the in-tree targets I'd be suspicious that the
C++ code in SelectWhateverAddrMode (from XYZISelDAGToDAG.cpp) was
refusing to handle FrameIndex operands for the pointer (or maybe that
an Operand<i32> had been used for something that's really a pointer).
But you'll know more after looking at the .inc file.
Cheers.
Tim.
More information about the llvm-dev
mailing list