[PATCH] D40591: [SelectionDAG][X86] Teach promotion legalization for fp_to_sint/fp_to_uint to insert an assertsext/assertzext based on the original type

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 12:21:19 PST 2017


RKSimon added a comment.

Just to double check - are we happy with the undefined behaviour here?

I'm wondering if out of range float2int could be a problem (e.g. f32 -> i8, but with a value of -512.0f) - yes its UB but does assertsext expect to still guarantee the sign/zero bits? I don't think so but wanted to be sure.


https://reviews.llvm.org/D40591





More information about the llvm-commits mailing list