[PATCH] Cleanup handling of constant function casts

Eli Friedman eli.friedman at gmail.com
Tue Sep 17 13:42:00 PDT 2013


On Tue, Sep 17, 2013 at 11:24 AM, Matt Arsenault
<Matthew.Arsenault at amd.com>wrote:

>
>
> ================
> Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:1081
> @@ -1080,3 +1065,2 @@
> -      return false;
>    }
>
> ----------------
> Eli Friedman wrote:
> > Is just deleting this code really right?  Consider if a function is
> declared as "intptr_t f(void)" and defined as "void* f(void)".  (I know
> this isn't tested well...)
> This doesn't happen since the change I mentioned. Pointer<->integer
> doesn't pass the CastInst::isBitCastable check.
>
>
> Oh, right.

LGTM, then.

-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130917/08eea7a1/attachment.html>


More information about the llvm-commits mailing list