summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-01-13 18:56:28 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-01-14 20:40:03 +0100
commitb4dd928ffbb8232d6909b640d3affcd531681ffb (patch)
tree4c5df299e71f58d6073d9f3f6b29075c2007e05b /llvm/lib/Transforms/InstCombine/InstCombineInternal.h
parent652cd7c1007aa5a13ad9864fadc939c5710c5199 (diff)
downloadbcm5719-llvm-b4dd928ffbb8232d6909b640d3affcd531681ffb.tar.gz
bcm5719-llvm-b4dd928ffbb8232d6909b640d3affcd531681ffb.zip
[InstCombine] Make combineLoadToNewType a method; NFC
So it can be reused as part of other combines. In particular for D71164.
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineInternal.h3
1 files changed, 3 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud