[PATCH] D71209: InstCombine: Don't rewrite phi-of-bitcast when the phi has other users

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 03:35:58 PST 2019


foad added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:2300
         Type *TyA = BCI->getType();
-        if (TyA == DestTy && TyB == SrcTy) {
-          Instruction *I = replaceInstUsesWith(*BCI, NewPN);
-          if (BCI == &CI)
-            RetVal = I;
-        }
+        assert(TyA == DestTy && TyB == SrcTy);
+        Instruction *I = replaceInstUsesWith(*BCI, NewPN);
----------------
In a Release build I get "warning: unused variable" for TyA and TyB.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71209





More information about the llvm-commits mailing list