Skip to content

Commit

Permalink
Verifier: Don't rely on bitmask enum when checking nofpclass value
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenm committed Feb 24, 2023
1 parent f138840 commit c6f64c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/IR/Verifier.cpp
Expand Up @@ -1969,8 +1969,8 @@ void Verifier::verifyParameterAttrs(AttributeSet Attrs, Type *Ty,
uint64_t Val = Attrs.getAttribute(Attribute::NoFPClass).getValueAsInt();
Check(Val != 0, "Attribute 'nofpclass' must have at least one test bit set",
V);
Check((Val & ~fcAllFlags) == 0, "Invalid value for 'nofpclass' test mask",
V);
Check((Val & ~static_cast<unsigned>(fcAllFlags)) == 0,
"Invalid value for 'nofpclass' test mask", V);
}
}

Expand Down

0 comments on commit c6f64c5

Please sign in to comment.