1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Change logic in StackMaps::recordStackMapOpers to use the isInt<32>

predicate instead of bitwise operations.

This is not a functional change.

llvm-svn: 221209
This commit is contained in:
Sanjoy Das 2014-11-04 00:06:57 +00:00
parent 5a78b496e9
commit f94294baf2

View File

@ -220,8 +220,7 @@ void StackMaps::recordStackMapOpers(const MachineInstr &MI, uint64_t ID,
I != E; ++I) {
// Constants are encoded as sign-extended integers.
// -1 is directly encoded as .long 0xFFFFFFFF with no constant pool.
if (I->LocType == Location::Constant &&
((I->Offset + (int64_t(1)<<31)) >> 32) != 0) {
if (I->LocType == Location::Constant && !isInt<32>(I->Offset)) {
I->LocType = Location::ConstantIndex;
auto Result = ConstPool.insert(std::make_pair(I->Offset, I->Offset));
I->Offset = Result.first - ConstPool.begin();