[llvm] [SelectionDAG] Introduce ISD::PTRADD (PR #140017)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Mon May 19 17:13:54 PDT 2025


arichardson wrote:

> Should we add these verification asserts(or some equivalent) to `getNode` like we have for `ISD::ADD`
> 
> ```
>     assert(VT.isInteger() && "This operator does not apply to FP types!");       
>     assert(N1.getValueType() == N2.getValueType() &&                             
>            N1.getValueType() == VT && "Binary operator types must match!");
> ```

I agree having these assertions would be useful, and we can relax them once PTRADD starts using actual pointer types instead of integer ones.

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


More information about the llvm-commits mailing list