[llvm] 1342b86 - [test][DSE] Precommit test for D123162
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 6 09:56:56 PDT 2022
Author: Arthur Eubanks
Date: 2022-04-06T09:54:37-07:00
New Revision: 1342b861a3d6ad728c114e3180cfca9afba49c2b
URL: https://github.com/llvm/llvm-project/commit/1342b861a3d6ad728c114e3180cfca9afba49c2b
DIFF: https://github.com/llvm/llvm-project/commit/1342b861a3d6ad728c114e3180cfca9afba49c2b.diff
LOG: [test][DSE] Precommit test for D123162
Added:
llvm/test/Transforms/DeadStoreElimination/assume.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Transforms/DeadStoreElimination/assume.ll b/llvm/test/Transforms/DeadStoreElimination/assume.ll
new file mode 100644
index 0000000000000..f7559dcbff39a
--- /dev/null
+++ b/llvm/test/Transforms/DeadStoreElimination/assume.ll
@@ -0,0 +1,23 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -passes=dse -S < %s | FileCheck %s
+
+ at global = external constant i8
+
+define void @f() {
+; CHECK-LABEL: @f(
+; CHECK-NEXT: [[TMP1:%.*]] = call noalias i8* @_Znwm(i64 32)
+; CHECK-NEXT: [[TMP2:%.*]] = icmp ugt i8* [[TMP1]], @global
+; CHECK-NEXT: call void @llvm.assume(i1 [[TMP2]])
+; CHECK-NEXT: store i8 0, i8* [[TMP1]], align 1
+; CHECK-NEXT: ret void
+;
+ %tmp1 = call noalias i8* @_Znwm(i64 32)
+ %tmp2 = icmp ugt i8* %tmp1, @global
+ call void @llvm.assume(i1 %tmp2)
+ store i8 0, i8* %tmp1, align 1
+ ret void
+}
+
+declare i8* @_Znwm(i64)
+
+declare void @llvm.assume(i1)
More information about the llvm-commits
mailing list