[llvm-commits] [PATCH] Teach DAG combine to fold (trunc (fptoXi x)) to smaller (fptoXi x)

Michael Liao michael.liao at intel.com
Tue Oct 16 11:27:32 PDT 2012


Hi

Here is the patch teaching DAG combine to fold (trunc (fptoXi x)) to
smaller (fptoXi x). This trick is to tell backend the exact significant
bits to be preserved after FP conversion. As some backend has costy f32
to u32 conversion, f32 -> u32 -> u8 should be simplified as f32 -> u8
and mapped onto f32 -> i32 in code generation finally.

Thanks for your review.

Yours
- Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-DAG-combining-from-(trunc-(fptoXi-x))-to-(fptoXi-x).patch
Type: text/x-patch
Size: 3682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121016/efb4029b/attachment.bin>


More information about the llvm-commits mailing list