Files
clang-p2996/llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp
Craig Topper 9396891271 [RISCV] Don't look for sext in RISCVCodeGenPrepare::visitAnd.
We want to know the upper 33 bits of the And Input are zero. SExt
only guarantees they are the same.

We originally checked for SExt or ZExt when we were using
isImpliedByDomCondition because a ZExt may have been changed to SExt
before we visited the And.

We are no longer using isImpliedByDomCondition so we can only look
for zext with the nneg flag.

While here, switch to PatternMatch to simplify the code.

Fixes #78783
2024-01-19 14:44:47 -08:00

5.6 KiB