[llvm] r196269 - Addrspacecasts are no-ops on ARM.

James Molloy James.Molloy at arm.com
Wed Dec 4 06:59:33 PST 2013


Hi Pekka,

I also vote that it should go into 3.4 - it caused all our OpenCL tests to fall over :)

James

> -----Original Message-----
> From: Pekka Jääskeläinen [mailto:pekka.jaaskelainen at tut.fi]
> Sent: 04 December 2013 14:53
> To: James Molloy; llvm-commits at cs.uiuc.edu; wendling at gmail.com
> Cc: Kalle Raiskila
> Subject: Re: [llvm] r196269 - Addrspacecasts are no-ops on ARM.
>
> Can this go to LLVM 3.4? It now crashes with
> LLVM IR programs that use address spaces.
>
> At least x86_64 is OK with the fake address space map ids.
>
> Thanks,
> Pekka
>
> On 12/03/2013 01:23 PM, James Molloy wrote:
> > Author: jamesm
> > Date: Tue Dec  3 05:23:11 2013
> > New Revision: 196269
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=196269&view=rev
> > Log:
> > Addrspacecasts are no-ops on ARM.
> >
> > Testcase added.
> >
> >
> > Added:
> >      llvm/trunk/test/CodeGen/ARM/addrspacecast.ll
> > Modified:
> >      llvm/trunk/lib/Target/ARM/ARMISelLowering.h
> >
> > Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h
> > URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=196269&r1=196
> 268&r2=196269&view=diff
> >
> ==========================================================
> ====================
> > --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original)
> > +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Tue Dec  3 05:23:11
> 2013
> > @@ -361,6 +361,12 @@ namespace llvm {
> >       /// be used for loads / stores from the global.
> >       virtual unsigned getMaximalGlobalOffset() const;
> >
> > +    /// Returns true if a cast between SrcAS and DestAS is a noop.
> > +    virtual bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS)
> const {
> > +      // Addrspacecasts are always noops.
> > +      return true;
> > +    }
> > +
> >       /// createFastISel - This method returns a target specific FastISel object,
> >       /// or null if the target does not support "fast" ISel.
> >       virtual FastISel *createFastISel(FunctionLoweringInfo &funcInfo,
> >
> > Added: llvm/trunk/test/CodeGen/ARM/addrspacecast.ll
> > URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/test/CodeGen/ARM/addrspacecast.ll?rev=196269&view
> =auto
> >
> ==========================================================
> ====================
> > --- llvm/trunk/test/CodeGen/ARM/addrspacecast.ll (added)
> > +++ llvm/trunk/test/CodeGen/ARM/addrspacecast.ll Tue Dec  3 05:23:11
> 2013
> > @@ -0,0 +1,7 @@
> > +; RUN: llc < %s -march=arm
> > +
> > +; Check that codegen for an addrspace cast succeeds without error.
> > +define <4 x i32 addrspace(1)*> @f (<4 x i32*> %x) {
> > +  %1 = addrspacecast <4 x i32*> %x to <4 x i32 addrspace(1)*>
> > +  ret <4 x i32 addrspace(1)*> %1
> > +}
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
>
>
> --
> --Pekka


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2548782





More information about the llvm-commits mailing list