<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt;">Hi All,</div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt;"><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">For a piece of code I get '<span style="background-color: transparent;">overflow' intrinsic generated by clang. </span></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0);
background-color: transparent; font-style: normal;"><span style="font-size: 13px;"><span class="Apple-tab-span" style="white-space:pre"> </span>//C++ code</span><br></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>jap = new just_another[i]; </font><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>//clang generated code.</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>%1 = call { i32, i1 }
@llvm.umul.with.overflow.i32(i32 %0, i32 28), !dbg !46 </font><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'Times New Roman'; font-style: normal;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">The 'return type' for this intrinsic is '{i32, i1}'. Unfortunately, the architecture description does not allow me to have a 'such aggregate type' as 'return type' for a function. </font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;"><font face="Courier New, courier, monaco, monospace,
sans-serif" size="2"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">For 'non-supported return types', we return them as 'indirect', which results in generating this as a function argument. S</font><span style="font-size: 13px; background-color: transparent;">uch cases are handled in <myarch>ABIInfo class, in overridden function 'classifyReturnType()'.</span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;"><span style="font-size: 13px; background-color: transparent;"><br></span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco,
monospace, sans-serif; font-style: normal;"><span style="background-color: transparent;">I am not sure about handling such 'return types' for intrinsic call. What should be the classification of such return type ? </span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;"><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="background-color: transparent;">Thanks & Regards,</span><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">Pankaj</div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0);
background-color: transparent; font-style: normal;"><br></div></div></body></html>