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