[PATCH] D74729: [FPEnv] Intrinsic for setting rounding mode
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 27 11:56:33 PDT 2020
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:6197
+ Res = DAG.getNode(ISD::SET_ROUNDING, sdl, MVT::Other,
+ {DAG.getRoot(), getValue(I.getArgOperand(0))});
+ setValue(&I, Res);
----------------
Don't you need to call getRoot not DAG.getRoot()?
================
Comment at: llvm/lib/IR/Verifier.cpp:4973
+ case Intrinsic::set_rounding: {
+ if (auto RM = dyn_cast<ConstantInt>(Call.getArgOperand(0))) {
+ Assert(RM->getZExtValue() < static_cast<unsigned>(RoundingMode::Dynamic),
----------------
Is the argument intended to always be a constant or we're just verifying it when we can? The latter seems unusual.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74729/new/
https://reviews.llvm.org/D74729
More information about the llvm-commits
mailing list