[llvm] 13cb1a9 - [DeadArgElim] Add test case for #48366, #57075
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 23 05:09:45 PDT 2022
Author: Florian Hahn
Date: 2022-08-23T13:08:42+01:00
New Revision: 13cb1a924944f8acb67e9961a009c3001636b0c2
URL: https://github.com/llvm/llvm-project/commit/13cb1a924944f8acb67e9961a009c3001636b0c2
DIFF: https://github.com/llvm/llvm-project/commit/13cb1a924944f8acb67e9961a009c3001636b0c2.diff
LOG: [DeadArgElim] Add test case for #48366, #57075
Added:
llvm/test/Transforms/DeadArgElim/pr49022-builtin-nobuiltin.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Transforms/DeadArgElim/pr49022-builtin-nobuiltin.ll b/llvm/test/Transforms/DeadArgElim/pr49022-builtin-nobuiltin.ll
new file mode 100644
index 0000000000000..45a4b56d7c761
--- /dev/null
+++ b/llvm/test/Transforms/DeadArgElim/pr49022-builtin-nobuiltin.ll
@@ -0,0 +1,22 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -passes='deadargelim' -S %s | FileCheck %s
+
+define dso_local void @_ZdlPv(ptr %p) nobuiltin {
+; CHECK-LABEL: @_ZdlPv(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: ret void
+;
+entry:
+ ret void
+}
+
+define dso_local i32 @test_fn(ptr %ptr) {
+; CHECK-LABEL: @test_fn(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: call void @_ZdlPv(ptr poison) #[[ATTR1:[0-9]+]]
+; CHECK-NEXT: ret i32 1
+;
+entry:
+ call void @_ZdlPv(ptr %ptr) builtin
+ ret i32 1
+}
More information about the llvm-commits
mailing list