aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/2008-02-22-ReMatBug.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-01-25 03:53:59 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-01-25 03:53:59 +0000
commitd498c8f2c8eb5598bf2e0c3ab30016734e490c6b (patch)
tree33b7931d23d322b8f809c568f5600f31f6009117 /test/CodeGen/X86/2008-02-22-ReMatBug.ll
parent9b9948507474acd3c5941ad7d33a37cb066803ad (diff)
downloadexternal_llvm-d498c8f2c8eb5598bf2e0c3ab30016734e490c6b.zip
external_llvm-d498c8f2c8eb5598bf2e0c3ab30016734e490c6b.tar.gz
external_llvm-d498c8f2c8eb5598bf2e0c3ab30016734e490c6b.tar.bz2
Teach 2addr pass to be do more commuting. If both uses of a two-address instruction are killed, but the first operand has a use before and after the def, commute if the second operand does not suffer from the same issue.
%reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1 %reg1029<def> = MOV8rr %reg1028 %reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead> insert => %reg1030<def> = MOV8rr %reg1028 %reg1030<def> = ADD8rr %reg1028<kill>, %reg1029<kill>, %EFLAGS<imp-def,dead> In this case, it might not be possible to coalesce the second MOV8rr instruction if the first one is coalesced. So it would be profitable to commute it: %reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1 %reg1029<def> = MOV8rr %reg1028 %reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead> insert => %reg1030<def> = MOV8rr %reg1029 %reg1030<def> = ADD8rr %reg1029<kill>, %reg1028<kill>, %EFLAGS<imp-def,dead> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2008-02-22-ReMatBug.ll')
-rw-r--r--test/CodeGen/X86/2008-02-22-ReMatBug.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGen/X86/2008-02-22-ReMatBug.ll b/test/CodeGen/X86/2008-02-22-ReMatBug.ll
index f78d526..539fc15 100644
--- a/test/CodeGen/X86/2008-02-22-ReMatBug.ll
+++ b/test/CodeGen/X86/2008-02-22-ReMatBug.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of re-materialization} | grep 3
+; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of re-materialization} | grep 4
; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of dead spill slots removed}
; rdar://5761454