[PATCH] D138790: [DAG] Attempt to replace a mul node with an existing umul_lohi/smul_lohi node (PR59217)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 10:03:13 PST 2022


RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/X86/smul-with-overflow.ll:187
 
 define { i129, i1 } @smul_ovf(i129 %x, i129 %y) nounwind {
 ; X86-LABEL: smul_ovf:
----------------
deadalnix wrote:
> I have no idea how to evaluate if this is better or worse.
We end up spilling/reloading the (now resued) mul_lohi results instead of recomputing - I think this is the better approach for the DAG to take.

If we want to look at instruction rematerialization then that needs to be done in a later pass which can better compute the cost/benefit.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138790/new/

https://reviews.llvm.org/D138790



More information about the llvm-commits mailing list