[llvm-commits] [llvm] r44981 - in /llvm/trunk: lib/Transforms/Scalar/CodeGenPrepare.cpp test/CodeGen/X86/opt-ext-uses.ll

Nick Lewycky nicholas at mxc.ca
Wed Dec 12 20:26:46 PST 2007


Evan Cheng wrote:
> @@ -929,6 +929,10 @@
>    if (Src->hasOneUse())
>      return false;
>  
> +  // Only do this xform is truncating is free.

Should read ...xform if* truncating...

> +  if (!TLI->isTruncateFree(I->getType(), Src->getType()))
> +    return false;
> +
>    // Only safe to perform the optimization if the source is also defined in
>    // this block.
>    if (!isa<Instruction>(Src) || DefBB != cast<Instruction>(Src)->getParent())




More information about the llvm-commits mailing list