[PATCH] Avoid FP conversions when calling bitcasted / alias functions

Eli Friedman eli.friedman at gmail.com
Fri Jul 26 17:04:36 PDT 2013


Something weird happened to the diff.

Does it really make sense to zext and/or trunc the input here?

While you're at it, you might as well get rid of CastInst::isCastable,
because it isn't used anywhere else.

-Eli


On Fri, Jul 26, 2013 at 4:54 PM, Matt Arsenault
<Matthew.Arsenault at amd.com> wrote:
>   Rewrite to use new cast helper functions. These will try to use a bitcast if the sizes are equal, and use trunc/zext/sext/prttoint/inttoptr if they are not. It will not use the floating point casts.
>
> Hi baldrick,
>
> http://llvm-reviews.chandlerc.com/D1058
>
> CHANGE SINCE LAST DIFF
>   http://llvm-reviews.chandlerc.com/D1058?vs=2601&id=3044#toc
>
> Files:
>   include/llvm/IR/InstrTypes.h
>   lib/IR/Instructions.cpp
>   lib/Transforms/InstCombine/InstCombineCalls.cpp
>   test/Transforms/InstCombine/bitcast-alias-function.ll
>   unittests/IR/InstructionsTest.cpp



More information about the llvm-commits mailing list