Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
We talked offline and it's maybe better to have a bit more picture on how ReplaceNodeResults is working before committing this.
llvm/test/CodeGen/WebAssembly/simd-illegal-signext.ll | ||
---|---|---|
8 ↗ | (On Diff #196315) | Nit: Can we make it wrap to 80 cols bit more? It currently looks kinda random |
15 ↗ | (On Diff #196315) | Nit: we can remove #0 |
DAGTypeLegalizer calls ReplaceNodeResults whenever CustomLowerNode is called and its parameter LegalizeResult is true or when CustomWidenLowerNode is called. So basically it is the same as LowerOperation except that it is meant to focus on legalizing the result type rather than simply transforming the operation. There is even a TODO on LowerOperationWrapper, /// TODO: Consider merging with ReplaceNodeResults..
llvm/test/CodeGen/WebAssembly/simd-illegal-signext.ll | ||
---|---|---|
8 ↗ | (On Diff #196315) | I would have to break up the very long WebAssemblyTargetLowering::ReplaceNodeResults to make the wrapping prettier. I think it's more valuable to keep the name so the reader knows exactly what was fixed. |
Thanks for investigating this! This is getting kind of hard to understand without knowing the context that why signext_inreg is custom lowered for SIMD but actually not custom lowered....
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | ||
---|---|---|
898 ↗ | (On Diff #197906) | Can we guarantee this function is only executed in case of SIGN_EXTEND_INREG? How about checking its opcode here and if not do llvm_unreachable or something, with some comments why we need this for SIGN_EXTEND_INREG? |