[llvm] 32f3633 - [test][DSE] Precommit test
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 12 16:21:16 PDT 2022
Author: Arthur Eubanks
Date: 2022-04-12T16:21:04-07:00
New Revision: 32f3633171aa9d7352e9507c12d219efb48899a0
URL: https://github.com/llvm/llvm-project/commit/32f3633171aa9d7352e9507c12d219efb48899a0
DIFF: https://github.com/llvm/llvm-project/commit/32f3633171aa9d7352e9507c12d219efb48899a0.diff
LOG: [test][DSE] Precommit test
Added:
llvm/test/Transforms/DeadStoreElimination/dependent-capture.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Transforms/DeadStoreElimination/dependent-capture.ll b/llvm/test/Transforms/DeadStoreElimination/dependent-capture.ll
new file mode 100644
index 0000000000000..4973fadd38c0f
--- /dev/null
+++ b/llvm/test/Transforms/DeadStoreElimination/dependent-capture.ll
@@ -0,0 +1,18 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -passes=dse -S < %s | FileCheck %s
+
+define void @f() {
+; CHECK-LABEL: @f(
+; CHECK-NEXT: [[TMP1:%.*]] = call noalias ptr @_Znwm()
+; CHECK-NEXT: [[TMP4:%.*]] = call noalias ptr @_Znwm()
+; CHECK-NEXT: store i8 0, ptr [[TMP4]], align 1
+; CHECK-NEXT: ret void
+;
+ %tmp1 = call noalias ptr @_Znwm()
+ %tmp4 = call noalias ptr @_Znwm()
+ store ptr %tmp4, ptr %tmp1
+ store i8 0, ptr %tmp4, align 1
+ ret void
+}
+
+declare ptr @_Znwm()
More information about the llvm-commits
mailing list