[llvm] d8f530d - [LowerTypeTests] Use IRBuilder instead of ConstantExpr (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 06:31:50 PDT 2023
Author: Nikita Popov
Date: 2023-09-28T15:31:42+02:00
New Revision: d8f530d370881dbefc0b06256ab0cad740476349
URL: https://github.com/llvm/llvm-project/commit/d8f530d370881dbefc0b06256ab0cad740476349
DIFF: https://github.com/llvm/llvm-project/commit/d8f530d370881dbefc0b06256ab0cad740476349.diff
LOG: [LowerTypeTests] Use IRBuilder instead of ConstantExpr (NFC)
We don't require a Constant here, so let IRBuilder fold this.
Added:
Modified:
llvm/lib/Transforms/IPO/LowerTypeTests.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
index 5948cb14a123594..2bf0fc2a4a84459 100644
--- a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+++ b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
@@ -759,9 +759,9 @@ Value *LowerTypeTestsModule::lowerTypeTestCall(Metadata *TypeId, CallInst *CI,
// also conveniently gives us a bit offset to use during the load from
// the bitset.
Value *OffsetSHR =
- B.CreateLShr(PtrOffset, ConstantExpr::getZExt(TIL.AlignLog2, IntPtrTy));
+ B.CreateLShr(PtrOffset, B.CreateZExt(TIL.AlignLog2, IntPtrTy));
Value *OffsetSHL = B.CreateShl(
- PtrOffset, ConstantExpr::getZExt(
+ PtrOffset, B.CreateZExt(
ConstantExpr::getSub(
ConstantInt::get(Int8Ty, DL.getPointerSizeInBits(0)),
TIL.AlignLog2),
More information about the llvm-commits
mailing list