[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

Kevin P. Neal via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 5 07:25:27 PST 2024


================
@@ -273,29 +306,6 @@ void InstrProfCallsite::setCallee(Value *Callee) {
   setArgOperand(4, Callee);
 }
 
-std::optional<RoundingMode> ConstrainedFPIntrinsic::getRoundingMode() const {
-  unsigned NumOperands = arg_size();
-  Metadata *MD = nullptr;
-  auto *MAV = dyn_cast<MetadataAsValue>(getArgOperand(NumOperands - 2));
-  if (MAV)
-    MD = MAV->getMetadata();
-  if (!MD || !isa<MDString>(MD))
-    return std::nullopt;
-  return convertStrToRoundingMode(cast<MDString>(MD)->getString());
-}
-
-std::optional<fp::ExceptionBehavior>
-ConstrainedFPIntrinsic::getExceptionBehavior() const {
-  unsigned NumOperands = arg_size();
-  Metadata *MD = nullptr;
-  auto *MAV = dyn_cast<MetadataAsValue>(getArgOperand(NumOperands - 1));
-  if (MAV)
-    MD = MAV->getMetadata();
-  if (!MD || !isa<MDString>(MD))
-    return std::nullopt;
-  return convertStrToExceptionBehavior(cast<MDString>(MD)->getString());
-}
-
----------------
kpneal wrote:

I thought the plan was to have concurrent implementations until we can throw the switch. That way we won't have releases that have half-broken constrained intrinsic support but half-implemented operand bundles.

https://github.com/llvm/llvm-project/pull/109798


More information about the cfe-commits mailing list