[PATCH] D103856: [Attributor] Introduce a helper do deal with constant type mismatches

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 17 06:43:47 PDT 2021


jdoerfert added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:4782
                   : UndefValue::get(V.getType());
-    if (C) {
+    if (C && C != &V) {
       auto PredForReturned =
----------------
jdoerfert wrote:
> kuter wrote:
> > I  think the associated value for a `RETURNED` position is the value to the function itself so I don't think it makes sense to do this check. 
> You are right. I'll remove the V checks here.
The problem is that we default to the original value in `SimplifiedAssociatedValue` which doesn't really work for this position but is harder to fix.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103856



More information about the llvm-commits mailing list