1 ; RUN: opt -jump-threading -S %s -o - | FileCheck %s
3 define i32 @f(i64* %a, i64 %i) {
5 store i64 0, i64* %a, align 8
6 %p = getelementptr i64, i64* %a, i64 %i
7 %c = icmp eq i64* %p, null
8 ; `%a` is non-null at the end of the block, because we store through it.
9 ; However, `%p` is derived from `%a` via a GEP that is not `inbounds`, therefore we cannot judge `%p` is non-null as well
10 ; and must retain the `icmp` instruction.
11 ; CHECK: %c = icmp eq i64* %p, null
12 br i1 %c, label %if.else, label %if.then