[PATCH] D77977: [InstCombine] Simplify calls with casted "returned" attribute

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 02:07:37 PDT 2020


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:4660
+      Type *RetArgTy = ReturnedArg->getType();
+      if (RetArgTy->canLosslesslyBitCastTo(CallTy))
+        return replaceInstUsesWith(
----------------
lebedev.ri wrote:
> I can't imagine it matters, but these should be swapped around.
Shouldn't this be an assertion rather than an if check?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77977





More information about the llvm-commits mailing list