[llvm] [WIP] Consider datalayout sentinel pointer value for isKnownNonZero check (PR #91769)

Rana Pratap Reddy via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 02:29:24 PDT 2024


================
@@ -0,0 +1,23 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -S -passes=instsimplify < %s | FileCheck %s
+
+target datalayout = "A5-z0:1-z2:neg1-z3:neg1-z5:neg1"
+
+; A 0 valued byval pointer may be valid
+define i1 @byval_may_be_zero(ptr addrspace(5) byval(i32) %ptr) {
----------------
ranapratap55 wrote:

> Should have copies of identical functions except for the address space
> Also test a plain, non-byval pointer

added byval, plain, and non-byval pointer identical functions with different address space.

https://github.com/llvm/llvm-project/pull/91769


More information about the llvm-commits mailing list