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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 02:38:24 PST 2022


RKSimon 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
----------------
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?


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