Skip to content

Commit

Permalink
[SelectionDAG] Add additional documentation to FP_TO_S/UINT_SAT to ju…
Browse files Browse the repository at this point in the history
…stify D116870. NFC

As noted in post-commit review, the value of the bits between
the saturating type and result type were not defined defined. Define
them to be sign extended for FP_TO_SINT_SAT and zero extended for
FP_TO_UINT_SAT.
  • Loading branch information
topperc committed Jan 11, 2022
1 parent 86c5b87 commit 9ef2175
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions llvm/include/llvm/CodeGen/ISDOpcodes.h
Expand Up @@ -797,6 +797,10 @@ enum NodeType {
/// The scalar width of the type given in operand 1 must be equal to, or
/// smaller than, the scalar result type width. It may end up being smaller
/// than the result width as a result of integer type legalization.
///
/// After converting to the scalar integer type in operand 1, the value is
/// extended to the result VT. FP_TO_SINT_SAT sign extends and FP_TO_UINT_SAT
/// zero extends.
FP_TO_SINT_SAT,
FP_TO_UINT_SAT,

Expand Down

0 comments on commit 9ef2175

Please sign in to comment.