We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51904ae commit 2b0fae8Copy full SHA for 2b0fae8
llvm/test/Transforms/ArgumentPromotion/pr32917.ll
@@ -0,0 +1,23 @@
1
+; RUN: opt < %s -argpromotion -S | FileCheck %s
2
+; PR 32917
3
+
4
+@b = common local_unnamed_addr global i32 0, align 4
5
+@a = common local_unnamed_addr global i32 0, align 4
6
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)
12
+ ret i32 undef
13
+}
14
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
19
+ ret void
20
21
22
+; CHECK: getelementptr {{.*}} -1
23
+; CHECK-NOT: getelementptr {{.*}} 4294967295
0 commit comments