From b4dd928ffbb8232d6909b640d3affcd531681ffb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 13 Jan 2020 18:56:28 +0100 Subject: [InstCombine] Make combineLoadToNewType a method; NFC So it can be reused as part of other combines. In particular for D71164. --- llvm/lib/Transforms/InstCombine/InstCombineInternal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h index d793a9f641d..1a746cb87ab 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h +++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h @@ -467,6 +467,9 @@ public: /// \return true if successful. bool replacePointer(Instruction &I, Value *V); + LoadInst *combineLoadToNewType(LoadInst &LI, Type *NewTy, + const Twine &Suffix = ""); + private: bool shouldChangeType(unsigned FromBitWidth, unsigned ToBitWidth) const; bool shouldChangeType(Type *From, Type *To) const; -- cgit v1.2.3