[PATCH] D41944: [LLVM][IR][LIT] support of 'no-overflow' flag for sdiv\udiv instructions

Mohammed Agabaria via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 09:25:12 PST 2018


magabari added a comment.

In https://reviews.llvm.org/D41944#978691, @nlopes wrote:

> Before accepting this patch, we really need to see benchmark results. I'm not going to change clang to start emitting non-UB divs if the perf is going to be horrible. We need data.
>  Otherwise I don't see the need for this poison version of division. Could you elaborate if your plan is to expose this somehow to the application developer?
>
> I'm sorry if this questions have been properly answered in the past. If so, could you please link them here?


In general the proposed feature allows compiler to start speculating div without worrying too much of div-by-zero etc. so for example you can do instruction hoisting or vectorizing predicated sdiv.
We are currently focused on vectorizing predicated div instruction and our implementation shows around 20-30% improvements on several tests of coremark-pro and denbench.


https://reviews.llvm.org/D41944





More information about the llvm-commits mailing list