[PATCH] Don't constant fold bitcast/ptrtoint/inttoptr combinations without datalayout
Matt Arsenault
Matthew.Arsenault at amd.com
Mon Jul 22 20:59:48 PDT 2013
Keep using 64-bit maximum pointer size for the middle type when constant folding cast pairs.
This should only change the inttoptr, ptrtoint case. Only assuming the middle pointer size is 64-bits doesn't allow an illegal address space bitcast to be removed, and was the original behavior.
This avoids the need to change the inline_constprop test in the other patch. I thought the constant folding that InlineCost was doing would change when the DataLayout is available, but it does not. It still goes through the same layers where the DataLayout is not available.
Hi eli.friedman,
http://llvm-reviews.chandlerc.com/D1157
CHANGE SINCE LAST DIFF
http://llvm-reviews.chandlerc.com/D1157?vs=2933&id=2962#toc
Files:
lib/IR/ConstantFold.cpp
lib/IR/Instructions.cpp
test/Transforms/Inline/inline_constprop.ll
unittests/IR/InstructionsTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1157.4.patch
Type: text/x-patch
Size: 9920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130722/c97a4423/attachment.bin>
More information about the llvm-commits
mailing list