[llvm] 7eb3ce9 - [instsimplify] Precommit a test showing an alloca equality miscompile
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 17 09:16:46 PST 2022
Author: Philip Reames
Date: 2022-02-17T09:16:31-08:00
New Revision: 7eb3ce997abec85e923f648fd8b6d5ef1c634415
URL: https://github.com/llvm/llvm-project/commit/7eb3ce997abec85e923f648fd8b6d5ef1c634415
DIFF: https://github.com/llvm/llvm-project/commit/7eb3ce997abec85e923f648fd8b6d5ef1c634415.diff
LOG: [instsimplify] Precommit a test showing an alloca equality miscompile
Added:
Modified:
llvm/test/Transforms/InstSimplify/compare.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstSimplify/compare.ll b/llvm/test/Transforms/InstSimplify/compare.ll
index 571b2a4a7d051..b305296a49769 100644
--- a/llvm/test/Transforms/InstSimplify/compare.ll
+++ b/llvm/test/Transforms/InstSimplify/compare.ll
@@ -2700,4 +2700,26 @@ define <2 x i1> @cttz_slt_bitwidth_splat(<2 x i13> %x) {
ret <2 x i1> %cmp
}
+; FIXME: A zero sized alloca *can* be equal to another alloca
+define i1 @zero_sized_alloca1() {
+; CHECK-LABEL: @zero_sized_alloca1(
+; CHECK-NEXT: ret i1 true
+;
+ %a = alloca i32, i32 0
+ %b = alloca i32, i32 0
+ %res = icmp ne i32* %a, %b
+ ret i1 %res
+}
+
+define i1 @zero_sized_alloca2() {
+; CHECK-LABEL: @zero_sized_alloca2(
+; CHECK-NEXT: ret i1 true
+;
+ %a = alloca i32, i32 0
+ %b = alloca i32
+ %res = icmp ne i32* %a, %b
+ ret i1 %res
+}
+
+
attributes #0 = { null_pointer_is_valid }
More information about the llvm-commits
mailing list