[llvm] [SelectionDAG] Add initial support for nneg flag on ISD::ZERO_EXTEND. (PR #70872)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 1 07:56:36 PDT 2023


preames wrote:

Do we need to add the flag to the zext_in_reg nodes?   This question is complicated by the fact that comments in DAGCombine mention such a node, but it doesn't appear to be in the ISDOpcodes.h list.  

Can you update the comment for ZERO_EXTEND in ISDOpcodes.h to mention the flag and the implied poison semantics?

For context, we're definitely going to need this for RISCV.  At the moment, I set us up to prefer SIGN_EXTEND based on the target preference, and I see some cases in benchmarks where this hurt codegen because we missed a zext fold or zeroing bits is easier in a particular case (say, and with smallish constant).  


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


More information about the llvm-commits mailing list