]> granicus.if.org Git - llvm/commit
Pull fptrunc's upwards through selects when one of the select's selectands was a...
authorOwen Anderson <resistor@mac.com>
Thu, 3 Oct 2013 21:08:05 +0000 (21:08 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 3 Oct 2013 21:08:05 +0000 (21:08 +0000)
commit03e84c9df91cbc1fe0219a51109e260cacdfd2b7
tree08559633fe45071ebaa3d690c2afb195c24ff347
parente5830c4e2603ab36f08911ff6bb117638ae529c7
Pull fptrunc's upwards through selects when one of the select's selectands was a constant.  This has a number of benefits, including producing small immediates (easier to materialize, smaller constant pools) as well as being more likely to allow the fptrunc to fuse with a preceding instruction (truncating selects are unusual).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191929 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCasts.cpp
test/Transforms/InstCombine/fpcast.ll