mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-23 13:02:52 +02:00
[APInt] In slt/sgt(uint64_t), only call getMinSignedBits if the APInt is not a single word.
llvm-svn: 300824
This commit is contained in:
parent
475cc17252
commit
1792ac28fa
@ -1104,7 +1104,8 @@ public:
|
||||
///
|
||||
/// \returns true if *this < RHS when considered signed.
|
||||
bool slt(int64_t RHS) const {
|
||||
return getMinSignedBits() > 64 ? isNegative() : getSExtValue() < RHS;
|
||||
return (!isSingleWord() && getMinSignedBits() > 64) ? isNegative()
|
||||
: getSExtValue() < RHS;
|
||||
}
|
||||
|
||||
/// \brief Unsigned less or equal comparison
|
||||
@ -1173,7 +1174,8 @@ public:
|
||||
///
|
||||
/// \returns true if *this > RHS when considered signed.
|
||||
bool sgt(int64_t RHS) const {
|
||||
return getMinSignedBits() > 64 ? !isNegative() : getSExtValue() > RHS;
|
||||
return (!isSingleWord() && getMinSignedBits() > 64) ? !isNegative()
|
||||
: getSExtValue() > RHS;
|
||||
}
|
||||
|
||||
/// \brief Unsigned greater or equal comparison
|
||||
|
Loading…
Reference in New Issue
Block a user