[PATCH] SelectionDAG: fold (fp_to_u/sint (u/sint_to_fp val)) when possible
Quentin Colombet
qcolombet at apple.com
Mon Feb 9 14:50:24 PST 2015
On Feb 9, 2015, at 2:35 PM, Fiona Glaser <fglaser at apple.com> wrote:
>
>> On Feb 9, 2015, at 2:26 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>>
>>
>> For the instcombine part:
>>
>> + if (FITy->getScalarSizeInBits() > SrcTy->getScalarSizeInBits())
>> Shouldn’t we have some checks on the DstTy as well?
>
> Isn’t FITy the DstTy?
Right.
>
>>
>> e.g., what happens with:
>> sitofp i32 to float
>> fptoui float to i8
>>
>> We shouldn’t be able to simplify that with a s/zext, do we… Or maybe we can because it is undef??
>
> I don’t know :< Not a language expert here.
Nevermind me, I messed up that FITy was the destination type. This cannot happen.
Regarding the patch itself, the clean-up that Sanjay suggested for the test should land in a separate patch.
Q.
>
> Done the other parts.
>
> <floatcvtfold.diff>
More information about the llvm-commits
mailing list