<div dir="ltr"><div>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!")</div><div><br></div><div>Seems that it doesn't like returning one value but how do you return more than one value?</div><div><br></div><div>I am doing this in the LowerOperation for the case SDIVREM and a function LowerSDIVREM inside XXXISelLowering.cpp</div><div><br></div><div>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.</div><div><br></div><div>Thanks.</div></div>