[PATCH] D151254: InstSimplify: Require instruction be parented

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 13:59:15 PDT 2023


nikic added a comment.

I'm okay with making this change. People regularly rediscover it :)

You'll want to adjust the comment at https://github.com/llvm/llvm-project/blob/7f033d0f756e72359c525ed3ab371e064cf55cff/llvm/include/llvm/Analysis/InstructionSimplify.h#L22-L27.

I assume you plan to followup with a change that removes no longer needed checks from InstSimplify?



================
Comment at: llvm/test/Transforms/Inline/call-intrinsic-is-constant.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
 ; RUN: opt %s -passes=inline -inline-threshold=20 -S | FileCheck %s
----------------
Precommit regenerated checks.


================
Comment at: llvm/test/Transforms/Inline/noalias-calls2.ll:17
+; CHECK-NEXT:    tail call void @llvm.experimental.noalias.scope.decl(metadata [[META0:![0-9]+]])
+; CHECK-NEXT:    tail call void @llvm.experimental.noalias.scope.decl(metadata [[META3:![0-9]+]])
 ; CHECK-NEXT:    store i32 10, ptr [[ADD_PTR]], align 4, !alias.scope !0, !noalias !3
----------------
You'll have to manually undo these for now, to preserve integrity of the checks. (Once D148216 lands, we can just use `--check-globals` instead.)


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

https://reviews.llvm.org/D151254



More information about the llvm-commits mailing list