[llvm-commits] [llvm] r150425 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCompares.cpp test/Transforms/InstCombine/2012-02-13-FCmp.ll
Duncan Sands
baldrick at free.fr
Tue Feb 14 00:26:31 PST 2012
Hi Devang,
> Check against umin while converting fcmp into an icmp.
> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon Feb 13 17:05:18 2012
> @@ -2714,6 +2714,17 @@
> return ReplaceInstUsesWith(I, ConstantInt::getTrue(I.getContext()));
> return ReplaceInstUsesWith(I, ConstantInt::getFalse(I.getContext()));
> }
> + } else {
> + // See if the RHS value is< UnsignedMin.
> + APFloat SMin(RHS.getSemantics(), APFloat::fcZero, false);
maybe the variable should be called UMin rather than SMin?
> + SMin.convertFromAPInt(APInt::getMinValue(IntWidth), true,
> + APFloat::rmNearestTiesToEven);
> + if (SMin.compare(RHS) == APFloat::cmpGreaterThan) { // umin> 12312.0
Not sure what the "// umin> 12312.0" comment is trying to say... I would
have expected something like "umin > -1.0".
Ciao, Duncan.
More information about the llvm-commits
mailing list