<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On May 6, 2014, at 1:46 PM, Louis Gerbarg <<a href="mailto:lgg@apple.com">lgg@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>On May 2, 2014, at 11:40 PM, Tim Northover <<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>> wrote:<br><br><blockquote type="cite">Hi Louis,<br><br>On 3 May 2014 01:43, Louis Gerbarg <<a href="mailto:lgg@apple.com">lgg@apple.com</a>> wrote:<br><blockquote type="cite">The attached patch provides custom lowering of overflow intrinsics for the ARM architecture.<br></blockquote><br>As Pete said, a very good idea!<br><br>I think I'd prefer it if the tests also tracked data dependencies as<br>well as just the instructions used though. If you swapped some<br>operands around the results might be disastrous.<br><br><blockquote type="cite">      add     r2, r0, r1<br>      mov     r1, #1<br>      cmp     r2, r0<br>      movvc   r1, #0<br></blockquote><br>Couldn't this be simplified to:<br><br>      adds r2, r0, r1<br>      mov r1, #1<br>      movvc r1, #0<br><br>? This would probably involve adding ARMISD::ADDS and ARMISD::SUBS<br>nodes (see ARM64 for reference, it already has them).<br></blockquote><br>Yes, this can be simplified further. I took another look at this morning. The issue that prevented me from doing it in the first place is that the arm backend handles the CPSR somewhat differently than ARM64. There are already somewhat analogous nodes (ARMISD::ADDC and ARMISD::SUBC),  but they decide whether or not to set flags based on the liveness of the CPSR, so I need to figure out how to get that wired up. I don’t think adding explicit ADDS/SUBS nodes would make that any simpler because I suspect they would have to deal with equivalent CPSR issues in the tablegen files.<br><br>Louis<br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></div></blockquote></div><br></body></html>