[llvm] 4c2422e - [StackSafetyAnalysis] Add test with non-pointer use (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 01:45:06 PST 2024
Author: Nikita Popov
Date: 2024-01-30T10:44:59+01:00
New Revision: 4c2422e56ef17ca113be160cf85672c4736bc11e
URL: https://github.com/llvm/llvm-project/commit/4c2422e56ef17ca113be160cf85672c4736bc11e
DIFF: https://github.com/llvm/llvm-project/commit/4c2422e56ef17ca113be160cf85672c4736bc11e.diff
LOG: [StackSafetyAnalysis] Add test with non-pointer use (NFC)
Added:
Modified:
llvm/test/Analysis/StackSafetyAnalysis/local.ll
Removed:
################################################################################
diff --git a/llvm/test/Analysis/StackSafetyAnalysis/local.ll b/llvm/test/Analysis/StackSafetyAnalysis/local.ll
index 6314be0cf85a0..4a833611c7891 100644
--- a/llvm/test/Analysis/StackSafetyAnalysis/local.ll
+++ b/llvm/test/Analysis/StackSafetyAnalysis/local.ll
@@ -12,6 +12,7 @@ declare void @llvm.memmove.p0.p0.i32(ptr %dest, ptr %src, i32 %len, i1 %isvolati
declare void @llvm.memset.p0.i64(ptr %dest, i8 %val, i64 %len, i1 %isvolatile)
declare void @unknown_call(ptr %dest)
+declare void @unknown_call_int(i64 %i)
declare ptr @retptr(ptr returned)
; Address leaked.
@@ -1106,5 +1107,18 @@ entry:
ret void
}
+define void @NonPointer(ptr %p) {
+; CHECK-LABEL: @NonPointer
+; CHECK-NEXT: args uses:
+; LOCAL-NEXT: p[]: empty-set, @unknown_call_int(arg0, full-set)
+; GLOBAL-NEXT: p[]: full-set, @unknown_call_int(arg0, full-set)
+; CHECK-NEXT: allocas uses:
+; GLOBAL-NEXT: safe accesses:
+; CHECK-EMPTY:
+ %int = ptrtoint ptr %p to i64
+ call void @unknown_call_int(i64 %int)
+ ret void
+}
+
declare void @llvm.lifetime.start.p0(i64, ptr nocapture)
declare void @llvm.lifetime.end.p0(i64, ptr nocapture)
More information about the llvm-commits
mailing list