[PATCH] D138899: [DAGCombiner] handle more store value forwarding

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 02:50:20 PST 2022


shchenz added inline comments.


================
Comment at: llvm/test/CodeGen/X86/fastcc-byval.ll:2
 ; RUN: llc < %s -tailcallopt=false | FileCheck %s
-; CHECK: movl 8(%esp), %eax
+; CHECK: movl $1, (%esp)
 ; CHECK: movl 8(%esp), %eax
----------------
RKSimon wrote:
> RKSimon wrote:
> > shchenz wrote:
> > > Changing from:
> > > ```
> > > _bar:                                   ## @bar
> > > ## %bb.0:
> > > 	subl	$12, %esp
> > > 	movl	$1, 8(%esp)
> > > 	movl	8(%esp), %eax
> > > 	movl	%eax, (%esp)
> > > 	calll	_foo
> > > 	movl	8(%esp), %eax
> > > 	addl	$12, %esp
> > > 	retl
> > > ```
> > > 
> > > To:
> > > ```
> > > _bar:                                   ## @bar
> > > ## %bb.0:
> > > 	subl	$12, %esp
> > > 	movl	$1, 8(%esp)
> > > 	movl	$1, (%esp)
> > > 	calll	_foo
> > > 	movl	8(%esp), %eax
> > > 	addl	$12, %esp
> > > 	retl
> > > ```
> > > 
> > > Seems one load is saved, needs confirmation from X86 experts.
> > Please can you rebase after rG2d63646afdb0e4d8c063fe057916d7900f681968?
> Actually, rG51f154b997975ff1001b45823e903f87070222ad
Nice, thank you!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138899



More information about the llvm-commits mailing list