[llvm] r196269 - Addrspacecasts are no-ops on ARM.
Bill Wendling
isanbard at gmail.com
Sat Dec 7 01:40:49 PST 2013
Okay.
-bw
On Dec 4, 2013, at 6:53 AM, Pekka Jääskeläinen <pekka.jaaskelainen at tut.fi> wrote:
> 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=196268&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
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list