[llvm] [FMF] Set all bits if needed when setting individual flags. (PR #131321)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 14 04:55:32 PDT 2025
fhahn wrote:
> It looks like the current code tries to make a distinction between "fast" and "all bits set individual" from a bitcode upgrade perspective? I think if we're going to change that, it would be better to drop the special -1 value for fast and make it actually equivalent to "all bits set".
Yes the reason I went with setting all bits instead of going the other way and checking all mask bits set was the comment stating the all bits are intentional set. Could also remove that special case if preferred?
```
// If all 7 bits are set, turn this into -1. If the number of bits grows,
// this must be updated. This is intended to provide some forward binary
// compatibility insurance for the meaning of 'fast' in case bits are added.
```
https://github.com/llvm/llvm-project/pull/131321
More information about the llvm-commits
mailing list