mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-22 07:32:48 +00:00
d3fc1be4f6
bitcast between pointers of two different address spaces if they happened to have the same pointer size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203862 91177308-0d34-0410-b5e6-96231b3b80d8
13 lines
338 B
LLVM
13 lines
338 B
LLVM
; RUN: opt -instcombine -S < %s | FileCheck %s
|
|
target datalayout = "e-p:64:64:64-n8:16:32:64"
|
|
|
|
define i32* @pointer_to_addrspace_pointer(i32 addrspace(1)** %x) nounwind {
|
|
; CHECK-LABEL: @pointer_to_addrspace_pointer(
|
|
; CHECK: load
|
|
; CHECK: addrspacecast
|
|
%y = bitcast i32 addrspace(1)** %x to i32**
|
|
%z = load i32** %y
|
|
ret i32* %z
|
|
}
|
|
|