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]

Re: Arch-independent double-word clz expansion and a few other tweaks for bitscanning


On Fri, Aug 10, 2007 at 11:45:33PM -0700, Zack Weinberg wrote:
> ==================================================================
> --- config/i386/i386.md	(revision 127388)
> +++ config/i386/i386.md	(local)
> @@ -14583,98 +14583,16 @@ (define_insn "leave_rex64"
...
> +(define_insn "ctzsi2"
> +  [(set (match_operand:SI 0 "register_operand" "=r")
> +	(ctz:SI (match_operand:SI 1 "nonimmediate_operand" "rm")))
> +   (set (reg:CCZ FLAGS_REG)
> +        (compare:CCZ (match_dup 1) (const_int 0)))]

   Usually this sort of insn has the (set (reg:CCx FLAGS_REG) ...) part
first because that's how combine wants it. Likewise with the other ones you
added.

-- 
Rask Ingemann Lambertsen


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