1 ; RUN: opt < %s -argpromotion -S | FileCheck %s
4 @b = common local_unnamed_addr global i32 0, align 4
5 @a = common local_unnamed_addr global i32 0, align 4
7 define i32 @fn2() local_unnamed_addr {
8 %1 = load i32, i32* @b, align 4
9 %2 = sext i32 %1 to i64
10 %3 = inttoptr i64 %2 to i32*
11 call fastcc void @fn1(i32* %3)
15 define internal fastcc void @fn1(i32* nocapture readonly) unnamed_addr {
16 %2 = getelementptr inbounds i32, i32* %0, i64 -1
17 %3 = load i32, i32* %2, align 4
18 store i32 %3, i32* @a, align 4
22 ; CHECK: getelementptr {{.*}} -1
23 ; CHECK-NOT: getelementptr {{.*}} 4294967295