[llvm] [IR] Add disjoint flag for Or instructions. (PR #72583)

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 17 10:35:46 PST 2023


================
@@ -10012,6 +10013,12 @@ The truth table used for the '``or``' instruction is:
 |   1 |   1 |   1 |
 +-----+-----+-----+
 
+``disjoint`` means every bit is known to be zero in at least one of the inputs.
+This allows the Or to be treated as an Add since no carry can occur from any
+bit. If the disjoint keyword is present, the result value of the ``or`` is a
+:ref:`poison value <poisonvalues>` if both inputs have a one in any bit
+position. For vectors, only the element containing the bit is poison.
----------------
nhaehnle wrote:

I stumbled over this a little. Perhaps it should be "... is a poison value if both inputs have a one in the same position"? (I'm not 100% happy about that either)

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


More information about the llvm-commits mailing list