[llvm] [IR] Specify that overflow is poison, not UB in {s,u}{mul,div}.fix (PR #141748)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed May 28 05:56:45 PDT 2025
================
@@ -19135,8 +19137,10 @@ If the result value cannot be precisely represented in the given scale, the
value is rounded up or down to the closest representable value. The rounding
direction is unspecified.
-It is undefined behavior if the result value does not fit within the range of
-the fixed point type, or if the second argument is zero.
+If the result value does not fit within the range of the fixed point type, the
+result is poison.
----------------
nikic wrote:
Can udiv.fix even produce a value that does not fit the range?
https://github.com/llvm/llvm-project/pull/141748
More information about the llvm-commits
mailing list