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

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 10:30:16 PST 2022


deadalnix 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:
----------------
RKSimon wrote:
> 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.
Agreed.


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