[clang] [llvm] Minimal support of floating-point operand bundles (PR #135658)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 10 20:18:53 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 << "]";
----------------
arsenm wrote:
Move to separate stream function?
https://github.com/llvm/llvm-project/pull/135658
More information about the llvm-commits
mailing list