[llvm] [DAG][RISCV] Use vp.<binop> when widening illegal types for binops which can trap (PR #105214)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 11:29:54 PDT 2024


preames wrote:

A bit of context to help simplify review:
* There's a bunch of ISD opcodes which go through the WidenVecRes_BinaryCanTrap routine, but for which TLI.canOpTrap returns false.  These are always widened.  This covers everything except the DIV/REM opcodes.
* That codepath is not taken if NumElts is one.  As such, we have to guard the new code to handle the case where we have a base opcode without a vp opcode.  Currently FPOW is the only example, and to my knowledge, no target will actually reach this block for that case.  It seemed useful to be defensive here regardless.  

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


More information about the llvm-commits mailing list