You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Emit LLVM range metadata for call instructions #50157
Adding !range to a call instruction to communicate the possible range of the return value (analogous to !range on loads) already works in LLVM today, we just need to use it. Fixes the test case in #49572 and we already have the information anyway, so it's a cheap and easy win. cc @eddyb
@nox noticed that this can't actually help with NonZeroU32::get (#49572) because the return type there is plain old u32 🤦♂️ But it still helps functions that return fieldless enums, or more generally enums that get packed into a single scalar (but not scalar pairs).
Activity
nox commentedon Apr 22, 2018
I'll try to implement that.
hanna-kruppe commentedon Apr 22, 2018
@nox noticed that this can't actually help with
NonZeroU32::get(#49572) because the return type there is plain oldu32🤦♂️ But it still helps functions that return fieldless enums, or more generally enums that get packed into a single scalar (but not scalar pairs).Auto merge of #50164 - nox:rval-range-metadata, r=<try>
Auto merge of #50164 - nox:rval-range-metadata, r=eddyb