So that no store instruction will be generated.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This could do with some tests to show the effect on codegen.
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
8688 | "since the ProcessImplicitDefs pass will do it for us". I don't think referring to the DEBUG_TYPE is as helpful. |
This would be more useful as a DAG combine in performDAGCombine. That would allow the integer undefs to be further simplified.
llvm/test/CodeGen/RISCV/calling-conv-ilp32d.ll | ||
---|---|---|
269 ↗ | (On Diff #403469) | I thought the issue showed up with the ilp32 abi and the D extension, not the ilp32d abi? Please check this test case in this test file fails without the RISCVISelLowering.cpp change. |
Can we put the new test case in double-calling-conv.ll instead? I think that it already has the right command line.
Given that the description says "so that no store will be generated" I think it'd be helpful to pre-commit the test case so that this patch shows the improvement. I tested it locally and see:
define double @func_return_double_undef() nounwind { ; RV32IFD-LABEL: func_return_double_undef: ; RV32IFD: # %bb.0: ; RV32IFD-NEXT: addi sp, sp, -16 ; RV32IFD-NEXT: fsd ft0, 8(sp) ; RV32IFD-NEXT: lw a0, 8(sp) ; RV32IFD-NEXT: lw a1, 12(sp) ; RV32IFD-NEXT: addi sp, sp, 16 ; RV32IFD-NEXT: ret ret double undef }
Other than that LGTM.
"since the ProcessImplicitDefs pass will do it for us". I don't think referring to the DEBUG_TYPE is as helpful.