This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR target/52364: The unnecessary second form in *movabs<mode>_[12]
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>, Vladimir Makarov <vmakarov at redhat dot com>
- Date: Fri, 24 Feb 2012 17:11:55 +0100
- Subject: Re: PATCH: PR target/52364: The unnecessary second form in *movabs<mode>_[12]
- Authentication-results: mr.google.com; spf=pass (google.com: domain of ubizjak@gmail.com designates 10.236.46.232 as permitted sender) smtp.mail=ubizjak@gmail.com; dkim=pass header.i=ubizjak@gmail.com
- References: <20120224045849.GA14338@intel.com>
On Fri, Feb 24, 2012 at 5:58 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> The second form is redundant in
>
> ;; Stores and loads of ax to arbitrary constant address.
> ;; We fake an second form of instruction to force reload to load address
> ;; into register when rax is not available
> (define_insn "*movabs<mode>_1"
> ?[(set (mem:SWI1248x (match_operand:DI 0 "x86_64_movabs_operand" "i,r"))
> ? ? ? ?(match_operand:SWI1248x 1 "nonmemory_operand" "a,er"))]
> ?"TARGET_64BIT && ix86_check_movabs (insn, 0)"
> ?"@
> ? movabs{<imodesuffix>}\t{%1, %P0|%P0, %1}
> ? mov{<imodesuffix>}\t{%1, %a0|%a0, %1}"
> ?[(set_attr "type" "imov")
> ? (set_attr "modrm" "0,*")
> ? (set_attr "length_address" "8,0")
> ? (set_attr "length_immediate" "0,*")
> ? (set_attr "memory" "store")
> ? (set_attr "mode" "<MODE>")])
>
> since it is just normal mov<mode>. ?Tested on Linux/x86-64. ?OK for stage1?
I am a bit scarred by ... well ... scary comment that mentions reload.
This second form predates IRA - are we sure that IRA is clever enough
not to break due to this change?
Jan, Vladimir, do you have any comments?
Uros.