[llvm] [IR] Add `samesign` flag to icmp instruction (PR #111419)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 17:37:43 PDT 2024


================
@@ -12398,6 +12399,9 @@ If the operands are integer vectors, then they are compared element by
 element. The result is an ``i1`` vector with the same number of elements
 as the values being compared. Otherwise, the result is an ``i1``.
 
+If the ``samesign`` keyword is present and the operands are not of the
+same sign then the result is a :ref:`poison value <poisonvalues>`.
+
----------------
dtcxzyw wrote:

Should we note here we only infer `samesign` on unsigned predicates?


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


More information about the llvm-commits mailing list