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