Respect address space sizes in isEliminableCastPair.
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 30 Jul 2013 22:27:10 +0000 (22:27 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 30 Jul 2013 22:27:10 +0000 (22:27 +0000)
commit130e0ef6f4688d90fbf0cb9276b59f1d253f35c0
tree00dbad9845d4b3e0da6aab5cc2096ba605fe798d
parentb4019ae13c4a05d9cb7c4f2ce9b1ae89ea094d45
Respect address space sizes in isEliminableCastPair.

This avoids constant folding bitcast/ptrtoint/inttoptr combinations
that have illegal bitcasts between differently sized address spaces.

llvm-svn: 187455
llvm/lib/IR/ConstantFold.cpp
llvm/lib/IR/Instructions.cpp
llvm/unittests/IR/InstructionsTest.cpp