[llvm-dev] Invalid number for the given node in SelectionDAG

Ryan Taylor via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 24 06:42:43 PST 2016

I'm trying to replace SDIvRem (whch returns two i16 types) with a custom
that returns i32 or i16. I am getting the Assertion (!Node || ResNo <
Node->getNumValues() && "Invalid result number for the given node!")

Seems that it doesn't like returning one value but how do you return more
than one value?

I am doing this in the LowerOperation for the case SDIVREM and a function
LowerSDIVREM inside XXXISelLowering.cpp

I looked at some other cases, such as arm, and it generates a pair and then
returns the first of the pair, this does not work for me however.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160224/3577db05/attachment.html>

More information about the llvm-dev mailing list