aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/TableGen.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-01-28 18:08:26 +0000
committerDan Gohman <gohman@apple.com>2010-01-28 18:08:26 +0000
commit8ca83b4111972f626a3e3f9af41f55718bf68927 (patch)
tree5c8d5afbfe2cb69bf9797f04b76cc986eb61080c /utils/TableGen/TableGen.cpp
parent12ea66a7277240c5b045ed14c140f94d453eea0e (diff)
Remove the folding rule
getelementptr (i8* inttoptr (i64 1 to i8*), i32 -1) to inttoptr (i64 0 to i8*) from the VMCore constant folder. It didn't handle sign-extension properly in the case where the source integer is smaller than a pointer size. And, it relied on an assumption about sizeof(i8). The Analysis constant folder still folds these kinds of things; it has access to TargetData, so it can do them right. Add a testcase which tests that the VMCore constant folder doesn't miscompile this, and that the Analysis folder does fold it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/TableGen.cpp')
0 files changed, 0 insertions, 0 deletions