2 ; RUN: opt -disable-basic-aa -passes=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(ptr %v1)
9 %v2 = load <2 x i32>, ptr %v1
10 %v3 = inttoptr <2 x i32> %v2 to <2 x ptr>
11 store <2 x ptr> %v3, ptr %v1
12 %v5 = load <2 x i32>, ptr %v1
14 ; CHECK-LABEL: @test1(
15 ; CHECK: %v1 = alloca <2 x i32>
16 ; CHECK: call void @anything(ptr %v1)
17 ; CHECK: %v2 = load <2 x i32>, ptr %v1
18 ; CHECK: %v3 = inttoptr <2 x i32> %v2 to <2 x ptr>
19 ; CHECK: store <2 x ptr> %v3, ptr %v1
20 ; CHECK: ret <2 x i32> %v2
23 declare void @anything(ptr)