2 ; RUN: opt -disable-basic-aa -newgvn -S < %s | FileCheck %s
3 ; NewGVN fails this due to missing load coercion
4 target datalayout = "e-p:32:32:32"
5 target triple = "i386-pc-linux-gnu"
6 define <2 x i32> @test1() {
8 call void @anything(<2 x i32>* %v1)
9 %v2 = load <2 x i32>, <2 x i32>* %v1
10 %v3 = inttoptr <2 x i32> %v2 to <2 x i8*>
11 %v4 = bitcast <2 x i32>* %v1 to <2 x i8*>*
12 store <2 x i8*> %v3, <2 x i8*>* %v4
13 %v5 = load <2 x i32>, <2 x i32>* %v1
15 ; CHECK-LABEL: @test1(
16 ; CHECK: %v1 = alloca <2 x i32>
17 ; CHECK: call void @anything(<2 x i32>* %v1)
18 ; CHECK: %v2 = load <2 x i32>, <2 x i32>* %v1
19 ; CHECK: %v3 = inttoptr <2 x i32> %v2 to <2 x i8*>
20 ; CHECK: %v4 = bitcast <2 x i32>* %v1 to <2 x i8*>*
21 ; CHECK: store <2 x i8*> %v3, <2 x i8*>* %v4
22 ; CHECK: ret <2 x i32> %v2
25 declare void @anything(<2 x i32>*)