mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Revert the last patch as it violates the conditions of sext/zext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35068 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2b7d7b57ae
commit
4fd8606791
@ -921,8 +921,6 @@ APInt &APInt::trunc(uint32_t width) {
|
|||||||
|
|
||||||
// Sign extend to a new width.
|
// Sign extend to a new width.
|
||||||
APInt &APInt::sext(uint32_t width) {
|
APInt &APInt::sext(uint32_t width) {
|
||||||
if (width == BitWidth)
|
|
||||||
return *this;
|
|
||||||
assert(width > BitWidth && "Invalid APInt SignExtend request");
|
assert(width > BitWidth && "Invalid APInt SignExtend request");
|
||||||
assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
|
assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
|
||||||
// If the sign bit isn't set, this is the same as zext.
|
// If the sign bit isn't set, this is the same as zext.
|
||||||
@ -971,8 +969,6 @@ APInt &APInt::sext(uint32_t width) {
|
|||||||
|
|
||||||
// Zero extend to a new width.
|
// Zero extend to a new width.
|
||||||
APInt &APInt::zext(uint32_t width) {
|
APInt &APInt::zext(uint32_t width) {
|
||||||
if (width == BitWidth)
|
|
||||||
return *this;
|
|
||||||
assert(width > BitWidth && "Invalid APInt ZeroExtend request");
|
assert(width > BitWidth && "Invalid APInt ZeroExtend request");
|
||||||
assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
|
assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
|
||||||
uint32_t wordsBefore = getNumWords();
|
uint32_t wordsBefore = getNumWords();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user