1 ; RUN: opt -instcombine -S < %s | FileCheck %s
6 ; Check that dereferenceable metadata is combined
8 ; CHECK: load i32*, i32**
9 ; CHECK-SAME: !dereferenceable ![[DEREF:[0-9]+]]
10 define i32* @test_phi_combine_load_metadata(i1 %c, i32** dereferenceable(8) %p1, i32** dereferenceable(8) %p2) {
11 br i1 %c, label %t, label %f
14 %v1 = load i32*, i32** %p1, align 8, !dereferenceable !0
19 %v2 = load i32*, i32** %p2, align 8, !dereferenceable !1
23 %res = phi i32* [ %v1, %t ], [ %v2, %f ]
27 ; CHECK: ![[DEREF]] = !{i64 8}