diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2014-11-04 00:06:57 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2014-11-04 00:06:57 +0000 |
commit | 429c9cae09089becc2df489d2eff4b62a295f0c8 (patch) | |
tree | 8963edab0d474fca819e8e37bb455e3019f8196a /llvm/lib/CodeGen/StackMaps.cpp | |
parent | 11533184d70bfe46a0cdf375cf7b3765d41347d1 (diff) | |
download | bcm5719-llvm-429c9cae09089becc2df489d2eff4b62a295f0c8.tar.gz bcm5719-llvm-429c9cae09089becc2df489d2eff4b62a295f0c8.zip |
Change logic in StackMaps::recordStackMapOpers to use the isInt<32>
predicate instead of bitwise operations.
This is not a functional change.
llvm-svn: 221209
Diffstat (limited to 'llvm/lib/CodeGen/StackMaps.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackMaps.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/StackMaps.cpp b/llvm/lib/CodeGen/StackMaps.cpp index a32a7c150c4..967cf751f36 100644 --- a/llvm/lib/CodeGen/StackMaps.cpp +++ b/llvm/lib/CodeGen/StackMaps.cpp @@ -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(); |