Skip to content

Commit 16435a8

Browse files
[CodeGen] Remove an unnecessary cast (NFC) (#147155)
Offset is already of int64_t.
1 parent 945ed2e commit 16435a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ bool IRTranslator::translateGetElementPtr(const User &U,
16811681
auto OffsetMIB =
16821682
MIRBuilder.buildConstant(OffsetTy, Offset);
16831683

1684-
if (int64_t(Offset) >= 0 && cast<GEPOperator>(U).isInBounds())
1684+
if (Offset >= 0 && cast<GEPOperator>(U).isInBounds())
16851685
Flags |= MachineInstr::MIFlag::NoUWrap;
16861686

16871687
MIRBuilder.buildPtrAdd(getOrCreateVReg(U), BaseReg, OffsetMIB.getReg(0),

0 commit comments

Comments
 (0)