llvm/llvm/test/Analysis/CostModel/AMDGPU/addrspacecast.ll

; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=kaveri < %s | FileCheck -check-prefixes=ALL %s
; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=kaveri < %s | FileCheck -check-prefixes=ALL-SIZE %s
; END.

define void @addrspacecast_global_to_flat() #0 {
; ALL-LABEL: 'addrspacecast_global_to_flat'
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i8ptr = addrspacecast ptr addrspace(1) undef to ptr
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i8ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i8ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i8ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i8ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i16ptr = addrspacecast ptr addrspace(1) undef to ptr
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i16ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i16ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i16ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i16ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i32ptr = addrspacecast ptr addrspace(1) undef to ptr
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i32ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i32ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i32ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i32ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i64ptr = addrspacecast ptr addrspace(1) undef to ptr
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i64ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i64ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i64ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i64ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; ALL-SIZE-LABEL: 'addrspacecast_global_to_flat'
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i8ptr = addrspacecast ptr addrspace(1) undef to ptr
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i8ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i8ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i8ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i8ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i16ptr = addrspacecast ptr addrspace(1) undef to ptr
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i16ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i16ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i16ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i16ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i32ptr = addrspacecast ptr addrspace(1) undef to ptr
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i32ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i32ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i32ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i32ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i64ptr = addrspacecast ptr addrspace(1) undef to ptr
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i64ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i64ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i64ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i64ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
;
  %i8ptr = addrspacecast ptr addrspace(1) undef to ptr
  %v2i8ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
  %v3i8ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
  %v4i8ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
  %v32i8ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
  %i16ptr = addrspacecast ptr addrspace(1) undef to ptr
  %v2i16ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
  %v3i16ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
  %v4i16ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
  %v32i16ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
  %i32ptr = addrspacecast ptr addrspace(1) undef to ptr
  %v2i32ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
  %v3i32ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
  %v4i32ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
  %v32i32ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
  %i64ptr = addrspacecast ptr addrspace(1) undef to ptr
  %v2i64ptr = addrspacecast <2 x ptr addrspace(1)> undef to <2 x ptr>
  %v3i64ptr = addrspacecast <3 x ptr addrspace(1)> undef to <3 x ptr>
  %v4i64ptr = addrspacecast <4 x ptr addrspace(1)> undef to <4 x ptr>
  %v32i64ptr = addrspacecast <32 x ptr addrspace(1)> undef to <32 x ptr>
  ret void
}

define void @addrspacecast_local_to_flat() #0 {
; ALL-LABEL: 'addrspacecast_local_to_flat'
; ALL-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i8ptr = addrspacecast ptr addrspace(3) undef to ptr
; ALL-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i8ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i8ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i8ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i8ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i16ptr = addrspacecast ptr addrspace(3) undef to ptr
; ALL-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i16ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i16ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i16ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i32ptr = addrspacecast ptr addrspace(3) undef to ptr
; ALL-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i32ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i32ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i32ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i64ptr = addrspacecast ptr addrspace(3) undef to ptr
; ALL-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i64ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i64ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i64ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; ALL-SIZE-LABEL: 'addrspacecast_local_to_flat'
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i8ptr = addrspacecast ptr addrspace(3) undef to ptr
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i8ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i8ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i8ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i8ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i16ptr = addrspacecast ptr addrspace(3) undef to ptr
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i16ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i16ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i16ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i32ptr = addrspacecast ptr addrspace(3) undef to ptr
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i32ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i32ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i32ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i64ptr = addrspacecast ptr addrspace(3) undef to ptr
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i64ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i64ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i64ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
;
  %i8ptr = addrspacecast ptr addrspace(3) undef to ptr
  %v2i8ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
  %v3i8ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
  %v4i8ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
  %v32i8ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
  %i16ptr = addrspacecast ptr addrspace(3) undef to ptr
  %v2i16ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
  %v3i16ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
  %v4i16ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
  %v32i16ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
  %i32ptr = addrspacecast ptr addrspace(3) undef to ptr
  %v2i32ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
  %v3i32ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
  %v4i32ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
  %v32i32ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
  %i64ptr = addrspacecast ptr addrspace(3) undef to ptr
  %v2i64ptr = addrspacecast <2 x ptr addrspace(3)> undef to <2 x ptr>
  %v3i64ptr = addrspacecast <3 x ptr addrspace(3)> undef to <3 x ptr>
  %v4i64ptr = addrspacecast <4 x ptr addrspace(3)> undef to <4 x ptr>
  %v32i64ptr = addrspacecast <32 x ptr addrspace(3)> undef to <32 x ptr>
  ret void
}

define void @addrspacecast_flat_to_local() #0 {
; ALL-LABEL: 'addrspacecast_flat_to_local'
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i8ptr = addrspacecast ptr undef to ptr addrspace(3)
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i8ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i8ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i8ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i8ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i16ptr = addrspacecast ptr undef to ptr addrspace(3)
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i16ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i16ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i16ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i16ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i32ptr = addrspacecast ptr undef to ptr addrspace(3)
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i32ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i32ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i32ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i32ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i64ptr = addrspacecast ptr undef to ptr addrspace(3)
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i64ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i64ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i64ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i64ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; ALL-SIZE-LABEL: 'addrspacecast_flat_to_local'
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i8ptr = addrspacecast ptr undef to ptr addrspace(3)
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i8ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i8ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i8ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i8ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i16ptr = addrspacecast ptr undef to ptr addrspace(3)
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i16ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i16ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i16ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i16ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i32ptr = addrspacecast ptr undef to ptr addrspace(3)
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i32ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i32ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i32ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i32ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i64ptr = addrspacecast ptr undef to ptr addrspace(3)
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i64ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i64ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i64ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i64ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
;
  %i8ptr = addrspacecast ptr undef to ptr addrspace(3)
  %v2i8ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
  %v3i8ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
  %v4i8ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
  %v32i8ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
  %i16ptr = addrspacecast ptr undef to ptr addrspace(3)
  %v2i16ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
  %v3i16ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
  %v4i16ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
  %v32i16ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
  %i32ptr = addrspacecast ptr undef to ptr addrspace(3)
  %v2i32ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
  %v3i32ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
  %v4i32ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
  %v32i32ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
  %i64ptr = addrspacecast ptr undef to ptr addrspace(3)
  %v2i64ptr = addrspacecast <2 x ptr> undef to <2 x ptr addrspace(3)>
  %v3i64ptr = addrspacecast <3 x ptr> undef to <3 x ptr addrspace(3)>
  %v4i64ptr = addrspacecast <4 x ptr> undef to <4 x ptr addrspace(3)>
  %v32i64ptr = addrspacecast <32 x ptr> undef to <32 x ptr addrspace(3)>
  ret void
}

attributes #0 = { nounwind readnone }