[llvm] deb5bd1 - [DSE] Add test for #70547 (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 31 04:34:21 PDT 2023
Author: Nikita Popov
Date: 2023-10-31T12:34:11+01:00
New Revision: deb5bd1289404e8ca751127672d9380a6203b880
URL: https://github.com/llvm/llvm-project/commit/deb5bd1289404e8ca751127672d9380a6203b880
DIFF: https://github.com/llvm/llvm-project/commit/deb5bd1289404e8ca751127672d9380a6203b880.diff
LOG: [DSE] Add test for #70547 (NFC)
Added:
Modified:
llvm/test/Transforms/DeadStoreElimination/assume.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/DeadStoreElimination/assume.ll b/llvm/test/Transforms/DeadStoreElimination/assume.ll
index aa767664c52de15..c1c4027ea2f9a28 100644
--- a/llvm/test/Transforms/DeadStoreElimination/assume.ll
+++ b/llvm/test/Transforms/DeadStoreElimination/assume.ll
@@ -33,6 +33,25 @@ define void @f2() {
ret void
}
+; FIXME: This is a miscompile
+define void @pr70547() {
+; CHECK-LABEL: @pr70547(
+; CHECK-NEXT: [[A:%.*]] = alloca i8, align 1
+; CHECK-NEXT: [[CALL:%.*]] = call ptr @quux(ptr [[A]]) #[[ATTR1:[0-9]+]]
+; CHECK-NEXT: [[V:%.*]] = load i8, ptr [[CALL]], align 1
+; CHECK-NEXT: [[CMP:%.*]] = icmp ne i8 [[V]], 1
+; CHECK-NEXT: call void @llvm.assume(i1 [[CMP]])
+; CHECK-NEXT: ret void
+;
+ %a = alloca i8
+ store i8 0, ptr %a
+ %call = call ptr @quux(ptr %a) memory(none) nounwind willreturn
+ %v = load i8, ptr %call
+ %cmp = icmp ne i8 %v, 1
+ call void @llvm.assume(i1 %cmp)
+ ret void
+}
+
declare ptr @_Znwm(i64)
declare void @llvm.assume(i1)
More information about the llvm-commits
mailing list