1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -gvn -S | FileCheck %s
3 ; RUN: opt < %s -passes=gvn -S | FileCheck %s
5 define i32 addrspace(1)* @addrspacecast(i32* %ptr) {
6 ; CHECK-LABEL: @addrspacecast(
8 ; CHECK-NEXT: [[Z1:%.*]] = addrspacecast i32* [[PTR:%.*]] to i32 addrspace(1)*
9 ; CHECK-NEXT: store i32 addrspace(1)* [[Z1]], i32 addrspace(1)** undef
10 ; CHECK-NEXT: ret i32 addrspace(1)* [[Z1]]
13 %z1 = addrspacecast i32* %ptr to i32 addrspace(1)*
14 store i32 addrspace(1)* %z1, i32 addrspace(1)** undef
18 %z2 = addrspacecast i32* %ptr to i32 addrspace(1)*
19 ret i32 addrspace(1)* %z2