Skip to content

Commit 1b7285b

Browse files
committed
[X86FastISel] Avoid ConstantExpr::getZExt() (NFC)
Work on APInt instead.
1 parent 5e81d67 commit 1b7285b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/X86/X86FastISel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3284,9 +3284,9 @@ bool X86FastISel::fastLowerCall(CallLoweringInfo &CLI) {
32843284
if (auto *CI = dyn_cast<ConstantInt>(Val)) {
32853285
if (CI->getBitWidth() < 32) {
32863286
if (Flags.isSExt())
3287-
Val = ConstantExpr::getSExt(CI, Type::getInt32Ty(CI->getContext()));
3287+
Val = ConstantInt::get(CI->getContext(), CI->getValue().sext(32));
32883288
else
3289-
Val = ConstantExpr::getZExt(CI, Type::getInt32Ty(CI->getContext()));
3289+
Val = ConstantInt::get(CI->getContext(), CI->getValue().zext(32));
32903290
}
32913291
}
32923292

0 commit comments

Comments
 (0)