[PATCH] D121897: Support phi operand in __builtin_object_size folder
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 17 10:26:31 PDT 2022
nikic added a reviewer: nikic.
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/MemoryBuiltins.cpp:816
+SizeOffsetType ObjectSizeOffsetVisitor::visitPHINode(PHINode &PN) {
// too complex to analyze statically.
+ SmallVector<std::pair<SizeOffsetType, APInt>> Results;
----------------
Comment can be dropped.
================
Comment at: llvm/lib/Analysis/MemoryBuiltins.cpp:839
+ ->first;
+ }
+
----------------
Support for Exact mode?
It might be worthwhile to phrase this in terms of `combine(SizeOffsetType, SizeOffsetType, EvalMode) -> SizeOffsetType` and reuse that between the Select and the PHINode handling.
================
Comment at: llvm/test/Transforms/InstCombine/builtin-object-size-phi.ll:1
+; RUN: opt -O1 -S < %s | FileCheck %s
+
----------------
This should run `-instcombine` only.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121897/new/
https://reviews.llvm.org/D121897
More information about the llvm-commits
mailing list