[Mono-bugs] [Bug 61797][Wis] New - [PATCH] avoid two comparisons for bool b = x != y
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 21 Jul 2004 16:10:22 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=61797
--- shadow/61797 2004-07-21 16:10:22.000000000 -0400
+++ shadow/61797.tmp.26535 2004-07-21 16:10:22.000000000 -0400
@@ -0,0 +1,29 @@
+Bug#: 61797
+Product: Mono: Runtime
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: bmaurer@users.sf.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [PATCH] avoid two comparisons for bool b = x != y
+
+there is no cli opcode to do `compare not equal'. As a result, mcs emits:
+
+..
+ceq
+ldc.i4.0
+ceq
+
+This patch uses only one comparison for this operation.
+
+A similar thing could be done with the other ops, however they seem to be
+so infrequent to make this patch not worth it.