mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Addrspacecasts are no-ops on ARM.
Testcase added. llvm-svn: 196269
This commit is contained in:
parent
f84d58699b
commit
674f480ca4
@ -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,
|
||||
|
7
test/CodeGen/ARM/addrspacecast.ll
Normal file
7
test/CodeGen/ARM/addrspacecast.ll
Normal file
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user