[PATCH] D38378: [ARM] Optimize {s,u}{add,sub}.with.overflow.

Joel Galenson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 09:53:04 PST 2017


jgalenson added a comment.

Thanks for the comments.  I'll update the patch in a minute.



================
Comment at: test/CodeGen/ARM/su-addsub-overflow.ll:124
+define void @extern_loop(i32 %n) local_unnamed_addr #0 {
+; Do not replace the compare around the clobbering call.
+; CHECK: add {{r[0-9]+}}, {{r[0-9]+}}, #1
----------------
rogfer01 wrote:
> I understand this is a "sanity check"-like test and your change does not include new code to avoid this problem (all the machinery was already there). Is this correct?
Yes, mostly.  I added this test in my second version of this patch after seeing a bug in the first version.  I had initially made an incorrect change, and I reverted that part of it and added this test.  (You can diff my first two versions of this patch against each other to see the details.)  So this patch doesn't contain new code to avoid this; it just makes sure I don't make that mistake again.


https://reviews.llvm.org/D38378





More information about the llvm-commits mailing list