Skip to content

Commit

Permalink
Change logic in StackMaps::recordStackMapOpers to use the isInt<32>
Browse files Browse the repository at this point in the history
predicate instead of bitwise operations.

This is not a functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221209 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
sanjoy committed Nov 4, 2014
1 parent abe09fc commit 60c2a98
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/CodeGen/StackMaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 60c2a98

Please sign in to comment.