[llvm] bf88ba0 - Revert "[NFC][SROA] `speculateSelectInstLoads()`: play nice with typed pointers for now"
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 20 20:29:23 PST 2022
Author: Max Kazantsev
Date: 2022-12-21T11:21:56+07:00
New Revision: bf88ba0f8718c1e89e28e977839ad0a6186d44fe
URL: https://github.com/llvm/llvm-project/commit/bf88ba0f8718c1e89e28e977839ad0a6186d44fe
DIFF: https://github.com/llvm/llvm-project/commit/bf88ba0f8718c1e89e28e977839ad0a6186d44fe.diff
LOG: Revert "[NFC][SROA] `speculateSelectInstLoads()`: play nice with typed pointers for now"
This reverts commit 9f27f4536e19e93349b0662338408efe6d1cb2fd.
Supposed to be NFC, but broke buildbots (test addrspacecast.ll is failing).
Added:
Modified:
llvm/lib/Transforms/Scalar/SROA.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index 350e8bdc09314..1bea80b69bc52 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -1518,14 +1518,6 @@ static void speculateSelectInstLoads(SelectInst &SI, LoadInst &LI,
assert(LI.isSimple() && "We only speculate simple loads");
- if (auto *TypedPtrTy = LI.getType()->getPointerTo();
- SI.getType() != TypedPtrTy) {
- TV = BitCastInst::CreatePointerBitCastOrAddrSpaceCast(TV, TypedPtrTy, "",
- &LI);
- FV = BitCastInst::CreatePointerBitCastOrAddrSpaceCast(FV, TypedPtrTy, "",
- &LI);
- }
-
IRB.SetInsertPoint(&LI);
LoadInst *TL =
IRB.CreateAlignedLoad(LI.getType(), TV, LI.getAlign(),
More information about the llvm-commits
mailing list