[PATCH] D106053: [CodeGen] Remove pending AssertZext AssertSext in promoting FP_TO_INT

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 16:51:27 PDT 2021


LuoYuanke added a comment.

In D106053#2881182 <https://reviews.llvm.org/D106053#2881182>, @efriedma wrote:

> To be clear, I'm working on the assumption that AssertZext means "if the operand is not poison, the high N bits are not set".  I'm not sure we've formally stated that anywhere, but I think it's consistent with how SelectionDAG optimizations use AssertZext in practice.

Is it possible that user expect some saturate behaviour (get the max value of the int) when convert from FP to INT overflow? AssertZext cause the undefined behaviour be propagated to each optimization that assume the upper bits being zero.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106053/new/

https://reviews.llvm.org/D106053



More information about the llvm-commits mailing list