diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp index d682de6e3c484..85b1f0328fc40 100644 --- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp +++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp @@ -10301,8 +10301,8 @@ struct AANoFPClassImpl : AANoFPClass { SmallVector Attrs; A.getAttrs(getIRPosition(), {Attribute::NoFPClass}, Attrs, false); - if (!Attrs.empty()) { - addKnownBits(Attrs[0].getNoFPClass()); + for (const auto &Attr : Attrs) { + addKnownBits(Attr.getNoFPClass()); return; }