Skip to content

Commit 520b91f

Browse files
committed
Fix some errors
1 parent 0e19500 commit 520b91f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/Analysis/ConstantFolding.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,9 +1354,9 @@ static ConstantFP *flushDenormalConstantFP(ConstantFP *CFP,
13541354
if (!APF.isDenormal())
13551355
return CFP;
13561356

1357-
if (auto *CB = dyn_cast<CallBase>(Inst)) {
1357+
if (auto *CB = dyn_cast_or_null<CallBase>(Inst)) {
13581358
auto Mode = IsOutput ? CB->getOutputDenormMode() : CB->getInputDenormMode();
1359-
return flushDenormalConstant(CFP->getType(), APF, Mode);
1359+
return flushDenormalConstant(CFP->getType(), APF, *Mode);
13601360
}
13611361

13621362
DenormalMode Mode = getInstrDenormalMode(Inst, CFP->getType());

llvm/lib/IR/Instructions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,10 +984,10 @@ static StringRef getBundledDenormPrefix(const fltSemantics *FPSem, bool Input) {
984984
}
985985

986986
std::optional<DenormalMode::DenormalModeKind>
987-
llvm::getDenormModeBundle(const OperandBundleUse &Control, bool Unput,
987+
llvm::getDenormModeBundle(const OperandBundleUse &Control, bool Input,
988988
const fltSemantics *FPSem) {
989989
assert(Control.getTagID() == LLVMContext::OB_fp_control);
990-
StringRef Prefix = getBundledDenormPrefix(FPSem, true);
990+
StringRef Prefix = getBundledDenormPrefix(FPSem, Input);
991991
if (Prefix.empty())
992992
return std::nullopt;
993993
auto DenormOperand = getBundleOperandByPrefix(Control, Prefix);

0 commit comments

Comments
 (0)