1 ; RUN: opt -gvn -S < %s | FileCheck %s 2 target datalayout = "e-p:32:32:32" 3 target triple = "i386-pc-linux-gnu" 4 define <2 x i32> @test1() { 5 %v1 = alloca <2 x i32> 6 call void @anything(<2 x i32>* %v1) 7 %v2 = load <2 x i32>* %v1 8 %v3 = inttoptr <2 x i32> %v2 to <2 x i8*> 9 %v4 = bitcast <2 x i32>* %v1 to <2 x i8*>* 10 store <2 x i8*> %v3, <2 x i8*>* %v4 11 %v5 = load <2 x i32>* %v1 12 ret <2 x i32> %v5 13 ; CHECK: @test1 14 ; CHECK: %v1 = alloca <2 x i32> 15 ; CHECK: call void @anything(<2 x i32>* %v1) 16 ; CHECK: %v2 = load <2 x i32>* %v1 17 ; CHECK: %v3 = inttoptr <2 x i32> %v2 to <2 x i8*> 18 ; CHECK: %v4 = bitcast <2 x i32>* %v1 to <2 x i8*>* 19 ; CHECK: store <2 x i8*> %v3, <2 x i8*>* %v4 20 ; CHECK: %1 = ptrtoint <2 x i8*> %v3 to <2 x i32> 21 ; CHECK: %2 = bitcast <2 x i32> %1 to i64 22 ; CHECK: %3 = bitcast i64 %2 to <2 x i32> 23 ; CHECK: ret <2 x i32> %3 24 } 25 26 declare void @anything(<2 x i32>*) 27 28