[llvm] [RISCV] Add isel optimization for (and (sra y, c2), c1) to recover regression from #101751. (PR #104114)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 23 07:52:04 PDT 2024


zmodem wrote:

We're hitting an assert after this change:

```
llvm/include/llvm/Support/Casting.h:566:
decltype(auto) llvm::cast(const From &) [To = llvm::ConstantSDNode, From = llvm::SDValue]:
Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
```

(And with asserts disabled, the compiler crashes.)

I've attached a reproducer here: https://crbug.com/361746101#comment2

I'll prepare a revert.

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


More information about the llvm-commits mailing list