[PATCH] Teach ConstantFolding about address space pointer sizes
Matt Arsenault
Matthew.Arsenault at amd.com
Fri Aug 16 11:26:15 PDT 2013
================
Comment at: lib/Analysis/ConstantFolding.cpp:1000
@@ -991,1 +999,3 @@
+ }
+ }
----------------
Eli Friedman wrote:
> Isn't this missing some sort of address-space check? You're building a bitcast between two pointer types.
This checks the sizes, and for now when this folds into a bitcast that will be allowed. The variables here are misnamed, the "DestPtrSize" is really the middle int size for the ptrtoint / inttoptr pair. I'll fix that
Actually there is a case that doesn't work here.
http://llvm-reviews.chandlerc.com/D1199
More information about the llvm-commits
mailing list