[PATCH] SelectionDAG: fold (fp_to_u/sint (u/sint_to_fp val)) when possible

Fiona Glaser fglaser at apple.com
Mon Feb 9 14:35:07 PST 2015


> 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?

> 
> 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.

Done the other parts.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: floatcvtfold.diff
Type: application/octet-stream
Size: 11098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150209/39b9ec35/attachment.obj>


More information about the llvm-commits mailing list