This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, MIPS] Fix comment before *<optab>_trunc<mode>_exts


Hi Richard,

At the bottom of <http://gcc.gnu.org/ml/gcc-patches/2008-08/msg02343.html>, I
blindly did what you asked for and fixed the comment from something that was
correct to incorrect.  (Somehow I thought that you meant that I had made a
grammatical error.)

As I was thinking about the other thread today I looked at the code again and
found the comment very misleading: the middle-end can of course only remove
the explicit truncation if the logical shift is by more than 32.  I am
changing back to my original version but also adding some words on why I have
excluded 32.

OK to install?

Adam

	* config/mips/mips.md (*<optab>_trunc<mode>_exts): Fix comment
	before the pattern.

Index: mips.md
===================================================================
--- mips.md	(revision 154425)
+++ mips.md	(working copy)
@@ -2888,8 +2888,9 @@ (define_insn "*lshr32_trunc<mode>"
   [(set_attr "type" "shift")
    (set_attr "mode" "<MODE>")])
 
-;; Logical shift by 32 or more results in proper SI values so
-;; truncation is removed by the middle end.
+;; Logical shift by more than 32 results in proper SI values so truncation is
+;; removed by the middle end.  Note that a logical shift by 32 is handled by
+;; the previous pattern.
 (define_insn "*<optab>_trunc<mode>_exts"
   [(set (match_operand:SUBDI 0 "register_operand" "=d")
         (truncate:SUBDI


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]