[Mono-bugs] [Bug 503077] New: The "branch" optimization doesn't remove the opcodes compare+branch atomically (at least sometimes).
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue May 12 09:51:38 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=503077
Summary: The "branch" optimization doesn't remove the opcodes
compare+branch atomically (at least sometimes).
Classification: Mono
Product: Mono: Runtime
Version: 2.4.x
Platform: All
OS/Version: Linux
Status: NEW
Severity: Minor
Priority: P5 - None
Component: JIT
AssignedTo: lupus at novell.com
ReportedBy: cedric.vincent at st.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.10)
Gecko/2009042315 Firefox/3.0.10
Because the SH4 CPU uses a very reduced instruction set, the Mono/SH4
back-end has to converts the following code sequence:
compare
branch_if_greater
to:
compare_greater
branch_if_true
However the "branch" optimization does not remove the two opcodes
atomically (at least sometimes), so the SH4 lowering-pass is actually
confused.
Reproducible: Always
Steps to Reproduce:
Here comes a sample to reproduce this behavior with both Mono/x86 and
Mono/SH4 (attachement). You will notice it happens when JIT compiling
the method "System.IO.Path:GetDirectoryName":
AFTER METHOD-TO-IR 18: [IN: BB16(0), OUT: BB17(0) BB19(0) ]
iconst R101 <- [702263270]
iconst R102 <- [47]
iconst R103 <- [92]
icompare R102 R103
int_bne_un
...
HANDLE-GLOBAL-VREGS BLOCK 18:
iconst R101 <- [702263270]
iconst R102 <- [47]
iconst R103 <- [92]
icompare_imm R102
nop
The virtual register R102 does not seem to be used elsewhere. Maybe
the SH4 port of Mono should replace the opcode "icompare_imm" with a
"nop" for this case.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list