[llvm] ef4f858 - [BasicAA] Add test for incorrect handling of small index sizes (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 03:53:13 PST 2024
Author: Nikita Popov
Date: 2024-12-10T12:52:52+01:00
New Revision: ef4f8589e8e16d016119b7b8c2831ac406e8b97e
URL: https://github.com/llvm/llvm-project/commit/ef4f8589e8e16d016119b7b8c2831ac406e8b97e
DIFF: https://github.com/llvm/llvm-project/commit/ef4f8589e8e16d016119b7b8c2831ac406e8b97e.diff
LOG: [BasicAA] Add test for incorrect handling of small index sizes (NFC)
Added:
llvm/test/Analysis/BasicAA/smaller-index-size-overflow.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Analysis/BasicAA/smaller-index-size-overflow.ll b/llvm/test/Analysis/BasicAA/smaller-index-size-overflow.ll
new file mode 100644
index 00000000000000..a913a4a9e4b1c8
--- /dev/null
+++ b/llvm/test/Analysis/BasicAA/smaller-index-size-overflow.ll
@@ -0,0 +1,13 @@
+; RUN: opt -S -passes=aa-eval -print-all-alias-modref-info -disable-output < %s 2>&1 | FileCheck %s
+
+target datalayout = "p1:32:32"
+
+; FIXME: This is a miscompile.
+; CHECK: NoAlias: i32 addrspace(1)* %gep1, i32 addrspace(1)* %gep2
+define void @test(ptr addrspace(1) %p) {
+ %gep1 = getelementptr i8, ptr addrspace(1) %p, i32 u0x7fffffff
+ %gep2 = getelementptr i8, ptr addrspace(1) %p, i32 u0x80000001
+ store i32 0, ptr addrspace(1) %gep1
+ load i32, ptr addrspace(1) %gep2
+ ret void
+}
More information about the llvm-commits
mailing list