[InstCombine] Combine A->B->A BitCast
This patch enhances InstCombine to handle following case:
A -> B bitcast
PHI
B -> A bitcast
llvm-svn: 263734
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 3bb50ba..b1e3881 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -394,6 +394,7 @@
Instruction *scalarizePHI(ExtractElementInst &EI, PHINode *PN);
Value *EvaluateInDifferentElementOrder(Value *V, ArrayRef<int> Mask);
Instruction *foldCastedBitwiseLogic(BinaryOperator &I);
+ Instruction *optimizeBitCastFromPhi(CastInst &CI, PHINode *PN);
public:
/// \brief Inserts an instruction \p New before instruction \p Old