[llvm] [X86] Lower vector unsigned integer division through f64 division (PR #205263)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 02:29:13 PDT 2026


Andarwinux wrote:

https://llvm.org/docs/LangRef.html#i-sdiv

>The value produced is the signed integer quotient of the two operands rounded towards zero.
>Note that signed integer division and unsigned integer division are distinct operations; for unsigned integer division, use ‘udiv’.
>Division by zero is undefined behavior. For vectors, if any element of the divisor is zero, the operation has undefined >behavior. Overflow also leads to undefined behavior; this is a rare case, but can occur, for example, by doing a 32-bit >division of -2147483648 by -1.
>If the exact keyword is present, the result value of the sdiv is a [poison value](https://llvm.org/docs/LangRef.html#poisonvalues) if the result would be rounded.

Sounds like unnecessary to limit this to unsigned?

https://github.com/llvm/llvm-project/pull/205263


More information about the llvm-commits mailing list