[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
Sat Jan 13 23:04:14 PST 2018


magabari added a comment.

In https://reviews.llvm.org/D41944#973480, @MatzeB wrote:

> - Without any change in the backend (not even an abort) this will simply miscompile the no nof version on most targets.
> - With the way you are modeling the new flag, means that existing bitcode/.ll files will change semantics when read with newer compilers. I'm not sure that is a good idea for this, in any way at the very least you have to provide AutoUpgrade logic for that.




- I agree with the first point, but currently there is no such optimization that will generate the no nof version, so I assume that won't happen in the short term, Currently i am working on the backend side but at any case we can put some sanity check in the backend that sdiv\udiv come with the nof attribute now.

- As I know LLVM doesn't promise backward comparability so we tried following the correct solution (notice that another way is to suggest 'mayoverflow' attribute but it won't match other attributes in LLVM). Regarding the AutoUpgrade logic I will be glad if you can clarify more on what has to be done?


Repository:
  rL LLVM

https://reviews.llvm.org/D41944





More information about the llvm-commits mailing list