[PATCH] D32674: [LoopIdiom] PR32811 check for safety while expanding

Aditya K via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 30 07:57:38 PDT 2017


Thanks for the suggestion. There was a little more required because just putting assert would remove the udiv which was the problem.

I had to create a for loop which will look for udiv in the function and then llvm_unreachable until udiv is there and then bugpoint on that.




-Aditya

________________________________
From: Daniel Berlin <dberlin at dberlin.org>
Sent: Saturday, April 29, 2017 8:39 PM
To: reviews+D32674+public+1b3c0405cfceb398 at reviews.llvm.org
Cc: Aditya Kumar; Philip Reames; Davide Italiano; Vedant Kumar; Eli Friedman; Sebastian Pop; Michael Zolotukhin; llvm-commits
Subject: Re: [PATCH] D32674: [LoopIdiom] PR32811 check for safety while expanding

Yes, just make the isSafeToExpand an assert and bugpoint it, and it should give you something much smaller.


On Sat, Apr 29, 2017 at 7:26 PM, Davide Italiano via Phabricator <reviews at reviews.llvm.org<mailto:reviews at reviews.llvm.org>> wrote:
davide added inline comments.


================
Comment at: test/Transforms/LoopIdiom/unsafe.ll:1-7
+; RUN: opt -S < %s -loop-idiom | FileCheck %s
+; CHECK-NOT: memset
+; check that memset is not generated (for assignment in for.body5) because that will result
+; in udiv hoisted out of the loop by the SCEV Expander
+; TODO: ideally we should be able to generate memset
+; if SCEV expander is taught to generate the dependencies
+; at the right point.
----------------
I'm under the impression this test can be greatly reduced.


https://reviews.llvm.org/D32674




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170430/dcf850f5/attachment.html>


More information about the llvm-commits mailing list