Index: llvm/lib/Transforms/IPO/AttributorAttributes.cpp =================================================================== --- llvm/lib/Transforms/IPO/AttributorAttributes.cpp +++ llvm/lib/Transforms/IPO/AttributorAttributes.cpp @@ -10330,7 +10330,6 @@ A.getAttrs(getIRPosition(), {Attribute::NoFPClass}, Attrs, false); for (const auto &Attr : Attrs) { addKnownBits(Attr.getNoFPClass()); - return; } const DataLayout &DL = A.getDataLayout(); Index: llvm/test/Transforms/Attributor/nofpclass.ll =================================================================== --- llvm/test/Transforms/Attributor/nofpclass.ll +++ llvm/test/Transforms/Attributor/nofpclass.ll @@ -2247,7 +2247,7 @@ define internal float @returns_fence(float %arg) { ; TUNIT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) ; TUNIT-LABEL: define internal float @returns_fence -; TUNIT-SAME: (float nofpclass(nan) [[ARG:%.*]]) #[[ATTR3]] { +; TUNIT-SAME: (float nofpclass(nan inf) [[ARG:%.*]]) #[[ATTR3]] { ; TUNIT-NEXT: [[RET:%.*]] = call float @llvm.arithmetic.fence.f32(float [[ARG]]) #[[ATTR18]] ; TUNIT-NEXT: ret float [[RET]] ; @@ -2266,7 +2266,7 @@ ; TUNIT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) ; TUNIT-LABEL: define internal float @refine_callsite_attribute ; TUNIT-SAME: (float nofpclass(inf) [[ARG:%.*]]) #[[ATTR3]] { -; TUNIT-NEXT: [[FUNC0:%.*]] = call float @returns_fence(float nofpclass(nan) [[ARG]]) #[[ATTR15]] +; TUNIT-NEXT: [[FUNC0:%.*]] = call float @returns_fence(float nofpclass(nan inf) [[ARG]]) #[[ATTR15]] ; TUNIT-NEXT: [[RET:%.*]] = call float @llvm.arithmetic.fence.f32(float [[FUNC0]]) #[[ATTR18]] ; TUNIT-NEXT: ret float [[RET]] ;