[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 04:57:56 PST 2018


magabari added a comment.

I agree with Eli last comment, In fact we can solve compatibility in both text and bitcode.
Eli already suggested a way how to solve that in bitcode by inverting the bit (set will mean "mayOverflow" and unset means "NoOverflow")

We can use another approach in text, by adding "mayoveflow" or "nooverflow" to every sdiv instruction (always).

sdiv without any attribute will be the same like "sdiv nof" (backward compatibility)
sdiv that may overflow will be represented as "sdiv mof".

Later, we can add restriction that sdiv node should come with nof or mof keyword.


https://reviews.llvm.org/D41944





More information about the llvm-commits mailing list