[PATCH] D44909: [DAGCombine] (float)((int) f) --> ftrunc (PR36617)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 26 17:25:56 PDT 2018
spatel added a subscriber: dmgreen.
spatel added a comment.
In https://reviews.llvm.org/D44909#1048805, @scanon wrote:
> Two questions, to which I do not know the answer:
>
> (a) Are the semantics of ISD::FP_TO_[US]INT for out-of-range values specified anywhere? The do not seem to be, but maybe I'm just missing it.
No, I don't see anything either. We just have:
/// FP_TO_[US]INT - Convert a floating point value to a signed or unsigned
/// integer.
I was assuming these nodes follow the same rules as the IR instructions since they are mapped 1-to-1 in SelectionDAGBuilder::visitFPToSI() etc.
> (b) Are there test cases that make sure this transform is *not* applied for armv7 and x86 -sse4.1?
I don't see coverage for armv7, but I may be overlooking it (cc @dmgreen). For x86, I also don't see any test of the roundtrip. I'll add a RUN line to the ftrunc.ll test file.
https://reviews.llvm.org/D44909
More information about the llvm-commits
mailing list