[PATCH] D156444: [llvm][RISCV][IR] Zext flag in IR for RISC-V

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 29 11:41:01 PDT 2023


nikic added a comment.

In D156444#4652044 <https://reviews.llvm.org/D156444#4652044>, @karouzakisp wrote:

> In D156444#4650274 <https://reviews.llvm.org/D156444#4650274>, @nikic wrote:
>
>> The semantics need to be a change to llvm/docs/LangRef.rst in this patch, not a comment.
>>
>> As I said before, I don't think it makes sense to add nneg support to zext constant expressions, which are slated for removal.
>
> Refactoring NonNeg Operator and removing all zext constant expressions leads to 3 test failing due to the inheritance graph:
> NonNeg Operator is Operator and Operator is User and ConstantExpr is a Constant and Constant is User too.
> So the User class must be refactored too to not support ConstantExpr in general.

Yes, Operator is for cases that support Instruction and ConstantExpr. You would change NonNegOperator -> NonNegInstruction/NonNegInst (if you need it at all, it would only have the classof check for zext and nothing else).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156444



More information about the llvm-commits mailing list