[PATCH] D67105: [TargetLowering] Fix another potential FPE in expandFP_TO_UINT
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 08:29:43 PDT 2019
uweigand added a comment.
Ah, good point. Currently, constrained floating-point intrinsics are never constant-folded. In general, this would likely be wrong anyway, since we might not know the current rounding mode that applies.
However, in the specific case of a fptoui, we don't depend on the current rounding mode (it's always round-to-zero even for the constrained case), so we actually could constant fold those in the cases where we the result is in range.
@kpn -- the test cases you added specifically verify that constrained fptoui does **not** constant-fold but does the runtime conversion. Should those be changed to use nonconstant arguments then?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67105/new/
https://reviews.llvm.org/D67105
More information about the llvm-commits
mailing list