[clang] [llvm] Minimal support of floating-point operand bundles (PR #135658)
Serge Pavlov via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 22 11:18:37 PDT 2025
================
@@ -4388,6 +4388,31 @@ void AssemblyWriter::printInfoComment(const Value &V) {
if (PrintInstAddrs)
Out << " ; " << &V;
+
+ if (auto *CI = dyn_cast<CallInst>(&V))
+ if (Intrinsic::ID IID = CI->getIntrinsicID())
+ if (IntrinsicInst::isFloatingPointOperation(IID))
+ if (const BasicBlock *BB = CI->getParent())
+ if (const Function *F = BB->getParent())
+ if (F->hasFnAttribute(Attribute::StrictFP)) {
+ MemoryEffects ME = CI->getMemoryEffects();
+ ModRefInfo MR = ME.getModRef(IRMemLocation::InaccessibleMem);
+ Out << " ; fpe=[";
+ switch (MR) {
+ case ModRefInfo::NoModRef:
+ break;
+ case ModRefInfo::Ref:
+ Out << "r";
+ break;
+ case ModRefInfo::Mod:
+ Out << "w";
+ break;
+ case ModRefInfo::ModRef:
+ Out << "rw";
+ break;
+ }
+ Out << "]";
----------------
spavloff wrote:
Done.
https://github.com/llvm/llvm-project/pull/135658
More information about the llvm-commits
mailing list