[PATCH] Cleanup handling of constant function casts

Matt Arsenault Matthew.Arsenault at amd.com
Tue Sep 17 11:24:20 PDT 2013



================
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.


http://llvm-reviews.chandlerc.com/D1684



More information about the llvm-commits mailing list