[ISD] Add disclaimer comments to AssertSext/Zext/Align opcodes about poison values
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 19 Jul 2021 16:14:21 +0000 (17:14 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 19 Jul 2021 16:15:28 +0000 (17:15 +0100)
As encountered on D106053, we need to be very explicit that the Assertion nodes don't hold true for a poison value (or for specific poisoned vector elements).

Differential Revision: https://reviews.llvm.org/D106257

llvm/include/llvm/CodeGen/ISDOpcodes.h

index 8ff83043e7056ed88bf238288f52c50e3b1227d5..de311228975c2b947cec4c0af83dc3f01309615f 100644 (file)
@@ -55,9 +55,16 @@ enum NodeType {
   /// value that has already been zero or sign extended from a narrower type.
   /// These nodes take two operands.  The first is the node that has already
   /// been extended, and the second is a value type node indicating the width
-  /// of the extension
+  /// of the extension.
+  /// NOTE: In case of the source value (or any vector element value) is
+  /// poisoned the assertion will not be true for that value.
   AssertSext,
   AssertZext,
+
+  /// AssertAlign - These nodes record if a register contains a value that
+  /// has a known alignment and the trailing bits are known to be zero.
+  /// NOTE: In case of the source value (or any vector element value) is
+  /// poisoned the assertion will not be true for that value.
   AssertAlign,
 
   /// Various leaf nodes.