[LLVMdev] Load/Store Instruction Error

Tim Northover t.p.northover at gmail.com
Sun Jun 8 00:56:09 PDT 2014


On 7 June 2014 20:53, Ramin Guner <webvlkn at gmail.com> wrote:
> In the first definition, I think you defined that the loaded data contains
> an i32. But the second definition (Pat) is not clear.

Yep. The second definition was *just* a code-generation pattern so
that the backend knows what do do if it needs to load a float (f32).
The end result is that in the table (in
build/lib/Target/XXX/XXXGenDAGISel.inc) there'll now be two entries:
one that triggers when the type is i32, and one that triggers when
it's f32.

The main oddity comes from the fact that you don't ever write "(set
ABC, ...)" in patterns that appear in separate Pats, that's only for
patterns in the Instruction itself.

It's all a bit messy, unfortunately, but it works in the end.

> Actually, I do not too much knowledge about Patters, PatFrags and
> ComplexPatterns etc. and there is no document about them.

The closest is include/llvm/Target/TargetSelectionDAG.td, and the
existing backends to see what's possible of course.

Cheers.

Tim.



More information about the llvm-dev mailing list