1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/test/Transforms/InstCombine/load-addrspace-cast.ll
Owen Anderson 3a006737fe Fix a bug in InstCombine where we would incorrectly attempt to construct a
bitcast between pointers of two different address spaces if they happened to have
the same pointer size.

llvm-svn: 203862
2014-03-13 22:51:43 +00:00

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
}