Skip to content

Commit d8f530d

Browse files
committed
[LowerTypeTests] Use IRBuilder instead of ConstantExpr (NFC)
We don't require a Constant here, so let IRBuilder fold this.
1 parent c51857b commit d8f530d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/IPO/LowerTypeTests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,9 +759,9 @@ Value *LowerTypeTestsModule::lowerTypeTestCall(Metadata *TypeId, CallInst *CI,
759759
// also conveniently gives us a bit offset to use during the load from
760760
// the bitset.
761761
Value *OffsetSHR =
762-
B.CreateLShr(PtrOffset, ConstantExpr::getZExt(TIL.AlignLog2, IntPtrTy));
762+
B.CreateLShr(PtrOffset, B.CreateZExt(TIL.AlignLog2, IntPtrTy));
763763
Value *OffsetSHL = B.CreateShl(
764-
PtrOffset, ConstantExpr::getZExt(
764+
PtrOffset, B.CreateZExt(
765765
ConstantExpr::getSub(
766766
ConstantInt::get(Int8Ty, DL.getPointerSizeInBits(0)),
767767
TIL.AlignLog2),

0 commit comments

Comments
 (0)