[PATCH] D135572: [Attributes] Support int attributes with zero value
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 11 02:11:41 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/IR/Attributes.cpp:1663
+ getRawIntAttr(Attribute::VScaleRange).value_or(0))
+ .first;
}
----------------
serge-sans-paille wrote:
> I would be tempted to change the signature of thatone and the above to return an Optional instead of defaulting to zero, what do you think?
Done for getAllocSizeArgs() in https://github.com/llvm/llvm-project/commit/ac47db6acad29b6e077593430338be69d81cb6c0. I think getVScaleRangeMin() is fine as-is, because 0 is a sensible (and conservatively correct) minimum.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135572/new/
https://reviews.llvm.org/D135572
More information about the llvm-commits
mailing list