[llvm-dev] Instruction selection gives "LLVM ERROR: Cannot select"

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 25 15:15:10 PST 2016


On 25 January 2016 at 14:52, RCU via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>     I don't understand why because it seems to me store is specified well in
> [MyTarget]InstrInfo.td .
>
>     Can somebody help with an idea? Myself I will try to debug the code
> generated with TableGen, implementing the function SelectCode() .

We'd need to see at least the pattern in your .td file. More of the
DAG would also be helpful (try "llc -debug") since we've got not idea
what t20, t19 or t6 are.

About all I can suggest at the moment is following each step of the
"llc -debug" output while it's trying to select this store, referring
to build/lib/Target/MyTarget/MyTargetGenDAGISel.inc. You should be
able to work out which predicate on the way to the instruction you
expected to be used failed, which often makes it obvious what was
wrong with the pattern.

Cheers.

Tim.


More information about the llvm-dev mailing list