[PATCH] D142093: [InstCombine] trunc (fptoui|fptosi)
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 03:22:37 PST 2023
samparker added a comment.
> it should be sufficient to have the intermediate integer width be one more than the minimum required type width, so "%i = fptoui half %x to i17".
IIUC, for half fptoui we don't need an i17, as an i16 can hold the max normal value (65504). I can add support in for float conversions though, as this logic is only triggering for simple types, I assume the only conversion that will work is float -> i128 -> i64.
I would really appreciate if someone could help me understand the complication with fptosi w.r.t checking for poison/undef too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142093/new/
https://reviews.llvm.org/D142093
More information about the llvm-commits
mailing list