[PATCH] D145854: [GlobalDCE] Don't add dependency via icmp against inbouds pointer

Kohei Asano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 17:34:56 PDT 2023


khei4 added a comment.

Drive-by comments: Although I'm not sure about `dereferenceable` and `noalias` semantics, in this case, is it appropriate to use `noalias` instead of `dereferenceable`, if you want to know the pointers' base (in)equality? And use `getUnderlyingObject` for GEPs? I think dereferenceable GV aliases seem normal. 
langref for parameter attributes <https://llvm.org/docs/LangRef.html#parameter-attributes>



================
Comment at: llvm/test/Transforms/GlobalDCE/icmp.ll:1-3
+; RUN: opt -S -passes=globaldce < %s | FileCheck %s
+target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
+target triple = "aarch64-unknown-linux-gnu"
----------------
It might be better to use [[ https://github.com/llvm/llvm-project/blob/46dc3d0b9b70bbe5def0c404975a3775976122b7/llvm/utils/update_test_checks.py | update_test_checks.py ]] for maintainability. And if this is target independent test, you shouldn't hard code target info.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145854/new/

https://reviews.llvm.org/D145854



More information about the llvm-commits mailing list