HomePhabricator

[InstCombine] Allow fptrunc (fpext X)) to be reduced to a single fpext/ftrunc

Authored by craig.topper on Mar 2 2018, 10:16 AM.

Description

[InstCombine] Allow fptrunc (fpext X)) to be reduced to a single fpext/ftrunc

If we are only truncating bits from the extend we should be able to just use a smaller extend.

If we are truncating more than the extend we should be able to just use a fptrunc since the presense of the fpextend shouldn't affect rounding.

Differential Revision: https://reviews.llvm.org/D43970

llvm-svn: 326595