[Mlir-commits] [clang] [llvm] [mlir] [IR][CodeGen] Replace constrained FP intrinsics with fp.control/fp.except operand bundles (PR #191613)
Jason Eckhardt
llvmlistbot at llvm.org
Sun Apr 12 11:57:29 PDT 2026
================
@@ -2225,6 +2200,98 @@ bool IRTranslator::translateKnownIntrinsic(const CallInst &CI, Intrinsic::ID ID,
if (translateSimpleIntrinsic(CI, ID, MIRBuilder))
return true;
+ // Redirect new-form FP intrinsics with non-default bundles to G_STRICT_*.
+ {
+ fp::ExceptionBehavior EB = CI.getExceptionBehavior();
+ RoundingMode RM = CI.getRoundingMode();
+ if (EB != fp::ebStrict || RM != RoundingMode::Dynamic) {
+ if (unsigned StrictOp = getBundledFPStrictGOpcode(ID)) {
+ uint32_t Flags = MachineInstr::copyFlagsFromInstruction(CI);
+ if (EB == fp::ebIgnore)
+ Flags |= MachineInstr::NoFPExcept;
+ SmallVector<SrcOp, 4> VRegs;
----------------
nvjle wrote:
We typically don't specify `N` these days, is it imperative to do so here?
https://github.com/llvm/llvm-project/pull/191613
More information about the Mlir-commits
mailing list