1 ; RUN: opt < %s -sroa -S | FileCheck %s 2 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n8:16:32:64" 3 4 define <4 x i64> @vector_ptrtoint({<2 x i32*>, <2 x i32*>} %x) { 5 ; CHECK-LABEL: @vector_ptrtoint 6 %a = alloca {<2 x i32*>, <2 x i32*>} 7 ; CHECK-NOT: alloca 8 9 store {<2 x i32*>, <2 x i32*>} %x, {<2 x i32*>, <2 x i32*>}* %a 10 ; CHECK-NOT: store 11 12 %cast = bitcast {<2 x i32*>, <2 x i32*>}* %a to <4 x i64>* 13 %vec = load <4 x i64>, <4 x i64>* %cast 14 ; CHECK-NOT: load 15 ; CHECK: ptrtoint 16 17 ret <4 x i64> %vec 18 } 19 20 define <4 x i32*> @vector_inttoptr({<2 x i64>, <2 x i64>} %x) { 21 ; CHECK-LABEL: @vector_inttoptr 22 %a = alloca {<2 x i64>, <2 x i64>} 23 ; CHECK-NOT: alloca 24 25 store {<2 x i64>, <2 x i64>} %x, {<2 x i64>, <2 x i64>}* %a 26 ; CHECK-NOT: store 27 28 %cast = bitcast {<2 x i64>, <2 x i64>}* %a to <4 x i32*>* 29 %vec = load <4 x i32*>, <4 x i32*>* %cast 30 ; CHECK-NOT: load 31 ; CHECK: inttoptr 32 33 ret <4 x i32*> %vec 34 } 35 36 define <2 x i64> @vector_ptrtointbitcast({<1 x i32*>, <1 x i32*>} %x) { 37 ; CHECK-LABEL: @vector_ptrtointbitcast 38 %a = alloca {<1 x i32*>, <1 x i32*>} 39 ; CHECK-NOT: alloca 40 41 store {<1 x i32*>, <1 x i32*>} %x, {<1 x i32*>, <1 x i32*>}* %a 42 ; CHECK-NOT: store 43 44 %cast = bitcast {<1 x i32*>, <1 x i32*>}* %a to <2 x i64>* 45 %vec = load <2 x i64>, <2 x i64>* %cast 46 ; CHECK-NOT: load 47 ; CHECK: ptrtoint 48 ; CHECK: bitcast 49 ; CHECK: ptrtoint 50 ; CHECK: bitcast 51 52 ret <2 x i64> %vec 53 } 54